diff --git a/.sdk-version b/.sdk-version
index ba6ff6b..c757c98 100644
--- a/.sdk-version
+++ b/.sdk-version
@@ -1 +1 @@
-v2.12.1
+v2.13.0
diff --git a/README.md b/README.md
index 7d6dbaf..b0e8f12 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Add this dependency to your project's POM:
ai.reveng
sdk
- 2.12.1
+ 2.13.0
compile
```
@@ -31,7 +31,7 @@ repositories {
}
dependencies {
- implementation "ai.reveng:sdk:2.12.1"
+ implementation "ai.reveng:sdk:2.13.0"
}
```
@@ -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)
diff --git a/build.gradle b/build.gradle
index 23f8305..88beb8d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
group = 'ai.reveng'
-version = '2.12.1'
+version = '2.13.0'
@@ -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"
diff --git a/build.sbt b/build.sbt
index 5e29ec2..62192f0 100644
--- a/build.sbt
+++ b/build.sbt
@@ -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"),
diff --git a/docs/FunctionNameHistory.md b/docs/FunctionNameHistory.md
index a36464e..f3b017c 100644
--- a/docs/FunctionNameHistory.md
+++ b/docs/FunctionNameHistory.md
@@ -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 | |
diff --git a/docs/FunctionSourceType.md b/docs/FunctionSourceType.md
new file mode 100644
index 0000000..c6363b2
--- /dev/null
+++ b/docs/FunctionSourceType.md
@@ -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"`)
+
+
+
diff --git a/pom.xml b/pom.xml
index 0693eca..8d467d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
sdk
jar
sdk
- 2.12.1
+ 2.13.0
https://github.com/RevEngAI/sdk-java
Java SDK for the RevEng.AI API
diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java
index 8deacc5..16f1d2c 100644
--- a/src/main/java/ai/reveng/invoker/ApiClient.java
+++ b/src/main/java/ai/reveng/invoker/ApiClient.java
@@ -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();
}
diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java
index 4d5e286..d634ae8 100644
--- a/src/main/java/ai/reveng/invoker/Configuration.java
+++ b/src/main/java/ai/reveng/invoker/Configuration.java
@@ -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 defaultApiClient = new AtomicReference<>();
private static volatile Supplier apiClientFactory = ApiClient::new;
diff --git a/src/main/java/ai/reveng/model/FunctionNameHistory.java b/src/main/java/ai/reveng/model/FunctionNameHistory.java
index 7f56431..400dd9f 100644
--- a/src/main/java/ai/reveng/model/FunctionNameHistory.java
+++ b/src/main/java/ai/reveng/model/FunctionNameHistory.java
@@ -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;
@@ -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
@@ -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)
@@ -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;
@@ -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;
}
@@ -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;
}
@@ -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)&&
@@ -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
@@ -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");
@@ -298,10 +325,10 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"));
+ openapiFields = new HashSet(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(Arrays.asList("history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"));
+ openapiRequiredFields = new HashSet(Arrays.asList("history_id", "change_made_by", "function_name", "mangled_name", "is_debug", "source_type", "created_at"));
}
/**
@@ -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()));
}
diff --git a/src/main/java/ai/reveng/model/FunctionSourceType.java b/src/main/java/ai/reveng/model/FunctionSourceType.java
new file mode 100644
index 0000000..f1df731
--- /dev/null
+++ b/src/main/java/ai/reveng/model/FunctionSourceType.java
@@ -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 {
+ @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);
+ }
+}
+
diff --git a/src/test/java/ai/reveng/model/FunctionNameHistoryTest.java b/src/test/java/ai/reveng/model/FunctionNameHistoryTest.java
index c08f044..d52a413 100644
--- a/src/test/java/ai/reveng/model/FunctionNameHistoryTest.java
+++ b/src/test/java/ai/reveng/model/FunctionNameHistoryTest.java
@@ -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;
@@ -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'
*/
diff --git a/src/test/java/ai/reveng/model/FunctionSourceTypeTest.java b/src/test/java/ai/reveng/model/FunctionSourceTypeTest.java
new file mode 100644
index 0000000..fefd9e9
--- /dev/null
+++ b/src/test/java/ai/reveng/model/FunctionSourceTypeTest.java
@@ -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
+ }
+
+}