From 44a0480d8ce310d9436487026f4673b367845104 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Nov 2025 07:03:02 +0000 Subject: [PATCH] Update SDK to version v2.35.1 - Generated from OpenAPI spec version v2.35.1 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 19 +- build.gradle | 4 +- build.sbt | 2 +- docs/AnalysesCoreApi.md | 73 --- docs/AnalysisTags.md | 3 +- docs/AppServicesBinaryAnnSchemaTagItem.md | 14 - docs/BaseResponseBinaryAnnListResponse.md | 17 - ...eResponseListTagOriginBoxPlotConfidence.md | 17 - docs/BinaryAnnForm.md | 16 - docs/BinaryAnnListResponse.md | 13 - docs/BoxPlotConfidence.md | 20 - docs/ConfidenceApi.md | 81 --- docs/ExportedBinaryAnnResult.md | 21 - docs/Origin.md | 25 - docs/TagConfidenceBody.md | 13 - ...AnalysesResponsesTagItem.md => TagItem.md} | 2 +- docs/TagOriginBoxPlotConfidence.md | 14 - docs/Tags.md | 14 - pom.xml | 2 +- .../java/ai/reveng/api/AnalysesCoreApi.java | 143 ----- .../java/ai/reveng/api/ConfidenceApi.java | 217 ------- .../java/ai/reveng/invoker/ApiClient.java | 2 +- .../java/ai/reveng/invoker/Configuration.java | 2 +- src/main/java/ai/reveng/invoker/JSON.java | 12 +- .../java/ai/reveng/model/AnalysisTags.java | 66 +- .../AppServicesBinaryAnnSchemaTagItem.java | 328 ---------- .../BaseResponseBinaryAnnListResponse.java | 438 -------------- ...esponseListTagOriginBoxPlotConfidence.java | 456 -------------- .../java/ai/reveng/model/BinaryAnnForm.java | 393 ------------ .../reveng/model/BinaryAnnListResponse.java | 312 ---------- .../ai/reveng/model/BoxPlotConfidence.java | 448 -------------- .../reveng/model/ExportedBinaryAnnResult.java | 562 ------------------ src/main/java/ai/reveng/model/Origin.java | 91 --- .../ai/reveng/model/TagConfidenceBody.java | 312 ---------- ...ysesResponsesTagItem.java => TagItem.java} | 64 +- .../model/TagOriginBoxPlotConfidence.java | 323 ---------- src/main/java/ai/reveng/model/Tags.java | 323 ---------- .../ai/reveng/api/AnalysesCoreApiTest.java | 17 - .../java/ai/reveng/api/ConfidenceApiTest.java | 50 -- .../ai/reveng/model/AnalysisTagsTest.java | 10 +- ...AppServicesBinaryAnnSchemaTagItemTest.java | 56 -- ...BaseResponseBinaryAnnListResponseTest.java | 85 --- ...nseListTagOriginBoxPlotConfidenceTest.java | 85 --- .../ai/reveng/model/BinaryAnnFormTest.java | 74 --- .../model/BinaryAnnListResponseTest.java | 50 -- .../reveng/model/BoxPlotConfidenceTest.java | 96 --- .../model/ExportedBinaryAnnResultTest.java | 115 ---- src/test/java/ai/reveng/model/OriginTest.java | 31 - .../reveng/model/TagConfidenceBodyTest.java | 50 -- ...onsesTagItemTest.java => TagItemTest.java} | 12 +- .../model/TagOriginBoxPlotConfidenceTest.java | 57 -- src/test/java/ai/reveng/model/TagsTest.java | 56 -- 53 files changed, 63 insertions(+), 5645 deletions(-) delete mode 100644 docs/AppServicesBinaryAnnSchemaTagItem.md delete mode 100644 docs/BaseResponseBinaryAnnListResponse.md delete mode 100644 docs/BaseResponseListTagOriginBoxPlotConfidence.md delete mode 100644 docs/BinaryAnnForm.md delete mode 100644 docs/BinaryAnnListResponse.md delete mode 100644 docs/BoxPlotConfidence.md delete mode 100644 docs/ConfidenceApi.md delete mode 100644 docs/ExportedBinaryAnnResult.md delete mode 100644 docs/Origin.md delete mode 100644 docs/TagConfidenceBody.md rename docs/{AppApiRestV2AnalysesResponsesTagItem.md => TagItem.md} (85%) delete mode 100644 docs/TagOriginBoxPlotConfidence.md delete mode 100644 docs/Tags.md delete mode 100644 src/main/java/ai/reveng/api/ConfidenceApi.java delete mode 100644 src/main/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItem.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseBinaryAnnListResponse.java delete mode 100644 src/main/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/BinaryAnnForm.java delete mode 100644 src/main/java/ai/reveng/model/BinaryAnnListResponse.java delete mode 100644 src/main/java/ai/reveng/model/BoxPlotConfidence.java delete mode 100644 src/main/java/ai/reveng/model/ExportedBinaryAnnResult.java delete mode 100644 src/main/java/ai/reveng/model/Origin.java delete mode 100644 src/main/java/ai/reveng/model/TagConfidenceBody.java rename src/main/java/ai/reveng/model/{AppApiRestV2AnalysesResponsesTagItem.java => TagItem.java} (79%) 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/test/java/ai/reveng/api/ConfidenceApiTest.java delete mode 100644 src/test/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItemTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseBinaryAnnListResponseTest.java delete mode 100644 src/test/java/ai/reveng/model/BaseResponseListTagOriginBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/BinaryAnnFormTest.java delete mode 100644 src/test/java/ai/reveng/model/BinaryAnnListResponseTest.java delete mode 100644 src/test/java/ai/reveng/model/BoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/ExportedBinaryAnnResultTest.java delete mode 100644 src/test/java/ai/reveng/model/OriginTest.java delete mode 100644 src/test/java/ai/reveng/model/TagConfidenceBodyTest.java rename src/test/java/ai/reveng/model/{AppApiRestV2AnalysesResponsesTagItemTest.java => TagItemTest.java} (73%) delete mode 100644 src/test/java/ai/reveng/model/TagOriginBoxPlotConfidenceTest.java delete mode 100644 src/test/java/ai/reveng/model/TagsTest.java diff --git a/.sdk-version b/.sdk-version index f2bc310..01241e5 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.32.0 +v2.35.1 diff --git a/README.md b/README.md index 18ee44b..b481325 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 2.32.0 + 2.35.1 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:2.32.0" + implementation "ai.reveng:sdk:2.35.1" } ``` @@ -87,7 +87,6 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**getAnalysisLogs**](docs/AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis *AnalysesCoreApi* | [**getAnalysisParams**](docs/AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information *AnalysesCoreApi* | [**getAnalysisStatus**](docs/AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis -*AnalysesCoreApi* | [**getBinaryAnn**](docs/AnalysesCoreApi.md#getBinaryAnn) | **POST** /v2/binary_ann/{analysis_id} | Binary Ann *AnalysesCoreApi* | [**listAnalyses**](docs/AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookupBinaryId**](docs/AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID *AnalysesCoreApi* | [**requeueAnalysis**](docs/AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis @@ -129,7 +128,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 *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 @@ -205,11 +203,9 @@ Class | Method | HTTP request | Description - [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md) - [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - - [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - - [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md) - [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md) - [Argument](docs/Argument.md) - [AutoUnstripRequest](docs/AutoUnstripRequest.md) @@ -224,7 +220,6 @@ Class | Method | HTTP request | Description - [BaseResponseAnalysisUpdateTagsResponse](docs/BaseResponseAnalysisUpdateTagsResponse.md) - [BaseResponseBasic](docs/BaseResponseBasic.md) - [BaseResponseBinaryAdditionalResponse](docs/BaseResponseBinaryAdditionalResponse.md) - - [BaseResponseBinaryAnnListResponse](docs/BaseResponseBinaryAnnListResponse.md) - [BaseResponseBinaryDetailsResponse](docs/BaseResponseBinaryDetailsResponse.md) - [BaseResponseBinaryExternalsResponse](docs/BaseResponseBinaryExternalsResponse.md) - [BaseResponseBinarySearchResponse](docs/BaseResponseBinarySearchResponse.md) @@ -264,7 +259,6 @@ Class | Method | HTTP request | Description - [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md) - [BaseResponseListFunctionNameHistory](docs/BaseResponseListFunctionNameHistory.md) - [BaseResponseListSBOM](docs/BaseResponseListSBOM.md) - - [BaseResponseListTagOriginBoxPlotConfidence](docs/BaseResponseListTagOriginBoxPlotConfidence.md) - [BaseResponseListUserActivityResponse](docs/BaseResponseListUserActivityResponse.md) - [BaseResponseLoginResponse](docs/BaseResponseLoginResponse.md) - [BaseResponseLogs](docs/BaseResponseLogs.md) @@ -287,8 +281,6 @@ Class | Method | HTTP request | Description - [Basic](docs/Basic.md) - [BinaryAdditionalDetailsDataResponse](docs/BinaryAdditionalDetailsDataResponse.md) - [BinaryAdditionalResponse](docs/BinaryAdditionalResponse.md) - - [BinaryAnnForm](docs/BinaryAnnForm.md) - - [BinaryAnnListResponse](docs/BinaryAnnListResponse.md) - [BinaryConfig](docs/BinaryConfig.md) - [BinaryDetailsResponse](docs/BinaryDetailsResponse.md) - [BinaryExternalsResponse](docs/BinaryExternalsResponse.md) @@ -297,7 +289,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) @@ -342,7 +333,6 @@ Class | Method | HTTP request | Description - [Enumeration](docs/Enumeration.md) - [ErrorModel](docs/ErrorModel.md) - [ExportModel](docs/ExportModel.md) - - [ExportedBinaryAnnResult](docs/ExportedBinaryAnnResult.md) - [ExternalResponse](docs/ExternalResponse.md) - [FileFormat](docs/FileFormat.md) - [FileHashes](docs/FileHashes.md) @@ -413,7 +403,6 @@ Class | Method | HTTP request | Description - [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) @@ -457,12 +446,10 @@ 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) + - [TagItem](docs/TagItem.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) - [TimestampModel](docs/TimestampModel.md) diff --git a/build.gradle b/build.gradle index f1e6a50..8b4c1cc 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '2.32.0' +version = '2.35.1' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "2.32.0") + coordinates("ai.reveng", "sdk", "2.35.1") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 9199662..26cb3de 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.32.0", + version := "2.35.1", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 55ff1a4..0bccbb9 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -11,7 +11,6 @@ All URIs are relative to *https://api.reveng.ai* | [**getAnalysisLogs**](AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis | | [**getAnalysisParams**](AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information | | [**getAnalysisStatus**](AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis | -| [**getBinaryAnn**](AnalysesCoreApi.md#getBinaryAnn) | **POST** /v2/binary_ann/{analysis_id} | Binary Ann | | [**listAnalyses**](AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses | | [**lookupBinaryId**](AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID | | [**requeueAnalysis**](AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis | @@ -514,78 +513,6 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | - -# **getBinaryAnn** -> BaseResponseBinaryAnnListResponse getBinaryAnn(analysisId, binaryAnnForm) - -Binary Ann - -Binary Ann - -### 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 | - BinaryAnnForm binaryAnnForm = new BinaryAnnForm(); // BinaryAnnForm | - try { - BaseResponseBinaryAnnListResponse result = apiInstance.getBinaryAnn(analysisId, binaryAnnForm); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#getBinaryAnn"); - 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**| | | -| **binaryAnnForm** | [**BinaryAnnForm**](BinaryAnnForm.md)| | | - -### Return type - -[**BaseResponseBinaryAnnListResponse**](BaseResponseBinaryAnnListResponse.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 | - | - # **listAnalyses** > BaseResponseRecent listAnalyses(searchTerm, workspace, status, modelName, dynamicExecutionStatus, usernames, sha256Hash, limit, offset, orderBy, order) diff --git a/docs/AnalysisTags.md b/docs/AnalysisTags.md index 6832555..b9b341f 100644 --- a/docs/AnalysisTags.md +++ b/docs/AnalysisTags.md @@ -7,8 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**analysisTags** | [**List<AppApiRestV2AnalysesResponsesTagItem>**](AppApiRestV2AnalysesResponsesTagItem.md) | | | -|**suggestedTags** | [**List<AppApiRestV2AnalysesResponsesTagItem>**](AppApiRestV2AnalysesResponsesTagItem.md) | | | +|**analysisTags** | [**List<TagItem>**](TagItem.md) | | | diff --git a/docs/AppServicesBinaryAnnSchemaTagItem.md b/docs/AppServicesBinaryAnnSchemaTagItem.md deleted file mode 100644 index 349d47e..0000000 --- a/docs/AppServicesBinaryAnnSchemaTagItem.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AppServicesBinaryAnnSchemaTagItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tag** | **String** | | [optional] | -|**origin** | **String** | | [optional] | - - - diff --git a/docs/BaseResponseBinaryAnnListResponse.md b/docs/BaseResponseBinaryAnnListResponse.md deleted file mode 100644 index 8260ea8..0000000 --- a/docs/BaseResponseBinaryAnnListResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseBinaryAnnListResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**BinaryAnnListResponse**](BinaryAnnListResponse.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/BinaryAnnForm.md b/docs/BinaryAnnForm.md deleted file mode 100644 index 56961ff..0000000 --- a/docs/BinaryAnnForm.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# BinaryAnnForm - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**confidence** | **BigDecimal** | Confidence of the annotation | [optional] | -|**nns** | **Integer** | Number of nearest neighbors | [optional] | -|**collectionIds** | **List<Integer>** | Collection IDs to search for nearest neighbors | [optional] | -|**binaryIds** | **List<Integer>** | Binary IDs to search for nearest neighbors | [optional] | - - - diff --git a/docs/BinaryAnnListResponse.md b/docs/BinaryAnnListResponse.md deleted file mode 100644 index 4366844..0000000 --- a/docs/BinaryAnnListResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# BinaryAnnListResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_list** | [**List<ExportedBinaryAnnResult>**](ExportedBinaryAnnResult.md) | | | - - - 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 c0ece78..0000000 --- a/docs/ConfidenceApi.md +++ /dev/null @@ -1,81 +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 | - - - -# **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 | - | - diff --git a/docs/ExportedBinaryAnnResult.md b/docs/ExportedBinaryAnnResult.md deleted file mode 100644 index 3ed9122..0000000 --- a/docs/ExportedBinaryAnnResult.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# ExportedBinaryAnnResult - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**analysisId** | **Integer** | | | -|**binaryId** | **Integer** | | | -|**binaryName** | **String** | | | -|**sha256Hash** | **String** | | | -|**analysisScope** | **String** | | | -|**embedding3d** | **List<BigDecimal>** | | | -|**embedding1d** | **List<BigDecimal>** | | | -|**confidence** | **BigDecimal** | | | -|**tags** | [**List<AppServicesBinaryAnnSchemaTagItem>**](AppServicesBinaryAnnSchemaTagItem.md) | | [optional] | - - - 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/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/AppApiRestV2AnalysesResponsesTagItem.md b/docs/TagItem.md similarity index 85% rename from docs/AppApiRestV2AnalysesResponsesTagItem.md rename to docs/TagItem.md index 8a1038e..a284970 100644 --- a/docs/AppApiRestV2AnalysesResponsesTagItem.md +++ b/docs/TagItem.md @@ -1,6 +1,6 @@ -# AppApiRestV2AnalysesResponsesTagItem +# TagItem ## Properties 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/pom.xml b/pom.xml index 4da6db5..744e933 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 2.32.0 + 2.35.1 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 7634d99..c060c30 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -36,7 +36,6 @@ import ai.reveng.model.BaseResponseAnalysisFunctionMapping; import ai.reveng.model.BaseResponseAnalysisUpdateTagsResponse; import ai.reveng.model.BaseResponseBasic; -import ai.reveng.model.BaseResponseBinaryAnnListResponse; import ai.reveng.model.BaseResponseCreated; import ai.reveng.model.BaseResponseDict; import ai.reveng.model.BaseResponseLogs; @@ -44,7 +43,6 @@ import ai.reveng.model.BaseResponseRecent; import ai.reveng.model.BaseResponseStatus; import ai.reveng.model.BaseResponseUploadResponse; -import ai.reveng.model.BinaryAnnForm; import ai.reveng.model.DynamicExecutionStatusInput; import java.io.File; import ai.reveng.model.ModelName; @@ -1030,147 +1028,6 @@ public okhttp3.Call getAnalysisStatusAsync(@javax.annotation.Nonnull Integer ana localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getBinaryAnn - * @param analysisId (required) - * @param binaryAnnForm (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 getBinaryAnnCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull BinaryAnnForm binaryAnnForm, 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 = binaryAnnForm; - - // create path and map variables - String localVarPath = "/v2/binary_ann/{analysis_id}" - .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 getBinaryAnnValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull BinaryAnnForm binaryAnnForm, 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 getBinaryAnn(Async)"); - } - - // verify the required parameter 'binaryAnnForm' is set - if (binaryAnnForm == null) { - throw new ApiException("Missing the required parameter 'binaryAnnForm' when calling getBinaryAnn(Async)"); - } - - return getBinaryAnnCall(analysisId, binaryAnnForm, _callback); - - } - - /** - * Binary Ann - * Binary Ann - * @param analysisId (required) - * @param binaryAnnForm (required) - * @return BaseResponseBinaryAnnListResponse - * @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 BaseResponseBinaryAnnListResponse getBinaryAnn(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull BinaryAnnForm binaryAnnForm) throws ApiException { - ApiResponse localVarResp = getBinaryAnnWithHttpInfo(analysisId, binaryAnnForm); - return localVarResp.getData(); - } - - /** - * Binary Ann - * Binary Ann - * @param analysisId (required) - * @param binaryAnnForm (required) - * @return ApiResponse<BaseResponseBinaryAnnListResponse> - * @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 getBinaryAnnWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull BinaryAnnForm binaryAnnForm) throws ApiException { - okhttp3.Call localVarCall = getBinaryAnnValidateBeforeCall(analysisId, binaryAnnForm, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Binary Ann (asynchronously) - * Binary Ann - * @param analysisId (required) - * @param binaryAnnForm (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 getBinaryAnnAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull BinaryAnnForm binaryAnnForm, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getBinaryAnnValidateBeforeCall(analysisId, binaryAnnForm, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for listAnalyses * @param searchTerm (optional, default to ) 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 a914c04..0000000 --- a/src/main/java/ai/reveng/api/ConfidenceApi.java +++ /dev/null @@ -1,217 +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.BaseResponseListTagOriginBoxPlotConfidence; -import ai.reveng.model.TagConfidenceBody; - -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; - } -} diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 47e2410..e9a4d06 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -146,7 +146,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.32.0/java"); + setUserAgent("OpenAPI-Generator/2.35.1/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 76b90cd..676b6fe 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.32.0"; + public static final String VERSION = "2.35.1"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index 26570e6..c333c79 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -114,10 +114,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisUpdateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisUpdateTagsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisUpdateTagsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2AnalysesResponsesTagItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2FunctionsResponsesFunction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2FunctionsTypesFunction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppServicesBinaryAnnSchemaTagItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppServicesDynamicExecutionSchemasDynamicExecutionStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Argument.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AutoUnstripRequest.CustomTypeAdapterFactory()); @@ -132,7 +130,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisUpdateTagsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBasic.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBinaryAdditionalResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBinaryAnnListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBinaryDetailsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBinaryExternalsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBinarySearchResponse.CustomTypeAdapterFactory()); @@ -172,7 +169,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListDieMatch.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListFunctionNameHistory.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListSBOM.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()); @@ -195,8 +191,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Basic.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryAdditionalDetailsDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryAdditionalResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryAnnForm.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryAnnListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryDetailsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BinaryExternalsResponse.CustomTypeAdapterFactory()); @@ -204,7 +198,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()); @@ -246,7 +239,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Enumeration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ErrorModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExportModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExportedBinaryAnnResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExternalResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FileHashes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FileMetadata.CustomTypeAdapterFactory()); @@ -350,12 +342,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.TagItem.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.TimestampModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.TypeDefinition.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/AnalysisTags.java b/src/main/java/ai/reveng/model/AnalysisTags.java index 796cf87..09ca5fa 100644 --- a/src/main/java/ai/reveng/model/AnalysisTags.java +++ b/src/main/java/ai/reveng/model/AnalysisTags.java @@ -14,7 +14,7 @@ import java.util.Objects; import java.util.Locale; -import ai.reveng.model.AppApiRestV2AnalysesResponsesTagItem; +import ai.reveng.model.TagItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -57,22 +57,17 @@ public class AnalysisTags { public static final String SERIALIZED_NAME_ANALYSIS_TAGS = "analysis_tags"; @SerializedName(SERIALIZED_NAME_ANALYSIS_TAGS) @javax.annotation.Nonnull - private List analysisTags = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SUGGESTED_TAGS = "suggested_tags"; - @SerializedName(SERIALIZED_NAME_SUGGESTED_TAGS) - @javax.annotation.Nonnull - private List suggestedTags = new ArrayList<>(); + private List analysisTags = new ArrayList<>(); public AnalysisTags() { } - public AnalysisTags analysisTags(@javax.annotation.Nonnull List analysisTags) { + public AnalysisTags analysisTags(@javax.annotation.Nonnull List analysisTags) { this.analysisTags = analysisTags; return this; } - public AnalysisTags addAnalysisTagsItem(AppApiRestV2AnalysesResponsesTagItem analysisTagsItem) { + public AnalysisTags addAnalysisTagsItem(TagItem analysisTagsItem) { if (this.analysisTags == null) { this.analysisTags = new ArrayList<>(); } @@ -85,41 +80,14 @@ public AnalysisTags addAnalysisTagsItem(AppApiRestV2AnalysesResponsesTagItem ana * @return analysisTags */ @javax.annotation.Nonnull - public List getAnalysisTags() { + public List getAnalysisTags() { return analysisTags; } - public void setAnalysisTags(@javax.annotation.Nonnull List analysisTags) { + public void setAnalysisTags(@javax.annotation.Nonnull List analysisTags) { this.analysisTags = analysisTags; } - - public AnalysisTags suggestedTags(@javax.annotation.Nonnull List suggestedTags) { - this.suggestedTags = suggestedTags; - return this; - } - - public AnalysisTags addSuggestedTagsItem(AppApiRestV2AnalysesResponsesTagItem suggestedTagsItem) { - if (this.suggestedTags == null) { - this.suggestedTags = new ArrayList<>(); - } - this.suggestedTags.add(suggestedTagsItem); - return this; - } - - /** - * Get suggestedTags - * @return suggestedTags - */ - @javax.annotation.Nonnull - public List getSuggestedTags() { - return suggestedTags; - } - - public void setSuggestedTags(@javax.annotation.Nonnull List suggestedTags) { - this.suggestedTags = suggestedTags; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -175,14 +143,13 @@ public boolean equals(Object o) { return false; } AnalysisTags analysisTags = (AnalysisTags) o; - return Objects.equals(this.analysisTags, analysisTags.analysisTags) && - Objects.equals(this.suggestedTags, analysisTags.suggestedTags)&& + return Objects.equals(this.analysisTags, analysisTags.analysisTags)&& Objects.equals(this.additionalProperties, analysisTags.additionalProperties); } @Override public int hashCode() { - return Objects.hash(analysisTags, suggestedTags, additionalProperties); + return Objects.hash(analysisTags, additionalProperties); } @Override @@ -190,7 +157,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AnalysisTags {\n"); sb.append(" analysisTags: ").append(toIndentedString(analysisTags)).append("\n"); - sb.append(" suggestedTags: ").append(toIndentedString(suggestedTags)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -213,10 +179,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("analysis_tags", "suggested_tags")); + openapiFields = new HashSet(Arrays.asList("analysis_tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("analysis_tags", "suggested_tags")); + openapiRequiredFields = new HashSet(Arrays.asList("analysis_tags")); } /** @@ -247,17 +213,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayanalysisTags = jsonObj.getAsJsonArray("analysis_tags"); // validate the required field `analysis_tags` (array) for (int i = 0; i < jsonArrayanalysisTags.size(); i++) { - AppApiRestV2AnalysesResponsesTagItem.validateJsonElement(jsonArrayanalysisTags.get(i)); - }; - // ensure the json data is an array - if (!jsonObj.get("suggested_tags").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggested_tags` to be an array in the JSON string but got `%s`", jsonObj.get("suggested_tags").toString())); - } - - JsonArray jsonArraysuggestedTags = jsonObj.getAsJsonArray("suggested_tags"); - // validate the required field `suggested_tags` (array) - for (int i = 0; i < jsonArraysuggestedTags.size(); i++) { - AppApiRestV2AnalysesResponsesTagItem.validateJsonElement(jsonArraysuggestedTags.get(i)); + TagItem.validateJsonElement(jsonArrayanalysisTags.get(i)); }; } diff --git a/src/main/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItem.java b/src/main/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItem.java deleted file mode 100644 index 9c2245d..0000000 --- a/src/main/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItem.java +++ /dev/null @@ -1,328 +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 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; - -/** - * AppServicesBinaryAnnSchemaTagItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AppServicesBinaryAnnSchemaTagItem { - public static final String SERIALIZED_NAME_TAG = "tag"; - @SerializedName(SERIALIZED_NAME_TAG) - @javax.annotation.Nullable - private String tag; - - public static final String SERIALIZED_NAME_ORIGIN = "origin"; - @SerializedName(SERIALIZED_NAME_ORIGIN) - @javax.annotation.Nullable - private String origin; - - public AppServicesBinaryAnnSchemaTagItem() { - } - - public AppServicesBinaryAnnSchemaTagItem tag(@javax.annotation.Nullable String tag) { - this.tag = tag; - return this; - } - - /** - * Get tag - * @return tag - */ - @javax.annotation.Nullable - public String getTag() { - return tag; - } - - public void setTag(@javax.annotation.Nullable String tag) { - this.tag = tag; - } - - - public AppServicesBinaryAnnSchemaTagItem origin(@javax.annotation.Nullable String origin) { - this.origin = origin; - return this; - } - - /** - * Get origin - * @return origin - */ - @javax.annotation.Nullable - public String getOrigin() { - return origin; - } - - public void setOrigin(@javax.annotation.Nullable String 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 AppServicesBinaryAnnSchemaTagItem instance itself - */ - public AppServicesBinaryAnnSchemaTagItem 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; - } - AppServicesBinaryAnnSchemaTagItem appServicesBinaryAnnSchemaTagItem = (AppServicesBinaryAnnSchemaTagItem) o; - return Objects.equals(this.tag, appServicesBinaryAnnSchemaTagItem.tag) && - Objects.equals(this.origin, appServicesBinaryAnnSchemaTagItem.origin)&& - Objects.equals(this.additionalProperties, appServicesBinaryAnnSchemaTagItem.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(tag, origin, 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 AppServicesBinaryAnnSchemaTagItem {\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(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 AppServicesBinaryAnnSchemaTagItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AppServicesBinaryAnnSchemaTagItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServicesBinaryAnnSchemaTagItem is not found in the empty JSON string", AppServicesBinaryAnnSchemaTagItem.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !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())); - } - if ((jsonObj.get("origin") != null && !jsonObj.get("origin").isJsonNull()) && !jsonObj.get("origin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `origin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origin").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AppServicesBinaryAnnSchemaTagItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AppServicesBinaryAnnSchemaTagItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AppServicesBinaryAnnSchemaTagItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AppServicesBinaryAnnSchemaTagItem 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 AppServicesBinaryAnnSchemaTagItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AppServicesBinaryAnnSchemaTagItem 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 AppServicesBinaryAnnSchemaTagItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of AppServicesBinaryAnnSchemaTagItem - * @throws IOException if the JSON string is invalid with respect to AppServicesBinaryAnnSchemaTagItem - */ - public static AppServicesBinaryAnnSchemaTagItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AppServicesBinaryAnnSchemaTagItem.class); - } - - /** - * Convert an instance of AppServicesBinaryAnnSchemaTagItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseBinaryAnnListResponse.java b/src/main/java/ai/reveng/model/BaseResponseBinaryAnnListResponse.java deleted file mode 100644 index 88b967f..0000000 --- a/src/main/java/ai/reveng/model/BaseResponseBinaryAnnListResponse.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.BinaryAnnListResponse; -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; - -/** - * BaseResponseBinaryAnnListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseBinaryAnnListResponse { - 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 BinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse() { - } - - public BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse data(@javax.annotation.Nullable BinaryAnnListResponse data) { - this.data = data; - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public BinaryAnnListResponse getData() { - return data; - } - - public void setData(@javax.annotation.Nullable BinaryAnnListResponse data) { - this.data = data; - } - - - public BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse instance itself - */ - public BaseResponseBinaryAnnListResponse 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; - } - BaseResponseBinaryAnnListResponse baseResponseBinaryAnnListResponse = (BaseResponseBinaryAnnListResponse) o; - return Objects.equals(this.status, baseResponseBinaryAnnListResponse.status) && - Objects.equals(this.data, baseResponseBinaryAnnListResponse.data) && - Objects.equals(this.message, baseResponseBinaryAnnListResponse.message) && - Objects.equals(this.errors, baseResponseBinaryAnnListResponse.errors) && - Objects.equals(this.meta, baseResponseBinaryAnnListResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseBinaryAnnListResponse.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 BaseResponseBinaryAnnListResponse {\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 BaseResponseBinaryAnnListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseBinaryAnnListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseBinaryAnnListResponse is not found in the empty JSON string", BaseResponseBinaryAnnListResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - BinaryAnnListResponse.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 (!BaseResponseBinaryAnnListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseBinaryAnnListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseBinaryAnnListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseBinaryAnnListResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseBinaryAnnListResponse - */ - public static BaseResponseBinaryAnnListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseBinaryAnnListResponse.class); - } - - /** - * Convert an instance of BaseResponseBinaryAnnListResponse 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/BinaryAnnForm.java b/src/main/java/ai/reveng/model/BinaryAnnForm.java deleted file mode 100644 index a07e523..0000000 --- a/src/main/java/ai/reveng/model/BinaryAnnForm.java +++ /dev/null @@ -1,393 +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; - -/** - * BinaryAnnForm - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BinaryAnnForm { - public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; - @SerializedName(SERIALIZED_NAME_CONFIDENCE) - @javax.annotation.Nullable - private BigDecimal confidence = new BigDecimal("0.0"); - - public static final String SERIALIZED_NAME_NNS = "nns"; - @SerializedName(SERIALIZED_NAME_NNS) - @javax.annotation.Nullable - private Integer nns = 1; - - public static final String SERIALIZED_NAME_COLLECTION_IDS = "collection_ids"; - @SerializedName(SERIALIZED_NAME_COLLECTION_IDS) - @javax.annotation.Nullable - private List collectionIds = new ArrayList<>(); - - public static final String SERIALIZED_NAME_BINARY_IDS = "binary_ids"; - @SerializedName(SERIALIZED_NAME_BINARY_IDS) - @javax.annotation.Nullable - private List binaryIds = new ArrayList<>(); - - public BinaryAnnForm() { - } - - public BinaryAnnForm confidence(@javax.annotation.Nullable BigDecimal confidence) { - this.confidence = confidence; - return this; - } - - /** - * Confidence of the annotation - * minimum: 0.0 - * maximum: 1.0 - * @return confidence - */ - @javax.annotation.Nullable - public BigDecimal getConfidence() { - return confidence; - } - - public void setConfidence(@javax.annotation.Nullable BigDecimal confidence) { - this.confidence = confidence; - } - - - public BinaryAnnForm nns(@javax.annotation.Nullable Integer nns) { - this.nns = nns; - return this; - } - - /** - * Number of nearest neighbors - * minimum: 1 - * maximum: 100 - * @return nns - */ - @javax.annotation.Nullable - public Integer getNns() { - return nns; - } - - public void setNns(@javax.annotation.Nullable Integer nns) { - this.nns = nns; - } - - - public BinaryAnnForm collectionIds(@javax.annotation.Nullable List collectionIds) { - this.collectionIds = collectionIds; - return this; - } - - public BinaryAnnForm addCollectionIdsItem(Integer collectionIdsItem) { - if (this.collectionIds == null) { - this.collectionIds = new ArrayList<>(); - } - this.collectionIds.add(collectionIdsItem); - return this; - } - - /** - * Collection IDs to search for nearest neighbors - * @return collectionIds - */ - @javax.annotation.Nullable - public List getCollectionIds() { - return collectionIds; - } - - public void setCollectionIds(@javax.annotation.Nullable List collectionIds) { - this.collectionIds = collectionIds; - } - - - public BinaryAnnForm binaryIds(@javax.annotation.Nullable List binaryIds) { - this.binaryIds = binaryIds; - return this; - } - - public BinaryAnnForm addBinaryIdsItem(Integer binaryIdsItem) { - if (this.binaryIds == null) { - this.binaryIds = new ArrayList<>(); - } - this.binaryIds.add(binaryIdsItem); - return this; - } - - /** - * Binary IDs to search for nearest neighbors - * @return binaryIds - */ - @javax.annotation.Nullable - public List getBinaryIds() { - return binaryIds; - } - - public void setBinaryIds(@javax.annotation.Nullable List binaryIds) { - this.binaryIds = binaryIds; - } - - /** - * 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 BinaryAnnForm instance itself - */ - public BinaryAnnForm 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; - } - BinaryAnnForm binaryAnnForm = (BinaryAnnForm) o; - return Objects.equals(this.confidence, binaryAnnForm.confidence) && - Objects.equals(this.nns, binaryAnnForm.nns) && - Objects.equals(this.collectionIds, binaryAnnForm.collectionIds) && - Objects.equals(this.binaryIds, binaryAnnForm.binaryIds)&& - Objects.equals(this.additionalProperties, binaryAnnForm.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(confidence, nns, collectionIds, binaryIds, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BinaryAnnForm {\n"); - sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); - sb.append(" nns: ").append(toIndentedString(nns)).append("\n"); - sb.append(" collectionIds: ").append(toIndentedString(collectionIds)).append("\n"); - sb.append(" binaryIds: ").append(toIndentedString(binaryIds)).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("confidence", "nns", "collection_ids", "binary_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 BinaryAnnForm - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BinaryAnnForm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BinaryAnnForm is not found in the empty JSON string", BinaryAnnForm.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("collection_ids") != null && !jsonObj.get("collection_ids").isJsonNull() && !jsonObj.get("collection_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `collection_ids` to be an array in the JSON string but got `%s`", jsonObj.get("collection_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("binary_ids") != null && !jsonObj.get("binary_ids").isJsonNull() && !jsonObj.get("binary_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("binary_ids").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BinaryAnnForm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BinaryAnnForm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BinaryAnnForm.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BinaryAnnForm 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 BinaryAnnForm read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BinaryAnnForm 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 BinaryAnnForm given an JSON string - * - * @param jsonString JSON string - * @return An instance of BinaryAnnForm - * @throws IOException if the JSON string is invalid with respect to BinaryAnnForm - */ - public static BinaryAnnForm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BinaryAnnForm.class); - } - - /** - * Convert an instance of BinaryAnnForm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BinaryAnnListResponse.java b/src/main/java/ai/reveng/model/BinaryAnnListResponse.java deleted file mode 100644 index 7d2a146..0000000 --- a/src/main/java/ai/reveng/model/BinaryAnnListResponse.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.ExportedBinaryAnnResult; -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; - -/** - * BinaryAnnListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BinaryAnnListResponse { - public static final String SERIALIZED_NAME_LIST = "list"; - @SerializedName(SERIALIZED_NAME_LIST) - @javax.annotation.Nonnull - private List _list = new ArrayList<>(); - - public BinaryAnnListResponse() { - } - - public BinaryAnnListResponse _list(@javax.annotation.Nonnull List _list) { - this._list = _list; - return this; - } - - public BinaryAnnListResponse addListItem(ExportedBinaryAnnResult _listItem) { - if (this._list == null) { - this._list = new ArrayList<>(); - } - this._list.add(_listItem); - return this; - } - - /** - * Get _list - * @return _list - */ - @javax.annotation.Nonnull - public List getList() { - return _list; - } - - public void setList(@javax.annotation.Nonnull List _list) { - this._list = _list; - } - - /** - * 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 BinaryAnnListResponse instance itself - */ - public BinaryAnnListResponse 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; - } - BinaryAnnListResponse binaryAnnListResponse = (BinaryAnnListResponse) o; - return Objects.equals(this._list, binaryAnnListResponse._list)&& - Objects.equals(this.additionalProperties, binaryAnnListResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(_list, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BinaryAnnListResponse {\n"); - sb.append(" _list: ").append(toIndentedString(_list)).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("list")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("list")); - } - - /** - * 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 BinaryAnnListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BinaryAnnListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BinaryAnnListResponse is not found in the empty JSON string", BinaryAnnListResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BinaryAnnListResponse.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("list").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `list` to be an array in the JSON string but got `%s`", jsonObj.get("list").toString())); - } - - JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); - // validate the required field `list` (array) - for (int i = 0; i < jsonArray_list.size(); i++) { - ExportedBinaryAnnResult.validateJsonElement(jsonArray_list.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BinaryAnnListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BinaryAnnListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BinaryAnnListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BinaryAnnListResponse 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 BinaryAnnListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BinaryAnnListResponse 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 BinaryAnnListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BinaryAnnListResponse - * @throws IOException if the JSON string is invalid with respect to BinaryAnnListResponse - */ - public static BinaryAnnListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BinaryAnnListResponse.class); - } - - /** - * Convert an instance of BinaryAnnListResponse 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/ExportedBinaryAnnResult.java b/src/main/java/ai/reveng/model/ExportedBinaryAnnResult.java deleted file mode 100644 index 9eb1d69..0000000 --- a/src/main/java/ai/reveng/model/ExportedBinaryAnnResult.java +++ /dev/null @@ -1,562 +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.AppServicesBinaryAnnSchemaTagItem; -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; - -/** - * ExportedBinaryAnnResult - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExportedBinaryAnnResult { - public static final String SERIALIZED_NAME_ANALYSIS_ID = "analysis_id"; - @SerializedName(SERIALIZED_NAME_ANALYSIS_ID) - @javax.annotation.Nonnull - private Integer analysisId; - - 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_SHA256_HASH = "sha_256_hash"; - @SerializedName(SERIALIZED_NAME_SHA256_HASH) - @javax.annotation.Nonnull - private String sha256Hash; - - public static final String SERIALIZED_NAME_ANALYSIS_SCOPE = "analysis_scope"; - @SerializedName(SERIALIZED_NAME_ANALYSIS_SCOPE) - @javax.annotation.Nonnull - private String analysisScope; - - 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_CONFIDENCE = "confidence"; - @SerializedName(SERIALIZED_NAME_CONFIDENCE) - @javax.annotation.Nonnull - private BigDecimal confidence; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - @javax.annotation.Nullable - private List tags = new ArrayList<>(); - - public ExportedBinaryAnnResult() { - } - - public ExportedBinaryAnnResult analysisId(@javax.annotation.Nonnull Integer analysisId) { - this.analysisId = analysisId; - return this; - } - - /** - * Get analysisId - * @return analysisId - */ - @javax.annotation.Nonnull - public Integer getAnalysisId() { - return analysisId; - } - - public void setAnalysisId(@javax.annotation.Nonnull Integer analysisId) { - this.analysisId = analysisId; - } - - - public ExportedBinaryAnnResult 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 ExportedBinaryAnnResult 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 ExportedBinaryAnnResult 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; - } - - - public ExportedBinaryAnnResult analysisScope(@javax.annotation.Nonnull String analysisScope) { - this.analysisScope = analysisScope; - return this; - } - - /** - * Get analysisScope - * @return analysisScope - */ - @javax.annotation.Nonnull - public String getAnalysisScope() { - return analysisScope; - } - - public void setAnalysisScope(@javax.annotation.Nonnull String analysisScope) { - this.analysisScope = analysisScope; - } - - - public ExportedBinaryAnnResult embedding3d(@javax.annotation.Nonnull List embedding3d) { - this.embedding3d = embedding3d; - return this; - } - - public ExportedBinaryAnnResult 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 ExportedBinaryAnnResult embedding1d(@javax.annotation.Nonnull List embedding1d) { - this.embedding1d = embedding1d; - return this; - } - - public ExportedBinaryAnnResult 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 ExportedBinaryAnnResult confidence(@javax.annotation.Nonnull BigDecimal confidence) { - this.confidence = confidence; - return this; - } - - /** - * Get confidence - * @return confidence - */ - @javax.annotation.Nonnull - public BigDecimal getConfidence() { - return confidence; - } - - public void setConfidence(@javax.annotation.Nonnull BigDecimal confidence) { - this.confidence = confidence; - } - - - public ExportedBinaryAnnResult tags(@javax.annotation.Nullable List tags) { - this.tags = tags; - return this; - } - - public ExportedBinaryAnnResult addTagsItem(AppServicesBinaryAnnSchemaTagItem tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(@javax.annotation.Nullable 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 ExportedBinaryAnnResult instance itself - */ - public ExportedBinaryAnnResult 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; - } - ExportedBinaryAnnResult exportedBinaryAnnResult = (ExportedBinaryAnnResult) o; - return Objects.equals(this.analysisId, exportedBinaryAnnResult.analysisId) && - Objects.equals(this.binaryId, exportedBinaryAnnResult.binaryId) && - Objects.equals(this.binaryName, exportedBinaryAnnResult.binaryName) && - Objects.equals(this.sha256Hash, exportedBinaryAnnResult.sha256Hash) && - Objects.equals(this.analysisScope, exportedBinaryAnnResult.analysisScope) && - Objects.equals(this.embedding3d, exportedBinaryAnnResult.embedding3d) && - Objects.equals(this.embedding1d, exportedBinaryAnnResult.embedding1d) && - Objects.equals(this.confidence, exportedBinaryAnnResult.confidence) && - Objects.equals(this.tags, exportedBinaryAnnResult.tags)&& - Objects.equals(this.additionalProperties, exportedBinaryAnnResult.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(analysisId, binaryId, binaryName, sha256Hash, analysisScope, embedding3d, embedding1d, confidence, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportedBinaryAnnResult {\n"); - sb.append(" analysisId: ").append(toIndentedString(analysisId)).append("\n"); - sb.append(" binaryId: ").append(toIndentedString(binaryId)).append("\n"); - sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); - sb.append(" sha256Hash: ").append(toIndentedString(sha256Hash)).append("\n"); - sb.append(" analysisScope: ").append(toIndentedString(analysisScope)).append("\n"); - sb.append(" embedding3d: ").append(toIndentedString(embedding3d)).append("\n"); - sb.append(" embedding1d: ").append(toIndentedString(embedding1d)).append("\n"); - sb.append(" confidence: ").append(toIndentedString(confidence)).append("\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("analysis_id", "binary_id", "binary_name", "sha_256_hash", "analysis_scope", "embedding_3d", "embedding_1d", "confidence", "tags")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("analysis_id", "binary_id", "binary_name", "sha_256_hash", "analysis_scope", "embedding_3d", "embedding_1d", "confidence")); - } - - /** - * 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 ExportedBinaryAnnResult - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportedBinaryAnnResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExportedBinaryAnnResult is not found in the empty JSON string", ExportedBinaryAnnResult.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportedBinaryAnnResult.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("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())); - } - 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())); - } - if (!jsonObj.get("analysis_scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `analysis_scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("analysis_scope").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("tags") != null && !jsonObj.get("tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - if (jsonArraytags != null) { - // 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())); - } - - // validate the optional field `tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - AppServicesBinaryAnnSchemaTagItem.validateJsonElement(jsonArraytags.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportedBinaryAnnResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportedBinaryAnnResult' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExportedBinaryAnnResult.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportedBinaryAnnResult 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 ExportedBinaryAnnResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ExportedBinaryAnnResult 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 ExportedBinaryAnnResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportedBinaryAnnResult - * @throws IOException if the JSON string is invalid with respect to ExportedBinaryAnnResult - */ - public static ExportedBinaryAnnResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportedBinaryAnnResult.class); - } - - /** - * Convert an instance of ExportedBinaryAnnResult 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/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/AppApiRestV2AnalysesResponsesTagItem.java b/src/main/java/ai/reveng/model/TagItem.java similarity index 79% rename from src/main/java/ai/reveng/model/AppApiRestV2AnalysesResponsesTagItem.java rename to src/main/java/ai/reveng/model/TagItem.java index 691844e..26ecf26 100644 --- a/src/main/java/ai/reveng/model/AppApiRestV2AnalysesResponsesTagItem.java +++ b/src/main/java/ai/reveng/model/TagItem.java @@ -48,10 +48,10 @@ import ai.reveng.invoker.JSON; /** - * AppApiRestV2AnalysesResponsesTagItem + * TagItem */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AppApiRestV2AnalysesResponsesTagItem { +public class TagItem { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull @@ -67,10 +67,10 @@ public class AppApiRestV2AnalysesResponsesTagItem { @javax.annotation.Nullable private Integer collectionId; - public AppApiRestV2AnalysesResponsesTagItem() { + public TagItem() { } - public AppApiRestV2AnalysesResponsesTagItem name(@javax.annotation.Nonnull String name) { + public TagItem name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -89,7 +89,7 @@ public void setName(@javax.annotation.Nonnull String name) { } - public AppApiRestV2AnalysesResponsesTagItem origin(@javax.annotation.Nonnull String origin) { + public TagItem origin(@javax.annotation.Nonnull String origin) { this.origin = origin; return this; } @@ -108,7 +108,7 @@ public void setOrigin(@javax.annotation.Nonnull String origin) { } - public AppApiRestV2AnalysesResponsesTagItem collectionId(@javax.annotation.Nullable Integer collectionId) { + public TagItem collectionId(@javax.annotation.Nullable Integer collectionId) { this.collectionId = collectionId; return this; } @@ -139,9 +139,9 @@ public void setCollectionId(@javax.annotation.Nullable Integer collectionId) { * * @param key name of the property * @param value value of the property - * @return the AppApiRestV2AnalysesResponsesTagItem instance itself + * @return the TagItem instance itself */ - public AppApiRestV2AnalysesResponsesTagItem putAdditionalProperty(String key, Object value) { + public TagItem putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -180,11 +180,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AppApiRestV2AnalysesResponsesTagItem appApiRestV2AnalysesResponsesTagItem = (AppApiRestV2AnalysesResponsesTagItem) o; - return Objects.equals(this.name, appApiRestV2AnalysesResponsesTagItem.name) && - Objects.equals(this.origin, appApiRestV2AnalysesResponsesTagItem.origin) && - Objects.equals(this.collectionId, appApiRestV2AnalysesResponsesTagItem.collectionId)&& - Objects.equals(this.additionalProperties, appApiRestV2AnalysesResponsesTagItem.additionalProperties); + TagItem tagItem = (TagItem) o; + return Objects.equals(this.name, tagItem.name) && + Objects.equals(this.origin, tagItem.origin) && + Objects.equals(this.collectionId, tagItem.collectionId)&& + Objects.equals(this.additionalProperties, tagItem.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -206,7 +206,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AppApiRestV2AnalysesResponsesTagItem {\n"); + sb.append("class TagItem {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" origin: ").append(toIndentedString(origin)).append("\n"); sb.append(" collectionId: ").append(toIndentedString(collectionId)).append("\n"); @@ -242,17 +242,17 @@ private String toIndentedString(Object o) { * 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 AppApiRestV2AnalysesResponsesTagItem + * @throws IOException if the JSON Element is invalid with respect to TagItem */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AppApiRestV2AnalysesResponsesTagItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppApiRestV2AnalysesResponsesTagItem is not found in the empty JSON string", AppApiRestV2AnalysesResponsesTagItem.openapiRequiredFields.toString())); + if (!TagItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TagItem is not found in the empty JSON string", TagItem.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AppApiRestV2AnalysesResponsesTagItem.openapiRequiredFields) { + for (String requiredField : TagItem.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())); } @@ -270,16 +270,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AppApiRestV2AnalysesResponsesTagItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AppApiRestV2AnalysesResponsesTagItem' and its subtypes + if (!TagItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TagItem' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AppApiRestV2AnalysesResponsesTagItem.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TagItem.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AppApiRestV2AnalysesResponsesTagItem value) throws IOException { + public void write(JsonWriter out, TagItem value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -307,12 +307,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AppApiRestV2AnalysesResponsesTagItem read(JsonReader in) throws IOException { + public TagItem read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AppApiRestV2AnalysesResponsesTagItem instance = thisAdapter.fromJsonTree(jsonObj); + TagItem instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -339,18 +339,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AppApiRestV2AnalysesResponsesTagItem given an JSON string + * Create an instance of TagItem given an JSON string * * @param jsonString JSON string - * @return An instance of AppApiRestV2AnalysesResponsesTagItem - * @throws IOException if the JSON string is invalid with respect to AppApiRestV2AnalysesResponsesTagItem + * @return An instance of TagItem + * @throws IOException if the JSON string is invalid with respect to TagItem */ - public static AppApiRestV2AnalysesResponsesTagItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AppApiRestV2AnalysesResponsesTagItem.class); + public static TagItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TagItem.class); } /** - * Convert an instance of AppApiRestV2AnalysesResponsesTagItem to an JSON string + * Convert an instance of TagItem to an JSON string * * @return JSON string */ 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/test/java/ai/reveng/api/AnalysesCoreApiTest.java b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java index 7252187..18db6ea 100644 --- a/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java +++ b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java @@ -23,7 +23,6 @@ import ai.reveng.model.BaseResponseAnalysisFunctionMapping; import ai.reveng.model.BaseResponseAnalysisUpdateTagsResponse; import ai.reveng.model.BaseResponseBasic; -import ai.reveng.model.BaseResponseBinaryAnnListResponse; import ai.reveng.model.BaseResponseCreated; import ai.reveng.model.BaseResponseDict; import ai.reveng.model.BaseResponseLogs; @@ -31,7 +30,6 @@ import ai.reveng.model.BaseResponseRecent; import ai.reveng.model.BaseResponseStatus; import ai.reveng.model.BaseResponseUploadResponse; -import ai.reveng.model.BinaryAnnForm; import ai.reveng.model.DynamicExecutionStatusInput; import java.io.File; import ai.reveng.model.ModelName; @@ -154,21 +152,6 @@ public void getAnalysisStatusTest() throws ApiException { // TODO: test validations } - /** - * Binary Ann - * - * Binary Ann - * - * @throws ApiException if the Api call fails - */ - @Test - public void getBinaryAnnTest() throws ApiException { - Integer analysisId = null; - BinaryAnnForm binaryAnnForm = null; - BaseResponseBinaryAnnListResponse response = api.getBinaryAnn(analysisId, binaryAnnForm); - // TODO: test validations - } - /** * Gets the most recent analyses * 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 3c609ca..0000000 --- a/src/test/java/ai/reveng/api/ConfidenceApiTest.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.api; - -import ai.reveng.invoker.ApiException; -import ai.reveng.model.BaseResponse; -import ai.reveng.model.BaseResponseListTagOriginBoxPlotConfidence; -import ai.reveng.model.TagConfidenceBody; -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 - } - -} diff --git a/src/test/java/ai/reveng/model/AnalysisTagsTest.java b/src/test/java/ai/reveng/model/AnalysisTagsTest.java index 3c6adb3..12ae110 100644 --- a/src/test/java/ai/reveng/model/AnalysisTagsTest.java +++ b/src/test/java/ai/reveng/model/AnalysisTagsTest.java @@ -12,7 +12,7 @@ package ai.reveng.model; -import ai.reveng.model.AppApiRestV2AnalysesResponsesTagItem; +import ai.reveng.model.TagItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,12 +47,4 @@ public void analysisTagsTest() { // TODO: test analysisTags } - /** - * Test the property 'suggestedTags' - */ - @Test - public void suggestedTagsTest() { - // TODO: test suggestedTags - } - } diff --git a/src/test/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItemTest.java b/src/test/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItemTest.java deleted file mode 100644 index ed476a8..0000000 --- a/src/test/java/ai/reveng/model/AppServicesBinaryAnnSchemaTagItemTest.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 com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AppServicesBinaryAnnSchemaTagItem - */ -public class AppServicesBinaryAnnSchemaTagItemTest { - private final AppServicesBinaryAnnSchemaTagItem model = new AppServicesBinaryAnnSchemaTagItem(); - - /** - * Model tests for AppServicesBinaryAnnSchemaTagItem - */ - @Test - public void testAppServicesBinaryAnnSchemaTagItem() { - // TODO: test AppServicesBinaryAnnSchemaTagItem - } - - /** - * 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/BaseResponseBinaryAnnListResponseTest.java b/src/test/java/ai/reveng/model/BaseResponseBinaryAnnListResponseTest.java deleted file mode 100644 index 36f13b5..0000000 --- a/src/test/java/ai/reveng/model/BaseResponseBinaryAnnListResponseTest.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.BinaryAnnListResponse; -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 BaseResponseBinaryAnnListResponse - */ -public class BaseResponseBinaryAnnListResponseTest { - private final BaseResponseBinaryAnnListResponse model = new BaseResponseBinaryAnnListResponse(); - - /** - * Model tests for BaseResponseBinaryAnnListResponse - */ - @Test - public void testBaseResponseBinaryAnnListResponse() { - // TODO: test BaseResponseBinaryAnnListResponse - } - - /** - * 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/BinaryAnnFormTest.java b/src/test/java/ai/reveng/model/BinaryAnnFormTest.java deleted file mode 100644 index dc3aacc..0000000 --- a/src/test/java/ai/reveng/model/BinaryAnnFormTest.java +++ /dev/null @@ -1,74 +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 BinaryAnnForm - */ -public class BinaryAnnFormTest { - private final BinaryAnnForm model = new BinaryAnnForm(); - - /** - * Model tests for BinaryAnnForm - */ - @Test - public void testBinaryAnnForm() { - // TODO: test BinaryAnnForm - } - - /** - * Test the property 'confidence' - */ - @Test - public void confidenceTest() { - // TODO: test confidence - } - - /** - * Test the property 'nns' - */ - @Test - public void nnsTest() { - // TODO: test nns - } - - /** - * Test the property 'collectionIds' - */ - @Test - public void collectionIdsTest() { - // TODO: test collectionIds - } - - /** - * Test the property 'binaryIds' - */ - @Test - public void binaryIdsTest() { - // TODO: test binaryIds - } - -} diff --git a/src/test/java/ai/reveng/model/BinaryAnnListResponseTest.java b/src/test/java/ai/reveng/model/BinaryAnnListResponseTest.java deleted file mode 100644 index 60545d7..0000000 --- a/src/test/java/ai/reveng/model/BinaryAnnListResponseTest.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.ExportedBinaryAnnResult; -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 BinaryAnnListResponse - */ -public class BinaryAnnListResponseTest { - private final BinaryAnnListResponse model = new BinaryAnnListResponse(); - - /** - * Model tests for BinaryAnnListResponse - */ - @Test - public void testBinaryAnnListResponse() { - // TODO: test BinaryAnnListResponse - } - - /** - * Test the property '_list' - */ - @Test - public void _listTest() { - // TODO: test _list - } - -} 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/ExportedBinaryAnnResultTest.java b/src/test/java/ai/reveng/model/ExportedBinaryAnnResultTest.java deleted file mode 100644 index db7c246..0000000 --- a/src/test/java/ai/reveng/model/ExportedBinaryAnnResultTest.java +++ /dev/null @@ -1,115 +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.AppServicesBinaryAnnSchemaTagItem; -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 ExportedBinaryAnnResult - */ -public class ExportedBinaryAnnResultTest { - private final ExportedBinaryAnnResult model = new ExportedBinaryAnnResult(); - - /** - * Model tests for ExportedBinaryAnnResult - */ - @Test - public void testExportedBinaryAnnResult() { - // TODO: test ExportedBinaryAnnResult - } - - /** - * Test the property 'analysisId' - */ - @Test - public void analysisIdTest() { - // TODO: test analysisId - } - - /** - * 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 'sha256Hash' - */ - @Test - public void sha256HashTest() { - // TODO: test sha256Hash - } - - /** - * Test the property 'analysisScope' - */ - @Test - public void analysisScopeTest() { - // TODO: test analysisScope - } - - /** - * 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 'confidence' - */ - @Test - public void confidenceTest() { - // TODO: test confidence - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} 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/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/AppApiRestV2AnalysesResponsesTagItemTest.java b/src/test/java/ai/reveng/model/TagItemTest.java similarity index 73% rename from src/test/java/ai/reveng/model/AppApiRestV2AnalysesResponsesTagItemTest.java rename to src/test/java/ai/reveng/model/TagItemTest.java index b1e9720..810f4a2 100644 --- a/src/test/java/ai/reveng/model/AppApiRestV2AnalysesResponsesTagItemTest.java +++ b/src/test/java/ai/reveng/model/TagItemTest.java @@ -24,17 +24,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for AppApiRestV2AnalysesResponsesTagItem + * Model tests for TagItem */ -public class AppApiRestV2AnalysesResponsesTagItemTest { - private final AppApiRestV2AnalysesResponsesTagItem model = new AppApiRestV2AnalysesResponsesTagItem(); +public class TagItemTest { + private final TagItem model = new TagItem(); /** - * Model tests for AppApiRestV2AnalysesResponsesTagItem + * Model tests for TagItem */ @Test - public void testAppApiRestV2AnalysesResponsesTagItem() { - // TODO: test AppApiRestV2AnalysesResponsesTagItem + public void testTagItem() { + // TODO: test TagItem } /** 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 - } - -}