Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.12.1
v2.13.0
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ai.reveng</groupId>
<artifactId>sdk</artifactId>
<version>2.12.1</version>
<version>2.13.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:2.12.1"
implementation "ai.reveng:sdk:2.13.0"
}
```

Expand Down Expand Up @@ -381,6 +381,7 @@ Class | Method | HTTP request | Description
- [FunctionRenameMap](docs/FunctionRenameMap.md)
- [FunctionSearchResponse](docs/FunctionSearchResponse.md)
- [FunctionSearchResult](docs/FunctionSearchResult.md)
- [FunctionSourceType](docs/FunctionSourceType.md)
- [FunctionString](docs/FunctionString.md)
- [FunctionStringsResponse](docs/FunctionStringsResponse.md)
- [FunctionTaskResponse](docs/FunctionTaskResponse.md)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'ai.reveng'
version = '2.12.1'
version = '2.13.0'



Expand Down Expand Up @@ -171,7 +171,7 @@ mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates("ai.reveng", "sdk", "2.12.1")
coordinates("ai.reveng", "sdk", "2.13.0")

pom {
name = "sdk"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ai.reveng",
name := "sdk",
version := "2.12.1",
version := "2.13.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
3 changes: 2 additions & 1 deletion docs/FunctionNameHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
|**historyId** | **Integer** | The ID of the history record | |
|**changeMadeBy** | **String** | The user who made the change | |
|**functionName** | **String** | The name of the function | |
|**mangledName** | **String** | The mangled name of the function | |
|**isDebug** | **Boolean** | Whether the function is debugged | |
|**sourceType** | **String** | The source type of the function | |
|**sourceType** | **FunctionSourceType** | The source type of the function | |
|**createdAt** | **String** | The timestamp when the function name was created | |


Expand Down
19 changes: 19 additions & 0 deletions docs/FunctionSourceType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


# FunctionSourceType

## Enum


* `SYSTEM` (value: `"SYSTEM"`)

* `USER` (value: `"USER"`)

* `EXTERNAL` (value: `"EXTERNAL"`)

* `AUTO_UNSTRIP` (value: `"AUTO_UNSTRIP"`)

* `AI_UNSTRIP` (value: `"AI_UNSTRIP"`)



2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>sdk</name>
<version>2.12.1</version>
<version>2.13.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/2.12.1/java");
setUserAgent("OpenAPI-Generator/2.13.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "2.12.1";
public static final String VERSION = "2.13.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
47 changes: 38 additions & 9 deletions src/main/java/ai/reveng/model/FunctionNameHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.util.Objects;
import java.util.Locale;
import ai.reveng.model.FunctionSourceType;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -66,6 +67,11 @@ public class FunctionNameHistory {
@javax.annotation.Nonnull
private String functionName;

public static final String SERIALIZED_NAME_MANGLED_NAME = "mangled_name";
@SerializedName(SERIALIZED_NAME_MANGLED_NAME)
@javax.annotation.Nonnull
private String mangledName;

public static final String SERIALIZED_NAME_IS_DEBUG = "is_debug";
@SerializedName(SERIALIZED_NAME_IS_DEBUG)
@javax.annotation.Nonnull
Expand All @@ -74,7 +80,7 @@ public class FunctionNameHistory {
public static final String SERIALIZED_NAME_SOURCE_TYPE = "source_type";
@SerializedName(SERIALIZED_NAME_SOURCE_TYPE)
@javax.annotation.Nonnull
private String sourceType;
private FunctionSourceType sourceType;

public static final String SERIALIZED_NAME_CREATED_AT = "created_at";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
Expand Down Expand Up @@ -141,6 +147,25 @@ public void setFunctionName(@javax.annotation.Nonnull String functionName) {
}


public FunctionNameHistory mangledName(@javax.annotation.Nonnull String mangledName) {
this.mangledName = mangledName;
return this;
}

/**
* The mangled name of the function
* @return mangledName
*/
@javax.annotation.Nonnull
public String getMangledName() {
return mangledName;
}

public void setMangledName(@javax.annotation.Nonnull String mangledName) {
this.mangledName = mangledName;
}


public FunctionNameHistory isDebug(@javax.annotation.Nonnull Boolean isDebug) {
this.isDebug = isDebug;
return this;
Expand All @@ -160,7 +185,7 @@ public void setIsDebug(@javax.annotation.Nonnull Boolean isDebug) {
}


public FunctionNameHistory sourceType(@javax.annotation.Nonnull String sourceType) {
public FunctionNameHistory sourceType(@javax.annotation.Nonnull FunctionSourceType sourceType) {
this.sourceType = sourceType;
return this;
}
Expand All @@ -170,11 +195,11 @@ public FunctionNameHistory sourceType(@javax.annotation.Nonnull String sourceTyp
* @return sourceType
*/
@javax.annotation.Nonnull
public String getSourceType() {
public FunctionSourceType getSourceType() {
return sourceType;
}

public void setSourceType(@javax.annotation.Nonnull String sourceType) {
public void setSourceType(@javax.annotation.Nonnull FunctionSourceType sourceType) {
this.sourceType = sourceType;
}

Expand Down Expand Up @@ -255,6 +280,7 @@ public boolean equals(Object o) {
return Objects.equals(this.historyId, functionNameHistory.historyId) &&
Objects.equals(this.changeMadeBy, functionNameHistory.changeMadeBy) &&
Objects.equals(this.functionName, functionNameHistory.functionName) &&
Objects.equals(this.mangledName, functionNameHistory.mangledName) &&
Objects.equals(this.isDebug, functionNameHistory.isDebug) &&
Objects.equals(this.sourceType, functionNameHistory.sourceType) &&
Objects.equals(this.createdAt, functionNameHistory.createdAt)&&
Expand All @@ -263,7 +289,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(historyId, changeMadeBy, functionName, isDebug, sourceType, createdAt, additionalProperties);
return Objects.hash(historyId, changeMadeBy, functionName, mangledName, isDebug, sourceType, createdAt, additionalProperties);
}

@Override
Expand All @@ -273,6 +299,7 @@ public String toString() {
sb.append(" historyId: ").append(toIndentedString(historyId)).append("\n");
sb.append(" changeMadeBy: ").append(toIndentedString(changeMadeBy)).append("\n");
sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n");
sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n");
sb.append(" isDebug: ").append(toIndentedString(isDebug)).append("\n");
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
Expand All @@ -298,10 +325,10 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"));
openapiFields = new HashSet<String>(Arrays.asList("history_id", "change_made_by", "function_name", "mangled_name", "is_debug", "source_type", "created_at"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"));
openapiRequiredFields = new HashSet<String>(Arrays.asList("history_id", "change_made_by", "function_name", "mangled_name", "is_debug", "source_type", "created_at"));
}

/**
Expand Down Expand Up @@ -330,9 +357,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (!jsonObj.get("function_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("function_name").toString()));
}
if (!jsonObj.get("source_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `source_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_type").toString()));
if (!jsonObj.get("mangled_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mangled_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mangled_name").toString()));
}
// validate the required field `source_type`
FunctionSourceType.validateJsonElement(jsonObj.get("source_type"));
if (!jsonObj.get("created_at").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `created_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_at").toString()));
}
Expand Down
85 changes: 85 additions & 0 deletions src/main/java/ai/reveng/model/FunctionSourceType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* RevEng.AI API
* RevEng.AI is Similarity Search Engine for executable binaries
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package ai.reveng.model;

import java.util.Objects;
import java.util.Locale;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import java.util.Locale;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
* Gets or Sets FunctionSourceType
*/
@JsonAdapter(FunctionSourceType.Adapter.class)
public enum FunctionSourceType {

SYSTEM("SYSTEM"),

USER("USER"),

EXTERNAL("EXTERNAL"),

AUTO_UNSTRIP("AUTO_UNSTRIP"),

AI_UNSTRIP("AI_UNSTRIP");

private String value;

FunctionSourceType(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static FunctionSourceType fromValue(String value) {
for (FunctionSourceType b : FunctionSourceType.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<FunctionSourceType> {
@Override
public void write(final JsonWriter jsonWriter, final FunctionSourceType enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public FunctionSourceType read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return FunctionSourceType.fromValue(value);
}
}

public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
FunctionSourceType.fromValue(value);
}
}

9 changes: 9 additions & 0 deletions src/test/java/ai/reveng/model/FunctionNameHistoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

package ai.reveng.model;

import ai.reveng.model.FunctionSourceType;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -60,6 +61,14 @@ public void functionNameTest() {
// TODO: test functionName
}

/**
* Test the property 'mangledName'
*/
@Test
public void mangledNameTest() {
// TODO: test mangledName
}

/**
* Test the property 'isDebug'
*/
Expand Down
31 changes: 31 additions & 0 deletions src/test/java/ai/reveng/model/FunctionSourceTypeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* RevEng.AI API
* RevEng.AI is Similarity Search Engine for executable binaries
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package ai.reveng.model;

import com.google.gson.annotations.SerializedName;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
* Model tests for FunctionSourceType
*/
public class FunctionSourceTypeTest {
/**
* Model tests for FunctionSourceType
*/
@Test
public void testFunctionSourceType() {
// TODO: test FunctionSourceType
}

}