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.74.0
v2.75.0
4 changes: 2 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.74.0</version>
<version>2.75.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:2.74.0"
implementation "ai.reveng:sdk:2.75.0"
}
```

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.74.0'
version = '2.75.0'



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

coordinates("ai.reveng", "sdk", "2.74.0")
coordinates("ai.reveng", "sdk", "2.75.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.74.0",
version := "2.75.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
13 changes: 13 additions & 0 deletions docs/FunctionListItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,23 @@
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | Function id | |
|**name** | **String** | Name of the function | |
|**nameSourceType** | [**NameSourceTypeEnum**](#NameSourceTypeEnum) | The source (process) the function name came from | |
|**mangledName** | **String** | Mangled name of the function | |
|**vaddr** | **Long** | Function virtual address | |
|**size** | **Integer** | Function size in bytes | |
|**debug** | **Boolean** | Whether the function has debug information | |



## Enum: NameSourceTypeEnum

| Name | Value |
|---- | -----|
| SYSTEM | &quot;SYSTEM&quot; |
| USER | &quot;USER&quot; |
| AUTO_UNSTRIP | &quot;AUTO_UNSTRIP&quot; |
| EXTERNAL | &quot;EXTERNAL&quot; |
| AI_UNSTRIP | &quot;AI_UNSTRIP&quot; |



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.74.0</version>
<version>2.75.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ public okhttp3.Call getCommunitiesAsync(@javax.annotation.Nonnull Integer analys
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
* @deprecated
*/
@Deprecated
public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
Expand Down Expand Up @@ -569,6 +571,7 @@ public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analy
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@Deprecated
@SuppressWarnings("rawtypes")
private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'analysisId' is set
Expand Down Expand Up @@ -596,7 +599,9 @@ private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnul
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
* @deprecated
*/
@Deprecated
public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr) throws ApiException {
ApiResponse<BaseResponseAnalysisFunctions> localVarResp = getFunctionsListWithHttpInfo(analysisId, searchTerm, minVAddr, maxVAddr);
return localVarResp.getData();
Expand All @@ -618,7 +623,9 @@ public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
* @deprecated
*/
@Deprecated
public ApiResponse<BaseResponseAnalysisFunctions> getFunctionsListWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr) throws ApiException {
okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, null);
Type localVarReturnType = new TypeToken<BaseResponseAnalysisFunctions>(){}.getType();
Expand All @@ -642,7 +649,9 @@ public ApiResponse<BaseResponseAnalysisFunctions> getFunctionsListWithHttpInfo(@
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
* @deprecated
*/
@Deprecated
public okhttp3.Call getFunctionsListAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback<BaseResponseAnalysisFunctions> _callback) throws ApiException {

okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, _callback);
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.74.0/java");
setUserAgent("OpenAPI-Generator/2.75.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.74.0";
public static final String VERSION = "2.75.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
95 changes: 92 additions & 3 deletions src/main/java/ai/reveng/model/FunctionListItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,69 @@ public class FunctionListItem {
@javax.annotation.Nonnull
private String name;

/**
* The source (process) the function name came from
*/
@JsonAdapter(NameSourceTypeEnum.Adapter.class)
public enum NameSourceTypeEnum {
SYSTEM("SYSTEM"),

USER("USER"),

AUTO_UNSTRIP("AUTO_UNSTRIP"),

EXTERNAL("EXTERNAL"),

AI_UNSTRIP("AI_UNSTRIP");

private String value;

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

public String getValue() {
return value;
}

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

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

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

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

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

public static final String SERIALIZED_NAME_NAME_SOURCE_TYPE = "name_source_type";
@SerializedName(SERIALIZED_NAME_NAME_SOURCE_TYPE)
@javax.annotation.Nonnull
private NameSourceTypeEnum nameSourceType;

public static final String SERIALIZED_NAME_MANGLED_NAME = "mangled_name";
@SerializedName(SERIALIZED_NAME_MANGLED_NAME)
@javax.annotation.Nonnull
Expand Down Expand Up @@ -122,6 +185,25 @@ public void setName(@javax.annotation.Nonnull String name) {
}


public FunctionListItem nameSourceType(@javax.annotation.Nonnull NameSourceTypeEnum nameSourceType) {
this.nameSourceType = nameSourceType;
return this;
}

/**
* The source (process) the function name came from
* @return nameSourceType
*/
@javax.annotation.Nonnull
public NameSourceTypeEnum getNameSourceType() {
return nameSourceType;
}

public void setNameSourceType(@javax.annotation.Nonnull NameSourceTypeEnum nameSourceType) {
this.nameSourceType = nameSourceType;
}


public FunctionListItem mangledName(@javax.annotation.Nonnull String mangledName) {
this.mangledName = mangledName;
return this;
Expand Down Expand Up @@ -254,6 +336,7 @@ public boolean equals(Object o) {
FunctionListItem functionListItem = (FunctionListItem) o;
return Objects.equals(this.id, functionListItem.id) &&
Objects.equals(this.name, functionListItem.name) &&
Objects.equals(this.nameSourceType, functionListItem.nameSourceType) &&
Objects.equals(this.mangledName, functionListItem.mangledName) &&
Objects.equals(this.vaddr, functionListItem.vaddr) &&
Objects.equals(this.size, functionListItem.size) &&
Expand All @@ -263,7 +346,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(id, name, mangledName, vaddr, size, debug, additionalProperties);
return Objects.hash(id, name, nameSourceType, mangledName, vaddr, size, debug, additionalProperties);
}

@Override
Expand All @@ -272,6 +355,7 @@ public String toString() {
sb.append("class FunctionListItem {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" nameSourceType: ").append(toIndentedString(nameSourceType)).append("\n");
sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n");
sb.append(" vaddr: ").append(toIndentedString(vaddr)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
Expand All @@ -298,10 +382,10 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("id", "name", "mangled_name", "vaddr", "size", "debug"));
openapiFields = new HashSet<String>(Arrays.asList("id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("id", "name", "mangled_name", "vaddr", "size", "debug"));
openapiRequiredFields = new HashSet<String>(Arrays.asList("id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug"));
}

/**
Expand All @@ -327,6 +411,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
if (!jsonObj.get("name_source_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name_source_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_source_type").toString()));
}
// validate the required field `name_source_type`
NameSourceTypeEnum.validateJsonElement(jsonObj.get("name_source_type"));
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()));
}
Expand Down
8 changes: 8 additions & 0 deletions src/test/java/ai/reveng/model/FunctionListItemTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public void nameTest() {
// TODO: test name
}

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

/**
* Test the property 'mangledName'
*/
Expand Down