diff --git a/.sdk-version b/.sdk-version index 3bab994..b9ecbb2 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.93.0 +v3.93.1 diff --git a/README.md b/README.md index 030ed16..f0be2ee 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.93.0 + 3.93.1 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.93.0" + implementation "ai.reveng:sdk:3.93.1" } ``` @@ -534,7 +534,6 @@ Class | Method | HTTP request | Description - [NameConfidence](docs/NameConfidence.md) - [NameSourceType](docs/NameSourceType.md) - [NetworkActivity](docs/NetworkActivity.md) - - [NumericAddr](docs/NumericAddr.md) - [Order](docs/Order.md) - [PDBDebugModel](docs/PDBDebugModel.md) - [PEModel](docs/PEModel.md) diff --git a/build.gradle b/build.gradle index b8adfe7..3479c73 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.93.0' +version = '3.93.1' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.93.0") + coordinates("ai.reveng", "sdk", "3.93.1") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index d47d69d..dd28a3f 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.93.0", + version := "3.93.1", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AIDecompInverseFunctionMapItem.md b/docs/AIDecompInverseFunctionMapItem.md index a0f35b9..7cade37 100644 --- a/docs/AIDecompInverseFunctionMapItem.md +++ b/docs/AIDecompInverseFunctionMapItem.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**addr** | **NumericAddr** | | | +|**addr** | **Long** | | | |**isExternal** | **Boolean** | | | |**name** | **String** | | | diff --git a/docs/AIDecompInverseStringMapItem.md b/docs/AIDecompInverseStringMapItem.md index c9e41c0..b8d894c 100644 --- a/docs/AIDecompInverseStringMapItem.md +++ b/docs/AIDecompInverseStringMapItem.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**addr** | **NumericAddr** | | | +|**addr** | **Long** | | | |**string** | **String** | | | diff --git a/docs/NumericAddr.md b/docs/NumericAddr.md deleted file mode 100644 index efdf72b..0000000 --- a/docs/NumericAddr.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# NumericAddr - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**value** | **Long** | | | - - - diff --git a/pom.xml b/pom.xml index f4cc859..f8190f6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.93.0 + 3.93.1 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 8d12ce3..131e4a3 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/3.93.0/java"); + setUserAgent("OpenAPI-Generator/3.93.1/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 b3020f4..3f80da4 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 = "3.93.0"; + public static final String VERSION = "3.93.1"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index f8ccb79..e1cc629 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -393,7 +393,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NameConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NameSourceType.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NetworkActivity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NumericAddr.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PDBDebugModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PEModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PaginationModel.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/AIDecompInverseFunctionMapItem.java b/src/main/java/ai/reveng/model/AIDecompInverseFunctionMapItem.java index 5ca4821..23a87dc 100644 --- a/src/main/java/ai/reveng/model/AIDecompInverseFunctionMapItem.java +++ b/src/main/java/ai/reveng/model/AIDecompInverseFunctionMapItem.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Locale; -import ai.reveng.model.NumericAddr; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -54,8 +53,8 @@ public class AIDecompInverseFunctionMapItem { public static final String SERIALIZED_NAME_ADDR = "addr"; @SerializedName(SERIALIZED_NAME_ADDR) - @javax.annotation.Nonnull - private NumericAddr addr; + @javax.annotation.Nullable + private Long addr; public static final String SERIALIZED_NAME_IS_EXTERNAL = "is_external"; @SerializedName(SERIALIZED_NAME_IS_EXTERNAL) @@ -70,7 +69,7 @@ public class AIDecompInverseFunctionMapItem { public AIDecompInverseFunctionMapItem() { } - public AIDecompInverseFunctionMapItem addr(@javax.annotation.Nonnull NumericAddr addr) { + public AIDecompInverseFunctionMapItem addr(@javax.annotation.Nullable Long addr) { this.addr = addr; return this; } @@ -79,12 +78,12 @@ public AIDecompInverseFunctionMapItem addr(@javax.annotation.Nonnull NumericAddr * Get addr * @return addr */ - @javax.annotation.Nonnull - public NumericAddr getAddr() { + @javax.annotation.Nullable + public Long getAddr() { return addr; } - public void setAddr(@javax.annotation.Nonnull NumericAddr addr) { + public void setAddr(@javax.annotation.Nullable Long addr) { this.addr = addr; } diff --git a/src/main/java/ai/reveng/model/AIDecompInverseStringMapItem.java b/src/main/java/ai/reveng/model/AIDecompInverseStringMapItem.java index 88e5796..2a82b65 100644 --- a/src/main/java/ai/reveng/model/AIDecompInverseStringMapItem.java +++ b/src/main/java/ai/reveng/model/AIDecompInverseStringMapItem.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Locale; -import ai.reveng.model.NumericAddr; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -54,8 +53,8 @@ public class AIDecompInverseStringMapItem { public static final String SERIALIZED_NAME_ADDR = "addr"; @SerializedName(SERIALIZED_NAME_ADDR) - @javax.annotation.Nonnull - private NumericAddr addr; + @javax.annotation.Nullable + private Long addr; public static final String SERIALIZED_NAME_STRING = "string"; @SerializedName(SERIALIZED_NAME_STRING) @@ -65,7 +64,7 @@ public class AIDecompInverseStringMapItem { public AIDecompInverseStringMapItem() { } - public AIDecompInverseStringMapItem addr(@javax.annotation.Nonnull NumericAddr addr) { + public AIDecompInverseStringMapItem addr(@javax.annotation.Nullable Long addr) { this.addr = addr; return this; } @@ -74,12 +73,12 @@ public AIDecompInverseStringMapItem addr(@javax.annotation.Nonnull NumericAddr a * Get addr * @return addr */ - @javax.annotation.Nonnull - public NumericAddr getAddr() { + @javax.annotation.Nullable + public Long getAddr() { return addr; } - public void setAddr(@javax.annotation.Nonnull NumericAddr addr) { + public void setAddr(@javax.annotation.Nullable Long addr) { this.addr = addr; } diff --git a/src/main/java/ai/reveng/model/NumericAddr.java b/src/main/java/ai/reveng/model/NumericAddr.java deleted file mode 100644 index f586cf4..0000000 --- a/src/main/java/ai/reveng/model/NumericAddr.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - * - * - * - * 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.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import ai.reveng.invoker.JSON; - -/** - * NumericAddr - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NumericAddr { - public static final String SERIALIZED_NAME_VALUE = "Value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private Long value; - - public NumericAddr() { - } - - public NumericAddr value(@javax.annotation.Nullable Long value) { - this.value = value; - return this; - } - - /** - * Get value - * @return value - */ - @javax.annotation.Nullable - public Long getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable Long value) { - this.value = value; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the NumericAddr instance itself - */ - public NumericAddr putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumericAddr numericAddr = (NumericAddr) o; - return Objects.equals(this.value, numericAddr.value)&& - Objects.equals(this.additionalProperties, numericAddr.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(value, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumericAddr {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("Value")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("Value")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NumericAddr - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NumericAddr.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in NumericAddr is not found in the empty JSON string", NumericAddr.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NumericAddr.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NumericAddr.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NumericAddr' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NumericAddr.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NumericAddr value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public NumericAddr read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - NumericAddr instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NumericAddr given an JSON string - * - * @param jsonString JSON string - * @return An instance of NumericAddr - * @throws IOException if the JSON string is invalid with respect to NumericAddr - */ - public static NumericAddr fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NumericAddr.class); - } - - /** - * Convert an instance of NumericAddr to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} -