diff --git a/.sdk-version b/.sdk-version index 6b6133e..ad55eb8 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.88.6 +v3.0.0 diff --git a/README.md b/README.md index 12ac7ee..604da4a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 2.88.6 + 3.0.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:2.88.6" + implementation "ai.reveng:sdk:3.0.0" } ``` @@ -131,6 +131,7 @@ Class | Method | HTTP request | Description *CollectionsApi* | [**updateCollection**](docs/CollectionsApi.md#updateCollection) | **PATCH** /v2/collections/{collection_id} | Updates a collection *CollectionsApi* | [**updateCollectionBinaries**](docs/CollectionsApi.md#updateCollectionBinaries) | **PATCH** /v2/collections/{collection_id}/binaries | Updates a collection binaries *CollectionsApi* | [**updateCollectionTags**](docs/CollectionsApi.md#updateCollectionTags) | **PATCH** /v2/collections/{collection_id}/tags | Updates a collection tags +*ConfigApi* | [**getConfig**](docs/ConfigApi.md#getConfig) | **GET** /v2/config | Get Config *ExternalSourcesApi* | [**createExternalTaskVt**](docs/ExternalSourcesApi.md#createExternalTaskVt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal *ExternalSourcesApi* | [**getVtData**](docs/ExternalSourcesApi.md#getVtData) | **GET** /v2/analysis/{analysis_id}/external/vt | Get VirusTotal data *ExternalSourcesApi* | [**getVtTaskStatus**](docs/ExternalSourcesApi.md#getVtTaskStatus) | **GET** /v2/analysis/{analysis_id}/external/vt/status | Check the status of VirusTotal data retrieval @@ -244,6 +245,7 @@ Class | Method | HTTP request | Description - [BaseResponseCollectionTagsUpdateResponse](docs/BaseResponseCollectionTagsUpdateResponse.md) - [BaseResponseCommentResponse](docs/BaseResponseCommentResponse.md) - [BaseResponseCommunities](docs/BaseResponseCommunities.md) + - [BaseResponseConfigResponse](docs/BaseResponseConfigResponse.md) - [BaseResponseCreated](docs/BaseResponseCreated.md) - [BaseResponseDict](docs/BaseResponseDict.md) - [BaseResponseDynamicExecutionStatus](docs/BaseResponseDynamicExecutionStatus.md) @@ -326,6 +328,7 @@ Class | Method | HTTP request | Description - [Communities](docs/Communities.md) - [CommunityMatchPercentages](docs/CommunityMatchPercentages.md) - [ConfidenceType](docs/ConfidenceType.md) + - [ConfigResponse](docs/ConfigResponse.md) - [Context](docs/Context.md) - [Created](docs/Created.md) - [DecompilationCommentContext](docs/DecompilationCommentContext.md) @@ -409,6 +412,7 @@ Class | Method | HTTP request | Description - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) - [NameConfidence](docs/NameConfidence.md) + - [NameSourceType](docs/NameSourceType.md) - [NetworkOverviewDns](docs/NetworkOverviewDns.md) - [NetworkOverviewDnsAnswer](docs/NetworkOverviewDnsAnswer.md) - [NetworkOverviewMetadata](docs/NetworkOverviewMetadata.md) diff --git a/build.gradle b/build.gradle index 74acd41..34c5392 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '2.88.6' +version = '3.0.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "2.88.6") + coordinates("ai.reveng", "sdk", "3.0.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index afbade4..407dd80 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.88.6", + version := "3.0.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/BaseResponseConfigResponse.md b/docs/BaseResponseConfigResponse.md new file mode 100644 index 0000000..01e910a --- /dev/null +++ b/docs/BaseResponseConfigResponse.md @@ -0,0 +1,17 @@ + + +# BaseResponseConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | +|**data** | [**ConfigResponse**](ConfigResponse.md) | | [optional] | +|**message** | **String** | | [optional] | +|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | +|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | + + + diff --git a/docs/ConfigApi.md b/docs/ConfigApi.md new file mode 100644 index 0000000..f18046f --- /dev/null +++ b/docs/ConfigApi.md @@ -0,0 +1,75 @@ +# ConfigApi + +All URIs are relative to *https://api.reveng.ai* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getConfig**](ConfigApi.md#getConfig) | **GET** /v2/config | Get Config | + + + +# **getConfig** +> BaseResponseConfigResponse getConfig() + +Get Config + +General configuration endpoint + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.ConfigApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + ConfigApi apiInstance = new ConfigApi(defaultClient); + try { + BaseResponseConfigResponse result = apiInstance.getConfig(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConfigApi#getConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BaseResponseConfigResponse**](BaseResponseConfigResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Invalid request parameters | - | + diff --git a/docs/ConfigResponse.md b/docs/ConfigResponse.md new file mode 100644 index 0000000..9d42a97 --- /dev/null +++ b/docs/ConfigResponse.md @@ -0,0 +1,15 @@ + + +# ConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dashboardUrl** | **String** | The domain of the RevEng.AI platform you are connected to | [optional] | +|**maxFileSizeBytes** | **Integer** | Maximum file size (in bytes) that can be uploaded for analysis | | +|**aiDecompilerUnsupportedLanguages** | **List<String>** | List of programming languages that are not supported for AI decompilation | | + + + diff --git a/docs/FunctionListItem.md b/docs/FunctionListItem.md index d8e6a74..ef8fac0 100644 --- a/docs/FunctionListItem.md +++ b/docs/FunctionListItem.md @@ -10,6 +10,7 @@ |**id** | **Long** | Function id | | |**name** | **String** | Name of the function | | |**nameSourceType** | [**NameSourceTypeEnum**](#NameSourceTypeEnum) | The source (process) the function name came from | | +|**nameSource** | [**NameSourceType**](NameSourceType.md) | The source of the current function name. | | |**mangledName** | **String** | Mangled name of the function | | |**vaddr** | **Long** | Function virtual address | | |**size** | **Integer** | Function size in bytes | | diff --git a/docs/NameSourceType.md b/docs/NameSourceType.md new file mode 100644 index 0000000..cf129d2 --- /dev/null +++ b/docs/NameSourceType.md @@ -0,0 +1,27 @@ + + +# NameSourceType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The source (process) the function name came from | | +|**functionId** | **Integer** | | [optional] | +|**binaryId** | **Integer** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SYSTEM | "SYSTEM" | +| USER | "USER" | +| AUTO_UNSTRIP | "AUTO_UNSTRIP" | +| EXTERNAL | "EXTERNAL" | +| AI_UNSTRIP | "AI_UNSTRIP" | + + + diff --git a/docs/Platform.md b/docs/Platform.md index 118b66e..e82d976 100644 --- a/docs/Platform.md +++ b/docs/Platform.md @@ -9,5 +9,7 @@ * `WINDOWS` (value: `"windows"`) +* `ANDROID` (value: `"android"`) + diff --git a/pom.xml b/pom.xml index 9ce7f2a..ca2cacd 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 2.88.6 + 3.0.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/ConfigApi.java b/src/main/java/ai/reveng/api/ConfigApi.java new file mode 100644 index 0000000..7a0e5b5 --- /dev/null +++ b/src/main/java/ai/reveng/api/ConfigApi.java @@ -0,0 +1,196 @@ +/* + * 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.api; + +import ai.reveng.invoker.ApiCallback; +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.ApiResponse; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.Pair; +import ai.reveng.invoker.ProgressRequestBody; +import ai.reveng.invoker.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import ai.reveng.model.BaseResponse; +import ai.reveng.model.BaseResponseConfigResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ConfigApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ConfigApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConfigApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getConfig + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public okhttp3.Call getConfigCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/config"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getConfigCall(_callback); + + } + + /** + * Get Config + * General configuration endpoint + * @return BaseResponseConfigResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public BaseResponseConfigResponse getConfig() throws ApiException { + ApiResponse localVarResp = getConfigWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Config + * General configuration endpoint + * @return ApiResponse<BaseResponseConfigResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public ApiResponse getConfigWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getConfigValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Config (asynchronously) + * General configuration endpoint + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public okhttp3.Call getConfigAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getConfigValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 8fe7260..82c9cd6 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.88.6/java"); + setUserAgent("OpenAPI-Generator/3.0.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 16f4435..5c61aff 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.88.6"; + public static final String VERSION = "3.0.0"; 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 c71c65e..e00978a 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -153,6 +153,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCollectionTagsUpdateResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCommentResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCommunities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseConfigResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCreated.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseDict.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseDynamicExecutionStatus.CustomTypeAdapterFactory()); @@ -231,6 +232,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CommentUpdateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Communities.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CommunityMatchPercentages.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ConfigResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Context.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Created.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilationCommentContext.CustomTypeAdapterFactory()); @@ -307,6 +309,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MetaModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ModelsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NameConfidence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NameSourceType.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NetworkOverviewDns.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NetworkOverviewDnsAnswer.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.NetworkOverviewMetadata.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/BaseResponseConfigResponse.java b/src/main/java/ai/reveng/model/BaseResponseConfigResponse.java new file mode 100644 index 0000000..d8c8a7d --- /dev/null +++ b/src/main/java/ai/reveng/model/BaseResponseConfigResponse.java @@ -0,0 +1,438 @@ +/* + * 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 ai.reveng.model.ConfigResponse; +import ai.reveng.model.ErrorModel; +import ai.reveng.model.MetaModel; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +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; + +/** + * BaseResponseConfigResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BaseResponseConfigResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private Boolean status = true; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private ConfigResponse data; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors; + + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + @javax.annotation.Nullable + private MetaModel meta; + + public BaseResponseConfigResponse() { + } + + public BaseResponseConfigResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Response status on whether the request succeeded + * @return status + */ + @javax.annotation.Nullable + public Boolean getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public BaseResponseConfigResponse data(@javax.annotation.Nullable ConfigResponse data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public ConfigResponse getData() { + return data; + } + + public void setData(@javax.annotation.Nullable ConfigResponse data) { + this.data = data; + } + + + public BaseResponseConfigResponse message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public BaseResponseConfigResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public BaseResponseConfigResponse addErrorsItem(ErrorModel errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + + public BaseResponseConfigResponse meta(@javax.annotation.Nullable MetaModel meta) { + this.meta = meta; + return this; + } + + /** + * Metadata + * @return meta + */ + @javax.annotation.Nullable + public MetaModel getMeta() { + return meta; + } + + public void setMeta(@javax.annotation.Nullable MetaModel meta) { + this.meta = meta; + } + + /** + * 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 BaseResponseConfigResponse instance itself + */ + public BaseResponseConfigResponse 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; + } + BaseResponseConfigResponse baseResponseConfigResponse = (BaseResponseConfigResponse) o; + return Objects.equals(this.status, baseResponseConfigResponse.status) && + Objects.equals(this.data, baseResponseConfigResponse.data) && + Objects.equals(this.message, baseResponseConfigResponse.message) && + Objects.equals(this.errors, baseResponseConfigResponse.errors) && + Objects.equals(this.meta, baseResponseConfigResponse.meta)&& + Objects.equals(this.additionalProperties, baseResponseConfigResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, data, message, errors, meta, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseResponseConfigResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).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("status", "data", "message", "errors", "meta")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 BaseResponseConfigResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BaseResponseConfigResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseConfigResponse is not found in the empty JSON string", BaseResponseConfigResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ConfigResponse.validateJsonElement(jsonObj.get("data")); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + ErrorModel.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + MetaModel.validateJsonElement(jsonObj.get("meta")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BaseResponseConfigResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BaseResponseConfigResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseConfigResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BaseResponseConfigResponse 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 BaseResponseConfigResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BaseResponseConfigResponse 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 BaseResponseConfigResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BaseResponseConfigResponse + * @throws IOException if the JSON string is invalid with respect to BaseResponseConfigResponse + */ + public static BaseResponseConfigResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BaseResponseConfigResponse.class); + } + + /** + * Convert an instance of BaseResponseConfigResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/ConfigResponse.java b/src/main/java/ai/reveng/model/ConfigResponse.java new file mode 100644 index 0000000..2bd9c8b --- /dev/null +++ b/src/main/java/ai/reveng/model/ConfigResponse.java @@ -0,0 +1,362 @@ +/* + * 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.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.ArrayList; +import java.util.Arrays; +import java.util.List; + +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; + +/** + * ConfigResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConfigResponse { + public static final String SERIALIZED_NAME_DASHBOARD_URL = "dashboard_url"; + @SerializedName(SERIALIZED_NAME_DASHBOARD_URL) + @javax.annotation.Nullable + private String dashboardUrl = ""; + + public static final String SERIALIZED_NAME_MAX_FILE_SIZE_BYTES = "max_file_size_bytes"; + @SerializedName(SERIALIZED_NAME_MAX_FILE_SIZE_BYTES) + @javax.annotation.Nonnull + private Integer maxFileSizeBytes; + + public static final String SERIALIZED_NAME_AI_DECOMPILER_UNSUPPORTED_LANGUAGES = "ai_decompiler_unsupported_languages"; + @SerializedName(SERIALIZED_NAME_AI_DECOMPILER_UNSUPPORTED_LANGUAGES) + @javax.annotation.Nonnull + private List aiDecompilerUnsupportedLanguages = new ArrayList<>(); + + public ConfigResponse() { + } + + public ConfigResponse dashboardUrl(@javax.annotation.Nullable String dashboardUrl) { + this.dashboardUrl = dashboardUrl; + return this; + } + + /** + * The domain of the RevEng.AI platform you are connected to + * @return dashboardUrl + */ + @javax.annotation.Nullable + public String getDashboardUrl() { + return dashboardUrl; + } + + public void setDashboardUrl(@javax.annotation.Nullable String dashboardUrl) { + this.dashboardUrl = dashboardUrl; + } + + + public ConfigResponse maxFileSizeBytes(@javax.annotation.Nonnull Integer maxFileSizeBytes) { + this.maxFileSizeBytes = maxFileSizeBytes; + return this; + } + + /** + * Maximum file size (in bytes) that can be uploaded for analysis + * @return maxFileSizeBytes + */ + @javax.annotation.Nonnull + public Integer getMaxFileSizeBytes() { + return maxFileSizeBytes; + } + + public void setMaxFileSizeBytes(@javax.annotation.Nonnull Integer maxFileSizeBytes) { + this.maxFileSizeBytes = maxFileSizeBytes; + } + + + public ConfigResponse aiDecompilerUnsupportedLanguages(@javax.annotation.Nonnull List aiDecompilerUnsupportedLanguages) { + this.aiDecompilerUnsupportedLanguages = aiDecompilerUnsupportedLanguages; + return this; + } + + public ConfigResponse addAiDecompilerUnsupportedLanguagesItem(String aiDecompilerUnsupportedLanguagesItem) { + if (this.aiDecompilerUnsupportedLanguages == null) { + this.aiDecompilerUnsupportedLanguages = new ArrayList<>(); + } + this.aiDecompilerUnsupportedLanguages.add(aiDecompilerUnsupportedLanguagesItem); + return this; + } + + /** + * List of programming languages that are not supported for AI decompilation + * @return aiDecompilerUnsupportedLanguages + */ + @javax.annotation.Nonnull + public List getAiDecompilerUnsupportedLanguages() { + return aiDecompilerUnsupportedLanguages; + } + + public void setAiDecompilerUnsupportedLanguages(@javax.annotation.Nonnull List aiDecompilerUnsupportedLanguages) { + this.aiDecompilerUnsupportedLanguages = aiDecompilerUnsupportedLanguages; + } + + /** + * 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 ConfigResponse instance itself + */ + public ConfigResponse 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; + } + ConfigResponse configResponse = (ConfigResponse) o; + return Objects.equals(this.dashboardUrl, configResponse.dashboardUrl) && + Objects.equals(this.maxFileSizeBytes, configResponse.maxFileSizeBytes) && + Objects.equals(this.aiDecompilerUnsupportedLanguages, configResponse.aiDecompilerUnsupportedLanguages)&& + Objects.equals(this.additionalProperties, configResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dashboardUrl, maxFileSizeBytes, aiDecompilerUnsupportedLanguages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigResponse {\n"); + sb.append(" dashboardUrl: ").append(toIndentedString(dashboardUrl)).append("\n"); + sb.append(" maxFileSizeBytes: ").append(toIndentedString(maxFileSizeBytes)).append("\n"); + sb.append(" aiDecompilerUnsupportedLanguages: ").append(toIndentedString(aiDecompilerUnsupportedLanguages)).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("dashboard_url", "max_file_size_bytes", "ai_decompiler_unsupported_languages")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("max_file_size_bytes", "ai_decompiler_unsupported_languages")); + } + + /** + * 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 ConfigResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConfigResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConfigResponse is not found in the empty JSON string", ConfigResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConfigResponse.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(); + if ((jsonObj.get("dashboard_url") != null && !jsonObj.get("dashboard_url").isJsonNull()) && !jsonObj.get("dashboard_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `dashboard_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dashboard_url").toString())); + } + // ensure the required json array is present + if (jsonObj.get("ai_decompiler_unsupported_languages") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("ai_decompiler_unsupported_languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ai_decompiler_unsupported_languages` to be an array in the JSON string but got `%s`", jsonObj.get("ai_decompiler_unsupported_languages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConfigResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConfigResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConfigResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConfigResponse 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 ConfigResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConfigResponse 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 ConfigResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConfigResponse + * @throws IOException if the JSON string is invalid with respect to ConfigResponse + */ + public static ConfigResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConfigResponse.class); + } + + /** + * Convert an instance of ConfigResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/FunctionListItem.java b/src/main/java/ai/reveng/model/FunctionListItem.java index cb5a0be..f8bdd01 100644 --- a/src/main/java/ai/reveng/model/FunctionListItem.java +++ b/src/main/java/ai/reveng/model/FunctionListItem.java @@ -14,6 +14,7 @@ import java.util.Objects; import java.util.Locale; +import ai.reveng.model.NameSourceType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -124,6 +125,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private NameSourceTypeEnum nameSourceType; + public static final String SERIALIZED_NAME_NAME_SOURCE = "name_source"; + @SerializedName(SERIALIZED_NAME_NAME_SOURCE) + @javax.annotation.Nonnull + private NameSourceType nameSource; + public static final String SERIALIZED_NAME_MANGLED_NAME = "mangled_name"; @SerializedName(SERIALIZED_NAME_MANGLED_NAME) @javax.annotation.Nonnull @@ -204,6 +210,25 @@ public void setNameSourceType(@javax.annotation.Nonnull NameSourceTypeEnum nameS } + public FunctionListItem nameSource(@javax.annotation.Nonnull NameSourceType nameSource) { + this.nameSource = nameSource; + return this; + } + + /** + * The source of the current function name. + * @return nameSource + */ + @javax.annotation.Nonnull + public NameSourceType getNameSource() { + return nameSource; + } + + public void setNameSource(@javax.annotation.Nonnull NameSourceType nameSource) { + this.nameSource = nameSource; + } + + public FunctionListItem mangledName(@javax.annotation.Nonnull String mangledName) { this.mangledName = mangledName; return this; @@ -337,6 +362,7 @@ public boolean equals(Object o) { return Objects.equals(this.id, functionListItem.id) && Objects.equals(this.name, functionListItem.name) && Objects.equals(this.nameSourceType, functionListItem.nameSourceType) && + Objects.equals(this.nameSource, functionListItem.nameSource) && Objects.equals(this.mangledName, functionListItem.mangledName) && Objects.equals(this.vaddr, functionListItem.vaddr) && Objects.equals(this.size, functionListItem.size) && @@ -346,7 +372,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, nameSourceType, mangledName, vaddr, size, debug, additionalProperties); + return Objects.hash(id, name, nameSourceType, nameSource, mangledName, vaddr, size, debug, additionalProperties); } @Override @@ -356,6 +382,7 @@ public String toString() { 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(" nameSource: ").append(toIndentedString(nameSource)).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"); @@ -382,10 +409,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug")); + openapiFields = new HashSet(Arrays.asList("id", "name", "name_source_type", "name_source", "mangled_name", "vaddr", "size", "debug")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug")); + openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "name_source_type", "name_source", "mangled_name", "vaddr", "size", "debug")); } /** @@ -416,6 +443,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `name_source_type` NameSourceTypeEnum.validateJsonElement(jsonObj.get("name_source_type")); + // validate the required field `name_source` + NameSourceType.validateJsonElement(jsonObj.get("name_source")); 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())); } diff --git a/src/main/java/ai/reveng/model/NameSourceType.java b/src/main/java/ai/reveng/model/NameSourceType.java new file mode 100644 index 0000000..d725a7e --- /dev/null +++ b/src/main/java/ai/reveng/model/NameSourceType.java @@ -0,0 +1,418 @@ +/* + * 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.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 org.openapitools.jackson.nullable.JsonNullable; + +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; + +/** + * NameSourceType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NameSourceType { + /** + * The source (process) the function name came from + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + SYSTEM("SYSTEM"), + + USER("USER"), + + AUTO_UNSTRIP("AUTO_UNSTRIP"), + + EXTERNAL("EXTERNAL"), + + AI_UNSTRIP("AI_UNSTRIP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; + @SerializedName(SERIALIZED_NAME_FUNCTION_ID) + @javax.annotation.Nullable + private Integer functionId; + + public static final String SERIALIZED_NAME_BINARY_ID = "binary_id"; + @SerializedName(SERIALIZED_NAME_BINARY_ID) + @javax.annotation.Nullable + private Integer binaryId; + + public NameSourceType() { + } + + public NameSourceType type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * The source (process) the function name came from + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public NameSourceType functionId(@javax.annotation.Nullable Integer functionId) { + this.functionId = functionId; + return this; + } + + /** + * Get functionId + * @return functionId + */ + @javax.annotation.Nullable + public Integer getFunctionId() { + return functionId; + } + + public void setFunctionId(@javax.annotation.Nullable Integer functionId) { + this.functionId = functionId; + } + + + public NameSourceType binaryId(@javax.annotation.Nullable Integer binaryId) { + this.binaryId = binaryId; + return this; + } + + /** + * Get binaryId + * @return binaryId + */ + @javax.annotation.Nullable + public Integer getBinaryId() { + return binaryId; + } + + public void setBinaryId(@javax.annotation.Nullable Integer binaryId) { + this.binaryId = binaryId; + } + + /** + * 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 NameSourceType instance itself + */ + public NameSourceType 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; + } + NameSourceType nameSourceType = (NameSourceType) o; + return Objects.equals(this.type, nameSourceType.type) && + Objects.equals(this.functionId, nameSourceType.functionId) && + Objects.equals(this.binaryId, nameSourceType.binaryId)&& + Objects.equals(this.additionalProperties, nameSourceType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, functionId, binaryId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NameSourceType {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); + sb.append(" binaryId: ").append(toIndentedString(binaryId)).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("type", "function_id", "binary_id")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type")); + } + + /** + * 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 NameSourceType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NameSourceType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in NameSourceType is not found in the empty JSON string", NameSourceType.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NameSourceType.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(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NameSourceType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NameSourceType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NameSourceType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NameSourceType 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 NameSourceType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + NameSourceType 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 NameSourceType given an JSON string + * + * @param jsonString JSON string + * @return An instance of NameSourceType + * @throws IOException if the JSON string is invalid with respect to NameSourceType + */ + public static NameSourceType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NameSourceType.class); + } + + /** + * Convert an instance of NameSourceType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/Platform.java b/src/main/java/ai/reveng/model/Platform.java index c602359..bebe134 100644 --- a/src/main/java/ai/reveng/model/Platform.java +++ b/src/main/java/ai/reveng/model/Platform.java @@ -32,7 +32,9 @@ public enum Platform { LINUX("linux"), - WINDOWS("windows"); + WINDOWS("windows"), + + ANDROID("android"); private String value; diff --git a/src/test/java/ai/reveng/api/ConfigApiTest.java b/src/test/java/ai/reveng/api/ConfigApiTest.java new file mode 100644 index 0000000..1d49ed0 --- /dev/null +++ b/src/test/java/ai/reveng/api/ConfigApiTest.java @@ -0,0 +1,47 @@ +/* + * 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.api; + +import ai.reveng.invoker.ApiException; +import ai.reveng.model.BaseResponse; +import ai.reveng.model.BaseResponseConfigResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ConfigApi + */ +@Disabled +public class ConfigApiTest { + + private final ConfigApi api = new ConfigApi(); + + /** + * Get Config + * + * General configuration endpoint + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConfigTest() throws ApiException { + BaseResponseConfigResponse response = api.getConfig(); + // TODO: test validations + } + +} diff --git a/src/test/java/ai/reveng/model/BaseResponseConfigResponseTest.java b/src/test/java/ai/reveng/model/BaseResponseConfigResponseTest.java new file mode 100644 index 0000000..ef13470 --- /dev/null +++ b/src/test/java/ai/reveng/model/BaseResponseConfigResponseTest.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 ai.reveng.model.ConfigResponse; +import ai.reveng.model.ErrorModel; +import ai.reveng.model.MetaModel; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for BaseResponseConfigResponse + */ +public class BaseResponseConfigResponseTest { + private final BaseResponseConfigResponse model = new BaseResponseConfigResponse(); + + /** + * Model tests for BaseResponseConfigResponse + */ + @Test + public void testBaseResponseConfigResponse() { + // TODO: test BaseResponseConfigResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/ai/reveng/model/ConfigResponseTest.java b/src/test/java/ai/reveng/model/ConfigResponseTest.java new file mode 100644 index 0000000..3a58500 --- /dev/null +++ b/src/test/java/ai/reveng/model/ConfigResponseTest.java @@ -0,0 +1,65 @@ +/* + * 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.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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ConfigResponse + */ +public class ConfigResponseTest { + private final ConfigResponse model = new ConfigResponse(); + + /** + * Model tests for ConfigResponse + */ + @Test + public void testConfigResponse() { + // TODO: test ConfigResponse + } + + /** + * Test the property 'dashboardUrl' + */ + @Test + public void dashboardUrlTest() { + // TODO: test dashboardUrl + } + + /** + * Test the property 'maxFileSizeBytes' + */ + @Test + public void maxFileSizeBytesTest() { + // TODO: test maxFileSizeBytes + } + + /** + * Test the property 'aiDecompilerUnsupportedLanguages' + */ + @Test + public void aiDecompilerUnsupportedLanguagesTest() { + // TODO: test aiDecompilerUnsupportedLanguages + } + +} diff --git a/src/test/java/ai/reveng/model/FunctionListItemTest.java b/src/test/java/ai/reveng/model/FunctionListItemTest.java index f8d3ef5..853b854 100644 --- a/src/test/java/ai/reveng/model/FunctionListItemTest.java +++ b/src/test/java/ai/reveng/model/FunctionListItemTest.java @@ -12,6 +12,7 @@ package ai.reveng.model; +import ai.reveng.model.NameSourceType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -60,6 +61,14 @@ public void nameSourceTypeTest() { // TODO: test nameSourceType } + /** + * Test the property 'nameSource' + */ + @Test + public void nameSourceTest() { + // TODO: test nameSource + } + /** * Test the property 'mangledName' */ diff --git a/src/test/java/ai/reveng/model/NameSourceTypeTest.java b/src/test/java/ai/reveng/model/NameSourceTypeTest.java new file mode 100644 index 0000000..508a4d1 --- /dev/null +++ b/src/test/java/ai/reveng/model/NameSourceTypeTest.java @@ -0,0 +1,64 @@ +/* + * 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.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 org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NameSourceType + */ +public class NameSourceTypeTest { + private final NameSourceType model = new NameSourceType(); + + /** + * Model tests for NameSourceType + */ + @Test + public void testNameSourceType() { + // TODO: test NameSourceType + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'functionId' + */ + @Test + public void functionIdTest() { + // TODO: test functionId + } + + /** + * Test the property 'binaryId' + */ + @Test + public void binaryIdTest() { + // TODO: test binaryId + } + +}