From 979bd6f64897786bed637388ce816a97f43b83ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Oct 2025 07:03:10 +0000 Subject: [PATCH] Update SDK to version v2.8.0 - Generated from OpenAPI spec version v2.8.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 27 +- build.gradle | 4 +- build.sbt | 2 +- docs/ANNFunction.md | 19 - docs/AnalysesCoreApi.md | 73 --- docs/BaseResponseBoxPlotConfidence.md | 17 - ...seResponseListFunctionBoxPlotConfidence.md | 17 - ...aseResponseListSimilarFunctionsResponse.md | 17 - ...eResponseListTagOriginBoxPlotConfidence.md | 17 - docs/BaseResponseNearestNeighborAnalysis.md | 17 - docs/BoxPlotConfidence.md | 20 - docs/ConfidenceApi.md | 294 --------- docs/ELFRelocation.md | 2 +- docs/FunctionBoxPlotConfidence.md | 14 - docs/FunctionNameConfidenceBody.md | 14 - docs/FunctionNameInput.md | 14 - docs/FunctionsCoreApi.md | 81 --- docs/FunctionsDetailResponse.md | 1 + docs/NearestNeighbor.md | 20 - docs/Origin.md | 25 - docs/SimilarFunctionsResponse.md | 20 - docs/TagConfidenceBody.md | 13 - docs/TagOriginBoxPlotConfidence.md | 14 - docs/Tags.md | 14 - docs/ThreatScoreFunctionBody.md | 13 - pom.xml | 2 +- .../java/ai/reveng/api/AnalysesCoreApi.java | 143 ---- .../java/ai/reveng/api/ConfidenceApi.java | 614 ------------------ .../java/ai/reveng/api/FunctionsCoreApi.java | 181 ------ .../java/ai/reveng/invoker/ApiClient.java | 2 +- .../java/ai/reveng/invoker/Configuration.java | 2 +- src/main/java/ai/reveng/invoker/JSON.java | 16 - .../java/ai/reveng/model/ANNFunction.java | 503 -------------- .../model/BaseResponseBoxPlotConfidence.java | 438 ------------- ...ResponseListFunctionBoxPlotConfidence.java | 456 ------------- ...eResponseListSimilarFunctionsResponse.java | 456 ------------- ...esponseListTagOriginBoxPlotConfidence.java | 456 ------------- .../BaseResponseNearestNeighborAnalysis.java | 444 ------------- .../ai/reveng/model/BoxPlotConfidence.java | 448 ------------- .../java/ai/reveng/model/ELFRelocation.java | 11 +- .../model/FunctionBoxPlotConfidence.java | 320 --------- .../model/FunctionNameConfidenceBody.java | 335 ---------- .../ai/reveng/model/FunctionNameInput.java | 320 --------- .../reveng/model/FunctionsDetailResponse.java | 32 +- .../java/ai/reveng/model/NearestNeighbor.java | 486 -------------- src/main/java/ai/reveng/model/Origin.java | 91 --- .../model/SimilarFunctionsResponse.java | 513 --------------- .../ai/reveng/model/TagConfidenceBody.java | 312 --------- .../model/TagOriginBoxPlotConfidence.java | 323 --------- src/main/java/ai/reveng/model/Tags.java | 323 --------- .../reveng/model/ThreatScoreFunctionBody.java | 298 --------- .../ai/reveng/api/AnalysesCoreApiTest.java | 17 - .../java/ai/reveng/api/ConfidenceApiTest.java | 96 --- .../ai/reveng/api/FunctionsCoreApiTest.java | 20 - .../java/ai/reveng/model/ANNFunctionTest.java | 99 --- .../BaseResponseBoxPlotConfidenceTest.java | 85 --- ...onseListFunctionBoxPlotConfidenceTest.java | 85 --- ...ponseListSimilarFunctionsResponseTest.java | 85 --- ...nseListTagOriginBoxPlotConfidenceTest.java | 85 --- ...seResponseNearestNeighborAnalysisTest.java | 87 --- .../reveng/model/BoxPlotConfidenceTest.java | 96 --- .../model/FunctionBoxPlotConfidenceTest.java | 56 -- .../model/FunctionNameConfidenceBodyTest.java | 58 -- .../reveng/model/FunctionNameInputTest.java | 55 -- .../model/FunctionsDetailResponseTest.java | 8 + .../ai/reveng/model/NearestNeighborTest.java | 104 --- src/test/java/ai/reveng/model/OriginTest.java | 31 - .../model/SimilarFunctionsResponseTest.java | 106 --- .../reveng/model/TagConfidenceBodyTest.java | 50 -- .../model/TagOriginBoxPlotConfidenceTest.java | 57 -- src/test/java/ai/reveng/model/TagsTest.java | 56 -- .../model/ThreatScoreFunctionBodyTest.java | 49 -- 73 files changed, 55 insertions(+), 9626 deletions(-) delete mode 100644 docs/ANNFunction.md delete mode 100644 docs/BaseResponseBoxPlotConfidence.md delete mode 100644 docs/BaseResponseListFunctionBoxPlotConfidence.md delete mode 100644 docs/BaseResponseListSimilarFunctionsResponse.md delete mode 100644 docs/BaseResponseListTagOriginBoxPlotConfidence.md delete mode 100644 docs/BaseResponseNearestNeighborAnalysis.md delete mode 100644 docs/BoxPlotConfidence.md delete mode 100644 docs/ConfidenceApi.md delete mode 100644 docs/FunctionBoxPlotConfidence.md delete mode 100644 docs/FunctionNameConfidenceBody.md delete mode 100644 docs/FunctionNameInput.md delete mode 100644 docs/NearestNeighbor.md delete mode 100644 docs/Origin.md delete mode 100644 docs/SimilarFunctionsResponse.md delete mode 100644 docs/TagConfidenceBody.md delete mode 100644 docs/TagOriginBoxPlotConfidence.md delete mode 100644 docs/Tags.md delete mode 100644 docs/ThreatScoreFunctionBody.md delete mode 100644 src/main/java/ai/reveng/api/ConfidenceApi.java delete mode 100644 src/main/java/ai/reveng/model/ANNFunction.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponse.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseNearestNeighborAnalysis.java delete mode 100644 src/main/java/ai/reveng/model/BoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/FunctionBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/FunctionNameConfidenceBody.java delete mode 100644 src/main/java/ai/reveng/model/FunctionNameInput.java delete mode 100644 src/main/java/ai/reveng/model/NearestNeighbor.java delete mode 100644 src/main/java/ai/reveng/model/Origin.java delete mode 100644 src/main/java/ai/reveng/model/SimilarFunctionsResponse.java delete mode 100644 src/main/java/ai/reveng/model/TagConfidenceBody.java delete mode 100644 src/main/java/ai/reveng/model/TagOriginBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/Tags.java delete mode 100644 src/main/java/ai/reveng/model/ThreatScoreFunctionBody.java delete mode 100644 src/test/java/ai/reveng/api/ConfidenceApiTest.java delete mode 100644 src/test/java/ai/reveng/model/ANNFunctionTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponseTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseNearestNeighborAnalysisTest.java delete mode 100644 src/test/java/ai/reveng/model/BoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/FunctionBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/FunctionNameConfidenceBodyTest.java delete mode 100644 src/test/java/ai/reveng/model/FunctionNameInputTest.java delete mode 100644 src/test/java/ai/reveng/model/NearestNeighborTest.java delete mode 100644 src/test/java/ai/reveng/model/OriginTest.java delete mode 100644 src/test/java/ai/reveng/model/SimilarFunctionsResponseTest.java delete mode 100644 src/test/java/ai/reveng/model/TagConfidenceBodyTest.java delete mode 100644 src/test/java/ai/reveng/model/TagOriginBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/TagsTest.java delete mode 100644 src/test/java/ai/reveng/model/ThreatScoreFunctionBodyTest.java diff --git a/.sdk-version b/.sdk-version index 8721bbc..b77e3cc 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.4.0 +v2.8.0 diff --git a/README.md b/README.md index 87a9558..0eb11af 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 2.4.0 + 2.8.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:2.4.0" + implementation "ai.reveng:sdk:2.8.0" } ``` @@ -82,7 +82,6 @@ Class | Method | HTTP request | Description *AnalysesCommentsApi* | [**updateAnalysisComment**](docs/AnalysesCommentsApi.md#updateAnalysisComment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment *AnalysesCoreApi* | [**createAnalysis**](docs/AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**deleteAnalysis**](docs/AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis -*AnalysesCoreApi* | [**findSimilarFunctionsBatch**](docs/AnalysesCoreApi.md#findSimilarFunctionsBatch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID *AnalysesCoreApi* | [**getAnalysisBasicInfo**](docs/AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information *AnalysesCoreApi* | [**getAnalysisFunctionMap**](docs/AnalysesCoreApi.md#getAnalysisFunctionMap) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map *AnalysesCoreApi* | [**getAnalysisLogs**](docs/AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis @@ -130,10 +129,6 @@ 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 -*ConfidenceApi* | [**getAnalysisTagScore**](docs/ConfidenceApi.md#getAnalysisTagScore) | **POST** /v2/confidence/analysis/{analysis_id}/tag_score | Calculate Tag Confidence Score for an Analysis -*ConfidenceApi* | [**getAnalysisThreatScore**](docs/ConfidenceApi.md#getAnalysisThreatScore) | **GET** /v2/confidence/analysis/{analysis_id}/threat_score | Calculate Threat Score for Binary -*ConfidenceApi* | [**getFunctionsNameScore**](docs/ConfidenceApi.md#getFunctionsNameScore) | **POST** /v2/confidence/functions/name_score | Calculate function name confidence for a set of Functions -*ConfidenceApi* | [**getFunctionsThreatScore**](docs/ConfidenceApi.md#getFunctionsThreatScore) | **POST** /v2/confidence/functions/threat_score | Calculate Threat Score for a set of Functions *ExternalSourcesApi* | [**createExternalTaskMb**](docs/ExternalSourcesApi.md#createExternalTaskMb) | **POST** /v2/analysis/{analysis_id}/external/mb | Pulls data from VirusTotal *ExternalSourcesApi* | [**createExternalTaskVt**](docs/ExternalSourcesApi.md#createExternalTaskVt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal *ExternalSourcesApi* | [**getMbData**](docs/ExternalSourcesApi.md#getMbData) | **GET** /v2/analysis/{analysis_id}/external/mb | Get MalwareBazaar data @@ -166,7 +161,6 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**getFunctionCapabilities**](docs/FunctionsCoreApi.md#getFunctionCapabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities *FunctionsCoreApi* | [**getFunctionDetails**](docs/FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -*FunctionsCoreApi* | [**getSimilarFunctions**](docs/FunctionsCoreApi.md#getSimilarFunctions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions *FunctionsDataTypesApi* | [**generateFunctionDataTypesForAnalysis**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForAnalysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesApi* | [**generateFunctionDataTypesForFunctions**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForFunctions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions *FunctionsDataTypesApi* | [**getFunctionDataTypes**](docs/FunctionsDataTypesApi.md#getFunctionDataTypes) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types @@ -193,7 +187,6 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [ANNFunction](docs/ANNFunction.md) - [Addr](docs/Addr.md) - [AiDecompilationRating](docs/AiDecompilationRating.md) - [AiUnstripRequest](docs/AiUnstripRequest.md) @@ -240,7 +233,6 @@ Class | Method | HTTP request | Description - [BaseResponseBlockCommentsGenerationForFunctionResponse](docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md) - [BaseResponseBlockCommentsOverviewGenerationResponse](docs/BaseResponseBlockCommentsOverviewGenerationResponse.md) - [BaseResponseBool](docs/BaseResponseBool.md) - - [BaseResponseBoxPlotConfidence](docs/BaseResponseBoxPlotConfidence.md) - [BaseResponseCalleesCallerFunctionsResponse](docs/BaseResponseCalleesCallerFunctionsResponse.md) - [BaseResponseCapabilities](docs/BaseResponseCapabilities.md) - [BaseResponseCheckSecurityChecksTaskResponse](docs/BaseResponseCheckSecurityChecksTaskResponse.md) @@ -273,16 +265,12 @@ Class | Method | HTTP request | Description - [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md) - [BaseResponseListCommentResponse](docs/BaseResponseListCommentResponse.md) - [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md) - - [BaseResponseListFunctionBoxPlotConfidence](docs/BaseResponseListFunctionBoxPlotConfidence.md) - [BaseResponseListFunctionNameHistory](docs/BaseResponseListFunctionNameHistory.md) - [BaseResponseListSBOM](docs/BaseResponseListSBOM.md) - - [BaseResponseListSimilarFunctionsResponse](docs/BaseResponseListSimilarFunctionsResponse.md) - - [BaseResponseListTagOriginBoxPlotConfidence](docs/BaseResponseListTagOriginBoxPlotConfidence.md) - [BaseResponseListUserActivityResponse](docs/BaseResponseListUserActivityResponse.md) - [BaseResponseLoginResponse](docs/BaseResponseLoginResponse.md) - [BaseResponseLogs](docs/BaseResponseLogs.md) - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) - - [BaseResponseNearestNeighborAnalysis](docs/BaseResponseNearestNeighborAnalysis.md) - [BaseResponseNetworkOverviewResponse](docs/BaseResponseNetworkOverviewResponse.md) - [BaseResponseParams](docs/BaseResponseParams.md) - [BaseResponseProcessDumps](docs/BaseResponseProcessDumps.md) @@ -311,7 +299,6 @@ Class | Method | HTTP request | Description - [BinaryTaskStatus](docs/BinaryTaskStatus.md) - [Block](docs/Block.md) - [BlockCommentsGenerationForFunctionResponse](docs/BlockCommentsGenerationForFunctionResponse.md) - - [BoxPlotConfidence](docs/BoxPlotConfidence.md) - [CalleeFunctionInfo](docs/CalleeFunctionInfo.md) - [CalleesCallerFunctionsResponse](docs/CalleesCallerFunctionsResponse.md) - [CallerFunctionInfo](docs/CallerFunctionInfo.md) @@ -367,7 +354,6 @@ Class | Method | HTTP request | Description - [FunctionBlockResponse](docs/FunctionBlockResponse.md) - [FunctionBlocksResponse](docs/FunctionBlocksResponse.md) - [FunctionBoundary](docs/FunctionBoundary.md) - - [FunctionBoxPlotConfidence](docs/FunctionBoxPlotConfidence.md) - [FunctionCapabilityResponse](docs/FunctionCapabilityResponse.md) - [FunctionCommentCreateRequest](docs/FunctionCommentCreateRequest.md) - [FunctionDataTypes](docs/FunctionDataTypes.md) @@ -386,9 +372,7 @@ Class | Method | HTTP request | Description - [FunctionMatchingFilters](docs/FunctionMatchingFilters.md) - [FunctionMatchingRequest](docs/FunctionMatchingRequest.md) - [FunctionMatchingResultWithBestMatch](docs/FunctionMatchingResultWithBestMatch.md) - - [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md) - [FunctionNameHistory](docs/FunctionNameHistory.md) - - [FunctionNameInput](docs/FunctionNameInput.md) - [FunctionParamResponse](docs/FunctionParamResponse.md) - [FunctionRename](docs/FunctionRename.md) - [FunctionRenameMap](docs/FunctionRenameMap.md) @@ -425,13 +409,11 @@ Class | Method | HTTP request | Description - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) - [NameConfidence](docs/NameConfidence.md) - - [NearestNeighbor](docs/NearestNeighbor.md) - [NetworkOverviewDns](docs/NetworkOverviewDns.md) - [NetworkOverviewDnsAnswer](docs/NetworkOverviewDnsAnswer.md) - [NetworkOverviewMetadata](docs/NetworkOverviewMetadata.md) - [NetworkOverviewResponse](docs/NetworkOverviewResponse.md) - [Order](docs/Order.md) - - [Origin](docs/Origin.md) - [PDBDebugModel](docs/PDBDebugModel.md) - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) @@ -458,7 +440,6 @@ Class | Method | HTTP request | Description - [SecurityChecksResult](docs/SecurityChecksResult.md) - [SecurityModel](docs/SecurityModel.md) - [SeverityType](docs/SeverityType.md) - - [SimilarFunctionsResponse](docs/SimilarFunctionsResponse.md) - [SingleCodeCertificateModel](docs/SingleCodeCertificateModel.md) - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) @@ -476,15 +457,11 @@ Class | Method | HTTP request | Description - [TTPSElement](docs/TTPSElement.md) - [TTPSOccurance](docs/TTPSOccurance.md) - [Tag](docs/Tag.md) - - [TagConfidenceBody](docs/TagConfidenceBody.md) - - [TagOriginBoxPlotConfidence](docs/TagOriginBoxPlotConfidence.md) - [TagResponse](docs/TagResponse.md) - [TagSearchResponse](docs/TagSearchResponse.md) - [TagSearchResult](docs/TagSearchResult.md) - - [Tags](docs/Tags.md) - [TaskResponse](docs/TaskResponse.md) - [TaskStatus](docs/TaskStatus.md) - - [ThreatScoreFunctionBody](docs/ThreatScoreFunctionBody.md) - [TimestampModel](docs/TimestampModel.md) - [TypeDefinition](docs/TypeDefinition.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) diff --git a/build.gradle b/build.gradle index d3f4e97..b3116d2 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '2.4.0' +version = '2.8.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "2.4.0") + coordinates("ai.reveng", "sdk", "2.8.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 241a70d..1307f8e 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.4.0", + version := "2.8.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/ANNFunction.md b/docs/ANNFunction.md deleted file mode 100644 index a5bcb18..0000000 --- a/docs/ANNFunction.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# ANNFunction - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**limit** | **Integer** | The amount of neighbours per function ID | [optional] | -|**distance** | **BigDecimal** | The distance between two neighbours | [optional] | -|**analysisSearchIds** | **List<Integer>** | Perform a search on functions within a list of analyses | [optional] | -|**collectionSearchIds** | **List<Integer>** | Search only within these collections | [optional] | -|**searchBinaryIds** | **List<Integer>** | | [optional] | -|**searchFunctionIds** | **List<Integer>** | | [optional] | -|**debugOnly** | **Boolean** | Searches for only functions which are debug | [optional] | - - - diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 009a55c..55ff1a4 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -6,7 +6,6 @@ All URIs are relative to *https://api.reveng.ai* |------------- | ------------- | -------------| | [**createAnalysis**](AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis | | [**deleteAnalysis**](AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis | -| [**findSimilarFunctionsBatch**](AnalysesCoreApi.md#findSimilarFunctionsBatch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID | | [**getAnalysisBasicInfo**](AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information | | [**getAnalysisFunctionMap**](AnalysesCoreApi.md#getAnalysisFunctionMap) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map | | [**getAnalysisLogs**](AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis | @@ -165,78 +164,6 @@ public class Example { | **404** | Not Found | - | | **403** | Forbidden | - | - -# **findSimilarFunctionsBatch** -> BaseResponseNearestNeighborAnalysis findSimilarFunctionsBatch(analysisId, anNFunction) - -Batch Symbol ANN using Analysis ID - -Takes a analysis ID and returns the nearest functions within the database that match those functions - -### 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.AnalysesCoreApi; - -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"); - - AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); - Integer analysisId = 56; // Integer | - ANNFunction anNFunction = new ANNFunction(); // ANNFunction | - try { - BaseResponseNearestNeighborAnalysis result = apiInstance.findSimilarFunctionsBatch(analysisId, anNFunction); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#findSimilarFunctionsBatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | -| **anNFunction** | [**ANNFunction**](ANNFunction.md)| | | - -### Return type - -[**BaseResponseNearestNeighborAnalysis**](BaseResponseNearestNeighborAnalysis.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - # **getAnalysisBasicInfo** > BaseResponseBasic getAnalysisBasicInfo(analysisId) diff --git a/docs/BaseResponseBoxPlotConfidence.md b/docs/BaseResponseBoxPlotConfidence.md deleted file mode 100644 index 222fd35..0000000 --- a/docs/BaseResponseBoxPlotConfidence.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseBoxPlotConfidence - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseListFunctionBoxPlotConfidence.md b/docs/BaseResponseListFunctionBoxPlotConfidence.md deleted file mode 100644 index 08c39e5..0000000 --- a/docs/BaseResponseListFunctionBoxPlotConfidence.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseListFunctionBoxPlotConfidence - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**List<FunctionBoxPlotConfidence>**](FunctionBoxPlotConfidence.md) | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseListSimilarFunctionsResponse.md b/docs/BaseResponseListSimilarFunctionsResponse.md deleted file mode 100644 index 4de5384..0000000 --- a/docs/BaseResponseListSimilarFunctionsResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseListSimilarFunctionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**List<SimilarFunctionsResponse>**](SimilarFunctionsResponse.md) | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseListTagOriginBoxPlotConfidence.md b/docs/BaseResponseListTagOriginBoxPlotConfidence.md deleted file mode 100644 index 8a07667..0000000 --- a/docs/BaseResponseListTagOriginBoxPlotConfidence.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseListTagOriginBoxPlotConfidence - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**List<TagOriginBoxPlotConfidence>**](TagOriginBoxPlotConfidence.md) | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseNearestNeighborAnalysis.md b/docs/BaseResponseNearestNeighborAnalysis.md deleted file mode 100644 index 122b56a..0000000 --- a/docs/BaseResponseNearestNeighborAnalysis.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseNearestNeighborAnalysis - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | **Map<String, Map<String, NearestNeighbor>>** | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BoxPlotConfidence.md b/docs/BoxPlotConfidence.md deleted file mode 100644 index dc98ad7..0000000 --- a/docs/BoxPlotConfidence.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# BoxPlotConfidence - -Format for confidence - returned in the box plot format - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**min** | **BigDecimal** | | | -|**max** | **BigDecimal** | | | -|**average** | **BigDecimal** | | | -|**upperQuartile** | **BigDecimal** | | | -|**lowerQuartile** | **BigDecimal** | | | -|**positiveCount** | **Integer** | | | -|**negativeCount** | **Integer** | | | - - - diff --git a/docs/ConfidenceApi.md b/docs/ConfidenceApi.md deleted file mode 100644 index ac6de92..0000000 --- a/docs/ConfidenceApi.md +++ /dev/null @@ -1,294 +0,0 @@ -# ConfidenceApi - -All URIs are relative to *https://api.reveng.ai* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getAnalysisTagScore**](ConfidenceApi.md#getAnalysisTagScore) | **POST** /v2/confidence/analysis/{analysis_id}/tag_score | Calculate Tag Confidence Score for an Analysis | -| [**getAnalysisThreatScore**](ConfidenceApi.md#getAnalysisThreatScore) | **GET** /v2/confidence/analysis/{analysis_id}/threat_score | Calculate Threat Score for Binary | -| [**getFunctionsNameScore**](ConfidenceApi.md#getFunctionsNameScore) | **POST** /v2/confidence/functions/name_score | Calculate function name confidence for a set of Functions | -| [**getFunctionsThreatScore**](ConfidenceApi.md#getFunctionsThreatScore) | **POST** /v2/confidence/functions/threat_score | Calculate Threat Score for a set of Functions | - - - -# **getAnalysisTagScore** -> BaseResponseListTagOriginBoxPlotConfidence getAnalysisTagScore(analysisId, tagConfidenceBody) - -Calculate Tag Confidence Score for an Analysis - -Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - -### 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.ConfidenceApi; - -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"); - - ConfidenceApi apiInstance = new ConfidenceApi(defaultClient); - Integer analysisId = 56; // Integer | The analysis to calculate the tag scores for - TagConfidenceBody tagConfidenceBody = new TagConfidenceBody(); // TagConfidenceBody | - try { - BaseResponseListTagOriginBoxPlotConfidence result = apiInstance.getAnalysisTagScore(analysisId, tagConfidenceBody); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConfidenceApi#getAnalysisTagScore"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| The analysis to calculate the tag scores for | | -| **tagConfidenceBody** | [**TagConfidenceBody**](TagConfidenceBody.md)| | | - -### Return type - -[**BaseResponseListTagOriginBoxPlotConfidence**](BaseResponseListTagOriginBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - - -# **getAnalysisThreatScore** -> BaseResponseBoxPlotConfidence getAnalysisThreatScore(analysisId) - -Calculate Threat Score for Binary - -Accepts a binary ID and returns the threat score for that binary - -### 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.ConfidenceApi; - -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"); - - ConfidenceApi apiInstance = new ConfidenceApi(defaultClient); - Integer analysisId = 56; // Integer | The analysis to calculate the threat score for - try { - BaseResponseBoxPlotConfidence result = apiInstance.getAnalysisThreatScore(analysisId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConfidenceApi#getAnalysisThreatScore"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| The analysis to calculate the threat score for | | - -### Return type - -[**BaseResponseBoxPlotConfidence**](BaseResponseBoxPlotConfidence.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 | - | - - -# **getFunctionsNameScore** -> BaseResponseListFunctionBoxPlotConfidence getFunctionsNameScore(functionNameConfidenceBody) - -Calculate function name confidence for a set of Functions - -Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - -### 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.ConfidenceApi; - -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"); - - ConfidenceApi apiInstance = new ConfidenceApi(defaultClient); - FunctionNameConfidenceBody functionNameConfidenceBody = new FunctionNameConfidenceBody(); // FunctionNameConfidenceBody | - try { - BaseResponseListFunctionBoxPlotConfidence result = apiInstance.getFunctionsNameScore(functionNameConfidenceBody); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConfidenceApi#getFunctionsNameScore"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **functionNameConfidenceBody** | [**FunctionNameConfidenceBody**](FunctionNameConfidenceBody.md)| | | - -### Return type - -[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - - -# **getFunctionsThreatScore** -> BaseResponseListFunctionBoxPlotConfidence getFunctionsThreatScore(threatScoreFunctionBody) - -Calculate Threat Score for a set of Functions - -Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - -### 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.ConfidenceApi; - -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"); - - ConfidenceApi apiInstance = new ConfidenceApi(defaultClient); - ThreatScoreFunctionBody threatScoreFunctionBody = new ThreatScoreFunctionBody(); // ThreatScoreFunctionBody | - try { - BaseResponseListFunctionBoxPlotConfidence result = apiInstance.getFunctionsThreatScore(threatScoreFunctionBody); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConfidenceApi#getFunctionsThreatScore"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **threatScoreFunctionBody** | [**ThreatScoreFunctionBody**](ThreatScoreFunctionBody.md)| | | - -### Return type - -[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - diff --git a/docs/ELFRelocation.md b/docs/ELFRelocation.md index 47ae5f3..aa5b2b5 100644 --- a/docs/ELFRelocation.md +++ b/docs/ELFRelocation.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**address** | **Integer** | | | -|**type** | **Integer** | | | +|**type** | **String** | | | |**size** | **Integer** | | | |**addend** | **Integer** | | | |**symbolName** | **String** | | | diff --git a/docs/FunctionBoxPlotConfidence.md b/docs/FunctionBoxPlotConfidence.md deleted file mode 100644 index 312ad19..0000000 --- a/docs/FunctionBoxPlotConfidence.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FunctionBoxPlotConfidence - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functionId** | **Integer** | | | -|**boxPlot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | | - - - diff --git a/docs/FunctionNameConfidenceBody.md b/docs/FunctionNameConfidenceBody.md deleted file mode 100644 index 0898652..0000000 --- a/docs/FunctionNameConfidenceBody.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FunctionNameConfidenceBody - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functions** | [**List<FunctionNameInput>**](FunctionNameInput.md) | List of function ids and the function names they want to check confidence for | [optional] | -|**isDebug** | **Boolean** | Flag to match only to a debug function | [optional] | - - - diff --git a/docs/FunctionNameInput.md b/docs/FunctionNameInput.md deleted file mode 100644 index ec7547a..0000000 --- a/docs/FunctionNameInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FunctionNameInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functionId** | **Integer** | | | -|**functionName** | **String** | | | - - - diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index abbc69a..8aa4c03 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -16,7 +16,6 @@ All URIs are relative to *https://api.reveng.ai* | [**getFunctionCapabilities**](FunctionsCoreApi.md#getFunctionCapabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities | | [**getFunctionDetails**](FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details | | [**getFunctionStrings**](FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function | -| [**getSimilarFunctions**](FunctionsCoreApi.md#getSimilarFunctions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions | @@ -875,83 +874,3 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | - -# **getSimilarFunctions** -> BaseResponseListSimilarFunctionsResponse getSimilarFunctions(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds) - -Get list of similar functions - -### 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.FunctionsCoreApi; - -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"); - - FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); - Integer functionId = 56; // Integer | - Integer limit = 20; // Integer | Number of similar functions to return - BigDecimal distance = new BigDecimal("1.0"); // BigDecimal | Maximum cosine distance - List collectionIds = Arrays.asList(); // List | Collection filtering by IDs - Boolean debug = false; // Boolean | Only return matching debug functions - List debugTypes = Arrays.asList(); // List | If limiting results to functions with debug names, which type of debug names to include? - List binaryIds = Arrays.asList(); // List | Limit similar functions to specific binaries - try { - BaseResponseListSimilarFunctionsResponse result = apiInstance.getSimilarFunctions(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FunctionsCoreApi#getSimilarFunctions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **functionId** | **Integer**| | | -| **limit** | **Integer**| Number of similar functions to return | [optional] [default to 20] | -| **distance** | **BigDecimal**| Maximum cosine distance | [optional] [default to 1.0] | -| **collectionIds** | [**List<Integer>**](Integer.md)| Collection filtering by IDs | [optional] | -| **debug** | **Boolean**| Only return matching debug functions | [optional] [default to false] | -| **debugTypes** | [**List<String>**](String.md)| If limiting results to functions with debug names, which type of debug names to include? | [optional] [enum: USER, SYSTEM, EXTERNAL] | -| **binaryIds** | [**List<Integer>**](Integer.md)| Limit similar functions to specific binaries | [optional] | - -### Return type - -[**BaseResponseListSimilarFunctionsResponse**](BaseResponseListSimilarFunctionsResponse.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/FunctionsDetailResponse.md b/docs/FunctionsDetailResponse.md index 7ef0ff2..0e5cdde 100644 --- a/docs/FunctionsDetailResponse.md +++ b/docs/FunctionsDetailResponse.md @@ -16,6 +16,7 @@ |**binaryName** | **String** | | | |**sha256Hash** | **String** | | | |**debugHash** | **String** | | | +|**debug** | **Boolean** | | | |**embedding3d** | **List<BigDecimal>** | | [optional] | |**embedding1d** | **List<BigDecimal>** | | [optional] | diff --git a/docs/NearestNeighbor.md b/docs/NearestNeighbor.md deleted file mode 100644 index 771a541..0000000 --- a/docs/NearestNeighbor.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# NearestNeighbor - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**distance** | **BigDecimal** | | | -|**nearestNeighborAnalysisId** | **Integer** | | | -|**nearestNeighborAnalysisName** | **String** | | | -|**nearestNeighborFunctionName** | **String** | | | -|**nearestNeighborFunctionNameMangled** | **String** | | | -|**nearestNeighborBinaryId** | **Integer** | | | -|**nearestNeighborSha256Hash** | **String** | | | -|**nearestNeighborDebug** | **Boolean** | | | - - - diff --git a/docs/Origin.md b/docs/Origin.md deleted file mode 100644 index 41c47ae..0000000 --- a/docs/Origin.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# Origin - -## Enum - - -* `REV_ENG_MALWARE` (value: `"RevEng-Malware"`) - -* `REV_ENG_LIBRARY` (value: `"RevEng-Library"`) - -* `REV_ENG_BENIGN` (value: `"RevEng-Benign"`) - -* `REV_ENG` (value: `"RevEng"`) - -* `REV_ENG_HEURISTIC` (value: `"RevEng-Heuristic"`) - -* `REV_ENG_UNKNOWN` (value: `"RevEng-Unknown"`) - -* `VIRUS_TOTAL` (value: `"VirusTotal"`) - -* `MALWARE_BAZAAR` (value: `"MalwareBazaar"`) - - - diff --git a/docs/SimilarFunctionsResponse.md b/docs/SimilarFunctionsResponse.md deleted file mode 100644 index f8e1a69..0000000 --- a/docs/SimilarFunctionsResponse.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# SimilarFunctionsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functionId** | **Integer** | | | -|**functionName** | **String** | | | -|**binaryId** | **Integer** | | | -|**binaryName** | **String** | | | -|**distance** | **BigDecimal** | | | -|**embedding3d** | **List<BigDecimal>** | | | -|**embedding1d** | **List<BigDecimal>** | | | -|**sha256Hash** | **String** | | | - - - diff --git a/docs/TagConfidenceBody.md b/docs/TagConfidenceBody.md deleted file mode 100644 index d686c1e..0000000 --- a/docs/TagConfidenceBody.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TagConfidenceBody - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tags** | [**List<Tags>**](Tags.md) | | | - - - diff --git a/docs/TagOriginBoxPlotConfidence.md b/docs/TagOriginBoxPlotConfidence.md deleted file mode 100644 index 46932bd..0000000 --- a/docs/TagOriginBoxPlotConfidence.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TagOriginBoxPlotConfidence - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tag** | [**Tags**](Tags.md) | | | -|**boxPlot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | | - - - diff --git a/docs/Tags.md b/docs/Tags.md deleted file mode 100644 index 7a4510d..0000000 --- a/docs/Tags.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Tags - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tag** | **String** | The tag name | | -|**origin** | **Origin** | The origin of the tag | | - - - diff --git a/docs/ThreatScoreFunctionBody.md b/docs/ThreatScoreFunctionBody.md deleted file mode 100644 index 6ccb81f..0000000 --- a/docs/ThreatScoreFunctionBody.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ThreatScoreFunctionBody - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functionIds** | **List<Integer>** | List of function IDs to calculate threat score for | [optional] | - - - diff --git a/pom.xml b/pom.xml index 93d29cd..aa91adb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 2.4.0 + 2.8.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AnalysesCoreApi.java b/src/main/java/ai/reveng/api/AnalysesCoreApi.java index d497e9d..7634d99 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -26,7 +26,6 @@ import java.io.IOException; -import ai.reveng.model.ANNFunction; import ai.reveng.model.AnalysisCreateRequest; import ai.reveng.model.AnalysisUpdateRequest; import ai.reveng.model.AnalysisUpdateTagsRequest; @@ -41,7 +40,6 @@ import ai.reveng.model.BaseResponseCreated; import ai.reveng.model.BaseResponseDict; import ai.reveng.model.BaseResponseLogs; -import ai.reveng.model.BaseResponseNearestNeighborAnalysis; import ai.reveng.model.BaseResponseParams; import ai.reveng.model.BaseResponseRecent; import ai.reveng.model.BaseResponseStatus; @@ -377,147 +375,6 @@ public okhttp3.Call deleteAnalysisAsync(@javax.annotation.Nonnull Integer analys localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for findSimilarFunctionsBatch - * @param analysisId (required) - * @param anNFunction (required) - * @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 findSimilarFunctionsBatchCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ANNFunction anNFunction, 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 = anNFunction; - - // create path and map variables - String localVarPath = "/v2/analyses/{analysis_id}/similarity/functions" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - 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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSimilarFunctionsBatchValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ANNFunction anNFunction, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling findSimilarFunctionsBatch(Async)"); - } - - // verify the required parameter 'anNFunction' is set - if (anNFunction == null) { - throw new ApiException("Missing the required parameter 'anNFunction' when calling findSimilarFunctionsBatch(Async)"); - } - - return findSimilarFunctionsBatchCall(analysisId, anNFunction, _callback); - - } - - /** - * Batch Symbol ANN using Analysis ID - * Takes a analysis ID and returns the nearest functions within the database that match those functions - * @param analysisId (required) - * @param anNFunction (required) - * @return BaseResponseNearestNeighborAnalysis - * @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 BaseResponseNearestNeighborAnalysis findSimilarFunctionsBatch(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ANNFunction anNFunction) throws ApiException { - ApiResponse localVarResp = findSimilarFunctionsBatchWithHttpInfo(analysisId, anNFunction); - return localVarResp.getData(); - } - - /** - * Batch Symbol ANN using Analysis ID - * Takes a analysis ID and returns the nearest functions within the database that match those functions - * @param analysisId (required) - * @param anNFunction (required) - * @return ApiResponse<BaseResponseNearestNeighborAnalysis> - * @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 findSimilarFunctionsBatchWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ANNFunction anNFunction) throws ApiException { - okhttp3.Call localVarCall = findSimilarFunctionsBatchValidateBeforeCall(analysisId, anNFunction, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Batch Symbol ANN using Analysis ID (asynchronously) - * Takes a analysis ID and returns the nearest functions within the database that match those functions - * @param analysisId (required) - * @param anNFunction (required) - * @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 findSimilarFunctionsBatchAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ANNFunction anNFunction, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSimilarFunctionsBatchValidateBeforeCall(analysisId, anNFunction, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getAnalysisBasicInfo * @param analysisId (required) diff --git a/src/main/java/ai/reveng/api/ConfidenceApi.java b/src/main/java/ai/reveng/api/ConfidenceApi.java deleted file mode 100644 index b0a6a8e..0000000 --- a/src/main/java/ai/reveng/api/ConfidenceApi.java +++ /dev/null @@ -1,614 +0,0 @@ -/* - * 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.BaseResponseBoxPlotConfidence; -import ai.reveng.model.BaseResponseListFunctionBoxPlotConfidence; -import ai.reveng.model.BaseResponseListTagOriginBoxPlotConfidence; -import ai.reveng.model.FunctionNameConfidenceBody; -import ai.reveng.model.TagConfidenceBody; -import ai.reveng.model.ThreatScoreFunctionBody; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ConfidenceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ConfidenceApi() { - this(Configuration.getDefaultApiClient()); - } - - public ConfidenceApi(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 getAnalysisTagScore - * @param analysisId The analysis to calculate the tag scores for (required) - * @param tagConfidenceBody (required) - * @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 getAnalysisTagScoreCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull TagConfidenceBody tagConfidenceBody, 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 = tagConfidenceBody; - - // create path and map variables - String localVarPath = "/v2/confidence/analysis/{analysis_id}/tag_score" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - 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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAnalysisTagScoreValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull TagConfidenceBody tagConfidenceBody, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling getAnalysisTagScore(Async)"); - } - - // verify the required parameter 'tagConfidenceBody' is set - if (tagConfidenceBody == null) { - throw new ApiException("Missing the required parameter 'tagConfidenceBody' when calling getAnalysisTagScore(Async)"); - } - - return getAnalysisTagScoreCall(analysisId, tagConfidenceBody, _callback); - - } - - /** - * Calculate Tag Confidence Score for an Analysis - * Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - * @param analysisId The analysis to calculate the tag scores for (required) - * @param tagConfidenceBody (required) - * @return BaseResponseListTagOriginBoxPlotConfidence - * @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 BaseResponseListTagOriginBoxPlotConfidence getAnalysisTagScore(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull TagConfidenceBody tagConfidenceBody) throws ApiException { - ApiResponse localVarResp = getAnalysisTagScoreWithHttpInfo(analysisId, tagConfidenceBody); - return localVarResp.getData(); - } - - /** - * Calculate Tag Confidence Score for an Analysis - * Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - * @param analysisId The analysis to calculate the tag scores for (required) - * @param tagConfidenceBody (required) - * @return ApiResponse<BaseResponseListTagOriginBoxPlotConfidence> - * @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 getAnalysisTagScoreWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull TagConfidenceBody tagConfidenceBody) throws ApiException { - okhttp3.Call localVarCall = getAnalysisTagScoreValidateBeforeCall(analysisId, tagConfidenceBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Calculate Tag Confidence Score for an Analysis (asynchronously) - * Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - * @param analysisId The analysis to calculate the tag scores for (required) - * @param tagConfidenceBody (required) - * @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 getAnalysisTagScoreAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull TagConfidenceBody tagConfidenceBody, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAnalysisTagScoreValidateBeforeCall(analysisId, tagConfidenceBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAnalysisThreatScore - * @param analysisId The analysis to calculate the threat score for (required) - * @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 getAnalysisThreatScoreCall(@javax.annotation.Nonnull Integer analysisId, 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/confidence/analysis/{analysis_id}/threat_score" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - 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 getAnalysisThreatScoreValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling getAnalysisThreatScore(Async)"); - } - - return getAnalysisThreatScoreCall(analysisId, _callback); - - } - - /** - * Calculate Threat Score for Binary - * Accepts a binary ID and returns the threat score for that binary - * @param analysisId The analysis to calculate the threat score for (required) - * @return BaseResponseBoxPlotConfidence - * @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 BaseResponseBoxPlotConfidence getAnalysisThreatScore(@javax.annotation.Nonnull Integer analysisId) throws ApiException { - ApiResponse localVarResp = getAnalysisThreatScoreWithHttpInfo(analysisId); - return localVarResp.getData(); - } - - /** - * Calculate Threat Score for Binary - * Accepts a binary ID and returns the threat score for that binary - * @param analysisId The analysis to calculate the threat score for (required) - * @return ApiResponse<BaseResponseBoxPlotConfidence> - * @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 getAnalysisThreatScoreWithHttpInfo(@javax.annotation.Nonnull Integer analysisId) throws ApiException { - okhttp3.Call localVarCall = getAnalysisThreatScoreValidateBeforeCall(analysisId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Calculate Threat Score for Binary (asynchronously) - * Accepts a binary ID and returns the threat score for that binary - * @param analysisId The analysis to calculate the threat score for (required) - * @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 getAnalysisThreatScoreAsync(@javax.annotation.Nonnull Integer analysisId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAnalysisThreatScoreValidateBeforeCall(analysisId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getFunctionsNameScore - * @param functionNameConfidenceBody (required) - * @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 getFunctionsNameScoreCall(@javax.annotation.Nonnull FunctionNameConfidenceBody functionNameConfidenceBody, 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 = functionNameConfidenceBody; - - // create path and map variables - String localVarPath = "/v2/confidence/functions/name_score"; - - 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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionsNameScoreValidateBeforeCall(@javax.annotation.Nonnull FunctionNameConfidenceBody functionNameConfidenceBody, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'functionNameConfidenceBody' is set - if (functionNameConfidenceBody == null) { - throw new ApiException("Missing the required parameter 'functionNameConfidenceBody' when calling getFunctionsNameScore(Async)"); - } - - return getFunctionsNameScoreCall(functionNameConfidenceBody, _callback); - - } - - /** - * Calculate function name confidence for a set of Functions - * Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param functionNameConfidenceBody (required) - * @return BaseResponseListFunctionBoxPlotConfidence - * @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 BaseResponseListFunctionBoxPlotConfidence getFunctionsNameScore(@javax.annotation.Nonnull FunctionNameConfidenceBody functionNameConfidenceBody) throws ApiException { - ApiResponse localVarResp = getFunctionsNameScoreWithHttpInfo(functionNameConfidenceBody); - return localVarResp.getData(); - } - - /** - * Calculate function name confidence for a set of Functions - * Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param functionNameConfidenceBody (required) - * @return ApiResponse<BaseResponseListFunctionBoxPlotConfidence> - * @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 getFunctionsNameScoreWithHttpInfo(@javax.annotation.Nonnull FunctionNameConfidenceBody functionNameConfidenceBody) throws ApiException { - okhttp3.Call localVarCall = getFunctionsNameScoreValidateBeforeCall(functionNameConfidenceBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Calculate function name confidence for a set of Functions (asynchronously) - * Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param functionNameConfidenceBody (required) - * @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 getFunctionsNameScoreAsync(@javax.annotation.Nonnull FunctionNameConfidenceBody functionNameConfidenceBody, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getFunctionsNameScoreValidateBeforeCall(functionNameConfidenceBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getFunctionsThreatScore - * @param threatScoreFunctionBody (required) - * @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 getFunctionsThreatScoreCall(@javax.annotation.Nonnull ThreatScoreFunctionBody threatScoreFunctionBody, 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 = threatScoreFunctionBody; - - // create path and map variables - String localVarPath = "/v2/confidence/functions/threat_score"; - - 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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionsThreatScoreValidateBeforeCall(@javax.annotation.Nonnull ThreatScoreFunctionBody threatScoreFunctionBody, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'threatScoreFunctionBody' is set - if (threatScoreFunctionBody == null) { - throw new ApiException("Missing the required parameter 'threatScoreFunctionBody' when calling getFunctionsThreatScore(Async)"); - } - - return getFunctionsThreatScoreCall(threatScoreFunctionBody, _callback); - - } - - /** - * Calculate Threat Score for a set of Functions - * Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param threatScoreFunctionBody (required) - * @return BaseResponseListFunctionBoxPlotConfidence - * @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 BaseResponseListFunctionBoxPlotConfidence getFunctionsThreatScore(@javax.annotation.Nonnull ThreatScoreFunctionBody threatScoreFunctionBody) throws ApiException { - ApiResponse localVarResp = getFunctionsThreatScoreWithHttpInfo(threatScoreFunctionBody); - return localVarResp.getData(); - } - - /** - * Calculate Threat Score for a set of Functions - * Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param threatScoreFunctionBody (required) - * @return ApiResponse<BaseResponseListFunctionBoxPlotConfidence> - * @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 getFunctionsThreatScoreWithHttpInfo(@javax.annotation.Nonnull ThreatScoreFunctionBody threatScoreFunctionBody) throws ApiException { - okhttp3.Call localVarCall = getFunctionsThreatScoreValidateBeforeCall(threatScoreFunctionBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Calculate Threat Score for a set of Functions (asynchronously) - * Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - * @param threatScoreFunctionBody (required) - * @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 getFunctionsThreatScoreAsync(@javax.annotation.Nonnull ThreatScoreFunctionBody threatScoreFunctionBody, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getFunctionsThreatScoreValidateBeforeCall(threatScoreFunctionBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/ai/reveng/api/FunctionsCoreApi.java b/src/main/java/ai/reveng/api/FunctionsCoreApi.java index a4961ec..0ded6ec 100644 --- a/src/main/java/ai/reveng/api/FunctionsCoreApi.java +++ b/src/main/java/ai/reveng/api/FunctionsCoreApi.java @@ -37,8 +37,6 @@ import ai.reveng.model.BaseResponseFunctionCapabilityResponse; import ai.reveng.model.BaseResponseFunctionStringsResponse; import ai.reveng.model.BaseResponseFunctionsDetailResponse; -import ai.reveng.model.BaseResponseListSimilarFunctionsResponse; -import java.math.BigDecimal; import ai.reveng.model.FunctionMatchingBatchResponse; import ai.reveng.model.FunctionMatchingRequest; @@ -1751,183 +1749,4 @@ public okhttp3.Call getFunctionStringsAsync(@javax.annotation.Nonnull Integer fu localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getSimilarFunctions - * @param functionId (required) - * @param limit Number of similar functions to return (optional, default to 20) - * @param distance Maximum cosine distance (optional, default to 1.0) - * @param collectionIds Collection filtering by IDs (optional) - * @param debug Only return matching debug functions (optional, default to false) - * @param debugTypes If limiting results to functions with debug names, which type of debug names to include? (optional) - * @param binaryIds Limit similar functions to specific binaries (optional) - * @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 getSimilarFunctionsCall(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable BigDecimal distance, @javax.annotation.Nullable List collectionIds, @javax.annotation.Nullable Boolean debug, @javax.annotation.Nullable List debugTypes, @javax.annotation.Nullable List binaryIds, 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/functions/{function_id}/similar-functions" - .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (distance != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("distance", distance)); - } - - if (collectionIds != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "collection_ids", collectionIds)); - } - - if (debug != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("debug", debug)); - } - - if (debugTypes != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "debug_types", debugTypes)); - } - - if (binaryIds != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "binary_ids", binaryIds)); - } - - 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 getSimilarFunctionsValidateBeforeCall(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable BigDecimal distance, @javax.annotation.Nullable List collectionIds, @javax.annotation.Nullable Boolean debug, @javax.annotation.Nullable List debugTypes, @javax.annotation.Nullable List binaryIds, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'functionId' is set - if (functionId == null) { - throw new ApiException("Missing the required parameter 'functionId' when calling getSimilarFunctions(Async)"); - } - - return getSimilarFunctionsCall(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds, _callback); - - } - - /** - * Get list of similar functions - * - * @param functionId (required) - * @param limit Number of similar functions to return (optional, default to 20) - * @param distance Maximum cosine distance (optional, default to 1.0) - * @param collectionIds Collection filtering by IDs (optional) - * @param debug Only return matching debug functions (optional, default to false) - * @param debugTypes If limiting results to functions with debug names, which type of debug names to include? (optional) - * @param binaryIds Limit similar functions to specific binaries (optional) - * @return BaseResponseListSimilarFunctionsResponse - * @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 BaseResponseListSimilarFunctionsResponse getSimilarFunctions(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable BigDecimal distance, @javax.annotation.Nullable List collectionIds, @javax.annotation.Nullable Boolean debug, @javax.annotation.Nullable List debugTypes, @javax.annotation.Nullable List binaryIds) throws ApiException { - ApiResponse localVarResp = getSimilarFunctionsWithHttpInfo(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds); - return localVarResp.getData(); - } - - /** - * Get list of similar functions - * - * @param functionId (required) - * @param limit Number of similar functions to return (optional, default to 20) - * @param distance Maximum cosine distance (optional, default to 1.0) - * @param collectionIds Collection filtering by IDs (optional) - * @param debug Only return matching debug functions (optional, default to false) - * @param debugTypes If limiting results to functions with debug names, which type of debug names to include? (optional) - * @param binaryIds Limit similar functions to specific binaries (optional) - * @return ApiResponse<BaseResponseListSimilarFunctionsResponse> - * @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 getSimilarFunctionsWithHttpInfo(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable BigDecimal distance, @javax.annotation.Nullable List collectionIds, @javax.annotation.Nullable Boolean debug, @javax.annotation.Nullable List debugTypes, @javax.annotation.Nullable List binaryIds) throws ApiException { - okhttp3.Call localVarCall = getSimilarFunctionsValidateBeforeCall(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get list of similar functions (asynchronously) - * - * @param functionId (required) - * @param limit Number of similar functions to return (optional, default to 20) - * @param distance Maximum cosine distance (optional, default to 1.0) - * @param collectionIds Collection filtering by IDs (optional) - * @param debug Only return matching debug functions (optional, default to false) - * @param debugTypes If limiting results to functions with debug names, which type of debug names to include? (optional) - * @param binaryIds Limit similar functions to specific binaries (optional) - * @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 getSimilarFunctionsAsync(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable BigDecimal distance, @javax.annotation.Nullable List collectionIds, @javax.annotation.Nullable Boolean debug, @javax.annotation.Nullable List debugTypes, @javax.annotation.Nullable List binaryIds, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getSimilarFunctionsValidateBeforeCall(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds, _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 6a6efb7..a1befed 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -140,7 +140,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.4.0/java"); + setUserAgent("OpenAPI-Generator/2.8.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 7f1a215..a2a7dd2 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.4.0"; + public static final String VERSION = "2.8.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 10c8f10..372cdae 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -98,7 +98,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ANNFunction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Addr.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AiUnstripRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisAccessInfo.CustomTypeAdapterFactory()); @@ -140,7 +139,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBlockCommentsGenerationForFunctionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBlockCommentsOverviewGenerationResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBool.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCalleesCallerFunctionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCapabilities.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseCheckSecurityChecksTaskResponse.CustomTypeAdapterFactory()); @@ -173,16 +171,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCollectionResults.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCommentResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListDieMatch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListFunctionBoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListFunctionNameHistory.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListSBOM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListSimilarFunctionsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListTagOriginBoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListUserActivityResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseLoginResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseLogs.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseModelsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseNearestNeighborAnalysis.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseNetworkOverviewResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseProcessDumps.CustomTypeAdapterFactory()); @@ -210,7 +204,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinarySearchResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Block.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BlockCommentsGenerationForFunctionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CalleeFunctionInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CalleesCallerFunctionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CallerFunctionInfo.CustomTypeAdapterFactory()); @@ -261,7 +254,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBlockResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBlocksResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBoundary.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionCapabilityResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionCommentCreateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionDataTypes.CustomTypeAdapterFactory()); @@ -280,9 +272,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionMatchingFilters.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionMatchingRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionMatchingResultWithBestMatch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionNameConfidenceBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionNameHistory.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionNameInput.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionParamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionRename.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionRenameMap.CustomTypeAdapterFactory()); @@ -316,7 +306,6 @@ 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.NearestNeighbor.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()); @@ -345,7 +334,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityChecksResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SecurityModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SimilarFunctionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleCodeCertificateModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleCodeSignatureModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SinglePDBEntryModel.CustomTypeAdapterFactory()); @@ -362,14 +350,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TTPSElement.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TTPSOccurance.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Tag.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TagConfidenceBody.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TagOriginBoxPlotConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TagResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TagSearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TagSearchResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Tags.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TaskResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ThreatScoreFunctionBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TimestampModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TypeDefinition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.UpdateFunctionDataTypes.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/ANNFunction.java b/src/main/java/ai/reveng/model/ANNFunction.java deleted file mode 100644 index 903adbc..0000000 --- a/src/main/java/ai/reveng/model/ANNFunction.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * 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.math.BigDecimal; -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; - -/** - * ANNFunction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ANNFunction { - public static final String SERIALIZED_NAME_LIMIT = "limit"; - @SerializedName(SERIALIZED_NAME_LIMIT) - @javax.annotation.Nullable - private Integer limit = 5; - - public static final String SERIALIZED_NAME_DISTANCE = "distance"; - @SerializedName(SERIALIZED_NAME_DISTANCE) - @javax.annotation.Nullable - private BigDecimal distance = new BigDecimal("0.1"); - - public static final String SERIALIZED_NAME_ANALYSIS_SEARCH_IDS = "analysis_search_ids"; - @SerializedName(SERIALIZED_NAME_ANALYSIS_SEARCH_IDS) - @javax.annotation.Nullable - private List analysisSearchIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_COLLECTION_SEARCH_IDS = "collection_search_ids"; - @SerializedName(SERIALIZED_NAME_COLLECTION_SEARCH_IDS) - @javax.annotation.Nullable - private List collectionSearchIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SEARCH_BINARY_IDS = "search_binary_ids"; - @SerializedName(SERIALIZED_NAME_SEARCH_BINARY_IDS) - @javax.annotation.Nullable - private List searchBinaryIds; - - public static final String SERIALIZED_NAME_SEARCH_FUNCTION_IDS = "search_function_ids"; - @SerializedName(SERIALIZED_NAME_SEARCH_FUNCTION_IDS) - @javax.annotation.Nullable - private List searchFunctionIds; - - public static final String SERIALIZED_NAME_DEBUG_ONLY = "debug_only"; - @SerializedName(SERIALIZED_NAME_DEBUG_ONLY) - @javax.annotation.Nullable - private Boolean debugOnly = false; - - public ANNFunction() { - } - - public ANNFunction limit(@javax.annotation.Nullable Integer limit) { - this.limit = limit; - return this; - } - - /** - * The amount of neighbours per function ID - * @return limit - */ - @javax.annotation.Nullable - public Integer getLimit() { - return limit; - } - - public void setLimit(@javax.annotation.Nullable Integer limit) { - this.limit = limit; - } - - - public ANNFunction distance(@javax.annotation.Nullable BigDecimal distance) { - this.distance = distance; - return this; - } - - /** - * The distance between two neighbours - * @return distance - */ - @javax.annotation.Nullable - public BigDecimal getDistance() { - return distance; - } - - public void setDistance(@javax.annotation.Nullable BigDecimal distance) { - this.distance = distance; - } - - - public ANNFunction analysisSearchIds(@javax.annotation.Nullable List analysisSearchIds) { - this.analysisSearchIds = analysisSearchIds; - return this; - } - - public ANNFunction addAnalysisSearchIdsItem(Integer analysisSearchIdsItem) { - if (this.analysisSearchIds == null) { - this.analysisSearchIds = new ArrayList<>(); - } - this.analysisSearchIds.add(analysisSearchIdsItem); - return this; - } - - /** - * Perform a search on functions within a list of analyses - * @return analysisSearchIds - */ - @javax.annotation.Nullable - public List getAnalysisSearchIds() { - return analysisSearchIds; - } - - public void setAnalysisSearchIds(@javax.annotation.Nullable List analysisSearchIds) { - this.analysisSearchIds = analysisSearchIds; - } - - - public ANNFunction collectionSearchIds(@javax.annotation.Nullable List collectionSearchIds) { - this.collectionSearchIds = collectionSearchIds; - return this; - } - - public ANNFunction addCollectionSearchIdsItem(Integer collectionSearchIdsItem) { - if (this.collectionSearchIds == null) { - this.collectionSearchIds = new ArrayList<>(); - } - this.collectionSearchIds.add(collectionSearchIdsItem); - return this; - } - - /** - * Search only within these collections - * @return collectionSearchIds - */ - @javax.annotation.Nullable - public List getCollectionSearchIds() { - return collectionSearchIds; - } - - public void setCollectionSearchIds(@javax.annotation.Nullable List collectionSearchIds) { - this.collectionSearchIds = collectionSearchIds; - } - - - public ANNFunction searchBinaryIds(@javax.annotation.Nullable List searchBinaryIds) { - this.searchBinaryIds = searchBinaryIds; - return this; - } - - public ANNFunction addSearchBinaryIdsItem(Integer searchBinaryIdsItem) { - if (this.searchBinaryIds == null) { - this.searchBinaryIds = new ArrayList<>(); - } - this.searchBinaryIds.add(searchBinaryIdsItem); - return this; - } - - /** - * Get searchBinaryIds - * @return searchBinaryIds - */ - @javax.annotation.Nullable - public List getSearchBinaryIds() { - return searchBinaryIds; - } - - public void setSearchBinaryIds(@javax.annotation.Nullable List searchBinaryIds) { - this.searchBinaryIds = searchBinaryIds; - } - - - public ANNFunction searchFunctionIds(@javax.annotation.Nullable List searchFunctionIds) { - this.searchFunctionIds = searchFunctionIds; - return this; - } - - public ANNFunction addSearchFunctionIdsItem(Integer searchFunctionIdsItem) { - if (this.searchFunctionIds == null) { - this.searchFunctionIds = new ArrayList<>(); - } - this.searchFunctionIds.add(searchFunctionIdsItem); - return this; - } - - /** - * Get searchFunctionIds - * @return searchFunctionIds - */ - @javax.annotation.Nullable - public List getSearchFunctionIds() { - return searchFunctionIds; - } - - public void setSearchFunctionIds(@javax.annotation.Nullable List searchFunctionIds) { - this.searchFunctionIds = searchFunctionIds; - } - - - public ANNFunction debugOnly(@javax.annotation.Nullable Boolean debugOnly) { - this.debugOnly = debugOnly; - return this; - } - - /** - * Searches for only functions which are debug - * @return debugOnly - */ - @javax.annotation.Nullable - public Boolean getDebugOnly() { - return debugOnly; - } - - public void setDebugOnly(@javax.annotation.Nullable Boolean debugOnly) { - this.debugOnly = debugOnly; - } - - /** - * 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 ANNFunction instance itself - */ - public ANNFunction 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; - } - ANNFunction anNFunction = (ANNFunction) o; - return Objects.equals(this.limit, anNFunction.limit) && - Objects.equals(this.distance, anNFunction.distance) && - Objects.equals(this.analysisSearchIds, anNFunction.analysisSearchIds) && - Objects.equals(this.collectionSearchIds, anNFunction.collectionSearchIds) && - Objects.equals(this.searchBinaryIds, anNFunction.searchBinaryIds) && - Objects.equals(this.searchFunctionIds, anNFunction.searchFunctionIds) && - Objects.equals(this.debugOnly, anNFunction.debugOnly)&& - Objects.equals(this.additionalProperties, anNFunction.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(limit, distance, analysisSearchIds, collectionSearchIds, searchBinaryIds, searchFunctionIds, debugOnly, 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 ANNFunction {\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); - sb.append(" analysisSearchIds: ").append(toIndentedString(analysisSearchIds)).append("\n"); - sb.append(" collectionSearchIds: ").append(toIndentedString(collectionSearchIds)).append("\n"); - sb.append(" searchBinaryIds: ").append(toIndentedString(searchBinaryIds)).append("\n"); - sb.append(" searchFunctionIds: ").append(toIndentedString(searchFunctionIds)).append("\n"); - sb.append(" debugOnly: ").append(toIndentedString(debugOnly)).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("limit", "distance", "analysis_search_ids", "collection_search_ids", "search_binary_ids", "search_function_ids", "debug_only")); - - // 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 ANNFunction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ANNFunction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ANNFunction is not found in the empty JSON string", ANNFunction.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("analysis_search_ids") != null && !jsonObj.get("analysis_search_ids").isJsonNull() && !jsonObj.get("analysis_search_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `analysis_search_ids` to be an array in the JSON string but got `%s`", jsonObj.get("analysis_search_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("collection_search_ids") != null && !jsonObj.get("collection_search_ids").isJsonNull() && !jsonObj.get("collection_search_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `collection_search_ids` to be an array in the JSON string but got `%s`", jsonObj.get("collection_search_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("search_binary_ids") != null && !jsonObj.get("search_binary_ids").isJsonNull() && !jsonObj.get("search_binary_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `search_binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("search_binary_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("search_function_ids") != null && !jsonObj.get("search_function_ids").isJsonNull() && !jsonObj.get("search_function_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `search_function_ids` to be an array in the JSON string but got `%s`", jsonObj.get("search_function_ids").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ANNFunction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ANNFunction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ANNFunction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ANNFunction 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 ANNFunction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ANNFunction 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 ANNFunction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ANNFunction - * @throws IOException if the JSON string is invalid with respect to ANNFunction - */ - public static ANNFunction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ANNFunction.class); - } - - /** - * Convert an instance of ANNFunction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseBoxPlotConfidence.java b/src/main/java/ai/reveng/model/BaseResponseBoxPlotConfidence.java deleted file mode 100644 index c5213fb..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseBoxPlotConfidence.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * 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.BoxPlotConfidence; -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; - -/** - * BaseResponseBoxPlotConfidence - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseBoxPlotConfidence { - 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 BoxPlotConfidence 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 BaseResponseBoxPlotConfidence() { - } - - public BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence data(@javax.annotation.Nullable BoxPlotConfidence data) { - this.data = data; - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public BoxPlotConfidence getData() { - return data; - } - - public void setData(@javax.annotation.Nullable BoxPlotConfidence data) { - this.data = data; - } - - - public BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence instance itself - */ - public BaseResponseBoxPlotConfidence 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; - } - BaseResponseBoxPlotConfidence baseResponseBoxPlotConfidence = (BaseResponseBoxPlotConfidence) o; - return Objects.equals(this.status, baseResponseBoxPlotConfidence.status) && - Objects.equals(this.data, baseResponseBoxPlotConfidence.data) && - Objects.equals(this.message, baseResponseBoxPlotConfidence.message) && - Objects.equals(this.errors, baseResponseBoxPlotConfidence.errors) && - Objects.equals(this.meta, baseResponseBoxPlotConfidence.meta)&& - Objects.equals(this.additionalProperties, baseResponseBoxPlotConfidence.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 BaseResponseBoxPlotConfidence {\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 BaseResponseBoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseBoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseBoxPlotConfidence is not found in the empty JSON string", BaseResponseBoxPlotConfidence.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - BoxPlotConfidence.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 (!BaseResponseBoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseBoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseBoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseBoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to BaseResponseBoxPlotConfidence - */ - public static BaseResponseBoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseBoxPlotConfidence.class); - } - - /** - * Convert an instance of BaseResponseBoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidence.java b/src/main/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidence.java deleted file mode 100644 index 85a6f59..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidence.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.FunctionBoxPlotConfidence; -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; - -/** - * BaseResponseListFunctionBoxPlotConfidence - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseListFunctionBoxPlotConfidence { - 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 List 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 BaseResponseListFunctionBoxPlotConfidence() { - } - - public BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence data(@javax.annotation.Nullable List data) { - this.data = data; - return this; - } - - public BaseResponseListFunctionBoxPlotConfidence addDataItem(FunctionBoxPlotConfidence dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public List getData() { - return data; - } - - public void setData(@javax.annotation.Nullable List data) { - this.data = data; - } - - - public BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence instance itself - */ - public BaseResponseListFunctionBoxPlotConfidence 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; - } - BaseResponseListFunctionBoxPlotConfidence baseResponseListFunctionBoxPlotConfidence = (BaseResponseListFunctionBoxPlotConfidence) o; - return Objects.equals(this.status, baseResponseListFunctionBoxPlotConfidence.status) && - Objects.equals(this.data, baseResponseListFunctionBoxPlotConfidence.data) && - Objects.equals(this.message, baseResponseListFunctionBoxPlotConfidence.message) && - Objects.equals(this.errors, baseResponseListFunctionBoxPlotConfidence.errors) && - Objects.equals(this.meta, baseResponseListFunctionBoxPlotConfidence.meta)&& - Objects.equals(this.additionalProperties, baseResponseListFunctionBoxPlotConfidence.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 BaseResponseListFunctionBoxPlotConfidence {\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 BaseResponseListFunctionBoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseListFunctionBoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseListFunctionBoxPlotConfidence is not found in the empty JSON string", BaseResponseListFunctionBoxPlotConfidence.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - FunctionBoxPlotConfidence.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - 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 (!BaseResponseListFunctionBoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseListFunctionBoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseListFunctionBoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseListFunctionBoxPlotConfidence 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 BaseResponseListFunctionBoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseListFunctionBoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to BaseResponseListFunctionBoxPlotConfidence - */ - public static BaseResponseListFunctionBoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseListFunctionBoxPlotConfidence.class); - } - - /** - * Convert an instance of BaseResponseListFunctionBoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponse.java b/src/main/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponse.java deleted file mode 100644 index 39589d6..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponse.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.SimilarFunctionsResponse; -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; - -/** - * BaseResponseListSimilarFunctionsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseListSimilarFunctionsResponse { - 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 List 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 BaseResponseListSimilarFunctionsResponse() { - } - - public BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse data(@javax.annotation.Nullable List data) { - this.data = data; - return this; - } - - public BaseResponseListSimilarFunctionsResponse addDataItem(SimilarFunctionsResponse dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public List getData() { - return data; - } - - public void setData(@javax.annotation.Nullable List data) { - this.data = data; - } - - - public BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse instance itself - */ - public BaseResponseListSimilarFunctionsResponse 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; - } - BaseResponseListSimilarFunctionsResponse baseResponseListSimilarFunctionsResponse = (BaseResponseListSimilarFunctionsResponse) o; - return Objects.equals(this.status, baseResponseListSimilarFunctionsResponse.status) && - Objects.equals(this.data, baseResponseListSimilarFunctionsResponse.data) && - Objects.equals(this.message, baseResponseListSimilarFunctionsResponse.message) && - Objects.equals(this.errors, baseResponseListSimilarFunctionsResponse.errors) && - Objects.equals(this.meta, baseResponseListSimilarFunctionsResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseListSimilarFunctionsResponse.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 BaseResponseListSimilarFunctionsResponse {\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 BaseResponseListSimilarFunctionsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseListSimilarFunctionsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseListSimilarFunctionsResponse is not found in the empty JSON string", BaseResponseListSimilarFunctionsResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - SimilarFunctionsResponse.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - 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 (!BaseResponseListSimilarFunctionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseListSimilarFunctionsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseListSimilarFunctionsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseListSimilarFunctionsResponse 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 BaseResponseListSimilarFunctionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseListSimilarFunctionsResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseListSimilarFunctionsResponse - */ - public static BaseResponseListSimilarFunctionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseListSimilarFunctionsResponse.class); - } - - /** - * Convert an instance of BaseResponseListSimilarFunctionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidence.java b/src/main/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidence.java deleted file mode 100644 index 7667f01..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidence.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.TagOriginBoxPlotConfidence; -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; - -/** - * BaseResponseListTagOriginBoxPlotConfidence - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseListTagOriginBoxPlotConfidence { - 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 List 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 BaseResponseListTagOriginBoxPlotConfidence() { - } - - public BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence data(@javax.annotation.Nullable List data) { - this.data = data; - return this; - } - - public BaseResponseListTagOriginBoxPlotConfidence addDataItem(TagOriginBoxPlotConfidence dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public List getData() { - return data; - } - - public void setData(@javax.annotation.Nullable List data) { - this.data = data; - } - - - public BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence instance itself - */ - public BaseResponseListTagOriginBoxPlotConfidence 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; - } - BaseResponseListTagOriginBoxPlotConfidence baseResponseListTagOriginBoxPlotConfidence = (BaseResponseListTagOriginBoxPlotConfidence) o; - return Objects.equals(this.status, baseResponseListTagOriginBoxPlotConfidence.status) && - Objects.equals(this.data, baseResponseListTagOriginBoxPlotConfidence.data) && - Objects.equals(this.message, baseResponseListTagOriginBoxPlotConfidence.message) && - Objects.equals(this.errors, baseResponseListTagOriginBoxPlotConfidence.errors) && - Objects.equals(this.meta, baseResponseListTagOriginBoxPlotConfidence.meta)&& - Objects.equals(this.additionalProperties, baseResponseListTagOriginBoxPlotConfidence.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 BaseResponseListTagOriginBoxPlotConfidence {\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 BaseResponseListTagOriginBoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseListTagOriginBoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseListTagOriginBoxPlotConfidence is not found in the empty JSON string", BaseResponseListTagOriginBoxPlotConfidence.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - TagOriginBoxPlotConfidence.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - 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 (!BaseResponseListTagOriginBoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseListTagOriginBoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseListTagOriginBoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseListTagOriginBoxPlotConfidence 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 BaseResponseListTagOriginBoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseListTagOriginBoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to BaseResponseListTagOriginBoxPlotConfidence - */ - public static BaseResponseListTagOriginBoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseListTagOriginBoxPlotConfidence.class); - } - - /** - * Convert an instance of BaseResponseListTagOriginBoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseNearestNeighborAnalysis.java b/src/main/java/ai/reveng/model/BaseResponseNearestNeighborAnalysis.java deleted file mode 100644 index 01550d2..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseNearestNeighborAnalysis.java +++ /dev/null @@ -1,444 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.NearestNeighbor; -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.HashMap; -import java.util.List; -import java.util.Map; -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; - -/** - * BaseResponseNearestNeighborAnalysis - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseNearestNeighborAnalysis { - 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 Map> data = new HashMap<>(); - - 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 BaseResponseNearestNeighborAnalysis() { - } - - public BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis data(@javax.annotation.Nullable Map> data) { - this.data = data; - return this; - } - - public BaseResponseNearestNeighborAnalysis putDataItem(String key, Map dataItem) { - if (this.data == null) { - this.data = new HashMap<>(); - } - this.data.put(key, dataItem); - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public Map> getData() { - return data; - } - - public void setData(@javax.annotation.Nullable Map> data) { - this.data = data; - } - - - public BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis instance itself - */ - public BaseResponseNearestNeighborAnalysis 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; - } - BaseResponseNearestNeighborAnalysis baseResponseNearestNeighborAnalysis = (BaseResponseNearestNeighborAnalysis) o; - return Objects.equals(this.status, baseResponseNearestNeighborAnalysis.status) && - Objects.equals(this.data, baseResponseNearestNeighborAnalysis.data) && - Objects.equals(this.message, baseResponseNearestNeighborAnalysis.message) && - Objects.equals(this.errors, baseResponseNearestNeighborAnalysis.errors) && - Objects.equals(this.meta, baseResponseNearestNeighborAnalysis.meta)&& - Objects.equals(this.additionalProperties, baseResponseNearestNeighborAnalysis.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 BaseResponseNearestNeighborAnalysis {\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 BaseResponseNearestNeighborAnalysis - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseNearestNeighborAnalysis.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseNearestNeighborAnalysis is not found in the empty JSON string", BaseResponseNearestNeighborAnalysis.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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 (!BaseResponseNearestNeighborAnalysis.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseNearestNeighborAnalysis' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseNearestNeighborAnalysis.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseNearestNeighborAnalysis 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 BaseResponseNearestNeighborAnalysis given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseNearestNeighborAnalysis - * @throws IOException if the JSON string is invalid with respect to BaseResponseNearestNeighborAnalysis - */ - public static BaseResponseNearestNeighborAnalysis fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseNearestNeighborAnalysis.class); - } - - /** - * Convert an instance of BaseResponseNearestNeighborAnalysis to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BoxPlotConfidence.java b/src/main/java/ai/reveng/model/BoxPlotConfidence.java deleted file mode 100644 index 6dc3e5f..0000000 --- a/src/main/java/ai/reveng/model/BoxPlotConfidence.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * 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.math.BigDecimal; -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; - -/** - * Format for confidence - returned in the box plot format - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BoxPlotConfidence { - public static final String SERIALIZED_NAME_MIN = "min"; - @SerializedName(SERIALIZED_NAME_MIN) - @javax.annotation.Nonnull - private BigDecimal min; - - public static final String SERIALIZED_NAME_MAX = "max"; - @SerializedName(SERIALIZED_NAME_MAX) - @javax.annotation.Nonnull - private BigDecimal max; - - public static final String SERIALIZED_NAME_AVERAGE = "average"; - @SerializedName(SERIALIZED_NAME_AVERAGE) - @javax.annotation.Nonnull - private BigDecimal average; - - public static final String SERIALIZED_NAME_UPPER_QUARTILE = "upper_quartile"; - @SerializedName(SERIALIZED_NAME_UPPER_QUARTILE) - @javax.annotation.Nonnull - private BigDecimal upperQuartile; - - public static final String SERIALIZED_NAME_LOWER_QUARTILE = "lower_quartile"; - @SerializedName(SERIALIZED_NAME_LOWER_QUARTILE) - @javax.annotation.Nonnull - private BigDecimal lowerQuartile; - - public static final String SERIALIZED_NAME_POSITIVE_COUNT = "positive_count"; - @SerializedName(SERIALIZED_NAME_POSITIVE_COUNT) - @javax.annotation.Nonnull - private Integer positiveCount; - - public static final String SERIALIZED_NAME_NEGATIVE_COUNT = "negative_count"; - @SerializedName(SERIALIZED_NAME_NEGATIVE_COUNT) - @javax.annotation.Nonnull - private Integer negativeCount; - - public BoxPlotConfidence() { - } - - public BoxPlotConfidence min(@javax.annotation.Nonnull BigDecimal min) { - this.min = min; - return this; - } - - /** - * Get min - * @return min - */ - @javax.annotation.Nonnull - public BigDecimal getMin() { - return min; - } - - public void setMin(@javax.annotation.Nonnull BigDecimal min) { - this.min = min; - } - - - public BoxPlotConfidence max(@javax.annotation.Nonnull BigDecimal max) { - this.max = max; - return this; - } - - /** - * Get max - * @return max - */ - @javax.annotation.Nonnull - public BigDecimal getMax() { - return max; - } - - public void setMax(@javax.annotation.Nonnull BigDecimal max) { - this.max = max; - } - - - public BoxPlotConfidence average(@javax.annotation.Nonnull BigDecimal average) { - this.average = average; - return this; - } - - /** - * Get average - * @return average - */ - @javax.annotation.Nonnull - public BigDecimal getAverage() { - return average; - } - - public void setAverage(@javax.annotation.Nonnull BigDecimal average) { - this.average = average; - } - - - public BoxPlotConfidence upperQuartile(@javax.annotation.Nonnull BigDecimal upperQuartile) { - this.upperQuartile = upperQuartile; - return this; - } - - /** - * Get upperQuartile - * @return upperQuartile - */ - @javax.annotation.Nonnull - public BigDecimal getUpperQuartile() { - return upperQuartile; - } - - public void setUpperQuartile(@javax.annotation.Nonnull BigDecimal upperQuartile) { - this.upperQuartile = upperQuartile; - } - - - public BoxPlotConfidence lowerQuartile(@javax.annotation.Nonnull BigDecimal lowerQuartile) { - this.lowerQuartile = lowerQuartile; - return this; - } - - /** - * Get lowerQuartile - * @return lowerQuartile - */ - @javax.annotation.Nonnull - public BigDecimal getLowerQuartile() { - return lowerQuartile; - } - - public void setLowerQuartile(@javax.annotation.Nonnull BigDecimal lowerQuartile) { - this.lowerQuartile = lowerQuartile; - } - - - public BoxPlotConfidence positiveCount(@javax.annotation.Nonnull Integer positiveCount) { - this.positiveCount = positiveCount; - return this; - } - - /** - * Get positiveCount - * @return positiveCount - */ - @javax.annotation.Nonnull - public Integer getPositiveCount() { - return positiveCount; - } - - public void setPositiveCount(@javax.annotation.Nonnull Integer positiveCount) { - this.positiveCount = positiveCount; - } - - - public BoxPlotConfidence negativeCount(@javax.annotation.Nonnull Integer negativeCount) { - this.negativeCount = negativeCount; - return this; - } - - /** - * Get negativeCount - * @return negativeCount - */ - @javax.annotation.Nonnull - public Integer getNegativeCount() { - return negativeCount; - } - - public void setNegativeCount(@javax.annotation.Nonnull Integer negativeCount) { - this.negativeCount = negativeCount; - } - - /** - * 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 BoxPlotConfidence instance itself - */ - public BoxPlotConfidence 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; - } - BoxPlotConfidence boxPlotConfidence = (BoxPlotConfidence) o; - return Objects.equals(this.min, boxPlotConfidence.min) && - Objects.equals(this.max, boxPlotConfidence.max) && - Objects.equals(this.average, boxPlotConfidence.average) && - Objects.equals(this.upperQuartile, boxPlotConfidence.upperQuartile) && - Objects.equals(this.lowerQuartile, boxPlotConfidence.lowerQuartile) && - Objects.equals(this.positiveCount, boxPlotConfidence.positiveCount) && - Objects.equals(this.negativeCount, boxPlotConfidence.negativeCount)&& - Objects.equals(this.additionalProperties, boxPlotConfidence.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(min, max, average, upperQuartile, lowerQuartile, positiveCount, negativeCount, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BoxPlotConfidence {\n"); - sb.append(" min: ").append(toIndentedString(min)).append("\n"); - sb.append(" max: ").append(toIndentedString(max)).append("\n"); - sb.append(" average: ").append(toIndentedString(average)).append("\n"); - sb.append(" upperQuartile: ").append(toIndentedString(upperQuartile)).append("\n"); - sb.append(" lowerQuartile: ").append(toIndentedString(lowerQuartile)).append("\n"); - sb.append(" positiveCount: ").append(toIndentedString(positiveCount)).append("\n"); - sb.append(" negativeCount: ").append(toIndentedString(negativeCount)).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("min", "max", "average", "upper_quartile", "lower_quartile", "positive_count", "negative_count")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("min", "max", "average", "upper_quartile", "lower_quartile", "positive_count", "negative_count")); - } - - /** - * 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 BoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BoxPlotConfidence is not found in the empty JSON string", BoxPlotConfidence.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BoxPlotConfidence.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 (!BoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BoxPlotConfidence 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 BoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BoxPlotConfidence 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 BoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of BoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to BoxPlotConfidence - */ - public static BoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BoxPlotConfidence.class); - } - - /** - * Convert an instance of BoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/ELFRelocation.java b/src/main/java/ai/reveng/model/ELFRelocation.java index 8b75501..f86d810 100644 --- a/src/main/java/ai/reveng/model/ELFRelocation.java +++ b/src/main/java/ai/reveng/model/ELFRelocation.java @@ -59,7 +59,7 @@ public class ELFRelocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull - private Integer type; + private String type; public static final String SERIALIZED_NAME_SIZE = "size"; @SerializedName(SERIALIZED_NAME_SIZE) @@ -108,7 +108,7 @@ public void setAddress(@javax.annotation.Nonnull Integer address) { } - public ELFRelocation type(@javax.annotation.Nonnull Integer type) { + public ELFRelocation type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -118,11 +118,11 @@ public ELFRelocation type(@javax.annotation.Nonnull Integer type) { * @return type */ @javax.annotation.Nonnull - public Integer getType() { + public String getType() { return type; } - public void setType(@javax.annotation.Nonnull Integer type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -350,6 +350,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } 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())); + } if (!jsonObj.get("symbol_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `symbol_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("symbol_name").toString())); } diff --git a/src/main/java/ai/reveng/model/FunctionBoxPlotConfidence.java b/src/main/java/ai/reveng/model/FunctionBoxPlotConfidence.java deleted file mode 100644 index 9aa9d81..0000000 --- a/src/main/java/ai/reveng/model/FunctionBoxPlotConfidence.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * 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.BoxPlotConfidence; -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; - -/** - * FunctionBoxPlotConfidence - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FunctionBoxPlotConfidence { - public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; - @SerializedName(SERIALIZED_NAME_FUNCTION_ID) - @javax.annotation.Nonnull - private Integer functionId; - - public static final String SERIALIZED_NAME_BOX_PLOT = "box_plot"; - @SerializedName(SERIALIZED_NAME_BOX_PLOT) - @javax.annotation.Nonnull - private BoxPlotConfidence boxPlot; - - public FunctionBoxPlotConfidence() { - } - - public FunctionBoxPlotConfidence functionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - return this; - } - - /** - * Get functionId - * @return functionId - */ - @javax.annotation.Nonnull - public Integer getFunctionId() { - return functionId; - } - - public void setFunctionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - } - - - public FunctionBoxPlotConfidence boxPlot(@javax.annotation.Nonnull BoxPlotConfidence boxPlot) { - this.boxPlot = boxPlot; - return this; - } - - /** - * Get boxPlot - * @return boxPlot - */ - @javax.annotation.Nonnull - public BoxPlotConfidence getBoxPlot() { - return boxPlot; - } - - public void setBoxPlot(@javax.annotation.Nonnull BoxPlotConfidence boxPlot) { - this.boxPlot = boxPlot; - } - - /** - * 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 FunctionBoxPlotConfidence instance itself - */ - public FunctionBoxPlotConfidence 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; - } - FunctionBoxPlotConfidence functionBoxPlotConfidence = (FunctionBoxPlotConfidence) o; - return Objects.equals(this.functionId, functionBoxPlotConfidence.functionId) && - Objects.equals(this.boxPlot, functionBoxPlotConfidence.boxPlot)&& - Objects.equals(this.additionalProperties, functionBoxPlotConfidence.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(functionId, boxPlot, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FunctionBoxPlotConfidence {\n"); - sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); - sb.append(" boxPlot: ").append(toIndentedString(boxPlot)).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("function_id", "box_plot")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_id", "box_plot")); - } - - /** - * 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 FunctionBoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FunctionBoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FunctionBoxPlotConfidence is not found in the empty JSON string", FunctionBoxPlotConfidence.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FunctionBoxPlotConfidence.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(); - // validate the required field `box_plot` - BoxPlotConfidence.validateJsonElement(jsonObj.get("box_plot")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FunctionBoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FunctionBoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FunctionBoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FunctionBoxPlotConfidence 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 FunctionBoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionBoxPlotConfidence 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 FunctionBoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of FunctionBoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to FunctionBoxPlotConfidence - */ - public static FunctionBoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FunctionBoxPlotConfidence.class); - } - - /** - * Convert an instance of FunctionBoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/FunctionNameConfidenceBody.java b/src/main/java/ai/reveng/model/FunctionNameConfidenceBody.java deleted file mode 100644 index 727b144..0000000 --- a/src/main/java/ai/reveng/model/FunctionNameConfidenceBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * 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.FunctionNameInput; -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; - -/** - * FunctionNameConfidenceBody - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FunctionNameConfidenceBody { - public static final String SERIALIZED_NAME_FUNCTIONS = "functions"; - @SerializedName(SERIALIZED_NAME_FUNCTIONS) - @javax.annotation.Nullable - private List functions = new ArrayList<>(); - - public static final String SERIALIZED_NAME_IS_DEBUG = "is_debug"; - @SerializedName(SERIALIZED_NAME_IS_DEBUG) - @javax.annotation.Nullable - private Boolean isDebug = false; - - public FunctionNameConfidenceBody() { - } - - public FunctionNameConfidenceBody functions(@javax.annotation.Nullable List functions) { - this.functions = functions; - return this; - } - - public FunctionNameConfidenceBody addFunctionsItem(FunctionNameInput functionsItem) { - if (this.functions == null) { - this.functions = new ArrayList<>(); - } - this.functions.add(functionsItem); - return this; - } - - /** - * List of function ids and the function names they want to check confidence for - * @return functions - */ - @javax.annotation.Nullable - public List getFunctions() { - return functions; - } - - public void setFunctions(@javax.annotation.Nullable List functions) { - this.functions = functions; - } - - - public FunctionNameConfidenceBody isDebug(@javax.annotation.Nullable Boolean isDebug) { - this.isDebug = isDebug; - return this; - } - - /** - * Flag to match only to a debug function - * @return isDebug - */ - @javax.annotation.Nullable - public Boolean getIsDebug() { - return isDebug; - } - - public void setIsDebug(@javax.annotation.Nullable Boolean isDebug) { - this.isDebug = isDebug; - } - - /** - * 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 FunctionNameConfidenceBody instance itself - */ - public FunctionNameConfidenceBody 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; - } - FunctionNameConfidenceBody functionNameConfidenceBody = (FunctionNameConfidenceBody) o; - return Objects.equals(this.functions, functionNameConfidenceBody.functions) && - Objects.equals(this.isDebug, functionNameConfidenceBody.isDebug)&& - Objects.equals(this.additionalProperties, functionNameConfidenceBody.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(functions, isDebug, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FunctionNameConfidenceBody {\n"); - sb.append(" functions: ").append(toIndentedString(functions)).append("\n"); - sb.append(" isDebug: ").append(toIndentedString(isDebug)).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("functions", "is_debug")); - - // 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 FunctionNameConfidenceBody - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FunctionNameConfidenceBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FunctionNameConfidenceBody is not found in the empty JSON string", FunctionNameConfidenceBody.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("functions") != null && !jsonObj.get("functions").isJsonNull()) { - JsonArray jsonArrayfunctions = jsonObj.getAsJsonArray("functions"); - if (jsonArrayfunctions != null) { - // ensure the json data is an array - if (!jsonObj.get("functions").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `functions` to be an array in the JSON string but got `%s`", jsonObj.get("functions").toString())); - } - - // validate the optional field `functions` (array) - for (int i = 0; i < jsonArrayfunctions.size(); i++) { - FunctionNameInput.validateJsonElement(jsonArrayfunctions.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FunctionNameConfidenceBody.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FunctionNameConfidenceBody' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FunctionNameConfidenceBody.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FunctionNameConfidenceBody 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 FunctionNameConfidenceBody read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionNameConfidenceBody 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 FunctionNameConfidenceBody given an JSON string - * - * @param jsonString JSON string - * @return An instance of FunctionNameConfidenceBody - * @throws IOException if the JSON string is invalid with respect to FunctionNameConfidenceBody - */ - public static FunctionNameConfidenceBody fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FunctionNameConfidenceBody.class); - } - - /** - * Convert an instance of FunctionNameConfidenceBody to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/FunctionNameInput.java b/src/main/java/ai/reveng/model/FunctionNameInput.java deleted file mode 100644 index e64d4c8..0000000 --- a/src/main/java/ai/reveng/model/FunctionNameInput.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * 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 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; - -/** - * FunctionNameInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FunctionNameInput { - public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; - @SerializedName(SERIALIZED_NAME_FUNCTION_ID) - @javax.annotation.Nonnull - private Integer functionId; - - public static final String SERIALIZED_NAME_FUNCTION_NAME = "function_name"; - @SerializedName(SERIALIZED_NAME_FUNCTION_NAME) - @javax.annotation.Nonnull - private String functionName; - - public FunctionNameInput() { - } - - public FunctionNameInput functionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - return this; - } - - /** - * Get functionId - * @return functionId - */ - @javax.annotation.Nonnull - public Integer getFunctionId() { - return functionId; - } - - public void setFunctionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - } - - - public FunctionNameInput functionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; - return this; - } - - /** - * Get functionName - * @return functionName - */ - @javax.annotation.Nonnull - public String getFunctionName() { - return functionName; - } - - public void setFunctionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; - } - - /** - * 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 FunctionNameInput instance itself - */ - public FunctionNameInput 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; - } - FunctionNameInput functionNameInput = (FunctionNameInput) o; - return Objects.equals(this.functionId, functionNameInput.functionId) && - Objects.equals(this.functionName, functionNameInput.functionName)&& - Objects.equals(this.additionalProperties, functionNameInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(functionId, functionName, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FunctionNameInput {\n"); - sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); - sb.append(" functionName: ").append(toIndentedString(functionName)).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("function_id", "function_name")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_id", "function_name")); - } - - /** - * 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 FunctionNameInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FunctionNameInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FunctionNameInput is not found in the empty JSON string", FunctionNameInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FunctionNameInput.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("function_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("function_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FunctionNameInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FunctionNameInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FunctionNameInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FunctionNameInput 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 FunctionNameInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionNameInput 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 FunctionNameInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of FunctionNameInput - * @throws IOException if the JSON string is invalid with respect to FunctionNameInput - */ - public static FunctionNameInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FunctionNameInput.class); - } - - /** - * Convert an instance of FunctionNameInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/FunctionsDetailResponse.java b/src/main/java/ai/reveng/model/FunctionsDetailResponse.java index 962ba7a..1d5fdae 100644 --- a/src/main/java/ai/reveng/model/FunctionsDetailResponse.java +++ b/src/main/java/ai/reveng/model/FunctionsDetailResponse.java @@ -100,6 +100,11 @@ public class FunctionsDetailResponse { @javax.annotation.Nullable private String debugHash; + public static final String SERIALIZED_NAME_DEBUG = "debug"; + @SerializedName(SERIALIZED_NAME_DEBUG) + @javax.annotation.Nonnull + private Boolean debug; + public static final String SERIALIZED_NAME_EMBEDDING3D = "embedding_3d"; @SerializedName(SERIALIZED_NAME_EMBEDDING3D) @javax.annotation.Nullable @@ -284,6 +289,25 @@ public void setDebugHash(@javax.annotation.Nullable String debugHash) { } + public FunctionsDetailResponse debug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; + return this; + } + + /** + * Get debug + * @return debug + */ + @javax.annotation.Nonnull + public Boolean getDebug() { + return debug; + } + + public void setDebug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; + } + + public FunctionsDetailResponse embedding3d(@javax.annotation.Nullable List embedding3d) { this.embedding3d = embedding3d; return this; @@ -401,6 +425,7 @@ public boolean equals(Object o) { Objects.equals(this.binaryName, functionsDetailResponse.binaryName) && Objects.equals(this.sha256Hash, functionsDetailResponse.sha256Hash) && Objects.equals(this.debugHash, functionsDetailResponse.debugHash) && + Objects.equals(this.debug, functionsDetailResponse.debug) && Objects.equals(this.embedding3d, functionsDetailResponse.embedding3d) && Objects.equals(this.embedding1d, functionsDetailResponse.embedding1d)&& Objects.equals(this.additionalProperties, functionsDetailResponse.additionalProperties); @@ -412,7 +437,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(functionId, functionName, functionVaddr, functionSize, analysisId, binaryId, binaryName, sha256Hash, debugHash, embedding3d, embedding1d, additionalProperties); + return Objects.hash(functionId, functionName, functionVaddr, functionSize, analysisId, binaryId, binaryName, sha256Hash, debugHash, debug, embedding3d, embedding1d, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -435,6 +460,7 @@ public String toString() { sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); sb.append(" sha256Hash: ").append(toIndentedString(sha256Hash)).append("\n"); sb.append(" debugHash: ").append(toIndentedString(debugHash)).append("\n"); + sb.append(" debug: ").append(toIndentedString(debug)).append("\n"); sb.append(" embedding3d: ").append(toIndentedString(embedding3d)).append("\n"); sb.append(" embedding1d: ").append(toIndentedString(embedding1d)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -459,10 +485,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "embedding_3d", "embedding_1d")); + openapiFields = new HashSet(Arrays.asList("function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "debug", "embedding_3d", "embedding_1d")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash")); + openapiRequiredFields = new HashSet(Arrays.asList("function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "debug")); } /** diff --git a/src/main/java/ai/reveng/model/NearestNeighbor.java b/src/main/java/ai/reveng/model/NearestNeighbor.java deleted file mode 100644 index f705cf4..0000000 --- a/src/main/java/ai/reveng/model/NearestNeighbor.java +++ /dev/null @@ -1,486 +0,0 @@ -/* - * 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.math.BigDecimal; -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; - -/** - * NearestNeighbor - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NearestNeighbor { - public static final String SERIALIZED_NAME_DISTANCE = "distance"; - @SerializedName(SERIALIZED_NAME_DISTANCE) - @javax.annotation.Nonnull - private BigDecimal distance; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_ANALYSIS_ID = "nearest_neighbor_analysis_id"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_ANALYSIS_ID) - @javax.annotation.Nonnull - private Integer nearestNeighborAnalysisId; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_ANALYSIS_NAME = "nearest_neighbor_analysis_name"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_ANALYSIS_NAME) - @javax.annotation.Nonnull - private String nearestNeighborAnalysisName; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_FUNCTION_NAME = "nearest_neighbor_function_name"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_FUNCTION_NAME) - @javax.annotation.Nonnull - private String nearestNeighborFunctionName; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_FUNCTION_NAME_MANGLED = "nearest_neighbor_function_name_mangled"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_FUNCTION_NAME_MANGLED) - @javax.annotation.Nullable - private String nearestNeighborFunctionNameMangled; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_BINARY_ID = "nearest_neighbor_binary_id"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_BINARY_ID) - @javax.annotation.Nonnull - private Integer nearestNeighborBinaryId; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_SHA256_HASH = "nearest_neighbor_sha_256_hash"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_SHA256_HASH) - @javax.annotation.Nonnull - private String nearestNeighborSha256Hash; - - public static final String SERIALIZED_NAME_NEAREST_NEIGHBOR_DEBUG = "nearest_neighbor_debug"; - @SerializedName(SERIALIZED_NAME_NEAREST_NEIGHBOR_DEBUG) - @javax.annotation.Nonnull - private Boolean nearestNeighborDebug; - - public NearestNeighbor() { - } - - public NearestNeighbor distance(@javax.annotation.Nonnull BigDecimal distance) { - this.distance = distance; - return this; - } - - /** - * Get distance - * @return distance - */ - @javax.annotation.Nonnull - public BigDecimal getDistance() { - return distance; - } - - public void setDistance(@javax.annotation.Nonnull BigDecimal distance) { - this.distance = distance; - } - - - public NearestNeighbor nearestNeighborAnalysisId(@javax.annotation.Nonnull Integer nearestNeighborAnalysisId) { - this.nearestNeighborAnalysisId = nearestNeighborAnalysisId; - return this; - } - - /** - * Get nearestNeighborAnalysisId - * @return nearestNeighborAnalysisId - */ - @javax.annotation.Nonnull - public Integer getNearestNeighborAnalysisId() { - return nearestNeighborAnalysisId; - } - - public void setNearestNeighborAnalysisId(@javax.annotation.Nonnull Integer nearestNeighborAnalysisId) { - this.nearestNeighborAnalysisId = nearestNeighborAnalysisId; - } - - - public NearestNeighbor nearestNeighborAnalysisName(@javax.annotation.Nonnull String nearestNeighborAnalysisName) { - this.nearestNeighborAnalysisName = nearestNeighborAnalysisName; - return this; - } - - /** - * Get nearestNeighborAnalysisName - * @return nearestNeighborAnalysisName - */ - @javax.annotation.Nonnull - public String getNearestNeighborAnalysisName() { - return nearestNeighborAnalysisName; - } - - public void setNearestNeighborAnalysisName(@javax.annotation.Nonnull String nearestNeighborAnalysisName) { - this.nearestNeighborAnalysisName = nearestNeighborAnalysisName; - } - - - public NearestNeighbor nearestNeighborFunctionName(@javax.annotation.Nonnull String nearestNeighborFunctionName) { - this.nearestNeighborFunctionName = nearestNeighborFunctionName; - return this; - } - - /** - * Get nearestNeighborFunctionName - * @return nearestNeighborFunctionName - */ - @javax.annotation.Nonnull - public String getNearestNeighborFunctionName() { - return nearestNeighborFunctionName; - } - - public void setNearestNeighborFunctionName(@javax.annotation.Nonnull String nearestNeighborFunctionName) { - this.nearestNeighborFunctionName = nearestNeighborFunctionName; - } - - - public NearestNeighbor nearestNeighborFunctionNameMangled(@javax.annotation.Nullable String nearestNeighborFunctionNameMangled) { - this.nearestNeighborFunctionNameMangled = nearestNeighborFunctionNameMangled; - return this; - } - - /** - * Get nearestNeighborFunctionNameMangled - * @return nearestNeighborFunctionNameMangled - */ - @javax.annotation.Nullable - public String getNearestNeighborFunctionNameMangled() { - return nearestNeighborFunctionNameMangled; - } - - public void setNearestNeighborFunctionNameMangled(@javax.annotation.Nullable String nearestNeighborFunctionNameMangled) { - this.nearestNeighborFunctionNameMangled = nearestNeighborFunctionNameMangled; - } - - - public NearestNeighbor nearestNeighborBinaryId(@javax.annotation.Nonnull Integer nearestNeighborBinaryId) { - this.nearestNeighborBinaryId = nearestNeighborBinaryId; - return this; - } - - /** - * Get nearestNeighborBinaryId - * @return nearestNeighborBinaryId - */ - @javax.annotation.Nonnull - public Integer getNearestNeighborBinaryId() { - return nearestNeighborBinaryId; - } - - public void setNearestNeighborBinaryId(@javax.annotation.Nonnull Integer nearestNeighborBinaryId) { - this.nearestNeighborBinaryId = nearestNeighborBinaryId; - } - - - public NearestNeighbor nearestNeighborSha256Hash(@javax.annotation.Nonnull String nearestNeighborSha256Hash) { - this.nearestNeighborSha256Hash = nearestNeighborSha256Hash; - return this; - } - - /** - * Get nearestNeighborSha256Hash - * @return nearestNeighborSha256Hash - */ - @javax.annotation.Nonnull - public String getNearestNeighborSha256Hash() { - return nearestNeighborSha256Hash; - } - - public void setNearestNeighborSha256Hash(@javax.annotation.Nonnull String nearestNeighborSha256Hash) { - this.nearestNeighborSha256Hash = nearestNeighborSha256Hash; - } - - - public NearestNeighbor nearestNeighborDebug(@javax.annotation.Nonnull Boolean nearestNeighborDebug) { - this.nearestNeighborDebug = nearestNeighborDebug; - return this; - } - - /** - * Get nearestNeighborDebug - * @return nearestNeighborDebug - */ - @javax.annotation.Nonnull - public Boolean getNearestNeighborDebug() { - return nearestNeighborDebug; - } - - public void setNearestNeighborDebug(@javax.annotation.Nonnull Boolean nearestNeighborDebug) { - this.nearestNeighborDebug = nearestNeighborDebug; - } - - /** - * 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 NearestNeighbor instance itself - */ - public NearestNeighbor 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; - } - NearestNeighbor nearestNeighbor = (NearestNeighbor) o; - return Objects.equals(this.distance, nearestNeighbor.distance) && - Objects.equals(this.nearestNeighborAnalysisId, nearestNeighbor.nearestNeighborAnalysisId) && - Objects.equals(this.nearestNeighborAnalysisName, nearestNeighbor.nearestNeighborAnalysisName) && - Objects.equals(this.nearestNeighborFunctionName, nearestNeighbor.nearestNeighborFunctionName) && - Objects.equals(this.nearestNeighborFunctionNameMangled, nearestNeighbor.nearestNeighborFunctionNameMangled) && - Objects.equals(this.nearestNeighborBinaryId, nearestNeighbor.nearestNeighborBinaryId) && - Objects.equals(this.nearestNeighborSha256Hash, nearestNeighbor.nearestNeighborSha256Hash) && - Objects.equals(this.nearestNeighborDebug, nearestNeighbor.nearestNeighborDebug)&& - Objects.equals(this.additionalProperties, nearestNeighbor.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(distance, nearestNeighborAnalysisId, nearestNeighborAnalysisName, nearestNeighborFunctionName, nearestNeighborFunctionNameMangled, nearestNeighborBinaryId, nearestNeighborSha256Hash, nearestNeighborDebug, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NearestNeighbor {\n"); - sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); - sb.append(" nearestNeighborAnalysisId: ").append(toIndentedString(nearestNeighborAnalysisId)).append("\n"); - sb.append(" nearestNeighborAnalysisName: ").append(toIndentedString(nearestNeighborAnalysisName)).append("\n"); - sb.append(" nearestNeighborFunctionName: ").append(toIndentedString(nearestNeighborFunctionName)).append("\n"); - sb.append(" nearestNeighborFunctionNameMangled: ").append(toIndentedString(nearestNeighborFunctionNameMangled)).append("\n"); - sb.append(" nearestNeighborBinaryId: ").append(toIndentedString(nearestNeighborBinaryId)).append("\n"); - sb.append(" nearestNeighborSha256Hash: ").append(toIndentedString(nearestNeighborSha256Hash)).append("\n"); - sb.append(" nearestNeighborDebug: ").append(toIndentedString(nearestNeighborDebug)).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("distance", "nearest_neighbor_analysis_id", "nearest_neighbor_analysis_name", "nearest_neighbor_function_name", "nearest_neighbor_function_name_mangled", "nearest_neighbor_binary_id", "nearest_neighbor_sha_256_hash", "nearest_neighbor_debug")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("distance", "nearest_neighbor_analysis_id", "nearest_neighbor_analysis_name", "nearest_neighbor_function_name", "nearest_neighbor_function_name_mangled", "nearest_neighbor_binary_id", "nearest_neighbor_sha_256_hash", "nearest_neighbor_debug")); - } - - /** - * 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 NearestNeighbor - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NearestNeighbor.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in NearestNeighbor is not found in the empty JSON string", NearestNeighbor.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NearestNeighbor.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("nearest_neighbor_analysis_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nearest_neighbor_analysis_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nearest_neighbor_analysis_name").toString())); - } - if (!jsonObj.get("nearest_neighbor_function_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nearest_neighbor_function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nearest_neighbor_function_name").toString())); - } - if ((jsonObj.get("nearest_neighbor_function_name_mangled") != null && !jsonObj.get("nearest_neighbor_function_name_mangled").isJsonNull()) && !jsonObj.get("nearest_neighbor_function_name_mangled").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nearest_neighbor_function_name_mangled` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nearest_neighbor_function_name_mangled").toString())); - } - if (!jsonObj.get("nearest_neighbor_sha_256_hash").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nearest_neighbor_sha_256_hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nearest_neighbor_sha_256_hash").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NearestNeighbor.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NearestNeighbor' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NearestNeighbor.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NearestNeighbor 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 NearestNeighbor read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - NearestNeighbor 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 NearestNeighbor given an JSON string - * - * @param jsonString JSON string - * @return An instance of NearestNeighbor - * @throws IOException if the JSON string is invalid with respect to NearestNeighbor - */ - public static NearestNeighbor fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NearestNeighbor.class); - } - - /** - * Convert an instance of NearestNeighbor to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/Origin.java b/src/main/java/ai/reveng/model/Origin.java deleted file mode 100644 index 3651ba7..0000000 --- a/src/main/java/ai/reveng/model/Origin.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is Similarity Search Engine for executable binaries - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import java.util.Locale; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets Origin - */ -@JsonAdapter(Origin.Adapter.class) -public enum Origin { - - REV_ENG_MALWARE("RevEng-Malware"), - - REV_ENG_LIBRARY("RevEng-Library"), - - REV_ENG_BENIGN("RevEng-Benign"), - - REV_ENG("RevEng"), - - REV_ENG_HEURISTIC("RevEng-Heuristic"), - - REV_ENG_UNKNOWN("RevEng-Unknown"), - - VIRUS_TOTAL("VirusTotal"), - - MALWARE_BAZAAR("MalwareBazaar"); - - private String value; - - Origin(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Origin fromValue(String value) { - for (Origin b : Origin.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 Origin enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Origin read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Origin.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Origin.fromValue(value); - } -} - diff --git a/src/main/java/ai/reveng/model/SimilarFunctionsResponse.java b/src/main/java/ai/reveng/model/SimilarFunctionsResponse.java deleted file mode 100644 index 74a7632..0000000 --- a/src/main/java/ai/reveng/model/SimilarFunctionsResponse.java +++ /dev/null @@ -1,513 +0,0 @@ -/* - * 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.math.BigDecimal; -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; - -/** - * SimilarFunctionsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SimilarFunctionsResponse { - public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; - @SerializedName(SERIALIZED_NAME_FUNCTION_ID) - @javax.annotation.Nonnull - private Integer functionId; - - public static final String SERIALIZED_NAME_FUNCTION_NAME = "function_name"; - @SerializedName(SERIALIZED_NAME_FUNCTION_NAME) - @javax.annotation.Nonnull - private String functionName; - - public static final String SERIALIZED_NAME_BINARY_ID = "binary_id"; - @SerializedName(SERIALIZED_NAME_BINARY_ID) - @javax.annotation.Nonnull - private Integer binaryId; - - public static final String SERIALIZED_NAME_BINARY_NAME = "binary_name"; - @SerializedName(SERIALIZED_NAME_BINARY_NAME) - @javax.annotation.Nonnull - private String binaryName; - - public static final String SERIALIZED_NAME_DISTANCE = "distance"; - @SerializedName(SERIALIZED_NAME_DISTANCE) - @javax.annotation.Nonnull - private BigDecimal distance; - - public static final String SERIALIZED_NAME_EMBEDDING3D = "embedding_3d"; - @SerializedName(SERIALIZED_NAME_EMBEDDING3D) - @javax.annotation.Nonnull - private List embedding3d = new ArrayList<>(); - - public static final String SERIALIZED_NAME_EMBEDDING1D = "embedding_1d"; - @SerializedName(SERIALIZED_NAME_EMBEDDING1D) - @javax.annotation.Nonnull - private List embedding1d = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SHA256_HASH = "sha_256_hash"; - @SerializedName(SERIALIZED_NAME_SHA256_HASH) - @javax.annotation.Nonnull - private String sha256Hash; - - public SimilarFunctionsResponse() { - } - - public SimilarFunctionsResponse functionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - return this; - } - - /** - * Get functionId - * @return functionId - */ - @javax.annotation.Nonnull - public Integer getFunctionId() { - return functionId; - } - - public void setFunctionId(@javax.annotation.Nonnull Integer functionId) { - this.functionId = functionId; - } - - - public SimilarFunctionsResponse functionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; - return this; - } - - /** - * Get functionName - * @return functionName - */ - @javax.annotation.Nonnull - public String getFunctionName() { - return functionName; - } - - public void setFunctionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; - } - - - public SimilarFunctionsResponse binaryId(@javax.annotation.Nonnull Integer binaryId) { - this.binaryId = binaryId; - return this; - } - - /** - * Get binaryId - * @return binaryId - */ - @javax.annotation.Nonnull - public Integer getBinaryId() { - return binaryId; - } - - public void setBinaryId(@javax.annotation.Nonnull Integer binaryId) { - this.binaryId = binaryId; - } - - - public SimilarFunctionsResponse binaryName(@javax.annotation.Nonnull String binaryName) { - this.binaryName = binaryName; - return this; - } - - /** - * Get binaryName - * @return binaryName - */ - @javax.annotation.Nonnull - public String getBinaryName() { - return binaryName; - } - - public void setBinaryName(@javax.annotation.Nonnull String binaryName) { - this.binaryName = binaryName; - } - - - public SimilarFunctionsResponse distance(@javax.annotation.Nonnull BigDecimal distance) { - this.distance = distance; - return this; - } - - /** - * Get distance - * @return distance - */ - @javax.annotation.Nonnull - public BigDecimal getDistance() { - return distance; - } - - public void setDistance(@javax.annotation.Nonnull BigDecimal distance) { - this.distance = distance; - } - - - public SimilarFunctionsResponse embedding3d(@javax.annotation.Nonnull List embedding3d) { - this.embedding3d = embedding3d; - return this; - } - - public SimilarFunctionsResponse addEmbedding3dItem(BigDecimal embedding3dItem) { - if (this.embedding3d == null) { - this.embedding3d = new ArrayList<>(); - } - this.embedding3d.add(embedding3dItem); - return this; - } - - /** - * Get embedding3d - * @return embedding3d - */ - @javax.annotation.Nonnull - public List getEmbedding3d() { - return embedding3d; - } - - public void setEmbedding3d(@javax.annotation.Nonnull List embedding3d) { - this.embedding3d = embedding3d; - } - - - public SimilarFunctionsResponse embedding1d(@javax.annotation.Nonnull List embedding1d) { - this.embedding1d = embedding1d; - return this; - } - - public SimilarFunctionsResponse addEmbedding1dItem(BigDecimal embedding1dItem) { - if (this.embedding1d == null) { - this.embedding1d = new ArrayList<>(); - } - this.embedding1d.add(embedding1dItem); - return this; - } - - /** - * Get embedding1d - * @return embedding1d - */ - @javax.annotation.Nonnull - public List getEmbedding1d() { - return embedding1d; - } - - public void setEmbedding1d(@javax.annotation.Nonnull List embedding1d) { - this.embedding1d = embedding1d; - } - - - public SimilarFunctionsResponse sha256Hash(@javax.annotation.Nonnull String sha256Hash) { - this.sha256Hash = sha256Hash; - return this; - } - - /** - * Get sha256Hash - * @return sha256Hash - */ - @javax.annotation.Nonnull - public String getSha256Hash() { - return sha256Hash; - } - - public void setSha256Hash(@javax.annotation.Nonnull String sha256Hash) { - this.sha256Hash = sha256Hash; - } - - /** - * 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 SimilarFunctionsResponse instance itself - */ - public SimilarFunctionsResponse 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; - } - SimilarFunctionsResponse similarFunctionsResponse = (SimilarFunctionsResponse) o; - return Objects.equals(this.functionId, similarFunctionsResponse.functionId) && - Objects.equals(this.functionName, similarFunctionsResponse.functionName) && - Objects.equals(this.binaryId, similarFunctionsResponse.binaryId) && - Objects.equals(this.binaryName, similarFunctionsResponse.binaryName) && - Objects.equals(this.distance, similarFunctionsResponse.distance) && - Objects.equals(this.embedding3d, similarFunctionsResponse.embedding3d) && - Objects.equals(this.embedding1d, similarFunctionsResponse.embedding1d) && - Objects.equals(this.sha256Hash, similarFunctionsResponse.sha256Hash)&& - Objects.equals(this.additionalProperties, similarFunctionsResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(functionId, functionName, binaryId, binaryName, distance, embedding3d, embedding1d, sha256Hash, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SimilarFunctionsResponse {\n"); - sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); - sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n"); - sb.append(" binaryId: ").append(toIndentedString(binaryId)).append("\n"); - sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); - sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); - sb.append(" embedding3d: ").append(toIndentedString(embedding3d)).append("\n"); - sb.append(" embedding1d: ").append(toIndentedString(embedding1d)).append("\n"); - sb.append(" sha256Hash: ").append(toIndentedString(sha256Hash)).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("function_id", "function_name", "binary_id", "binary_name", "distance", "embedding_3d", "embedding_1d", "sha_256_hash")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_id", "function_name", "binary_id", "binary_name", "distance", "embedding_3d", "embedding_1d", "sha_256_hash")); - } - - /** - * 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 SimilarFunctionsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SimilarFunctionsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SimilarFunctionsResponse is not found in the empty JSON string", SimilarFunctionsResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimilarFunctionsResponse.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("function_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("function_name").toString())); - } - if (!jsonObj.get("binary_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `binary_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("binary_name").toString())); - } - // ensure the required json array is present - if (jsonObj.get("embedding_3d") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("embedding_3d").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `embedding_3d` to be an array in the JSON string but got `%s`", jsonObj.get("embedding_3d").toString())); - } - // ensure the required json array is present - if (jsonObj.get("embedding_1d") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("embedding_1d").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `embedding_1d` to be an array in the JSON string but got `%s`", jsonObj.get("embedding_1d").toString())); - } - if (!jsonObj.get("sha_256_hash").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sha_256_hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sha_256_hash").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SimilarFunctionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SimilarFunctionsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SimilarFunctionsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SimilarFunctionsResponse 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 SimilarFunctionsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SimilarFunctionsResponse 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 SimilarFunctionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SimilarFunctionsResponse - * @throws IOException if the JSON string is invalid with respect to SimilarFunctionsResponse - */ - public static SimilarFunctionsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SimilarFunctionsResponse.class); - } - - /** - * Convert an instance of SimilarFunctionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/TagConfidenceBody.java b/src/main/java/ai/reveng/model/TagConfidenceBody.java deleted file mode 100644 index 2cf9d00..0000000 --- a/src/main/java/ai/reveng/model/TagConfidenceBody.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 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.Tags; -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; - -/** - * TagConfidenceBody - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TagConfidenceBody { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - @javax.annotation.Nonnull - private List tags = new ArrayList<>(); - - public TagConfidenceBody() { - } - - public TagConfidenceBody tags(@javax.annotation.Nonnull List tags) { - this.tags = tags; - return this; - } - - public TagConfidenceBody addTagsItem(Tags tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - */ - @javax.annotation.Nonnull - public List getTags() { - return tags; - } - - public void setTags(@javax.annotation.Nonnull List tags) { - this.tags = tags; - } - - /** - * 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 TagConfidenceBody instance itself - */ - public TagConfidenceBody 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; - } - TagConfidenceBody tagConfidenceBody = (TagConfidenceBody) o; - return Objects.equals(this.tags, tagConfidenceBody.tags)&& - Objects.equals(this.additionalProperties, tagConfidenceBody.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TagConfidenceBody {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).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("tags")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("tags")); - } - - /** - * 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 TagConfidenceBody - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TagConfidenceBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TagConfidenceBody is not found in the empty JSON string", TagConfidenceBody.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TagConfidenceBody.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(); - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - - JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - // validate the required field `tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - Tags.validateJsonElement(jsonArraytags.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TagConfidenceBody.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TagConfidenceBody' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TagConfidenceBody.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TagConfidenceBody 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 TagConfidenceBody read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TagConfidenceBody 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 TagConfidenceBody given an JSON string - * - * @param jsonString JSON string - * @return An instance of TagConfidenceBody - * @throws IOException if the JSON string is invalid with respect to TagConfidenceBody - */ - public static TagConfidenceBody fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TagConfidenceBody.class); - } - - /** - * Convert an instance of TagConfidenceBody to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/TagOriginBoxPlotConfidence.java b/src/main/java/ai/reveng/model/TagOriginBoxPlotConfidence.java deleted file mode 100644 index 24114d1..0000000 --- a/src/main/java/ai/reveng/model/TagOriginBoxPlotConfidence.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * 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.BoxPlotConfidence; -import ai.reveng.model.Tags; -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; - -/** - * TagOriginBoxPlotConfidence - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TagOriginBoxPlotConfidence { - public static final String SERIALIZED_NAME_TAG = "tag"; - @SerializedName(SERIALIZED_NAME_TAG) - @javax.annotation.Nonnull - private Tags tag; - - public static final String SERIALIZED_NAME_BOX_PLOT = "box_plot"; - @SerializedName(SERIALIZED_NAME_BOX_PLOT) - @javax.annotation.Nonnull - private BoxPlotConfidence boxPlot; - - public TagOriginBoxPlotConfidence() { - } - - public TagOriginBoxPlotConfidence tag(@javax.annotation.Nonnull Tags tag) { - this.tag = tag; - return this; - } - - /** - * Get tag - * @return tag - */ - @javax.annotation.Nonnull - public Tags getTag() { - return tag; - } - - public void setTag(@javax.annotation.Nonnull Tags tag) { - this.tag = tag; - } - - - public TagOriginBoxPlotConfidence boxPlot(@javax.annotation.Nonnull BoxPlotConfidence boxPlot) { - this.boxPlot = boxPlot; - return this; - } - - /** - * Get boxPlot - * @return boxPlot - */ - @javax.annotation.Nonnull - public BoxPlotConfidence getBoxPlot() { - return boxPlot; - } - - public void setBoxPlot(@javax.annotation.Nonnull BoxPlotConfidence boxPlot) { - this.boxPlot = boxPlot; - } - - /** - * 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 TagOriginBoxPlotConfidence instance itself - */ - public TagOriginBoxPlotConfidence 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; - } - TagOriginBoxPlotConfidence tagOriginBoxPlotConfidence = (TagOriginBoxPlotConfidence) o; - return Objects.equals(this.tag, tagOriginBoxPlotConfidence.tag) && - Objects.equals(this.boxPlot, tagOriginBoxPlotConfidence.boxPlot)&& - Objects.equals(this.additionalProperties, tagOriginBoxPlotConfidence.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tag, boxPlot, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TagOriginBoxPlotConfidence {\n"); - sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); - sb.append(" boxPlot: ").append(toIndentedString(boxPlot)).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("tag", "box_plot")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("tag", "box_plot")); - } - - /** - * 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 TagOriginBoxPlotConfidence - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TagOriginBoxPlotConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TagOriginBoxPlotConfidence is not found in the empty JSON string", TagOriginBoxPlotConfidence.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TagOriginBoxPlotConfidence.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(); - // validate the required field `tag` - Tags.validateJsonElement(jsonObj.get("tag")); - // validate the required field `box_plot` - BoxPlotConfidence.validateJsonElement(jsonObj.get("box_plot")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TagOriginBoxPlotConfidence.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TagOriginBoxPlotConfidence' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TagOriginBoxPlotConfidence.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TagOriginBoxPlotConfidence 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 TagOriginBoxPlotConfidence read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TagOriginBoxPlotConfidence 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 TagOriginBoxPlotConfidence given an JSON string - * - * @param jsonString JSON string - * @return An instance of TagOriginBoxPlotConfidence - * @throws IOException if the JSON string is invalid with respect to TagOriginBoxPlotConfidence - */ - public static TagOriginBoxPlotConfidence fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TagOriginBoxPlotConfidence.class); - } - - /** - * Convert an instance of TagOriginBoxPlotConfidence to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/Tags.java b/src/main/java/ai/reveng/model/Tags.java deleted file mode 100644 index dcd21dc..0000000 --- a/src/main/java/ai/reveng/model/Tags.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * 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.Origin; -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; - -/** - * Tags - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Tags { - public static final String SERIALIZED_NAME_TAG = "tag"; - @SerializedName(SERIALIZED_NAME_TAG) - @javax.annotation.Nonnull - private String tag; - - public static final String SERIALIZED_NAME_ORIGIN = "origin"; - @SerializedName(SERIALIZED_NAME_ORIGIN) - @javax.annotation.Nonnull - private Origin origin; - - public Tags() { - } - - public Tags tag(@javax.annotation.Nonnull String tag) { - this.tag = tag; - return this; - } - - /** - * The tag name - * @return tag - */ - @javax.annotation.Nonnull - public String getTag() { - return tag; - } - - public void setTag(@javax.annotation.Nonnull String tag) { - this.tag = tag; - } - - - public Tags origin(@javax.annotation.Nonnull Origin origin) { - this.origin = origin; - return this; - } - - /** - * The origin of the tag - * @return origin - */ - @javax.annotation.Nonnull - public Origin getOrigin() { - return origin; - } - - public void setOrigin(@javax.annotation.Nonnull Origin origin) { - this.origin = origin; - } - - /** - * 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 Tags instance itself - */ - public Tags 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; - } - Tags tags = (Tags) o; - return Objects.equals(this.tag, tags.tag) && - Objects.equals(this.origin, tags.origin)&& - Objects.equals(this.additionalProperties, tags.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tag, origin, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tags {\n"); - sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); - sb.append(" origin: ").append(toIndentedString(origin)).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("tag", "origin")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("tag", "origin")); - } - - /** - * 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 Tags - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Tags.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Tags is not found in the empty JSON string", Tags.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Tags.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("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); - } - // validate the required field `origin` - Origin.validateJsonElement(jsonObj.get("origin")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Tags.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Tags' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Tags.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Tags 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 Tags read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Tags 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 Tags given an JSON string - * - * @param jsonString JSON string - * @return An instance of Tags - * @throws IOException if the JSON string is invalid with respect to Tags - */ - public static Tags fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Tags.class); - } - - /** - * Convert an instance of Tags to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/ThreatScoreFunctionBody.java b/src/main/java/ai/reveng/model/ThreatScoreFunctionBody.java deleted file mode 100644 index 16102db..0000000 --- a/src/main/java/ai/reveng/model/ThreatScoreFunctionBody.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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; - -/** - * ThreatScoreFunctionBody - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ThreatScoreFunctionBody { - public static final String SERIALIZED_NAME_FUNCTION_IDS = "function_ids"; - @SerializedName(SERIALIZED_NAME_FUNCTION_IDS) - @javax.annotation.Nullable - private List functionIds = new ArrayList<>(); - - public ThreatScoreFunctionBody() { - } - - public ThreatScoreFunctionBody functionIds(@javax.annotation.Nullable List functionIds) { - this.functionIds = functionIds; - return this; - } - - public ThreatScoreFunctionBody addFunctionIdsItem(Integer functionIdsItem) { - if (this.functionIds == null) { - this.functionIds = new ArrayList<>(); - } - this.functionIds.add(functionIdsItem); - return this; - } - - /** - * List of function IDs to calculate threat score for - * @return functionIds - */ - @javax.annotation.Nullable - public List getFunctionIds() { - return functionIds; - } - - public void setFunctionIds(@javax.annotation.Nullable List functionIds) { - this.functionIds = functionIds; - } - - /** - * 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 ThreatScoreFunctionBody instance itself - */ - public ThreatScoreFunctionBody 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; - } - ThreatScoreFunctionBody threatScoreFunctionBody = (ThreatScoreFunctionBody) o; - return Objects.equals(this.functionIds, threatScoreFunctionBody.functionIds)&& - Objects.equals(this.additionalProperties, threatScoreFunctionBody.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(functionIds, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ThreatScoreFunctionBody {\n"); - sb.append(" functionIds: ").append(toIndentedString(functionIds)).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("function_ids")); - - // 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 ThreatScoreFunctionBody - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ThreatScoreFunctionBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ThreatScoreFunctionBody is not found in the empty JSON string", ThreatScoreFunctionBody.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("function_ids") != null && !jsonObj.get("function_ids").isJsonNull() && !jsonObj.get("function_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `function_ids` to be an array in the JSON string but got `%s`", jsonObj.get("function_ids").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ThreatScoreFunctionBody.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ThreatScoreFunctionBody' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ThreatScoreFunctionBody.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ThreatScoreFunctionBody 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 ThreatScoreFunctionBody read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ThreatScoreFunctionBody 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 ThreatScoreFunctionBody given an JSON string - * - * @param jsonString JSON string - * @return An instance of ThreatScoreFunctionBody - * @throws IOException if the JSON string is invalid with respect to ThreatScoreFunctionBody - */ - public static ThreatScoreFunctionBody fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ThreatScoreFunctionBody.class); - } - - /** - * Convert an instance of ThreatScoreFunctionBody to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java index b8e1b8e..7252187 100644 --- a/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java +++ b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java @@ -13,7 +13,6 @@ package ai.reveng.api; import ai.reveng.invoker.ApiException; -import ai.reveng.model.ANNFunction; import ai.reveng.model.AnalysisCreateRequest; import ai.reveng.model.AnalysisUpdateRequest; import ai.reveng.model.AnalysisUpdateTagsRequest; @@ -28,7 +27,6 @@ import ai.reveng.model.BaseResponseCreated; import ai.reveng.model.BaseResponseDict; import ai.reveng.model.BaseResponseLogs; -import ai.reveng.model.BaseResponseNearestNeighborAnalysis; import ai.reveng.model.BaseResponseParams; import ai.reveng.model.BaseResponseRecent; import ai.reveng.model.BaseResponseStatus; @@ -86,21 +84,6 @@ public void deleteAnalysisTest() throws ApiException { // TODO: test validations } - /** - * Batch Symbol ANN using Analysis ID - * - * Takes a analysis ID and returns the nearest functions within the database that match those functions - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSimilarFunctionsBatchTest() throws ApiException { - Integer analysisId = null; - ANNFunction anNFunction = null; - BaseResponseNearestNeighborAnalysis response = api.findSimilarFunctionsBatch(analysisId, anNFunction); - // TODO: test validations - } - /** * Gets basic analysis information * diff --git a/src/test/java/ai/reveng/api/ConfidenceApiTest.java b/src/test/java/ai/reveng/api/ConfidenceApiTest.java deleted file mode 100644 index 774872d..0000000 --- a/src/test/java/ai/reveng/api/ConfidenceApiTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.BaseResponseBoxPlotConfidence; -import ai.reveng.model.BaseResponseListFunctionBoxPlotConfidence; -import ai.reveng.model.BaseResponseListTagOriginBoxPlotConfidence; -import ai.reveng.model.FunctionNameConfidenceBody; -import ai.reveng.model.TagConfidenceBody; -import ai.reveng.model.ThreatScoreFunctionBody; -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 ConfidenceApi - */ -@Disabled -public class ConfidenceApiTest { - - private final ConfidenceApi api = new ConfidenceApi(); - - /** - * Calculate Tag Confidence Score for an Analysis - * - * Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAnalysisTagScoreTest() throws ApiException { - Integer analysisId = null; - TagConfidenceBody tagConfidenceBody = null; - BaseResponseListTagOriginBoxPlotConfidence response = api.getAnalysisTagScore(analysisId, tagConfidenceBody); - // TODO: test validations - } - - /** - * Calculate Threat Score for Binary - * - * Accepts a binary ID and returns the threat score for that binary - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAnalysisThreatScoreTest() throws ApiException { - Integer analysisId = null; - BaseResponseBoxPlotConfidence response = api.getAnalysisThreatScore(analysisId); - // TODO: test validations - } - - /** - * Calculate function name confidence for a set of Functions - * - * Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getFunctionsNameScoreTest() throws ApiException { - FunctionNameConfidenceBody functionNameConfidenceBody = null; - BaseResponseListFunctionBoxPlotConfidence response = api.getFunctionsNameScore(functionNameConfidenceBody); - // TODO: test validations - } - - /** - * Calculate Threat Score for a set of Functions - * - * Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getFunctionsThreatScoreTest() throws ApiException { - ThreatScoreFunctionBody threatScoreFunctionBody = null; - BaseResponseListFunctionBoxPlotConfidence response = api.getFunctionsThreatScore(threatScoreFunctionBody); - // TODO: test validations - } - -} diff --git a/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java b/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java index fb7143e..491a0d6 100644 --- a/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java +++ b/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java @@ -24,8 +24,6 @@ import ai.reveng.model.BaseResponseFunctionCapabilityResponse; import ai.reveng.model.BaseResponseFunctionStringsResponse; import ai.reveng.model.BaseResponseFunctionsDetailResponse; -import ai.reveng.model.BaseResponseListSimilarFunctionsResponse; -import java.math.BigDecimal; import ai.reveng.model.FunctionMatchingBatchResponse; import ai.reveng.model.FunctionMatchingRequest; import org.junit.jupiter.api.Disabled; @@ -216,22 +214,4 @@ public void getFunctionStringsTest() throws ApiException { // TODO: test validations } - /** - * Get list of similar functions - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSimilarFunctionsTest() throws ApiException { - Integer functionId = null; - Integer limit = null; - BigDecimal distance = null; - List collectionIds = null; - Boolean debug = null; - List debugTypes = null; - List binaryIds = null; - BaseResponseListSimilarFunctionsResponse response = api.getSimilarFunctions(functionId, limit, distance, collectionIds, debug, debugTypes, binaryIds); - // TODO: test validations - } - } diff --git a/src/test/java/ai/reveng/model/ANNFunctionTest.java b/src/test/java/ai/reveng/model/ANNFunctionTest.java deleted file mode 100644 index 3e7142a..0000000 --- a/src/test/java/ai/reveng/model/ANNFunctionTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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.math.BigDecimal; -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 ANNFunction - */ -public class ANNFunctionTest { - private final ANNFunction model = new ANNFunction(); - - /** - * Model tests for ANNFunction - */ - @Test - public void testANNFunction() { - // TODO: test ANNFunction - } - - /** - * Test the property 'limit' - */ - @Test - public void limitTest() { - // TODO: test limit - } - - /** - * Test the property 'distance' - */ - @Test - public void distanceTest() { - // TODO: test distance - } - - /** - * Test the property 'analysisSearchIds' - */ - @Test - public void analysisSearchIdsTest() { - // TODO: test analysisSearchIds - } - - /** - * Test the property 'collectionSearchIds' - */ - @Test - public void collectionSearchIdsTest() { - // TODO: test collectionSearchIds - } - - /** - * Test the property 'searchBinaryIds' - */ - @Test - public void searchBinaryIdsTest() { - // TODO: test searchBinaryIds - } - - /** - * Test the property 'searchFunctionIds' - */ - @Test - public void searchFunctionIdsTest() { - // TODO: test searchFunctionIds - } - - /** - * Test the property 'debugOnly' - */ - @Test - public void debugOnlyTest() { - // TODO: test debugOnly - } - -} diff --git a/src/test/java/ai/reveng/model/BaseResponseBoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/BaseResponseBoxPlotConfidenceTest.java deleted file mode 100644 index 510c973..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseBoxPlotConfidenceTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.BoxPlotConfidence; -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 BaseResponseBoxPlotConfidence - */ -public class BaseResponseBoxPlotConfidenceTest { - private final BaseResponseBoxPlotConfidence model = new BaseResponseBoxPlotConfidence(); - - /** - * Model tests for BaseResponseBoxPlotConfidence - */ - @Test - public void testBaseResponseBoxPlotConfidence() { - // TODO: test BaseResponseBoxPlotConfidence - } - - /** - * 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/BaseResponseListFunctionBoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidenceTest.java deleted file mode 100644 index ae75801..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseListFunctionBoxPlotConfidenceTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.FunctionBoxPlotConfidence; -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 BaseResponseListFunctionBoxPlotConfidence - */ -public class BaseResponseListFunctionBoxPlotConfidenceTest { - private final BaseResponseListFunctionBoxPlotConfidence model = new BaseResponseListFunctionBoxPlotConfidence(); - - /** - * Model tests for BaseResponseListFunctionBoxPlotConfidence - */ - @Test - public void testBaseResponseListFunctionBoxPlotConfidence() { - // TODO: test BaseResponseListFunctionBoxPlotConfidence - } - - /** - * 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/BaseResponseListSimilarFunctionsResponseTest.java b/src/test/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponseTest.java deleted file mode 100644 index 2fd4c38..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseListSimilarFunctionsResponseTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.SimilarFunctionsResponse; -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 BaseResponseListSimilarFunctionsResponse - */ -public class BaseResponseListSimilarFunctionsResponseTest { - private final BaseResponseListSimilarFunctionsResponse model = new BaseResponseListSimilarFunctionsResponse(); - - /** - * Model tests for BaseResponseListSimilarFunctionsResponse - */ - @Test - public void testBaseResponseListSimilarFunctionsResponse() { - // TODO: test BaseResponseListSimilarFunctionsResponse - } - - /** - * 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/BaseResponseListTagOriginBoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidenceTest.java deleted file mode 100644 index 25ef548..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidenceTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.TagOriginBoxPlotConfidence; -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 BaseResponseListTagOriginBoxPlotConfidence - */ -public class BaseResponseListTagOriginBoxPlotConfidenceTest { - private final BaseResponseListTagOriginBoxPlotConfidence model = new BaseResponseListTagOriginBoxPlotConfidence(); - - /** - * Model tests for BaseResponseListTagOriginBoxPlotConfidence - */ - @Test - public void testBaseResponseListTagOriginBoxPlotConfidence() { - // TODO: test BaseResponseListTagOriginBoxPlotConfidence - } - - /** - * 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/BaseResponseNearestNeighborAnalysisTest.java b/src/test/java/ai/reveng/model/BaseResponseNearestNeighborAnalysisTest.java deleted file mode 100644 index 8fbe9bd..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseNearestNeighborAnalysisTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.MetaModel; -import ai.reveng.model.NearestNeighbor; -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.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BaseResponseNearestNeighborAnalysis - */ -public class BaseResponseNearestNeighborAnalysisTest { - private final BaseResponseNearestNeighborAnalysis model = new BaseResponseNearestNeighborAnalysis(); - - /** - * Model tests for BaseResponseNearestNeighborAnalysis - */ - @Test - public void testBaseResponseNearestNeighborAnalysis() { - // TODO: test BaseResponseNearestNeighborAnalysis - } - - /** - * 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/BoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/BoxPlotConfidenceTest.java deleted file mode 100644 index 85524ce..0000000 --- a/src/test/java/ai/reveng/model/BoxPlotConfidenceTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BoxPlotConfidence - */ -public class BoxPlotConfidenceTest { - private final BoxPlotConfidence model = new BoxPlotConfidence(); - - /** - * Model tests for BoxPlotConfidence - */ - @Test - public void testBoxPlotConfidence() { - // TODO: test BoxPlotConfidence - } - - /** - * Test the property 'min' - */ - @Test - public void minTest() { - // TODO: test min - } - - /** - * Test the property 'max' - */ - @Test - public void maxTest() { - // TODO: test max - } - - /** - * Test the property 'average' - */ - @Test - public void averageTest() { - // TODO: test average - } - - /** - * Test the property 'upperQuartile' - */ - @Test - public void upperQuartileTest() { - // TODO: test upperQuartile - } - - /** - * Test the property 'lowerQuartile' - */ - @Test - public void lowerQuartileTest() { - // TODO: test lowerQuartile - } - - /** - * Test the property 'positiveCount' - */ - @Test - public void positiveCountTest() { - // TODO: test positiveCount - } - - /** - * Test the property 'negativeCount' - */ - @Test - public void negativeCountTest() { - // TODO: test negativeCount - } - -} diff --git a/src/test/java/ai/reveng/model/FunctionBoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/FunctionBoxPlotConfidenceTest.java deleted file mode 100644 index f1f8eb7..0000000 --- a/src/test/java/ai/reveng/model/FunctionBoxPlotConfidenceTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.BoxPlotConfidence; -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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FunctionBoxPlotConfidence - */ -public class FunctionBoxPlotConfidenceTest { - private final FunctionBoxPlotConfidence model = new FunctionBoxPlotConfidence(); - - /** - * Model tests for FunctionBoxPlotConfidence - */ - @Test - public void testFunctionBoxPlotConfidence() { - // TODO: test FunctionBoxPlotConfidence - } - - /** - * Test the property 'functionId' - */ - @Test - public void functionIdTest() { - // TODO: test functionId - } - - /** - * Test the property 'boxPlot' - */ - @Test - public void boxPlotTest() { - // TODO: test boxPlot - } - -} diff --git a/src/test/java/ai/reveng/model/FunctionNameConfidenceBodyTest.java b/src/test/java/ai/reveng/model/FunctionNameConfidenceBodyTest.java deleted file mode 100644 index 36582fd..0000000 --- a/src/test/java/ai/reveng/model/FunctionNameConfidenceBodyTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.FunctionNameInput; -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 FunctionNameConfidenceBody - */ -public class FunctionNameConfidenceBodyTest { - private final FunctionNameConfidenceBody model = new FunctionNameConfidenceBody(); - - /** - * Model tests for FunctionNameConfidenceBody - */ - @Test - public void testFunctionNameConfidenceBody() { - // TODO: test FunctionNameConfidenceBody - } - - /** - * Test the property 'functions' - */ - @Test - public void functionsTest() { - // TODO: test functions - } - - /** - * Test the property 'isDebug' - */ - @Test - public void isDebugTest() { - // TODO: test isDebug - } - -} diff --git a/src/test/java/ai/reveng/model/FunctionNameInputTest.java b/src/test/java/ai/reveng/model/FunctionNameInputTest.java deleted file mode 100644 index a7f4add..0000000 --- a/src/test/java/ai/reveng/model/FunctionNameInputTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FunctionNameInput - */ -public class FunctionNameInputTest { - private final FunctionNameInput model = new FunctionNameInput(); - - /** - * Model tests for FunctionNameInput - */ - @Test - public void testFunctionNameInput() { - // TODO: test FunctionNameInput - } - - /** - * Test the property 'functionId' - */ - @Test - public void functionIdTest() { - // TODO: test functionId - } - - /** - * Test the property 'functionName' - */ - @Test - public void functionNameTest() { - // TODO: test functionName - } - -} diff --git a/src/test/java/ai/reveng/model/FunctionsDetailResponseTest.java b/src/test/java/ai/reveng/model/FunctionsDetailResponseTest.java index 8e75299..0af1998 100644 --- a/src/test/java/ai/reveng/model/FunctionsDetailResponseTest.java +++ b/src/test/java/ai/reveng/model/FunctionsDetailResponseTest.java @@ -112,6 +112,14 @@ public void debugHashTest() { // TODO: test debugHash } + /** + * Test the property 'debug' + */ + @Test + public void debugTest() { + // TODO: test debug + } + /** * Test the property 'embedding3d' */ diff --git a/src/test/java/ai/reveng/model/NearestNeighborTest.java b/src/test/java/ai/reveng/model/NearestNeighborTest.java deleted file mode 100644 index bd629ca..0000000 --- a/src/test/java/ai/reveng/model/NearestNeighborTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NearestNeighbor - */ -public class NearestNeighborTest { - private final NearestNeighbor model = new NearestNeighbor(); - - /** - * Model tests for NearestNeighbor - */ - @Test - public void testNearestNeighbor() { - // TODO: test NearestNeighbor - } - - /** - * Test the property 'distance' - */ - @Test - public void distanceTest() { - // TODO: test distance - } - - /** - * Test the property 'nearestNeighborAnalysisId' - */ - @Test - public void nearestNeighborAnalysisIdTest() { - // TODO: test nearestNeighborAnalysisId - } - - /** - * Test the property 'nearestNeighborAnalysisName' - */ - @Test - public void nearestNeighborAnalysisNameTest() { - // TODO: test nearestNeighborAnalysisName - } - - /** - * Test the property 'nearestNeighborFunctionName' - */ - @Test - public void nearestNeighborFunctionNameTest() { - // TODO: test nearestNeighborFunctionName - } - - /** - * Test the property 'nearestNeighborFunctionNameMangled' - */ - @Test - public void nearestNeighborFunctionNameMangledTest() { - // TODO: test nearestNeighborFunctionNameMangled - } - - /** - * Test the property 'nearestNeighborBinaryId' - */ - @Test - public void nearestNeighborBinaryIdTest() { - // TODO: test nearestNeighborBinaryId - } - - /** - * Test the property 'nearestNeighborSha256Hash' - */ - @Test - public void nearestNeighborSha256HashTest() { - // TODO: test nearestNeighborSha256Hash - } - - /** - * Test the property 'nearestNeighborDebug' - */ - @Test - public void nearestNeighborDebugTest() { - // TODO: test nearestNeighborDebug - } - -} diff --git a/src/test/java/ai/reveng/model/OriginTest.java b/src/test/java/ai/reveng/model/OriginTest.java deleted file mode 100644 index 7ae7834..0000000 --- a/src/test/java/ai/reveng/model/OriginTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is Similarity Search Engine for executable binaries - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Origin - */ -public class OriginTest { - /** - * Model tests for Origin - */ - @Test - public void testOrigin() { - // TODO: test Origin - } - -} diff --git a/src/test/java/ai/reveng/model/SimilarFunctionsResponseTest.java b/src/test/java/ai/reveng/model/SimilarFunctionsResponseTest.java deleted file mode 100644 index 100c9a2..0000000 --- a/src/test/java/ai/reveng/model/SimilarFunctionsResponseTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.math.BigDecimal; -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 SimilarFunctionsResponse - */ -public class SimilarFunctionsResponseTest { - private final SimilarFunctionsResponse model = new SimilarFunctionsResponse(); - - /** - * Model tests for SimilarFunctionsResponse - */ - @Test - public void testSimilarFunctionsResponse() { - // TODO: test SimilarFunctionsResponse - } - - /** - * Test the property 'functionId' - */ - @Test - public void functionIdTest() { - // TODO: test functionId - } - - /** - * Test the property 'functionName' - */ - @Test - public void functionNameTest() { - // TODO: test functionName - } - - /** - * Test the property 'binaryId' - */ - @Test - public void binaryIdTest() { - // TODO: test binaryId - } - - /** - * Test the property 'binaryName' - */ - @Test - public void binaryNameTest() { - // TODO: test binaryName - } - - /** - * Test the property 'distance' - */ - @Test - public void distanceTest() { - // TODO: test distance - } - - /** - * Test the property 'embedding3d' - */ - @Test - public void embedding3dTest() { - // TODO: test embedding3d - } - - /** - * Test the property 'embedding1d' - */ - @Test - public void embedding1dTest() { - // TODO: test embedding1d - } - - /** - * Test the property 'sha256Hash' - */ - @Test - public void sha256HashTest() { - // TODO: test sha256Hash - } - -} diff --git a/src/test/java/ai/reveng/model/TagConfidenceBodyTest.java b/src/test/java/ai/reveng/model/TagConfidenceBodyTest.java deleted file mode 100644 index 6824d36..0000000 --- a/src/test/java/ai/reveng/model/TagConfidenceBodyTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.Tags; -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 TagConfidenceBody - */ -public class TagConfidenceBodyTest { - private final TagConfidenceBody model = new TagConfidenceBody(); - - /** - * Model tests for TagConfidenceBody - */ - @Test - public void testTagConfidenceBody() { - // TODO: test TagConfidenceBody - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/src/test/java/ai/reveng/model/TagOriginBoxPlotConfidenceTest.java b/src/test/java/ai/reveng/model/TagOriginBoxPlotConfidenceTest.java deleted file mode 100644 index 0738835..0000000 --- a/src/test/java/ai/reveng/model/TagOriginBoxPlotConfidenceTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.BoxPlotConfidence; -import ai.reveng.model.Tags; -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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TagOriginBoxPlotConfidence - */ -public class TagOriginBoxPlotConfidenceTest { - private final TagOriginBoxPlotConfidence model = new TagOriginBoxPlotConfidence(); - - /** - * Model tests for TagOriginBoxPlotConfidence - */ - @Test - public void testTagOriginBoxPlotConfidence() { - // TODO: test TagOriginBoxPlotConfidence - } - - /** - * Test the property 'tag' - */ - @Test - public void tagTest() { - // TODO: test tag - } - - /** - * Test the property 'boxPlot' - */ - @Test - public void boxPlotTest() { - // TODO: test boxPlot - } - -} diff --git a/src/test/java/ai/reveng/model/TagsTest.java b/src/test/java/ai/reveng/model/TagsTest.java deleted file mode 100644 index b14566a..0000000 --- a/src/test/java/ai/reveng/model/TagsTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.Origin; -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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Tags - */ -public class TagsTest { - private final Tags model = new Tags(); - - /** - * Model tests for Tags - */ - @Test - public void testTags() { - // TODO: test Tags - } - - /** - * Test the property 'tag' - */ - @Test - public void tagTest() { - // TODO: test tag - } - - /** - * Test the property 'origin' - */ - @Test - public void originTest() { - // TODO: test origin - } - -} diff --git a/src/test/java/ai/reveng/model/ThreatScoreFunctionBodyTest.java b/src/test/java/ai/reveng/model/ThreatScoreFunctionBodyTest.java deleted file mode 100644 index 519813a..0000000 --- a/src/test/java/ai/reveng/model/ThreatScoreFunctionBodyTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 ThreatScoreFunctionBody - */ -public class ThreatScoreFunctionBodyTest { - private final ThreatScoreFunctionBody model = new ThreatScoreFunctionBody(); - - /** - * Model tests for ThreatScoreFunctionBody - */ - @Test - public void testThreatScoreFunctionBody() { - // TODO: test ThreatScoreFunctionBody - } - - /** - * Test the property 'functionIds' - */ - @Test - public void functionIdsTest() { - // TODO: test functionIds - } - -}