From 3059abd6f590cde96fbdf2c728f70121296949c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Jun 2026 08:00:37 +0000 Subject: [PATCH] Update SDK to version v3.100.0 - Generated from OpenAPI spec version v3.100.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 14 +- build.gradle | 4 +- build.sbt | 2 +- docs/AgentApi.md | 54 +- docs/AnalysesBulkActionsApi.md | 12 +- docs/AnalysesCommentsApi.md | 24 +- docs/AnalysesCoreApi.md | 156 ++++- docs/AnalysesResultsMetadataApi.md | 36 +- docs/AnalysesXRefsApi.md | 6 +- docs/AuthenticationUsersApi.md | 18 +- docs/BinariesApi.md | 60 +- docs/CollectionsApi.md | 84 ++- docs/ConfigApi.md | 6 +- docs/ConversationsApi.md | 42 +- docs/ExternalSourcesApi.md | 18 +- docs/FirmwareApi.md | 12 +- docs/FunctionArgument.md | 8 +- docs/FunctionDataTypes.md | 2 +- docs/FunctionDataTypesListItem.md | 2 +- docs/FunctionDependency.md | 6 +- docs/FunctionHeader.md | 11 +- docs/FunctionInfo.md | 4 +- docs/FunctionMatch.md | 6 +- docs/FunctionMatchingResponse.md | 2 +- docs/FunctionStackVariable.md | 8 +- docs/FunctionType.md | 17 +- docs/FunctionsAiDecompilationApi.md | 96 ++- docs/FunctionsCoreApi.md | 156 ++++- docs/FunctionsDataTypesApi.md | 207 ++++--- docs/FunctionsRenamingHistoryApi.md | 48 +- docs/IamUsersApi.md | 20 +- docs/MatchedFunction.md | 22 +- docs/ModelsApi.md | 6 +- docs/NameConfidence.md | 4 +- docs/ReportsApi.md | 18 +- docs/SearchApi.md | 24 +- docs/UpdateProfileInputBody.md | 1 + docs/UserProfile.md | 1 + docs/V2FunctionHeader.md | 17 + docs/V2FunctionInfo.md | 14 + docs/V2FunctionMatch.md | 15 + docs/V2FunctionType.md | 20 + docs/V2MatchedFunction.md | 23 + docs/V2NameConfidence.md | 14 + pom.xml | 2 +- src/main/java/ai/reveng/api/AgentApi.java | 18 +- .../ai/reveng/api/AnalysesBulkActionsApi.java | 4 +- .../ai/reveng/api/AnalysesCommentsApi.java | 8 +- .../java/ai/reveng/api/AnalysesCoreApi.java | 52 +- .../api/AnalysesResultsMetadataApi.java | 12 +- .../java/ai/reveng/api/AnalysesXRefsApi.java | 2 +- .../ai/reveng/api/AuthenticationUsersApi.java | 6 +- src/main/java/ai/reveng/api/BinariesApi.java | 20 +- .../java/ai/reveng/api/CollectionsApi.java | 28 +- src/main/java/ai/reveng/api/ConfigApi.java | 2 +- .../java/ai/reveng/api/ConversationsApi.java | 14 +- .../ai/reveng/api/ExternalSourcesApi.java | 6 +- src/main/java/ai/reveng/api/FirmwareApi.java | 4 +- .../api/FunctionsAiDecompilationApi.java | 32 +- .../java/ai/reveng/api/FunctionsCoreApi.java | 52 +- .../ai/reveng/api/FunctionsDataTypesApi.java | 362 +++++------ .../api/FunctionsRenamingHistoryApi.java | 16 +- src/main/java/ai/reveng/api/IamUsersApi.java | 4 +- src/main/java/ai/reveng/api/ModelsApi.java | 2 +- src/main/java/ai/reveng/api/ReportsApi.java | 6 +- src/main/java/ai/reveng/api/SearchApi.java | 8 +- .../java/ai/reveng/invoker/ApiClient.java | 26 +- .../java/ai/reveng/invoker/Configuration.java | 2 +- src/main/java/ai/reveng/invoker/JSON.java | 6 + .../ai/reveng/model/FunctionArgument.java | 143 +---- .../ai/reveng/model/FunctionDataTypes.java | 12 +- .../model/FunctionDataTypesListItem.java | 12 +- .../ai/reveng/model/FunctionDependency.java | 119 +--- .../java/ai/reveng/model/FunctionHeader.java | 254 +++----- .../java/ai/reveng/model/FunctionInfo.java | 177 ++---- .../java/ai/reveng/model/FunctionMatch.java | 207 ++----- .../model/FunctionMatchingResponse.java | 14 +- .../reveng/model/FunctionStackVariable.java | 143 +---- .../java/ai/reveng/model/FunctionType.java | 326 ++++------ .../java/ai/reveng/model/MatchedFunction.java | 271 ++++----- .../java/ai/reveng/model/NameConfidence.java | 152 ++--- .../model/UpdateDataTypesInputBody.java | 103 +--- .../model/UpdateDataTypesOutputBody.java | 103 +--- .../reveng/model/UpdateProfileInputBody.java | 30 +- .../java/ai/reveng/model/UserProfile.java | 32 +- .../ai/reveng/model/V2FunctionHeader.java | 422 +++++++++++++ .../java/ai/reveng/model/V2FunctionInfo.java | 350 +++++++++++ .../java/ai/reveng/model/V2FunctionMatch.java | 394 ++++++++++++ .../java/ai/reveng/model/V2FunctionType.java | 506 ++++++++++++++++ .../ai/reveng/model/V2MatchedFunction.java | 571 ++++++++++++++++++ .../ai/reveng/model/V2NameConfidence.java | 318 ++++++++++ 92 files changed, 4624 insertions(+), 2051 deletions(-) create mode 100644 docs/V2FunctionHeader.md create mode 100644 docs/V2FunctionInfo.md create mode 100644 docs/V2FunctionMatch.md create mode 100644 docs/V2FunctionType.md create mode 100644 docs/V2MatchedFunction.md create mode 100644 docs/V2NameConfidence.md create mode 100644 src/main/java/ai/reveng/model/V2FunctionHeader.java create mode 100644 src/main/java/ai/reveng/model/V2FunctionInfo.java create mode 100644 src/main/java/ai/reveng/model/V2FunctionMatch.java create mode 100644 src/main/java/ai/reveng/model/V2FunctionType.java create mode 100644 src/main/java/ai/reveng/model/V2MatchedFunction.java create mode 100644 src/main/java/ai/reveng/model/V2NameConfidence.java diff --git a/.sdk-version b/.sdk-version index c58bd37d..892f4faf 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.99.0 +v3.100.0 diff --git a/README.md b/README.md index c9e20b96..39ff208f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.99.0 + 3.100.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.99.0" + implementation "ai.reveng:sdk:3.100.0" } ``` @@ -209,12 +209,12 @@ Class | Method | HTTP request | Description *FunctionsDataTypesApi* | [**batchUpdateFunctionDataTypes**](docs/FunctionsDataTypesApi.md#batchUpdateFunctionDataTypes) | **PUT** /v3/analyses/{analysis_id}/functions/data-types | Batch update function data types *FunctionsDataTypesApi* | [**generateFunctionDataTypesForAnalysis**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForAnalysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesApi* | [**generateFunctionDataTypesForFunctions**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForFunctions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions -*FunctionsDataTypesApi* | [**getFunctionDataTypes**](docs/FunctionsDataTypesApi.md#getFunctionDataTypes) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types -*FunctionsDataTypesApi* | [**getFunctionDataTypes_0**](docs/FunctionsDataTypesApi.md#getFunctionDataTypes_0) | **GET** /v3/analyses/{analysis_id}/functions/{function_id}/data-types | Get data types for a single function +*FunctionsDataTypesApi* | [**getFunctionDataTypes**](docs/FunctionsDataTypesApi.md#getFunctionDataTypes) | **GET** /v3/analyses/{analysis_id}/functions/{function_id}/data-types | Get data types for a single function *FunctionsDataTypesApi* | [**listAnalysisFunctionsDataTypes**](docs/FunctionsDataTypesApi.md#listAnalysisFunctionsDataTypes) | **GET** /v3/analyses/{analysis_id}/functions/data-types | List data types for all functions in an analysis *FunctionsDataTypesApi* | [**listFunctionDataTypesForAnalysis**](docs/FunctionsDataTypesApi.md#listFunctionDataTypesForAnalysis) | **GET** /v2/analyses/{analysis_id}/functions/data_types | List Function Data Types *FunctionsDataTypesApi* | [**listFunctionDataTypesForFunctions**](docs/FunctionsDataTypesApi.md#listFunctionDataTypesForFunctions) | **GET** /v2/functions/data_types | List Function Data Types *FunctionsDataTypesApi* | [**listFunctionsDataTypes**](docs/FunctionsDataTypesApi.md#listFunctionsDataTypes) | **GET** /v3/functions/data-types | Get data types for many functions +*FunctionsDataTypesApi* | [**updateFunctionDataTypes**](docs/FunctionsDataTypesApi.md#updateFunctionDataTypes) | **PUT** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Update function data types *FunctionsRenamingHistoryApi* | [**batchRenameFunction**](docs/FunctionsRenamingHistoryApi.md#batchRenameFunction) | **POST** /v2/functions/rename/batch | Batch Rename Functions *FunctionsRenamingHistoryApi* | [**batchRenameFunctions**](docs/FunctionsRenamingHistoryApi.md#batchRenameFunctions) | **POST** /v3/functions/rename | Batch rename functions *FunctionsRenamingHistoryApi* | [**getFunctionHistory**](docs/FunctionsRenamingHistoryApi.md#getFunctionHistory) | **GET** /v3/functions/{function_id}/history | Get function name history @@ -723,6 +723,12 @@ Class | Method | HTTP request | Description - [UserCredits](docs/UserCredits.md) - [UserIdentity](docs/UserIdentity.md) - [UserProfile](docs/UserProfile.md) + - [V2FunctionHeader](docs/V2FunctionHeader.md) + - [V2FunctionInfo](docs/V2FunctionInfo.md) + - [V2FunctionMatch](docs/V2FunctionMatch.md) + - [V2FunctionType](docs/V2FunctionType.md) + - [V2MatchedFunction](docs/V2MatchedFunction.md) + - [V2NameConfidence](docs/V2NameConfidence.md) - [Vulnerabilities](docs/Vulnerabilities.md) - [Vulnerability](docs/Vulnerability.md) - [WarningEvent](docs/WarningEvent.md) diff --git a/build.gradle b/build.gradle index ffce6139..79608b92 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.99.0' +version = '3.100.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.99.0") + coordinates("ai.reveng", "sdk", "3.100.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index c2fdf178..15267f4f 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.99.0", + version := "3.100.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AgentApi.md b/docs/AgentApi.md index 326987f7..552e81f4 100644 --- a/docs/AgentApi.md +++ b/docs/AgentApi.md @@ -42,6 +42,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -70,7 +74,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -110,6 +114,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -138,7 +146,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -178,6 +186,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -206,7 +218,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -246,6 +258,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -274,7 +290,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -314,6 +330,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -342,7 +362,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -383,6 +403,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -411,7 +435,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -451,6 +475,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -479,7 +507,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -521,6 +549,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -549,7 +581,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -589,6 +621,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AgentApi apiInstance = new AgentApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -617,7 +653,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AnalysesBulkActionsApi.md b/docs/AnalysesBulkActionsApi.md index feda82a2..76d03825 100644 --- a/docs/AnalysesBulkActionsApi.md +++ b/docs/AnalysesBulkActionsApi.md @@ -37,6 +37,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesBulkActionsApi apiInstance = new AnalysesBulkActionsApi(defaultClient); AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest = new AnalysisBulkAddTagsRequest(); // AnalysisBulkAddTagsRequest | try { @@ -65,7 +69,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -107,6 +111,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesBulkActionsApi apiInstance = new AnalysesBulkActionsApi(defaultClient); BulkDeleteAnalysesRequest bulkDeleteAnalysesRequest = new BulkDeleteAnalysesRequest(); // BulkDeleteAnalysesRequest | try { @@ -135,7 +143,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AnalysesCommentsApi.md b/docs/AnalysesCommentsApi.md index bfacf9fd..f4cd9d64 100644 --- a/docs/AnalysesCommentsApi.md +++ b/docs/AnalysesCommentsApi.md @@ -39,6 +39,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCommentsApi apiInstance = new AnalysesCommentsApi(defaultClient); Integer analysisId = 56; // Integer | CommentBase commentBase = new CommentBase(); // CommentBase | @@ -69,7 +73,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -112,6 +116,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCommentsApi apiInstance = new AnalysesCommentsApi(defaultClient); Integer commentId = 56; // Integer | Integer analysisId = 56; // Integer | @@ -142,7 +150,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -186,6 +194,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCommentsApi apiInstance = new AnalysesCommentsApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -214,7 +226,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -256,6 +268,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCommentsApi apiInstance = new AnalysesCommentsApi(defaultClient); Integer commentId = 56; // Integer | Integer analysisId = 56; // Integer | @@ -288,7 +304,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 5fc64035..a5d8bf2e 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -61,6 +61,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID AddUserStringInputBody addUserStringInputBody = new AddUserStringInputBody(); // AddUserStringInputBody | @@ -91,7 +95,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -136,6 +140,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); AnalysisCreateRequest analysisCreateRequest = new AnalysisCreateRequest(); // AnalysisCreateRequest | String xRevEngApplication = "xRevEngApplication_example"; // String | @@ -166,7 +174,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -210,6 +218,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -238,7 +250,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -282,6 +294,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -310,7 +326,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -352,6 +368,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -380,7 +400,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -425,6 +445,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID Long page = 56L; // Long | 64kb page of binary data @@ -454,7 +478,7 @@ null (empty response body) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -500,6 +524,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -528,7 +556,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -570,6 +598,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -598,7 +630,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -643,6 +675,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -671,7 +707,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -716,6 +752,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -744,7 +784,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -786,6 +826,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -814,7 +858,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -856,6 +900,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -884,7 +932,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -926,6 +974,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -954,7 +1006,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -999,6 +1051,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -1027,7 +1083,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1071,6 +1127,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | InsertAnalysisLogRequest insertAnalysisLogRequest = new InsertAnalysisLogRequest(); // InsertAnalysisLogRequest | @@ -1101,7 +1161,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1143,6 +1203,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); String searchTerm = ""; // String | List workspace = Arrays.asList(); // List | The workspace to be viewed @@ -1191,7 +1255,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1233,6 +1297,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -1261,7 +1329,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1303,6 +1371,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | PutAnalysisStringsRequest putAnalysisStringsRequest = new PutAnalysisStringsRequest(); // PutAnalysisStringsRequest | @@ -1333,7 +1405,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1375,6 +1447,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | ReAnalysisForm reAnalysisForm = new ReAnalysisForm(); // ReAnalysisForm | @@ -1407,7 +1483,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1451,6 +1527,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID StartMatchingForAnalysisInputBody startMatchingForAnalysisInputBody = new StartMatchingForAnalysisInputBody(); // StartMatchingForAnalysisInputBody | @@ -1481,7 +1561,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1527,6 +1607,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | AnalysisUpdateRequest analysisUpdateRequest = new AnalysisUpdateRequest(); // AnalysisUpdateRequest | @@ -1557,7 +1641,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1599,6 +1683,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Integer analysisId = 56; // Integer | AnalysisUpdateTagsRequest analysisUpdateTagsRequest = new AnalysisUpdateTagsRequest(); // AnalysisUpdateTagsRequest | @@ -1629,7 +1717,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1669,6 +1757,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); UploadFileType uploadFileType = UploadFileType.fromValue("BINARY"); // UploadFileType | File _file = new File("/path/to/file"); // File | @@ -1703,7 +1795,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1745,6 +1837,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID Long page = 1L; // Long | Page number (1-indexed). @@ -1785,7 +1881,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1830,6 +1926,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -1858,7 +1958,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1903,6 +2003,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); try { ListExampleAnalysesOutputBody result = apiInstance.v3ListExampleAnalyses(); @@ -1927,7 +2031,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 5f8a4875..74fdb77f 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -41,6 +41,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | Integer page = 1; // Integer | The page number to retrieve. @@ -73,7 +77,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -113,6 +117,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -141,7 +149,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -183,6 +191,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | String searchTerm = "searchTerm_example"; // String | @@ -223,7 +235,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -263,6 +275,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -291,7 +307,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -331,6 +347,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -359,7 +379,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -399,6 +419,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -427,7 +451,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AnalysesXRefsApi.md b/docs/AnalysesXRefsApi.md index a9e267fb..7b94f964 100644 --- a/docs/AnalysesXRefsApi.md +++ b/docs/AnalysesXRefsApi.md @@ -36,6 +36,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AnalysesXRefsApi apiInstance = new AnalysesXRefsApi(defaultClient); Integer analysisId = 56; // Integer | Integer vaddr = 56; // Integer | Virtual address to match against xrefs @@ -66,7 +70,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/AuthenticationUsersApi.md b/docs/AuthenticationUsersApi.md index c8c29646..6a2d89c0 100644 --- a/docs/AuthenticationUsersApi.md +++ b/docs/AuthenticationUsersApi.md @@ -36,6 +36,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient); Integer userId = 56; // Integer | try { @@ -64,7 +68,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -104,6 +108,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient); try { BaseResponseListUserActivityResponse result = apiInstance.getUserActivity(); @@ -128,7 +136,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -170,6 +178,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient); SubmitUserFeedbackRequest submitUserFeedbackRequest = new SubmitUserFeedbackRequest(); // SubmitUserFeedbackRequest | try { @@ -198,7 +210,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/BinariesApi.md b/docs/BinariesApi.md index 38e9f609..97ff5601 100644 --- a/docs/BinariesApi.md +++ b/docs/BinariesApi.md @@ -43,6 +43,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -71,7 +75,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -111,6 +115,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -139,7 +147,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -179,6 +187,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -207,7 +219,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -249,6 +261,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Long binaryId = 56L; // Long | Binary ID try { @@ -277,7 +293,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -322,6 +338,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Long binaryId = 56L; // Long | Binary ID try { @@ -350,7 +370,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -393,6 +413,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -421,7 +445,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -461,6 +485,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -489,7 +517,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -529,6 +557,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -557,7 +589,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -597,6 +629,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -625,7 +661,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -665,6 +701,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + BinariesApi apiInstance = new BinariesApi(defaultClient); Integer binaryId = 56; // Integer | try { @@ -693,7 +733,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/CollectionsApi.md b/docs/CollectionsApi.md index bd6f31e3..c408b0a1 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -49,6 +49,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); CollectionCreateRequest collectionCreateRequest = new CollectionCreateRequest(); // CollectionCreateRequest | try { @@ -77,7 +81,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -119,6 +123,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Integer collectionId = 56; // Integer | try { @@ -147,7 +155,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -189,6 +197,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Integer collectionId = 56; // Integer | Boolean includeTags = false; // Boolean | @@ -227,7 +239,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -269,6 +281,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); String searchTerm = ""; // String | List filters = Arrays.asList(); // List | @@ -307,7 +323,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -349,6 +365,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Integer collectionId = 56; // Integer | CollectionUpdateRequest collectionUpdateRequest = new CollectionUpdateRequest(); // CollectionUpdateRequest | @@ -379,7 +399,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -421,6 +441,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Integer collectionId = 56; // Integer | CollectionBinariesUpdateRequest collectionBinariesUpdateRequest = new CollectionBinariesUpdateRequest(); // CollectionBinariesUpdateRequest | @@ -451,7 +475,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -493,6 +517,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Integer collectionId = 56; // Integer | CollectionTagsUpdateRequest collectionTagsUpdateRequest = new CollectionTagsUpdateRequest(); // CollectionTagsUpdateRequest | @@ -523,7 +551,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -565,6 +593,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); CreateCollectionInputBody createCollectionInputBody = new CreateCollectionInputBody(); // CreateCollectionInputBody | try { @@ -593,7 +625,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -637,6 +669,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Long collectionId = 56L; // Long | try { @@ -664,7 +700,7 @@ null (empty response body) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -710,6 +746,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Long collectionId = 56L; // Long | Boolean includeTags = true; // Boolean | @@ -748,7 +788,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -792,6 +832,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); String searchTerm = "searchTerm_example"; // String | List filters = Arrays.asList(); // List | @@ -830,7 +874,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -873,6 +917,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Long collectionId = 56L; // Long | PatchCollectionInputBody patchCollectionInputBody = new PatchCollectionInputBody(); // PatchCollectionInputBody | @@ -903,7 +951,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -948,6 +996,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Long collectionId = 56L; // Long | PatchCollectionBinariesInputBody patchCollectionBinariesInputBody = new PatchCollectionBinariesInputBody(); // PatchCollectionBinariesInputBody | @@ -978,7 +1030,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1023,6 +1075,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + CollectionsApi apiInstance = new CollectionsApi(defaultClient); Long collectionId = 56L; // Long | PatchCollectionTagsInputBody patchCollectionTagsInputBody = new PatchCollectionTagsInputBody(); // PatchCollectionTagsInputBody | @@ -1053,7 +1109,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/ConfigApi.md b/docs/ConfigApi.md index f18046f7..15cf4362 100644 --- a/docs/ConfigApi.md +++ b/docs/ConfigApi.md @@ -36,6 +36,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConfigApi apiInstance = new ConfigApi(defaultClient); try { BaseResponseConfigResponse result = apiInstance.getConfig(); @@ -60,7 +64,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/ConversationsApi.md b/docs/ConversationsApi.md index df8be5b4..11563705 100644 --- a/docs/ConversationsApi.md +++ b/docs/ConversationsApi.md @@ -42,6 +42,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Conversation UUID try { @@ -70,7 +74,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -115,6 +119,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Conversation UUID ConfirmToolInputBody confirmToolInputBody = new ConfirmToolInputBody(); // ConfirmToolInputBody | @@ -145,7 +153,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -190,6 +198,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); CreateConversationRequest createConversationRequest = new CreateConversationRequest(); // CreateConversationRequest | try { @@ -218,7 +230,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -262,6 +274,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Conversation UUID try { @@ -290,7 +306,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -335,6 +351,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); try { List result = apiInstance.listConversations(); @@ -359,7 +379,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -401,6 +421,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Conversation UUID SendMessageRequest sendMessageRequest = new SendMessageRequest(); // SendMessageRequest | @@ -431,7 +455,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -479,6 +503,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ConversationsApi apiInstance = new ConversationsApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Conversation UUID Long lastEventId = 56L; // Long | Replay events after this ID @@ -509,7 +537,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/ExternalSourcesApi.md b/docs/ExternalSourcesApi.md index 6e0d1cb6..6beafb95 100644 --- a/docs/ExternalSourcesApi.md +++ b/docs/ExternalSourcesApi.md @@ -36,6 +36,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ExternalSourcesApi apiInstance = new ExternalSourcesApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -64,7 +68,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -105,6 +109,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ExternalSourcesApi apiInstance = new ExternalSourcesApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -133,7 +141,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -174,6 +182,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ExternalSourcesApi apiInstance = new ExternalSourcesApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -202,7 +214,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/FirmwareApi.md b/docs/FirmwareApi.md index 697c7090..9a5df708 100644 --- a/docs/FirmwareApi.md +++ b/docs/FirmwareApi.md @@ -37,6 +37,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FirmwareApi apiInstance = new FirmwareApi(defaultClient); String taskId = "taskId_example"; // String | try { @@ -65,7 +69,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -107,6 +111,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FirmwareApi apiInstance = new FirmwareApi(defaultClient); File _file = new File("/path/to/file"); // File | String password = "password_example"; // String | @@ -137,7 +145,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/FunctionArgument.md b/docs/FunctionArgument.md index 65108e1e..831e73c8 100644 --- a/docs/FunctionArgument.md +++ b/docs/FunctionArgument.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastChange** | **String** | Search is applied to string value | [optional] | -|**name** | **String** | Search is applied to string value | | +|**lastChange** | **String** | | [optional] | +|**name** | **String** | | | |**offset** | **Long** | | | -|**scope** | **String** | Search is applied to string value | [optional] | +|**scope** | **String** | | [optional] | |**size** | **Long** | | | -|**type** | **String** | Search is applied to string value | | +|**type** | **String** | | | diff --git a/docs/FunctionDataTypes.md b/docs/FunctionDataTypes.md index 4aec6668..7ecf2b3f 100644 --- a/docs/FunctionDataTypes.md +++ b/docs/FunctionDataTypes.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**completed** | **Boolean** | Whether the service has completed data types generation | | |**status** | **String** | The current status of the data types service | | -|**dataTypes** | [**FunctionInfo**](FunctionInfo.md) | Function data types information if available | [optional] | +|**dataTypes** | [**V2FunctionInfo**](V2FunctionInfo.md) | Function data types information if available | [optional] | |**dataTypesVersion** | **Integer** | If the data types information has been updated by the user, this field will be populated | [optional] | diff --git a/docs/FunctionDataTypesListItem.md b/docs/FunctionDataTypesListItem.md index e10a4fc0..3fd02d2b 100644 --- a/docs/FunctionDataTypesListItem.md +++ b/docs/FunctionDataTypesListItem.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**completed** | **Boolean** | Whether the service has completed data types generation | | |**status** | **String** | The current status of the data types service | | -|**dataTypes** | [**FunctionInfo**](FunctionInfo.md) | Function data types information if available | [optional] | +|**dataTypes** | [**V2FunctionInfo**](V2FunctionInfo.md) | Function data types information if available | [optional] | |**dataTypesVersion** | **Integer** | If the data types information has been updated by the user, this field will be populated | [optional] | |**functionId** | **Long** | Function id | | diff --git a/docs/FunctionDependency.md b/docs/FunctionDependency.md index 675790a7..fd5771a0 100644 --- a/docs/FunctionDependency.md +++ b/docs/FunctionDependency.md @@ -9,10 +9,10 @@ |------------ | ------------- | ------------- | -------------| |**addr** | **Long** | Memory address (GlobalVariable). | [optional] | |**artifactType** | **String** | | [optional] | -|**lastChange** | **String** | Search is applied to string value | [optional] | +|**lastChange** | **String** | | [optional] | |**members** | **Object** | | [optional] | -|**name** | **String** | Search is applied to string value | | -|**scope** | **String** | Search is applied to string value | [optional] | +|**name** | **String** | | | +|**scope** | **String** | | [optional] | |**size** | **Long** | Total byte size (Struct, GlobalVariable). | [optional] | |**type** | **String** | Underlying type (TypeDefinition, GlobalVariable). | [optional] | diff --git a/docs/FunctionHeader.md b/docs/FunctionHeader.md index 5e4cf776..c9d12a13 100644 --- a/docs/FunctionHeader.md +++ b/docs/FunctionHeader.md @@ -7,11 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastChange** | **String** | Timestamp of the last change to this function header | [optional] | -|**name** | **String** | Name of the function | | -|**addr** | **Integer** | Memory address of the function | | -|**type** | **String** | Return type of the function | | -|**args** | [**Map<String, Argument>**](Argument.md) | Dictionary of function arguments | | +|**addr** | **Long** | | | +|**args** | [**Map<String, FunctionArgument>**](FunctionArgument.md) | Argument map keyed by ordinal hex (e.g. \"0x0\", \"0x1\"). | | +|**lastChange** | **String** | | [optional] | +|**name** | **String** | | | +|**scope** | **String** | | [optional] | +|**type** | **String** | | | diff --git a/docs/FunctionInfo.md b/docs/FunctionInfo.md index 5e744900..c50bc8a6 100644 --- a/docs/FunctionInfo.md +++ b/docs/FunctionInfo.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**funcTypes** | [**FunctionType**](FunctionType.md) | Function type information | [optional] | -|**funcDeps** | [**List<FuncDepsInner>**](FuncDepsInner.md) | List of function dependencies | | +|**funcDeps** | [**List<FunctionDependency>**](FunctionDependency.md) | | | +|**funcTypes** | [**FunctionType**](FunctionType.md) | | [optional] | diff --git a/docs/FunctionMatch.md b/docs/FunctionMatch.md index 9b4e1c93..fb4ade34 100644 --- a/docs/FunctionMatch.md +++ b/docs/FunctionMatch.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**functionId** | **Long** | Unique identifier of the function | | -|**matchedFunctions** | [**List<MatchedFunction>**](MatchedFunction.md) | | | -|**confidences** | [**List<NameConfidence>**](NameConfidence.md) | | [optional] | +|**confidences** | [**List<NameConfidence>**](NameConfidence.md) | Per-name confidences when canonify was requested | [optional] | +|**functionId** | **Long** | Source function ID | | +|**matchedFunctions** | [**List<MatchedFunction>**](MatchedFunction.md) | Top candidate matches in similarity-descending order | | diff --git a/docs/FunctionMatchingResponse.md b/docs/FunctionMatchingResponse.md index bf309f67..6b78b1e4 100644 --- a/docs/FunctionMatchingResponse.md +++ b/docs/FunctionMatchingResponse.md @@ -13,7 +13,7 @@ |**errorMessage** | **String** | Optional message providing additional information about the operation | [optional] | |**currentPage** | **Integer** | Current page number of the results, if pagination is used | [optional] | |**totalPages** | **Integer** | Total number of pages available, if pagination is used | [optional] | -|**matches** | [**List<FunctionMatch>**](FunctionMatch.md) | List of function matching results with best match information | [optional] | +|**matches** | [**List<V2FunctionMatch>**](V2FunctionMatch.md) | List of function matching results with best match information | [optional] | |**numMatches** | **Integer** | Total number of function matches found | [optional] | |**numDebugMatches** | **Integer** | Total number of debug function matches found | [optional] | |**updatedAt** | **String** | Timestamp of the last time function matching with the same request parameters was performed | [optional] | diff --git a/docs/FunctionStackVariable.md b/docs/FunctionStackVariable.md index 1d4a3fe2..69961df3 100644 --- a/docs/FunctionStackVariable.md +++ b/docs/FunctionStackVariable.md @@ -8,12 +8,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**addr** | **Long** | | | -|**lastChange** | **String** | Search is applied to string value | [optional] | -|**name** | **String** | Search is applied to string value | | +|**lastChange** | **String** | | [optional] | +|**name** | **String** | | | |**offset** | **Long** | | | -|**scope** | **String** | Search is applied to string value | [optional] | +|**scope** | **String** | | [optional] | |**size** | **Long** | | | -|**type** | **String** | Search is applied to string value | | +|**type** | **String** | | | diff --git a/docs/FunctionType.md b/docs/FunctionType.md index d92b3b56..57c99c61 100644 --- a/docs/FunctionType.md +++ b/docs/FunctionType.md @@ -7,14 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**lastChange** | **String** | Timestamp of the last change to this function type | [optional] | -|**addr** | **Integer** | Memory address of the function | | -|**size** | **Integer** | Size of the function in bytes | | -|**header** | [**FunctionHeader**](FunctionHeader.md) | Function header information | | -|**stackVars** | [**Map<String, StackVariable>**](StackVariable.md) | Dictionary of stack variables | [optional] | -|**name** | **String** | Name of the function | | -|**type** | **String** | Return type of the function | | -|**artifactType** | **String** | Type of artifact that the structure is associated with | [optional] | +|**addr** | **Long** | | | +|**artifactType** | **String** | | [optional] | +|**header** | [**FunctionHeader**](FunctionHeader.md) | | | +|**lastChange** | **String** | | [optional] | +|**name** | **String** | | | +|**scope** | **String** | | [optional] | +|**size** | **Long** | | | +|**stackVars** | [**Map<String, FunctionStackVariable>**](FunctionStackVariable.md) | Stack variables keyed by offset hex. | [optional] | +|**type** | **String** | | | diff --git a/docs/FunctionsAiDecompilationApi.md b/docs/FunctionsAiDecompilationApi.md index 045001c0..dbeccffc 100644 --- a/docs/FunctionsAiDecompilationApi.md +++ b/docs/FunctionsAiDecompilationApi.md @@ -51,6 +51,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID Boolean contextAware = false; // Boolean | Use context-aware decompilation @@ -83,7 +87,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -130,6 +134,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID Long line = 56L; // Long | Line number of the comment to delete @@ -160,7 +168,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -205,6 +213,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -233,7 +245,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -278,6 +290,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -306,7 +322,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -351,6 +367,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -379,7 +399,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -422,6 +442,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | The ID of the function for which to get the rating try { @@ -450,7 +474,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -492,6 +516,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -520,7 +548,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -565,6 +593,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -593,7 +625,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -638,6 +670,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -666,7 +702,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -711,6 +747,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -739,7 +779,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -784,6 +824,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID PatchCommentBody patchCommentBody = new PatchCommentBody(); // PatchCommentBody | @@ -814,7 +858,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -859,6 +903,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -887,7 +935,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -932,6 +980,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -960,7 +1012,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1005,6 +1057,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -1033,7 +1089,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1075,6 +1131,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | Function ID UpsertOverridesInputBody upsertOverridesInputBody = new UpsertOverridesInputBody(); // UpsertOverridesInputBody | @@ -1105,7 +1165,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1149,6 +1209,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); Long functionId = 56L; // Long | The ID of the function being rated UpsertAiDecomplationRatingRequest upsertAiDecomplationRatingRequest = new UpsertAiDecomplationRatingRequest(); // UpsertAiDecomplationRatingRequest | @@ -1179,7 +1243,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index b76e10e4..b0b0aa69 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -61,6 +61,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID AddCalleeInputBody addCalleeInputBody = new AddCalleeInputBody(); // AddCalleeInputBody | @@ -91,7 +95,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -137,6 +141,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID AddUserStringToFunctionInputBody addUserStringToFunctionInputBody = new AddUserStringToFunctionInputBody(); // AddUserStringToFunctionInputBody | @@ -167,7 +175,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -212,6 +220,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | AiUnstripRequest aiUnstripRequest = new AiUnstripRequest(); // AiUnstripRequest | @@ -242,7 +254,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -284,6 +296,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | AnalysisFunctionMatchingRequest analysisFunctionMatchingRequest = new AnalysisFunctionMatchingRequest(); // AnalysisFunctionMatchingRequest | @@ -314,7 +330,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -356,6 +372,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | AutoUnstripRequest autoUnstripRequest = new AutoUnstripRequest(); // AutoUnstripRequest | @@ -386,7 +406,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -428,6 +448,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); FunctionMatchingRequest functionMatchingRequest = new FunctionMatchingRequest(); // FunctionMatchingRequest | try { @@ -456,7 +480,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -498,6 +522,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -526,7 +554,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -568,6 +596,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -596,7 +628,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -638,6 +670,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | Integer page = 1; // Integer | The page number to retrieve. @@ -678,7 +714,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -720,6 +756,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer analysisId = 56; // Integer | try { @@ -748,7 +788,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -790,6 +830,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer functionId = 56; // Integer | try { @@ -818,7 +862,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -861,6 +905,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -889,7 +937,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -932,6 +980,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer functionId = 56; // Integer | try { @@ -960,7 +1012,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1000,6 +1052,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); List functionIds = Arrays.asList(); // List | try { @@ -1028,7 +1084,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1070,6 +1126,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -1098,7 +1158,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1141,6 +1201,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer functionId = 56; // Integer | try { @@ -1169,7 +1233,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1212,6 +1276,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -1240,7 +1308,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1283,6 +1351,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer functionId = 56; // Integer | try { @@ -1311,7 +1383,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1353,6 +1425,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -1381,7 +1457,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1426,6 +1502,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Integer functionId = 56; // Integer | Integer page = 1; // Integer | The page number to retrieve. @@ -1460,7 +1540,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1502,6 +1582,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long functionId = 56L; // Long | Function ID Long page = 1L; // Long | Page number (1-indexed). @@ -1536,7 +1620,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1581,6 +1665,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); List functionIds = Arrays.asList(); // List | Function IDs to fetch edges for. try { @@ -1609,7 +1697,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1655,6 +1743,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); List functionIds = Arrays.asList(); // List | Source function IDs whose matches to fetch. try { @@ -1683,7 +1775,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1729,6 +1821,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); List functionIds = Arrays.asList(); // List | Source function IDs whose matches to fetch. try { @@ -1757,7 +1853,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1803,6 +1899,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID Long offset = 56L; // Long | Pagination offset. Defaults to 0. @@ -1835,7 +1935,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1880,6 +1980,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient); StartMatchingForFunctionsInputBody startMatchingForFunctionsInputBody = new StartMatchingForFunctionsInputBody(); // StartMatchingForFunctionsInputBody | try { @@ -1908,7 +2012,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/FunctionsDataTypesApi.md b/docs/FunctionsDataTypesApi.md index b7449e81..91fb4ccf 100644 --- a/docs/FunctionsDataTypesApi.md +++ b/docs/FunctionsDataTypesApi.md @@ -7,12 +7,12 @@ All URIs are relative to *https://api.reveng.ai* | [**batchUpdateFunctionDataTypes**](FunctionsDataTypesApi.md#batchUpdateFunctionDataTypes) | **PUT** /v3/analyses/{analysis_id}/functions/data-types | Batch update function data types | | [**generateFunctionDataTypesForAnalysis**](FunctionsDataTypesApi.md#generateFunctionDataTypesForAnalysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types | | [**generateFunctionDataTypesForFunctions**](FunctionsDataTypesApi.md#generateFunctionDataTypesForFunctions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions | -| [**getFunctionDataTypes**](FunctionsDataTypesApi.md#getFunctionDataTypes) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types | -| [**getFunctionDataTypes_0**](FunctionsDataTypesApi.md#getFunctionDataTypes_0) | **GET** /v3/analyses/{analysis_id}/functions/{function_id}/data-types | Get data types for a single function | +| [**getFunctionDataTypes**](FunctionsDataTypesApi.md#getFunctionDataTypes) | **GET** /v3/analyses/{analysis_id}/functions/{function_id}/data-types | Get data types for a single function | | [**listAnalysisFunctionsDataTypes**](FunctionsDataTypesApi.md#listAnalysisFunctionsDataTypes) | **GET** /v3/analyses/{analysis_id}/functions/data-types | List data types for all functions in an analysis | | [**listFunctionDataTypesForAnalysis**](FunctionsDataTypesApi.md#listFunctionDataTypesForAnalysis) | **GET** /v2/analyses/{analysis_id}/functions/data_types | List Function Data Types | | [**listFunctionDataTypesForFunctions**](FunctionsDataTypesApi.md#listFunctionDataTypesForFunctions) | **GET** /v2/functions/data_types | List Function Data Types | | [**listFunctionsDataTypes**](FunctionsDataTypesApi.md#listFunctionsDataTypes) | **GET** /v3/functions/data-types | Get data types for many functions | +| [**updateFunctionDataTypes**](FunctionsDataTypesApi.md#updateFunctionDataTypes) | **PUT** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Update function data types | @@ -44,6 +44,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID BatchUpdateDataTypesInputBody batchUpdateDataTypesInputBody = new BatchUpdateDataTypesInputBody(); // BatchUpdateDataTypesInputBody | @@ -74,7 +78,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -120,6 +124,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); Integer analysisId = 56; // Integer | FunctionDataTypesParams functionDataTypesParams = new FunctionDataTypesParams(); // FunctionDataTypesParams | @@ -150,7 +158,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -192,6 +200,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); FunctionDataTypesParams functionDataTypesParams = new FunctionDataTypesParams(); // FunctionDataTypesParams | try { @@ -220,7 +232,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -235,11 +247,11 @@ public class Example { # **getFunctionDataTypes** -> BaseResponseFunctionDataTypes getFunctionDataTypes(analysisId, functionId) +> DataTypesEntry getFunctionDataTypes(analysisId, functionId) -Get Function Data Types +Get data types for a single function -Polling endpoint which returns the current status of function generation and once completed the data type information +Returns the stored data-types blob for one function. The function must belong to the supplied analysis. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found ### Example ```java @@ -262,11 +274,15 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); - Integer analysisId = 56; // Integer | - Integer functionId = 56; // Integer | + Long analysisId = 56L; // Long | Analysis ID + Long functionId = 56L; // Long | Function ID try { - BaseResponseFunctionDataTypes result = apiInstance.getFunctionDataTypes(analysisId, functionId); + DataTypesEntry result = apiInstance.getFunctionDataTypes(analysisId, functionId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FunctionsDataTypesApi#getFunctionDataTypes"); @@ -283,16 +299,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | -| **functionId** | **Integer**| | | +| **analysisId** | **Long**| Analysis ID | | +| **functionId** | **Long**| Function ID | | ### Return type -[**BaseResponseFunctionDataTypes**](BaseResponseFunctionDataTypes.md) +[**DataTypesEntry**](DataTypesEntry.md) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -302,16 +318,19 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | - -# **getFunctionDataTypes_0** -> DataTypesEntry getFunctionDataTypes_0(analysisId, functionId) + +# **listAnalysisFunctionsDataTypes** +> ListAnalysisFunctionsDataTypesOutputBody listAnalysisFunctionsDataTypes(analysisId, offset, limit) -Get data types for a single function +List data types for all functions in an analysis -Returns the stored data-types blob for one function. The function must belong to the supplied analysis. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +Paginated read of the stored data-types blob for each function in the analysis. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found ### Example ```java @@ -334,14 +353,19 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID - Long functionId = 56L; // Long | Function ID + Long offset = 56L; // Long | Pagination offset. Defaults to 0. + Long limit = 56L; // Long | Page size. Defaults to 100. try { - DataTypesEntry result = apiInstance.getFunctionDataTypes_0(analysisId, functionId); + ListAnalysisFunctionsDataTypesOutputBody result = apiInstance.listAnalysisFunctionsDataTypes(analysisId, offset, limit); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsDataTypesApi#getFunctionDataTypes_0"); + System.err.println("Exception when calling FunctionsDataTypesApi#listAnalysisFunctionsDataTypes"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -356,15 +380,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | -| **functionId** | **Long**| Function ID | | +| **offset** | **Long**| Pagination offset. Defaults to 0. | [optional] | +| **limit** | **Long**| Page size. Defaults to 100. | [optional] | ### Return type -[**DataTypesEntry**](DataTypesEntry.md) +[**ListAnalysisFunctionsDataTypesOutputBody**](ListAnalysisFunctionsDataTypesOutputBody.md) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -380,13 +405,13 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **listAnalysisFunctionsDataTypes** -> ListAnalysisFunctionsDataTypesOutputBody listAnalysisFunctionsDataTypes(analysisId, offset, limit) + +# **listFunctionDataTypesForAnalysis** +> BaseResponseFunctionDataTypesList listFunctionDataTypesForAnalysis(analysisId, functionIds) -List data types for all functions in an analysis +List Function Data Types -Paginated read of the stored data-types blob for each function in the analysis. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +Returns data types for multiple functions with optional function ID filtering ### Example ```java @@ -409,15 +434,18 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); - Long analysisId = 56L; // Long | Analysis ID - Long offset = 56L; // Long | Pagination offset. Defaults to 0. - Long limit = 56L; // Long | Page size. Defaults to 100. + Integer analysisId = 56; // Integer | + List functionIds = Arrays.asList(); // List | try { - ListAnalysisFunctionsDataTypesOutputBody result = apiInstance.listAnalysisFunctionsDataTypes(analysisId, offset, limit); + BaseResponseFunctionDataTypesList result = apiInstance.listFunctionDataTypesForAnalysis(analysisId, functionIds); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsDataTypesApi#listAnalysisFunctionsDataTypes"); + System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionDataTypesForAnalysis"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -431,17 +459,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **analysisId** | **Long**| Analysis ID | | -| **offset** | **Long**| Pagination offset. Defaults to 0. | [optional] | -| **limit** | **Long**| Page size. Defaults to 100. | [optional] | +| **analysisId** | **Integer**| | | +| **functionIds** | [**List<Integer>**](Integer.md)| | [optional] | ### Return type -[**ListAnalysisFunctionsDataTypesOutputBody**](ListAnalysisFunctionsDataTypesOutputBody.md) +[**BaseResponseFunctionDataTypesList**](BaseResponseFunctionDataTypesList.md) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -451,19 +478,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **422** | Unprocessable Entity | - | -| **500** | Internal Server Error | - | +| **200** | Successful Response | - | +| **422** | Invalid request parameters | - | - -# **listFunctionDataTypesForAnalysis** -> BaseResponseFunctionDataTypesList listFunctionDataTypesForAnalysis(analysisId, functionIds) + +# **listFunctionDataTypesForFunctions** +> BaseResponseFunctionDataTypesList listFunctionDataTypesForFunctions(functionIds) List Function Data Types -Returns data types for multiple functions with optional function ID filtering +Returns data types for multiple function IDs ### Example ```java @@ -486,14 +510,17 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); - Integer analysisId = 56; // Integer | List functionIds = Arrays.asList(); // List | try { - BaseResponseFunctionDataTypesList result = apiInstance.listFunctionDataTypesForAnalysis(analysisId, functionIds); + BaseResponseFunctionDataTypesList result = apiInstance.listFunctionDataTypesForFunctions(functionIds); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionDataTypesForAnalysis"); + System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionDataTypesForFunctions"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -507,7 +534,6 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | | **functionIds** | [**List<Integer>**](Integer.md)| | [optional] | ### Return type @@ -516,7 +542,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -529,13 +555,13 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | - -# **listFunctionDataTypesForFunctions** -> BaseResponseFunctionDataTypesList listFunctionDataTypesForFunctions(functionIds) + +# **listFunctionsDataTypes** +> ListFunctionsDataTypesOutputBody listFunctionsDataTypes(functionIds) -List Function Data Types +Get data types for many functions -Returns data types for multiple function IDs +Returns the stored data-types blob for each supplied function ID. Caller must have read access to every function or the request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request ### Example ```java @@ -558,13 +584,17 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); - List functionIds = Arrays.asList(); // List | + List functionIds = Arrays.asList(); // List | Function IDs to fetch data-types for. try { - BaseResponseFunctionDataTypesList result = apiInstance.listFunctionDataTypesForFunctions(functionIds); + ListFunctionsDataTypesOutputBody result = apiInstance.listFunctionsDataTypes(functionIds); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionDataTypesForFunctions"); + System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionsDataTypes"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -578,15 +608,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **functionIds** | [**List<Integer>**](Integer.md)| | [optional] | +| **functionIds** | [**List<Long>**](Long.md)| Function IDs to fetch data-types for. | | ### Return type -[**BaseResponseFunctionDataTypesList**](BaseResponseFunctionDataTypesList.md) +[**ListFunctionsDataTypesOutputBody**](ListFunctionsDataTypesOutputBody.md) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -596,16 +626,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | +| **200** | OK | - | +| **400** | Bad Request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | - -# **listFunctionsDataTypes** -> ListFunctionsDataTypesOutputBody listFunctionsDataTypes(functionIds) + +# **updateFunctionDataTypes** +> UpdateDataTypesOutputBody updateFunctionDataTypes(analysisId, functionId, updateDataTypesInputBody) -Get data types for many functions +Update function data types -Returns the stored data-types blob for each supplied function ID. Caller must have read access to every function or the request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +Stores user-specific overrides for a function's data types. Uses optimistic concurrency: if the stored version doesn't match `data_types_version`, the update is rejected with 409. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict ### Example ```java @@ -628,13 +662,19 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsDataTypesApi apiInstance = new FunctionsDataTypesApi(defaultClient); - List functionIds = Arrays.asList(); // List | Function IDs to fetch data-types for. + Long analysisId = 56L; // Long | Analysis ID + Long functionId = 56L; // Long | Function ID + UpdateDataTypesInputBody updateDataTypesInputBody = new UpdateDataTypesInputBody(); // UpdateDataTypesInputBody | try { - ListFunctionsDataTypesOutputBody result = apiInstance.listFunctionsDataTypes(functionIds); + UpdateDataTypesOutputBody result = apiInstance.updateFunctionDataTypes(analysisId, functionId, updateDataTypesInputBody); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsDataTypesApi#listFunctionsDataTypes"); + System.err.println("Exception when calling FunctionsDataTypesApi#updateFunctionDataTypes"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -648,19 +688,21 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **functionIds** | [**List<Long>**](Long.md)| Function IDs to fetch data-types for. | | +| **analysisId** | **Long**| Analysis ID | | +| **functionId** | **Long**| Function ID | | +| **updateDataTypesInputBody** | [**UpdateDataTypesInputBody**](UpdateDataTypesInputBody.md)| | | ### Return type -[**ListFunctionsDataTypesOutputBody**](ListFunctionsDataTypesOutputBody.md) +[**UpdateDataTypesOutputBody**](UpdateDataTypesOutputBody.md) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -670,6 +712,7 @@ public class Example { | **400** | Bad Request | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | diff --git a/docs/FunctionsRenamingHistoryApi.md b/docs/FunctionsRenamingHistoryApi.md index 12d40bf9..2cc5e7ab 100644 --- a/docs/FunctionsRenamingHistoryApi.md +++ b/docs/FunctionsRenamingHistoryApi.md @@ -43,6 +43,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); FunctionsListRename functionsListRename = new FunctionsListRename(); // FunctionsListRename | try { @@ -71,7 +75,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -113,6 +117,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); BatchRenameInputBody batchRenameInputBody = new BatchRenameInputBody(); // BatchRenameInputBody | try { @@ -141,7 +149,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -186,6 +194,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Long functionId = 56L; // Long | Function ID try { @@ -214,7 +226,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -259,6 +271,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Integer functionId = 56; // Integer | try { @@ -287,7 +303,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -329,6 +345,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Long functionId = 56L; // Long | Function ID RenameInputBody renameInputBody = new RenameInputBody(); // RenameInputBody | @@ -359,7 +379,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -404,6 +424,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Integer functionId = 56; // Integer | FunctionRename functionRename = new FunctionRename(); // FunctionRename | @@ -434,7 +458,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -476,6 +500,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Integer functionId = 56; // Integer | Integer historyId = 56; // Integer | @@ -506,7 +534,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -548,6 +576,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + FunctionsRenamingHistoryApi apiInstance = new FunctionsRenamingHistoryApi(defaultClient); Long functionId = 56L; // Long | Function ID Long historyId = 56L; // Long | History ID to revert to @@ -578,7 +610,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/IamUsersApi.md b/docs/IamUsersApi.md index 4d851bf5..4dce5dc9 100644 --- a/docs/IamUsersApi.md +++ b/docs/IamUsersApi.md @@ -31,11 +31,9 @@ public class Example { 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"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); IamUsersApi apiInstance = new IamUsersApi(defaultClient); try { @@ -61,7 +59,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -98,11 +96,9 @@ public class Example { 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"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); IamUsersApi apiInstance = new IamUsersApi(defaultClient); try { @@ -128,7 +124,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/MatchedFunction.md b/docs/MatchedFunction.md index bd0d03d6..4b38e7b6 100644 --- a/docs/MatchedFunction.md +++ b/docs/MatchedFunction.md @@ -7,17 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**functionId** | **Long** | Unique identifier of the matched function | | -|**binaryId** | **Integer** | | | -|**functionName** | **String** | | | -|**functionVaddr** | **Long** | | | -|**mangledName** | **String** | | | -|**debug** | **Boolean** | | | -|**binaryName** | **String** | | | -|**sha256Hash** | **String** | | | -|**analysisId** | **Integer** | | | -|**similarity** | **BigDecimal** | | [optional] | -|**confidence** | **BigDecimal** | | [optional] | +|**analysisId** | **Long** | Analysis the candidate's binary belongs to | | +|**binaryId** | **Long** | Binary the candidate belongs to | | +|**binaryName** | **String** | Binary name | | +|**confidence** | **Double** | Softmax-normalised confidence over the candidate pool | | +|**debug** | **Boolean** | Whether the candidate's name came from debug info | | +|**functionId** | **Long** | Candidate function ID | | +|**functionName** | **String** | Candidate function name | | +|**functionVaddr** | **Long** | Candidate's virtual address inside its binary | | +|**mangledName** | **String** | Mangled name when available | | +|**sha256Hash** | **String** | SHA-256 of the candidate's binary | | +|**similarity** | **Double** | Cosine similarity scaled to a percentage | | diff --git a/docs/ModelsApi.md b/docs/ModelsApi.md index 3653b516..c952fb00 100644 --- a/docs/ModelsApi.md +++ b/docs/ModelsApi.md @@ -36,6 +36,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ModelsApi apiInstance = new ModelsApi(defaultClient); try { BaseResponseModelsResponse result = apiInstance.getModels(); @@ -60,7 +64,7 @@ This endpoint does not need any parameter. ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/NameConfidence.md b/docs/NameConfidence.md index 296dea3d..2ea9e7ed 100644 --- a/docs/NameConfidence.md +++ b/docs/NameConfidence.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | The suggested function name | | -|**confidence** | **BigDecimal** | Confidence score as a percentage | | +|**confidence** | **Double** | Softmax-normalised confidence for this name | | +|**name** | **String** | Candidate name | | diff --git a/docs/ReportsApi.md b/docs/ReportsApi.md index 045ae486..3ae9a337 100644 --- a/docs/ReportsApi.md +++ b/docs/ReportsApi.md @@ -38,6 +38,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ReportsApi apiInstance = new ReportsApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -66,7 +70,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -111,6 +115,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ReportsApi apiInstance = new ReportsApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -138,7 +146,7 @@ null (empty response body) ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -184,6 +192,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + ReportsApi apiInstance = new ReportsApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID try { @@ -212,7 +224,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 098cc435..32e2f1b7 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -39,6 +39,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + SearchApi apiInstance = new SearchApi(defaultClient); Integer page = 1; // Integer | The page number to retrieve. Integer pageSize = 10; // Integer | Number of items per page. @@ -81,7 +85,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -123,6 +127,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + SearchApi apiInstance = new SearchApi(defaultClient); Integer page = 1; // Integer | The page number to retrieve. Integer pageSize = 10; // Integer | Number of items per page. @@ -169,7 +177,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -212,6 +220,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + SearchApi apiInstance = new SearchApi(defaultClient); Integer page = 1; // Integer | The page number to retrieve. Integer pageSize = 10; // Integer | Number of items per page. @@ -246,7 +258,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -288,6 +300,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + SearchApi apiInstance = new SearchApi(defaultClient); String partialName = "partialName_example"; // String | The partial or full name of the tag to search for Integer page = 1; // Integer | The page number to retrieve. @@ -320,7 +336,7 @@ public class Example { ### Authorization -[APIKey](../README.md#APIKey) +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/docs/UpdateProfileInputBody.md b/docs/UpdateProfileInputBody.md index 0b14a29f..2993ce10 100644 --- a/docs/UpdateProfileInputBody.md +++ b/docs/UpdateProfileInputBody.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**defaultTeamId** | **Long** | Default team ID | [optional] | |**firstName** | **String** | First name | [optional] | +|**hideExampleBinaries** | **Boolean** | Hide the Examples tab in the analyses listing | [optional] | |**lastName** | **String** | Last name | [optional] | |**timeZone** | **String** | IANA time zone | [optional] | |**username** | **String** | Username | [optional] | diff --git a/docs/UserProfile.md b/docs/UserProfile.md index 9e2f1c27..152cea67 100644 --- a/docs/UserProfile.md +++ b/docs/UserProfile.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**defaultTeamId** | **Long** | | [optional] | |**firstName** | **String** | | | +|**hideExampleBinaries** | **Boolean** | | | |**lastName** | **String** | | | |**timeZone** | **String** | | | |**username** | **String** | | | diff --git a/docs/V2FunctionHeader.md b/docs/V2FunctionHeader.md new file mode 100644 index 00000000..99d8b8e8 --- /dev/null +++ b/docs/V2FunctionHeader.md @@ -0,0 +1,17 @@ + + +# V2FunctionHeader + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lastChange** | **String** | Timestamp of the last change to this function header | [optional] | +|**name** | **String** | Name of the function | | +|**addr** | **Integer** | Memory address of the function | | +|**type** | **String** | Return type of the function | | +|**args** | [**Map<String, Argument>**](Argument.md) | Dictionary of function arguments | | + + + diff --git a/docs/V2FunctionInfo.md b/docs/V2FunctionInfo.md new file mode 100644 index 00000000..ff8ab546 --- /dev/null +++ b/docs/V2FunctionInfo.md @@ -0,0 +1,14 @@ + + +# V2FunctionInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**funcTypes** | [**V2FunctionType**](V2FunctionType.md) | Function type information | [optional] | +|**funcDeps** | [**List<FuncDepsInner>**](FuncDepsInner.md) | List of function dependencies | | + + + diff --git a/docs/V2FunctionMatch.md b/docs/V2FunctionMatch.md new file mode 100644 index 00000000..17ee5dbb --- /dev/null +++ b/docs/V2FunctionMatch.md @@ -0,0 +1,15 @@ + + +# V2FunctionMatch + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**functionId** | **Long** | Unique identifier of the function | | +|**matchedFunctions** | [**List<V2MatchedFunction>**](V2MatchedFunction.md) | | | +|**confidences** | [**List<V2NameConfidence>**](V2NameConfidence.md) | | [optional] | + + + diff --git a/docs/V2FunctionType.md b/docs/V2FunctionType.md new file mode 100644 index 00000000..6f6c0864 --- /dev/null +++ b/docs/V2FunctionType.md @@ -0,0 +1,20 @@ + + +# V2FunctionType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lastChange** | **String** | Timestamp of the last change to this function type | [optional] | +|**addr** | **Integer** | Memory address of the function | | +|**size** | **Integer** | Size of the function in bytes | | +|**header** | [**V2FunctionHeader**](V2FunctionHeader.md) | Function header information | | +|**stackVars** | [**Map<String, StackVariable>**](StackVariable.md) | Dictionary of stack variables | [optional] | +|**name** | **String** | Name of the function | | +|**type** | **String** | Return type of the function | | +|**artifactType** | **String** | Type of artifact that the structure is associated with | [optional] | + + + diff --git a/docs/V2MatchedFunction.md b/docs/V2MatchedFunction.md new file mode 100644 index 00000000..a9beb746 --- /dev/null +++ b/docs/V2MatchedFunction.md @@ -0,0 +1,23 @@ + + +# V2MatchedFunction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**functionId** | **Long** | Unique identifier of the matched function | | +|**binaryId** | **Integer** | | | +|**functionName** | **String** | | | +|**functionVaddr** | **Long** | | | +|**mangledName** | **String** | | | +|**debug** | **Boolean** | | | +|**binaryName** | **String** | | | +|**sha256Hash** | **String** | | | +|**analysisId** | **Integer** | | | +|**similarity** | **BigDecimal** | | [optional] | +|**confidence** | **BigDecimal** | | [optional] | + + + diff --git a/docs/V2NameConfidence.md b/docs/V2NameConfidence.md new file mode 100644 index 00000000..9f02731f --- /dev/null +++ b/docs/V2NameConfidence.md @@ -0,0 +1,14 @@ + + +# V2NameConfidence + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The suggested function name | | +|**confidence** | **BigDecimal** | Confidence score as a percentage | | + + + diff --git a/pom.xml b/pom.xml index 2274d141..e8d9af70 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.99.0 + 3.100.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AgentApi.java b/src/main/java/ai/reveng/api/AgentApi.java index fddcb18f..028f7927 100644 --- a/src/main/java/ai/reveng/api/AgentApi.java +++ b/src/main/java/ai/reveng/api/AgentApi.java @@ -133,7 +133,7 @@ public okhttp3.Call checkCapabilitiesTaskStatusV2AnalysesAnalysisIdAgentCapabili localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -264,7 +264,7 @@ public okhttp3.Call checkReportAnalysisTaskStatusV2AnalysesAnalysisIdAgentReport localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -395,7 +395,7 @@ public okhttp3.Call checkTriageTaskStatusV2AnalysesAnalysisIdAgentTriageStatusGe localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -526,7 +526,7 @@ public okhttp3.Call createCapabilitiesTaskV2AnalysesAnalysisIdAgentCapabilitiesP localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -658,7 +658,7 @@ public okhttp3.Call createReportAnalysisTaskV2AnalysesAnalysisIdAgentReportAnaly localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -792,7 +792,7 @@ public okhttp3.Call createTriageTaskV2AnalysesAnalysisIdAgentTriagePostCall(@jav localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -923,7 +923,7 @@ public okhttp3.Call getCapabilitiesResultV2AnalysesAnalysisIdAgentCapabilitiesGe localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1054,7 +1054,7 @@ public okhttp3.Call getReportAnalysisResultV2AnalysesAnalysisIdAgentReportAnalys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1185,7 +1185,7 @@ public okhttp3.Call getTriageResultV2AnalysesAnalysisIdAgentTriageGetCall(@javax localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AnalysesBulkActionsApi.java b/src/main/java/ai/reveng/api/AnalysesBulkActionsApi.java index e4a8e0ed..f853ef41 100644 --- a/src/main/java/ai/reveng/api/AnalysesBulkActionsApi.java +++ b/src/main/java/ai/reveng/api/AnalysesBulkActionsApi.java @@ -130,7 +130,7 @@ public okhttp3.Call bulkAddAnalysisTagsCall(@javax.annotation.Nonnull AnalysisBu localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -263,7 +263,7 @@ public okhttp3.Call bulkDeleteAnalysesCall(@javax.annotation.Nonnull BulkDeleteA localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AnalysesCommentsApi.java b/src/main/java/ai/reveng/api/AnalysesCommentsApi.java index 18854dfb..1cd64149 100644 --- a/src/main/java/ai/reveng/api/AnalysesCommentsApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCommentsApi.java @@ -134,7 +134,7 @@ public okhttp3.Call createAnalysisCommentCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -280,7 +280,7 @@ public okhttp3.Call deleteAnalysisCommentCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -425,7 +425,7 @@ public okhttp3.Call getAnalysisCommentsCall(@javax.annotation.Nonnull Integer an localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -562,7 +562,7 @@ public okhttp3.Call updateAnalysisCommentCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AnalysesCoreApi.java b/src/main/java/ai/reveng/api/AnalysesCoreApi.java index 196b7e54..c10edb44 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -169,7 +169,7 @@ public okhttp3.Call addUserStringToAnalysisCall(@javax.annotation.Nonnull Long a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -325,7 +325,7 @@ public okhttp3.Call createAnalysisCall(@javax.annotation.Nonnull AnalysisCreateR } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -467,7 +467,7 @@ public okhttp3.Call deleteAnalysisCall(@javax.annotation.Nonnull Integer analysi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -606,7 +606,7 @@ public okhttp3.Call getAnalysisBasicInfoCall(@javax.annotation.Nonnull Integer a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -747,7 +747,7 @@ public okhttp3.Call getAnalysisBasicInfo_0Call(@javax.annotation.Nonnull Long an localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -896,7 +896,7 @@ public okhttp3.Call getAnalysisBytesCall(@javax.annotation.Nonnull Long analysis localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1038,7 +1038,7 @@ public okhttp3.Call getAnalysisFunctionMapCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1172,7 +1172,7 @@ public okhttp3.Call getAnalysisFunctionMatchesCall(@javax.annotation.Nonnull Lon localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1315,7 +1315,7 @@ public okhttp3.Call getAnalysisFunctionMatchingStatusCall(@javax.annotation.Nonn localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1455,7 +1455,7 @@ public okhttp3.Call getAnalysisLogsCall(@javax.annotation.Nonnull Integer analys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1586,7 +1586,7 @@ public okhttp3.Call getAnalysisParamsCall(@javax.annotation.Nonnull Integer anal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1717,7 +1717,7 @@ public okhttp3.Call getAnalysisStatusCall(@javax.annotation.Nonnull Integer anal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1851,7 +1851,7 @@ public okhttp3.Call getDynamicExecutionReportCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1993,7 +1993,7 @@ public okhttp3.Call getDynamicExecutionStatusCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2132,7 +2132,7 @@ public okhttp3.Call insertAnalysisLogCall(@javax.annotation.Nonnull Integer anal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2324,7 +2324,7 @@ public okhttp3.Call listAnalysesCall(@javax.annotation.Nullable String searchTer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2480,7 +2480,7 @@ public okhttp3.Call lookupBinaryIdCall(@javax.annotation.Nonnull Integer binaryI localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2613,7 +2613,7 @@ public okhttp3.Call putAnalysisStringsCall(@javax.annotation.Nonnull Integer ana localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2762,7 +2762,7 @@ public okhttp3.Call requeueAnalysisCall(@javax.annotation.Nonnull Integer analys } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2916,7 +2916,7 @@ public okhttp3.Call startAnalysisFunctionMatchingCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3069,7 +3069,7 @@ public okhttp3.Call updateAnalysisCall(@javax.annotation.Nonnull Integer analysi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3210,7 +3210,7 @@ public okhttp3.Call updateAnalysisTagsCall(@javax.annotation.Nonnull Integer ana localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3368,7 +3368,7 @@ public okhttp3.Call uploadFileCall(@javax.annotation.Nonnull UploadFileType uplo localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3546,7 +3546,7 @@ public okhttp3.Call v3GetAnalysisStringsCall(@javax.annotation.Nonnull Long anal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3707,7 +3707,7 @@ public okhttp3.Call v3GetAnalysisStringsStatusCall(@javax.annotation.Nonnull Lon localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3845,7 +3845,7 @@ public okhttp3.Call v3ListExampleAnalysesCall(final ApiCallback _callback) throw localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java index 1898c20d..8fce41a1 100644 --- a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java +++ b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java @@ -144,7 +144,7 @@ public okhttp3.Call getAnalysisFunctionsPaginatedCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -288,7 +288,7 @@ public okhttp3.Call getCapabilitiesCall(@javax.annotation.Nonnull Integer analys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -451,7 +451,7 @@ public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analy localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -607,7 +607,7 @@ public okhttp3.Call getSbomCall(@javax.annotation.Nonnull Integer analysisId, fi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -738,7 +738,7 @@ public okhttp3.Call getTagsCall(@javax.annotation.Nonnull Integer analysisId, fi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -869,7 +869,7 @@ public okhttp3.Call getVulnerabilitiesCall(@javax.annotation.Nonnull Integer ana localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AnalysesXRefsApi.java b/src/main/java/ai/reveng/api/AnalysesXRefsApi.java index b8b45840..afa1005f 100644 --- a/src/main/java/ai/reveng/api/AnalysesXRefsApi.java +++ b/src/main/java/ai/reveng/api/AnalysesXRefsApi.java @@ -131,7 +131,7 @@ public okhttp3.Call getXrefByVaddrCall(@javax.annotation.Nonnull Integer analysi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/AuthenticationUsersApi.java b/src/main/java/ai/reveng/api/AuthenticationUsersApi.java index 8566e161..b996fb81 100644 --- a/src/main/java/ai/reveng/api/AuthenticationUsersApi.java +++ b/src/main/java/ai/reveng/api/AuthenticationUsersApi.java @@ -129,7 +129,7 @@ public okhttp3.Call getUserCall(@javax.annotation.Nonnull Integer userId, final localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -258,7 +258,7 @@ public okhttp3.Call getUserActivityCall(final ApiCallback _callback) throws ApiE localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -381,7 +381,7 @@ public okhttp3.Call submitUserFeedbackCall(@javax.annotation.Nonnull SubmitUserF localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/BinariesApi.java b/src/main/java/ai/reveng/api/BinariesApi.java index bf2530f6..e532d650 100644 --- a/src/main/java/ai/reveng/api/BinariesApi.java +++ b/src/main/java/ai/reveng/api/BinariesApi.java @@ -138,7 +138,7 @@ public okhttp3.Call downloadZippedBinaryCall(@javax.annotation.Nonnull Integer b localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -271,7 +271,7 @@ public okhttp3.Call getBinaryAdditionalDetailsCall(@javax.annotation.Nonnull Int localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -411,7 +411,7 @@ public okhttp3.Call getBinaryAdditionalDetailsStatusCall(@javax.annotation.Nonnu localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -552,7 +552,7 @@ public okhttp3.Call getBinaryAdditionalDetailsStatus_0Call(@javax.annotation.Non localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -695,7 +695,7 @@ public okhttp3.Call getBinaryAdditionalDetails_0Call(@javax.annotation.Nonnull L localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -835,7 +835,7 @@ public okhttp3.Call getBinaryDetailsCall(@javax.annotation.Nonnull Integer binar localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -966,7 +966,7 @@ public okhttp3.Call getBinaryDieInfoCall(@javax.annotation.Nonnull Integer binar localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1097,7 +1097,7 @@ public okhttp3.Call getBinaryExternalsCall(@javax.annotation.Nonnull Integer bin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1228,7 +1228,7 @@ public okhttp3.Call getBinaryRelatedStatusCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1360,7 +1360,7 @@ public okhttp3.Call getRelatedBinariesCall(@javax.annotation.Nonnull Integer bin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/CollectionsApi.java b/src/main/java/ai/reveng/api/CollectionsApi.java index 1d73e4e8..0e2274c5 100644 --- a/src/main/java/ai/reveng/api/CollectionsApi.java +++ b/src/main/java/ai/reveng/api/CollectionsApi.java @@ -151,7 +151,7 @@ public okhttp3.Call createCollectionCall(@javax.annotation.Nonnull CollectionCre localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -291,7 +291,7 @@ public okhttp3.Call deleteCollectionCall(@javax.annotation.Nonnull Integer colle localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -456,7 +456,7 @@ public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collecti localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -639,7 +639,7 @@ public okhttp3.Call listCollectionsCall(@javax.annotation.Nullable String search localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -791,7 +791,7 @@ public okhttp3.Call updateCollectionCall(@javax.annotation.Nonnull Integer colle localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -941,7 +941,7 @@ public okhttp3.Call updateCollectionBinariesCall(@javax.annotation.Nonnull Integ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1091,7 +1091,7 @@ public okhttp3.Call updateCollectionTagsCall(@javax.annotation.Nonnull Integer c localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1239,7 +1239,7 @@ public okhttp3.Call v3CreateCollectionCall(@javax.annotation.Nonnull CreateColle localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1380,7 +1380,7 @@ public okhttp3.Call v3DeleteCollectionCall(@javax.annotation.Nonnull Long collec localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1546,7 +1546,7 @@ public okhttp3.Call v3GetCollectionCall(@javax.annotation.Nonnull Long collectio localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1727,7 +1727,7 @@ public okhttp3.Call v3ListCollectionsCall(@javax.annotation.Nullable String sear localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1876,7 +1876,7 @@ public okhttp3.Call v3PatchCollectionCall(@javax.annotation.Nonnull Long collect localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2029,7 +2029,7 @@ public okhttp3.Call v3PatchCollectionBinariesCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2182,7 +2182,7 @@ public okhttp3.Call v3PatchCollectionTagsCall(@javax.annotation.Nonnull Long col localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/ConfigApi.java b/src/main/java/ai/reveng/api/ConfigApi.java index 90714512..207e5e17 100644 --- a/src/main/java/ai/reveng/api/ConfigApi.java +++ b/src/main/java/ai/reveng/api/ConfigApi.java @@ -125,7 +125,7 @@ public okhttp3.Call getConfigCall(final ApiCallback _callback) throws ApiExcepti localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/ConversationsApi.java b/src/main/java/ai/reveng/api/ConversationsApi.java index 236d789c..2601e9df 100644 --- a/src/main/java/ai/reveng/api/ConversationsApi.java +++ b/src/main/java/ai/reveng/api/ConversationsApi.java @@ -137,7 +137,7 @@ public okhttp3.Call cancelRunCall(@javax.annotation.Nonnull UUID id, final ApiCa localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -282,7 +282,7 @@ public okhttp3.Call confirmToolCall(@javax.annotation.Nonnull UUID id, @javax.an localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -432,7 +432,7 @@ public okhttp3.Call createConversationCall(@javax.annotation.Nonnull CreateConve localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -572,7 +572,7 @@ public okhttp3.Call getConversationCall(@javax.annotation.Nonnull UUID id, final localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -710,7 +710,7 @@ public okhttp3.Call listConversationsCall(final ApiCallback _callback) throws Ap localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -841,7 +841,7 @@ public okhttp3.Call sendMessageCall(@javax.annotation.Nonnull UUID id, @javax.an localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1004,7 +1004,7 @@ public okhttp3.Call streamEventsCall(@javax.annotation.Nonnull UUID id, @javax.a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/ExternalSourcesApi.java b/src/main/java/ai/reveng/api/ExternalSourcesApi.java index 1cfcda86..475633f4 100644 --- a/src/main/java/ai/reveng/api/ExternalSourcesApi.java +++ b/src/main/java/ai/reveng/api/ExternalSourcesApi.java @@ -130,7 +130,7 @@ public okhttp3.Call createExternalTaskVtCall(@javax.annotation.Nonnull Integer a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -265,7 +265,7 @@ public okhttp3.Call getVtDataCall(@javax.annotation.Nonnull Integer analysisId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -399,7 +399,7 @@ public okhttp3.Call getVtTaskStatusCall(@javax.annotation.Nonnull Integer analys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/FirmwareApi.java b/src/main/java/ai/reveng/api/FirmwareApi.java index fba276ab..f20d8d6e 100644 --- a/src/main/java/ai/reveng/api/FirmwareApi.java +++ b/src/main/java/ai/reveng/api/FirmwareApi.java @@ -127,7 +127,7 @@ public okhttp3.Call getBinariesForFirmwareTaskCall(@javax.annotation.Nonnull Str localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -268,7 +268,7 @@ public okhttp3.Call uploadFirmwareCall(@javax.annotation.Nonnull File _file, @ja localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java index 4d18f1ed..82b61009 100644 --- a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java +++ b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java @@ -155,7 +155,7 @@ public okhttp3.Call createAiDecompilationCall(@javax.annotation.Nonnull Long fun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -312,7 +312,7 @@ public okhttp3.Call deleteAiDecompilationInlineCommentCall(@javax.annotation.Non localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -463,7 +463,7 @@ public okhttp3.Call getAiDecompilationCall(@javax.annotation.Nonnull Long functi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -606,7 +606,7 @@ public okhttp3.Call getAiDecompilationInlineCommentsCall(@javax.annotation.Nonnu localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -749,7 +749,7 @@ public okhttp3.Call getAiDecompilationInlineCommentsStatusCall(@javax.annotation localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -889,7 +889,7 @@ public okhttp3.Call getAiDecompilationRatingCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1023,7 +1023,7 @@ public okhttp3.Call getAiDecompilationStatusCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1166,7 +1166,7 @@ public okhttp3.Call getAiDecompilationSummaryCall(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1309,7 +1309,7 @@ public okhttp3.Call getAiDecompilationSummaryStatusCall(@javax.annotation.Nonnul localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1452,7 +1452,7 @@ public okhttp3.Call getAiDecompilationTokenisedCall(@javax.annotation.Nonnull Lo localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1597,7 +1597,7 @@ public okhttp3.Call patchAiDecompilationInlineCommentCall(@javax.annotation.Nonn localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1748,7 +1748,7 @@ public okhttp3.Call regenerateAiDecompilationInlineCommentsCall(@javax.annotatio localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1891,7 +1891,7 @@ public okhttp3.Call regenerateAiDecompilationSummaryCall(@javax.annotation.Nonnu localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2032,7 +2032,7 @@ public okhttp3.Call streamAiDecompilationCall(@javax.annotation.Nonnull Long fun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2169,7 +2169,7 @@ public okhttp3.Call upsertAiDecompilationOverridesCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2322,7 +2322,7 @@ public okhttp3.Call upsertAiDecompilationRatingCall(@javax.annotation.Nonnull Lo localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/FunctionsCoreApi.java b/src/main/java/ai/reveng/api/FunctionsCoreApi.java index 90f0fe9c..35b97c0e 100644 --- a/src/main/java/ai/reveng/api/FunctionsCoreApi.java +++ b/src/main/java/ai/reveng/api/FunctionsCoreApi.java @@ -159,7 +159,7 @@ public okhttp3.Call addFunctionCalleeCall(@javax.annotation.Nonnull Long functio localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -315,7 +315,7 @@ public okhttp3.Call addUserStringToFunctionCall(@javax.annotation.Nonnull Long f localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -467,7 +467,7 @@ public okhttp3.Call aiUnstripCall(@javax.annotation.Nonnull Integer analysisId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -617,7 +617,7 @@ public okhttp3.Call analysisFunctionMatchingCall(@javax.annotation.Nonnull Integ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -767,7 +767,7 @@ public okhttp3.Call autoUnstripCall(@javax.annotation.Nonnull Integer analysisId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -915,7 +915,7 @@ public okhttp3.Call batchFunctionMatchingCall(@javax.annotation.Nonnull Function localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1055,7 +1055,7 @@ public okhttp3.Call cancelAiUnstripCall(@javax.annotation.Nonnull Integer analys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1195,7 +1195,7 @@ public okhttp3.Call cancelAutoUnstripCall(@javax.annotation.Nonnull Integer anal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1365,7 +1365,7 @@ public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer ana localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1523,7 +1523,7 @@ public okhttp3.Call getAnalysisStringsStatusCall(@javax.annotation.Nonnull Integ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1664,7 +1664,7 @@ public okhttp3.Call getFunctionBlocksCall(@javax.annotation.Nonnull Integer func localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1808,7 +1808,7 @@ public okhttp3.Call getFunctionBlocks_0Call(@javax.annotation.Nonnull Long funct localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1950,7 +1950,7 @@ public okhttp3.Call getFunctionCalleesCallersCall(@javax.annotation.Nonnull Inte localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2093,7 +2093,7 @@ public okhttp3.Call getFunctionCalleesCallersBulkCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2234,7 +2234,7 @@ public okhttp3.Call getFunctionCalleesCallers_0Call(@javax.annotation.Nonnull Lo localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2377,7 +2377,7 @@ public okhttp3.Call getFunctionCapabilitiesCall(@javax.annotation.Nonnull Intege localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2521,7 +2521,7 @@ public okhttp3.Call getFunctionCapabilities_0Call(@javax.annotation.Nonnull Long localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2663,7 +2663,7 @@ public okhttp3.Call getFunctionDetailsCall(@javax.annotation.Nonnull Integer fun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2804,7 +2804,7 @@ public okhttp3.Call getFunctionDetails_0Call(@javax.annotation.Nonnull Long func localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2961,7 +2961,7 @@ public okhttp3.Call getFunctionStringsCall(@javax.annotation.Nonnull Integer fun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3126,7 +3126,7 @@ public okhttp3.Call getFunctionStrings_0Call(@javax.annotation.Nonnull Long func localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3282,7 +3282,7 @@ public okhttp3.Call getFunctionsCalleesCallersCall(@javax.annotation.Nullable Li localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3432,7 +3432,7 @@ public okhttp3.Call getFunctionsMatchesCall(@javax.annotation.Nullable List - Response Details - Status Code Description Response Headers - 200 Successful Response - - 422 Invalid request parameters - - - * @deprecated - */ - @Deprecated - public okhttp3.Call getFunctionDataTypesCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull Integer functionId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v2/analyses/{analysis_id}/functions/{function_id}/data_types" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) - .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionDataTypesValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull Integer functionId, 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 getFunctionDataTypes(Async)"); - } - - // verify the required parameter 'functionId' is set - if (functionId == null) { - throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionDataTypes(Async)"); - } - - return getFunctionDataTypesCall(analysisId, functionId, _callback); - - } - - /** - * Get Function Data Types - * Polling endpoint which returns the current status of function generation and once completed the data type information - * @param analysisId (required) - * @param functionId (required) - * @return BaseResponseFunctionDataTypes - * @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 -
- * @deprecated - */ - @Deprecated - public BaseResponseFunctionDataTypes getFunctionDataTypes(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull Integer functionId) throws ApiException { - ApiResponse localVarResp = getFunctionDataTypesWithHttpInfo(analysisId, functionId); - return localVarResp.getData(); - } - - /** - * Get Function Data Types - * Polling endpoint which returns the current status of function generation and once completed the data type information - * @param analysisId (required) - * @param functionId (required) - * @return ApiResponse<BaseResponseFunctionDataTypes> - * @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 -
- * @deprecated - */ - @Deprecated - public ApiResponse getFunctionDataTypesWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull Integer functionId) throws ApiException { - okhttp3.Call localVarCall = getFunctionDataTypesValidateBeforeCall(analysisId, functionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Function Data Types (asynchronously) - * Polling endpoint which returns the current status of function generation and once completed the data type information - * @param analysisId (required) - * @param functionId (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 -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getFunctionDataTypesAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull Integer functionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getFunctionDataTypesValidateBeforeCall(analysisId, functionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getFunctionDataTypes_0 * @param analysisId Analysis ID (required) * @param functionId Function ID (required) * @param _callback Callback for upload/download progress @@ -679,7 +530,7 @@ public okhttp3.Call getFunctionDataTypesAsync(@javax.annotation.Nonnull Integer 500 Internal Server Error - */ - public okhttp3.Call getFunctionDataTypes_0Call(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionDataTypesCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -721,23 +572,23 @@ public okhttp3.Call getFunctionDataTypes_0Call(@javax.annotation.Nonnull Long an localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionDataTypes_0ValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFunctionDataTypesValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, 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 getFunctionDataTypes_0(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling getFunctionDataTypes(Async)"); } // verify the required parameter 'functionId' is set if (functionId == null) { - throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionDataTypes_0(Async)"); + throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionDataTypes(Async)"); } - return getFunctionDataTypes_0Call(analysisId, functionId, _callback); + return getFunctionDataTypesCall(analysisId, functionId, _callback); } @@ -759,8 +610,8 @@ private okhttp3.Call getFunctionDataTypes_0ValidateBeforeCall(@javax.annotation. 500 Internal Server Error - */ - public DataTypesEntry getFunctionDataTypes_0(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId) throws ApiException { - ApiResponse localVarResp = getFunctionDataTypes_0WithHttpInfo(analysisId, functionId); + public DataTypesEntry getFunctionDataTypes(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId) throws ApiException { + ApiResponse localVarResp = getFunctionDataTypesWithHttpInfo(analysisId, functionId); return localVarResp.getData(); } @@ -782,8 +633,8 @@ public DataTypesEntry getFunctionDataTypes_0(@javax.annotation.Nonnull Long anal 500 Internal Server Error - */ - public ApiResponse getFunctionDataTypes_0WithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId) throws ApiException { - okhttp3.Call localVarCall = getFunctionDataTypes_0ValidateBeforeCall(analysisId, functionId, null); + public ApiResponse getFunctionDataTypesWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId) throws ApiException { + okhttp3.Call localVarCall = getFunctionDataTypesValidateBeforeCall(analysisId, functionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -807,9 +658,9 @@ public ApiResponse getFunctionDataTypes_0WithHttpInfo(@javax.ann 500 Internal Server Error - */ - public okhttp3.Call getFunctionDataTypes_0Async(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionDataTypesAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFunctionDataTypes_0ValidateBeforeCall(analysisId, functionId, _callback); + okhttp3.Call localVarCall = getFunctionDataTypesValidateBeforeCall(analysisId, functionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -882,7 +733,7 @@ public okhttp3.Call listAnalysisFunctionsDataTypesCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1035,7 +886,7 @@ public okhttp3.Call listFunctionDataTypesForAnalysisCall(@javax.annotation.Nonnu localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1181,7 +1032,7 @@ public okhttp3.Call listFunctionDataTypesForFunctionsCall(@javax.annotation.Null localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1321,7 +1172,7 @@ public okhttp3.Call listFunctionsDataTypesCall(@javax.annotation.Nullable List + Response Details + Status Code Description Response Headers + 200 OK - + 400 Bad Request - + 403 Forbidden - + 404 Not Found - + 409 Conflict - + 422 Unprocessable Entity - + 500 Internal Server Error - + + */ + public okhttp3.Call updateFunctionDataTypesCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull UpdateDataTypesInputBody updateDataTypesInputBody, 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 = updateDataTypesInputBody; + + // create path and map variables + String localVarPath = "/v2/analyses/{analysis_id}/functions/{function_id}/data_types" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + 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", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateFunctionDataTypesValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull UpdateDataTypesInputBody updateDataTypesInputBody, 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 updateFunctionDataTypes(Async)"); + } + + // verify the required parameter 'functionId' is set + if (functionId == null) { + throw new ApiException("Missing the required parameter 'functionId' when calling updateFunctionDataTypes(Async)"); + } + + // verify the required parameter 'updateDataTypesInputBody' is set + if (updateDataTypesInputBody == null) { + throw new ApiException("Missing the required parameter 'updateDataTypesInputBody' when calling updateFunctionDataTypes(Async)"); + } + + return updateFunctionDataTypesCall(analysisId, functionId, updateDataTypesInputBody, _callback); + + } + + /** + * Update function data types + * Stores user-specific overrides for a function's data types. Uses optimistic concurrency: if the stored version doesn't match `data_types_version`, the update is rejected with 409. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + * @param analysisId Analysis ID (required) + * @param functionId Function ID (required) + * @param updateDataTypesInputBody (required) + * @return UpdateDataTypesOutputBody + * @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 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public UpdateDataTypesOutputBody updateFunctionDataTypes(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull UpdateDataTypesInputBody updateDataTypesInputBody) throws ApiException { + ApiResponse localVarResp = updateFunctionDataTypesWithHttpInfo(analysisId, functionId, updateDataTypesInputBody); + return localVarResp.getData(); + } + + /** + * Update function data types + * Stores user-specific overrides for a function's data types. Uses optimistic concurrency: if the stored version doesn't match `data_types_version`, the update is rejected with 409. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + * @param analysisId Analysis ID (required) + * @param functionId Function ID (required) + * @param updateDataTypesInputBody (required) + * @return ApiResponse<UpdateDataTypesOutputBody> + * @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 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse updateFunctionDataTypesWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull UpdateDataTypesInputBody updateDataTypesInputBody) throws ApiException { + okhttp3.Call localVarCall = updateFunctionDataTypesValidateBeforeCall(analysisId, functionId, updateDataTypesInputBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update function data types (asynchronously) + * Stores user-specific overrides for a function's data types. Uses optimistic concurrency: if the stored version doesn't match `data_types_version`, the update is rejected with 409. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + * @param analysisId Analysis ID (required) + * @param functionId Function ID (required) + * @param updateDataTypesInputBody (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 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call updateFunctionDataTypesAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull UpdateDataTypesInputBody updateDataTypesInputBody, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateFunctionDataTypesValidateBeforeCall(analysisId, functionId, updateDataTypesInputBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/src/main/java/ai/reveng/api/FunctionsRenamingHistoryApi.java b/src/main/java/ai/reveng/api/FunctionsRenamingHistoryApi.java index 3154ac3a..e91c7cbd 100644 --- a/src/main/java/ai/reveng/api/FunctionsRenamingHistoryApi.java +++ b/src/main/java/ai/reveng/api/FunctionsRenamingHistoryApi.java @@ -137,7 +137,7 @@ public okhttp3.Call batchRenameFunctionCall(@javax.annotation.Nonnull FunctionsL localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -278,7 +278,7 @@ public okhttp3.Call batchRenameFunctionsCall(@javax.annotation.Nonnull BatchRena localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -421,7 +421,7 @@ public okhttp3.Call getFunctionHistoryCall(@javax.annotation.Nonnull Long functi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -563,7 +563,7 @@ public okhttp3.Call getFunctionNameHistoryCall(@javax.annotation.Nonnull Integer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -706,7 +706,7 @@ public okhttp3.Call renameFunctionCall(@javax.annotation.Nonnull Long functionId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -858,7 +858,7 @@ public okhttp3.Call renameFunctionIdCall(@javax.annotation.Nonnull Integer funct localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1008,7 +1008,7 @@ public okhttp3.Call revertFunctionNameCall(@javax.annotation.Nonnull Integer fun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1159,7 +1159,7 @@ public okhttp3.Call revertFunctionName_0Call(@javax.annotation.Nonnull Long func localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/IamUsersApi.java b/src/main/java/ai/reveng/api/IamUsersApi.java index d4433585..1d62d732 100644 --- a/src/main/java/ai/reveng/api/IamUsersApi.java +++ b/src/main/java/ai/reveng/api/IamUsersApi.java @@ -127,7 +127,7 @@ public okhttp3.Call getMeCall(final ApiCallback _callback) throws ApiException { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -251,7 +251,7 @@ public okhttp3.Call getMyPermissionsCall(final ApiCallback _callback) throws Api localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/ModelsApi.java b/src/main/java/ai/reveng/api/ModelsApi.java index f51d0e81..c5af3679 100644 --- a/src/main/java/ai/reveng/api/ModelsApi.java +++ b/src/main/java/ai/reveng/api/ModelsApi.java @@ -125,7 +125,7 @@ public okhttp3.Call getModelsCall(final ApiCallback _callback) throws ApiExcepti localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/ReportsApi.java b/src/main/java/ai/reveng/api/ReportsApi.java index bd8234b1..71355c7b 100644 --- a/src/main/java/ai/reveng/api/ReportsApi.java +++ b/src/main/java/ai/reveng/api/ReportsApi.java @@ -131,7 +131,7 @@ public okhttp3.Call createPdfReportCall(@javax.annotation.Nonnull Long analysisI localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -275,7 +275,7 @@ public okhttp3.Call downloadPdfReportCall(@javax.annotation.Nonnull Long analysi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -417,7 +417,7 @@ public okhttp3.Call getPdfReportStatusCall(@javax.annotation.Nonnull Long analys localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/api/SearchApi.java b/src/main/java/ai/reveng/api/SearchApi.java index 5b355496..0dac3a8b 100644 --- a/src/main/java/ai/reveng/api/SearchApi.java +++ b/src/main/java/ai/reveng/api/SearchApi.java @@ -171,7 +171,7 @@ public okhttp3.Call searchBinariesCall(@javax.annotation.Nullable Integer page, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -367,7 +367,7 @@ public okhttp3.Call searchCollectionsCall(@javax.annotation.Nullable Integer pag localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -541,7 +541,7 @@ public okhttp3.Call searchFunctionsCall(@javax.annotation.Nullable Integer page, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -689,7 +689,7 @@ public okhttp3.Call searchTagsCall(@javax.annotation.Nonnull String partialName, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "APIKey" }; + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index aa1b9b62..bb527080 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -100,6 +100,7 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("APIKey", new ApiKeyAuth("header", "Authorization")); + authentications.put("bearerAuth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -116,6 +117,7 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("APIKey", new ApiKeyAuth("header", "Authorization")); + authentications.put("bearerAuth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -146,7 +148,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.99.0/java"); + setUserAgent("OpenAPI-Generator/3.100.0/java"); authentications = new HashMap(); } @@ -390,6 +392,28 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } /** * Helper method to set username for the first HTTP basic authentication. diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 8f9f3acc..ad7e33f8 100644 --- a/src/main/java/ai/reveng/invoker/Configuration.java +++ b/src/main/java/ai/reveng/invoker/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "3.99.0"; + public static final String VERSION = "3.100.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index 78b960e9..680312f4 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -563,6 +563,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.UserCredits.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.UserIdentity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.UserProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2FunctionHeader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2FunctionInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2FunctionMatch.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2FunctionType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2MatchedFunction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.V2NameConfidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Vulnerabilities.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Vulnerability.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.WarningEvent.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/FunctionArgument.java b/src/main/java/ai/reveng/model/FunctionArgument.java index d3938dda..28f2b7f5 100644 --- a/src/main/java/ai/reveng/model/FunctionArgument.java +++ b/src/main/java/ai/reveng/model/FunctionArgument.java @@ -20,7 +20,6 @@ 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; @@ -57,7 +56,7 @@ public class FunctionArgument { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OFFSET = "offset"; @@ -77,7 +76,7 @@ public class FunctionArgument { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String type; public FunctionArgument() { @@ -89,7 +88,7 @@ public FunctionArgument lastChange(@javax.annotation.Nullable String lastChange) } /** - * Search is applied to string value + * Get lastChange * @return lastChange */ @javax.annotation.Nullable @@ -102,21 +101,21 @@ public void setLastChange(@javax.annotation.Nullable String lastChange) { } - public FunctionArgument name(@javax.annotation.Nullable String name) { + public FunctionArgument name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Search is applied to string value + * Get name * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } @@ -146,7 +145,7 @@ public FunctionArgument scope(@javax.annotation.Nullable String scope) { } /** - * Search is applied to string value + * Get scope * @return scope */ @javax.annotation.Nullable @@ -178,68 +177,24 @@ public void setSize(@javax.annotation.Nonnull Long size) { } - public FunctionArgument type(@javax.annotation.Nullable String type) { + public FunctionArgument type(@javax.annotation.Nonnull String type) { this.type = type; return this; } /** - * Search is applied to string value + * Get type * @return type */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getType() { return type; } - public void setType(@javax.annotation.Nullable String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - /** - * 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 FunctionArgument instance itself - */ - public FunctionArgument 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 @@ -256,24 +211,12 @@ public boolean equals(Object o) { Objects.equals(this.offset, functionArgument.offset) && Objects.equals(this.scope, functionArgument.scope) && Objects.equals(this.size, functionArgument.size) && - Objects.equals(this.type, functionArgument.type)&& - Objects.equals(this.additionalProperties, functionArgument.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())); + Objects.equals(this.type, functionArgument.type); } @Override public int hashCode() { - return Objects.hash(lastChange, name, offset, scope, size, type, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(lastChange, name, offset, scope, size, type); } @Override @@ -286,7 +229,6 @@ public String toString() { sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -324,6 +266,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionArgument.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionArgument` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionArgument.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -334,13 +284,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -360,28 +310,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionArgument 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); } @@ -389,28 +317,7 @@ else if (entry.getValue() instanceof Character) public FunctionArgument read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionArgument 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionDataTypes.java b/src/main/java/ai/reveng/model/FunctionDataTypes.java index 4151daeb..82a545f7 100644 --- a/src/main/java/ai/reveng/model/FunctionDataTypes.java +++ b/src/main/java/ai/reveng/model/FunctionDataTypes.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.FunctionInfo; +import ai.reveng.model.V2FunctionInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,7 +64,7 @@ public class FunctionDataTypes { public static final String SERIALIZED_NAME_DATA_TYPES = "data_types"; @SerializedName(SERIALIZED_NAME_DATA_TYPES) @javax.annotation.Nullable - private FunctionInfo dataTypes; + private V2FunctionInfo dataTypes; public static final String SERIALIZED_NAME_DATA_TYPES_VERSION = "data_types_version"; @SerializedName(SERIALIZED_NAME_DATA_TYPES_VERSION) @@ -112,7 +112,7 @@ public void setStatus(@javax.annotation.Nonnull String status) { } - public FunctionDataTypes dataTypes(@javax.annotation.Nullable FunctionInfo dataTypes) { + public FunctionDataTypes dataTypes(@javax.annotation.Nullable V2FunctionInfo dataTypes) { this.dataTypes = dataTypes; return this; } @@ -122,11 +122,11 @@ public FunctionDataTypes dataTypes(@javax.annotation.Nullable FunctionInfo dataT * @return dataTypes */ @javax.annotation.Nullable - public FunctionInfo getDataTypes() { + public V2FunctionInfo getDataTypes() { return dataTypes; } - public void setDataTypes(@javax.annotation.Nullable FunctionInfo dataTypes) { + public void setDataTypes(@javax.annotation.Nullable V2FunctionInfo dataTypes) { this.dataTypes = dataTypes; } @@ -285,7 +285,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `data_types` if (jsonObj.get("data_types") != null && !jsonObj.get("data_types").isJsonNull()) { - FunctionInfo.validateJsonElement(jsonObj.get("data_types")); + V2FunctionInfo.validateJsonElement(jsonObj.get("data_types")); } } diff --git a/src/main/java/ai/reveng/model/FunctionDataTypesListItem.java b/src/main/java/ai/reveng/model/FunctionDataTypesListItem.java index f9db9668..23b8977d 100644 --- a/src/main/java/ai/reveng/model/FunctionDataTypesListItem.java +++ b/src/main/java/ai/reveng/model/FunctionDataTypesListItem.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.FunctionInfo; +import ai.reveng.model.V2FunctionInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,7 +64,7 @@ public class FunctionDataTypesListItem { public static final String SERIALIZED_NAME_DATA_TYPES = "data_types"; @SerializedName(SERIALIZED_NAME_DATA_TYPES) @javax.annotation.Nullable - private FunctionInfo dataTypes; + private V2FunctionInfo dataTypes; public static final String SERIALIZED_NAME_DATA_TYPES_VERSION = "data_types_version"; @SerializedName(SERIALIZED_NAME_DATA_TYPES_VERSION) @@ -117,7 +117,7 @@ public void setStatus(@javax.annotation.Nonnull String status) { } - public FunctionDataTypesListItem dataTypes(@javax.annotation.Nullable FunctionInfo dataTypes) { + public FunctionDataTypesListItem dataTypes(@javax.annotation.Nullable V2FunctionInfo dataTypes) { this.dataTypes = dataTypes; return this; } @@ -127,11 +127,11 @@ public FunctionDataTypesListItem dataTypes(@javax.annotation.Nullable FunctionIn * @return dataTypes */ @javax.annotation.Nullable - public FunctionInfo getDataTypes() { + public V2FunctionInfo getDataTypes() { return dataTypes; } - public void setDataTypes(@javax.annotation.Nullable FunctionInfo dataTypes) { + public void setDataTypes(@javax.annotation.Nullable V2FunctionInfo dataTypes) { this.dataTypes = dataTypes; } @@ -311,7 +311,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `data_types` if (jsonObj.get("data_types") != null && !jsonObj.get("data_types").isJsonNull()) { - FunctionInfo.validateJsonElement(jsonObj.get("data_types")); + V2FunctionInfo.validateJsonElement(jsonObj.get("data_types")); } } diff --git a/src/main/java/ai/reveng/model/FunctionDependency.java b/src/main/java/ai/reveng/model/FunctionDependency.java index eb42e28a..d2bcf3ce 100644 --- a/src/main/java/ai/reveng/model/FunctionDependency.java +++ b/src/main/java/ai/reveng/model/FunctionDependency.java @@ -72,7 +72,7 @@ public class FunctionDependency { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_SCOPE = "scope"; @@ -137,7 +137,7 @@ public FunctionDependency lastChange(@javax.annotation.Nullable String lastChang } /** - * Search is applied to string value + * Get lastChange * @return lastChange */ @javax.annotation.Nullable @@ -169,21 +169,21 @@ public void setMembers(@javax.annotation.Nullable Object members) { } - public FunctionDependency name(@javax.annotation.Nullable String name) { + public FunctionDependency name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Search is applied to string value + * Get name * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } @@ -194,7 +194,7 @@ public FunctionDependency scope(@javax.annotation.Nullable String scope) { } /** - * Search is applied to string value + * Get scope * @return scope */ @javax.annotation.Nullable @@ -244,50 +244,6 @@ public void setType(@javax.annotation.Nullable String type) { this.type = type; } - /** - * 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 FunctionDependency instance itself - */ - public FunctionDependency 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 @@ -306,8 +262,7 @@ public boolean equals(Object o) { Objects.equals(this.name, functionDependency.name) && Objects.equals(this.scope, functionDependency.scope) && Objects.equals(this.size, functionDependency.size) && - Objects.equals(this.type, functionDependency.type)&& - Objects.equals(this.additionalProperties, functionDependency.additionalProperties); + Objects.equals(this.type, functionDependency.type); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -316,7 +271,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(addr, artifactType, lastChange, members, name, scope, size, type, additionalProperties); + return Objects.hash(addr, artifactType, lastChange, members, name, scope, size, type); } private static int hashCodeNullable(JsonNullable a) { @@ -338,7 +293,6 @@ public String toString() { sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -376,6 +330,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionDependency.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionDependency` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionDependency.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -389,7 +351,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -415,28 +377,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionDependency 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); } @@ -444,28 +384,7 @@ else if (entry.getValue() instanceof Character) public FunctionDependency read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionDependency 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionHeader.java b/src/main/java/ai/reveng/model/FunctionHeader.java index e3f90124..28864afc 100644 --- a/src/main/java/ai/reveng/model/FunctionHeader.java +++ b/src/main/java/ai/reveng/model/FunctionHeader.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.Argument; +import ai.reveng.model.FunctionArgument; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,6 +52,16 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FunctionHeader { + public static final String SERIALIZED_NAME_ADDR = "addr"; + @SerializedName(SERIALIZED_NAME_ADDR) + @javax.annotation.Nonnull + private Long addr; + + public static final String SERIALIZED_NAME_ARGS = "args"; + @SerializedName(SERIALIZED_NAME_ARGS) + @javax.annotation.Nonnull + private Map args = new HashMap<>(); + public static final String SERIALIZED_NAME_LAST_CHANGE = "last_change"; @SerializedName(SERIALIZED_NAME_LAST_CHANGE) @javax.annotation.Nullable @@ -63,31 +72,72 @@ public class FunctionHeader { @javax.annotation.Nonnull private String name; - public static final String SERIALIZED_NAME_ADDR = "addr"; - @SerializedName(SERIALIZED_NAME_ADDR) - @javax.annotation.Nonnull - private Integer addr; + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nullable + private String scope; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull private String type; - public static final String SERIALIZED_NAME_ARGS = "args"; - @SerializedName(SERIALIZED_NAME_ARGS) + public FunctionHeader() { + } + + public FunctionHeader addr(@javax.annotation.Nonnull Long addr) { + this.addr = addr; + return this; + } + + /** + * Get addr + * @return addr + */ @javax.annotation.Nonnull - private Map args = new HashMap<>(); + public Long getAddr() { + return addr; + } - public FunctionHeader() { + public void setAddr(@javax.annotation.Nonnull Long addr) { + this.addr = addr; } + + public FunctionHeader args(@javax.annotation.Nonnull Map args) { + this.args = args; + return this; + } + + public FunctionHeader putArgsItem(String key, FunctionArgument argsItem) { + if (this.args == null) { + this.args = new HashMap<>(); + } + this.args.put(key, argsItem); + return this; + } + + /** + * Argument map keyed by ordinal hex (e.g. \"0x0\", \"0x1\"). + * @return args + */ + @javax.annotation.Nonnull + public Map getArgs() { + return args; + } + + public void setArgs(@javax.annotation.Nonnull Map args) { + this.args = args; + } + + public FunctionHeader lastChange(@javax.annotation.Nullable String lastChange) { this.lastChange = lastChange; return this; } /** - * Timestamp of the last change to this function header + * Get lastChange * @return lastChange */ @javax.annotation.Nullable @@ -106,7 +156,7 @@ public FunctionHeader name(@javax.annotation.Nonnull String name) { } /** - * Name of the function + * Get name * @return name */ @javax.annotation.Nonnull @@ -119,22 +169,22 @@ public void setName(@javax.annotation.Nonnull String name) { } - public FunctionHeader addr(@javax.annotation.Nonnull Integer addr) { - this.addr = addr; + public FunctionHeader scope(@javax.annotation.Nullable String scope) { + this.scope = scope; return this; } /** - * Memory address of the function - * @return addr + * Get scope + * @return scope */ - @javax.annotation.Nonnull - public Integer getAddr() { - return addr; + @javax.annotation.Nullable + public String getScope() { + return scope; } - public void setAddr(@javax.annotation.Nonnull Integer addr) { - this.addr = addr; + public void setScope(@javax.annotation.Nullable String scope) { + this.scope = scope; } @@ -144,7 +194,7 @@ public FunctionHeader type(@javax.annotation.Nonnull String type) { } /** - * Return type of the function + * Get type * @return type */ @javax.annotation.Nonnull @@ -157,77 +207,6 @@ public void setType(@javax.annotation.Nonnull String type) { } - public FunctionHeader args(@javax.annotation.Nonnull Map args) { - this.args = args; - return this; - } - - public FunctionHeader putArgsItem(String key, Argument argsItem) { - if (this.args == null) { - this.args = new HashMap<>(); - } - this.args.put(key, argsItem); - return this; - } - - /** - * Dictionary of function arguments - * @return args - */ - @javax.annotation.Nonnull - public Map getArgs() { - return args; - } - - public void setArgs(@javax.annotation.Nonnull Map args) { - this.args = args; - } - - /** - * 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 FunctionHeader instance itself - */ - public FunctionHeader 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) { @@ -238,40 +217,29 @@ public boolean equals(Object o) { return false; } FunctionHeader functionHeader = (FunctionHeader) o; - return Objects.equals(this.lastChange, functionHeader.lastChange) && + return Objects.equals(this.addr, functionHeader.addr) && + Objects.equals(this.args, functionHeader.args) && + Objects.equals(this.lastChange, functionHeader.lastChange) && Objects.equals(this.name, functionHeader.name) && - Objects.equals(this.addr, functionHeader.addr) && - Objects.equals(this.type, functionHeader.type) && - Objects.equals(this.args, functionHeader.args)&& - Objects.equals(this.additionalProperties, functionHeader.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())); + Objects.equals(this.scope, functionHeader.scope) && + Objects.equals(this.type, functionHeader.type); } @Override public int hashCode() { - return Objects.hash(lastChange, name, addr, type, args, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(addr, args, lastChange, name, scope, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FunctionHeader {\n"); + sb.append(" addr: ").append(toIndentedString(addr)).append("\n"); + sb.append(" args: ").append(toIndentedString(args)).append("\n"); sb.append(" lastChange: ").append(toIndentedString(lastChange)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" addr: ").append(toIndentedString(addr)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" args: ").append(toIndentedString(args)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -290,10 +258,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("last_change", "name", "addr", "type", "args")); + openapiFields = new HashSet(Arrays.asList("addr", "args", "last_change", "name", "scope", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "addr", "type", "args")); + openapiRequiredFields = new HashSet(Arrays.asList("addr", "args", "name", "type")); } /** @@ -309,6 +277,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionHeader.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionHeader` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionHeader.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -322,6 +298,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -342,28 +321,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionHeader 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); } @@ -371,28 +328,7 @@ else if (entry.getValue() instanceof Character) public FunctionHeader read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionHeader 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionInfo.java b/src/main/java/ai/reveng/model/FunctionInfo.java index 0453e340..9ce34c0a 100644 --- a/src/main/java/ai/reveng/model/FunctionInfo.java +++ b/src/main/java/ai/reveng/model/FunctionInfo.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.FuncDepsInner; +import ai.reveng.model.FunctionDependency; import ai.reveng.model.FunctionType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -24,7 +24,6 @@ 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; @@ -54,44 +53,25 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FunctionInfo { + public static final String SERIALIZED_NAME_FUNC_DEPS = "func_deps"; + @SerializedName(SERIALIZED_NAME_FUNC_DEPS) + @javax.annotation.Nullable + private List funcDeps; + public static final String SERIALIZED_NAME_FUNC_TYPES = "func_types"; @SerializedName(SERIALIZED_NAME_FUNC_TYPES) @javax.annotation.Nullable private FunctionType funcTypes; - public static final String SERIALIZED_NAME_FUNC_DEPS = "func_deps"; - @SerializedName(SERIALIZED_NAME_FUNC_DEPS) - @javax.annotation.Nonnull - private List funcDeps = new ArrayList<>(); - public FunctionInfo() { } - public FunctionInfo funcTypes(@javax.annotation.Nullable FunctionType funcTypes) { - this.funcTypes = funcTypes; - return this; - } - - /** - * Function type information - * @return funcTypes - */ - @javax.annotation.Nullable - public FunctionType getFuncTypes() { - return funcTypes; - } - - public void setFuncTypes(@javax.annotation.Nullable FunctionType funcTypes) { - this.funcTypes = funcTypes; - } - - - public FunctionInfo funcDeps(@javax.annotation.Nonnull List funcDeps) { + public FunctionInfo funcDeps(@javax.annotation.Nullable List funcDeps) { this.funcDeps = funcDeps; return this; } - public FunctionInfo addFuncDepsItem(FuncDepsInner funcDepsItem) { + public FunctionInfo addFuncDepsItem(FunctionDependency funcDepsItem) { if (this.funcDeps == null) { this.funcDeps = new ArrayList<>(); } @@ -100,64 +80,39 @@ public FunctionInfo addFuncDepsItem(FuncDepsInner funcDepsItem) { } /** - * List of function dependencies + * Get funcDeps * @return funcDeps */ - @javax.annotation.Nonnull - public List getFuncDeps() { + @javax.annotation.Nullable + public List getFuncDeps() { return funcDeps; } - public void setFuncDeps(@javax.annotation.Nonnull List funcDeps) { + public void setFuncDeps(@javax.annotation.Nullable List funcDeps) { this.funcDeps = funcDeps; } - /** - * 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 FunctionInfo instance itself - */ - public FunctionInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public FunctionInfo funcTypes(@javax.annotation.Nullable FunctionType funcTypes) { + this.funcTypes = funcTypes; return this; } /** - * Return the additional (undeclared) property. - * - * @return a map of objects + * Get funcTypes + * @return funcTypes */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public FunctionType getFuncTypes() { + return funcTypes; } - /** - * 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); + public void setFuncTypes(@javax.annotation.Nullable FunctionType funcTypes) { + this.funcTypes = funcTypes; } + @Override public boolean equals(Object o) { if (this == o) { @@ -167,34 +122,21 @@ public boolean equals(Object o) { return false; } FunctionInfo functionInfo = (FunctionInfo) o; - return Objects.equals(this.funcTypes, functionInfo.funcTypes) && - Objects.equals(this.funcDeps, functionInfo.funcDeps)&& - Objects.equals(this.additionalProperties, functionInfo.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())); + return Objects.equals(this.funcDeps, functionInfo.funcDeps) && + Objects.equals(this.funcTypes, functionInfo.funcTypes); } @Override public int hashCode() { - return Objects.hash(funcTypes, funcDeps, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(funcDeps, funcTypes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FunctionInfo {\n"); - sb.append(" funcTypes: ").append(toIndentedString(funcTypes)).append("\n"); sb.append(" funcDeps: ").append(toIndentedString(funcDeps)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" funcTypes: ").append(toIndentedString(funcTypes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -213,7 +155,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("func_types", "func_deps")); + openapiFields = new HashSet(Arrays.asList("func_deps", "func_types")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("func_deps")); @@ -232,6 +174,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionInfo.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -239,20 +189,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `func_types` - if (jsonObj.get("func_types") != null && !jsonObj.get("func_types").isJsonNull()) { - FunctionType.validateJsonElement(jsonObj.get("func_types")); - } - if (jsonObj.get("func_deps") != null) { + if (jsonObj.get("func_deps") != null && !jsonObj.get("func_deps").isJsonNull()) { if (!jsonObj.get("func_deps").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `func_deps` to be an array in the JSON string but got `%s`", jsonObj.get("func_deps").toString())); } JsonArray jsonArrayfuncDeps = jsonObj.getAsJsonArray("func_deps"); // validate the required field `func_deps` (array) for (int i = 0; i < jsonArrayfuncDeps.size(); i++) { - FuncDepsInner.validateJsonElement(jsonArrayfuncDeps.get(i)); + FunctionDependency.validateJsonElement(jsonArrayfuncDeps.get(i)); } } + // validate the optional field `func_types` + if (jsonObj.get("func_types") != null && !jsonObj.get("func_types").isJsonNull()) { + FunctionType.validateJsonElement(jsonObj.get("func_types")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -270,28 +220,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionInfo 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); } @@ -299,28 +227,7 @@ else if (entry.getValue() instanceof Character) public FunctionInfo read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionInfo 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionMatch.java b/src/main/java/ai/reveng/model/FunctionMatch.java index 7c36dff1..61643554 100644 --- a/src/main/java/ai/reveng/model/FunctionMatch.java +++ b/src/main/java/ai/reveng/model/FunctionMatch.java @@ -54,6 +54,11 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FunctionMatch { + public static final String SERIALIZED_NAME_CONFIDENCES = "confidences"; + @SerializedName(SERIALIZED_NAME_CONFIDENCES) + @javax.annotation.Nullable + private List confidences; + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; @SerializedName(SERIALIZED_NAME_FUNCTION_ID) @javax.annotation.Nonnull @@ -61,24 +66,46 @@ public class FunctionMatch { public static final String SERIALIZED_NAME_MATCHED_FUNCTIONS = "matched_functions"; @SerializedName(SERIALIZED_NAME_MATCHED_FUNCTIONS) - @javax.annotation.Nonnull - private List matchedFunctions = new ArrayList<>(); - - public static final String SERIALIZED_NAME_CONFIDENCES = "confidences"; - @SerializedName(SERIALIZED_NAME_CONFIDENCES) @javax.annotation.Nullable - private List confidences; + private List matchedFunctions; public FunctionMatch() { } + public FunctionMatch confidences(@javax.annotation.Nullable List confidences) { + this.confidences = confidences; + return this; + } + + public FunctionMatch addConfidencesItem(NameConfidence confidencesItem) { + if (this.confidences == null) { + this.confidences = new ArrayList<>(); + } + this.confidences.add(confidencesItem); + return this; + } + + /** + * Per-name confidences when canonify was requested + * @return confidences + */ + @javax.annotation.Nullable + public List getConfidences() { + return confidences; + } + + public void setConfidences(@javax.annotation.Nullable List confidences) { + this.confidences = confidences; + } + + public FunctionMatch functionId(@javax.annotation.Nonnull Long functionId) { this.functionId = functionId; return this; } /** - * Unique identifier of the function + * Source function ID * @return functionId */ @javax.annotation.Nonnull @@ -91,7 +118,7 @@ public void setFunctionId(@javax.annotation.Nonnull Long functionId) { } - public FunctionMatch matchedFunctions(@javax.annotation.Nonnull List matchedFunctions) { + public FunctionMatch matchedFunctions(@javax.annotation.Nullable List matchedFunctions) { this.matchedFunctions = matchedFunctions; return this; } @@ -105,90 +132,19 @@ public FunctionMatch addMatchedFunctionsItem(MatchedFunction matchedFunctionsIte } /** - * Get matchedFunctions + * Top candidate matches in similarity-descending order * @return matchedFunctions */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getMatchedFunctions() { return matchedFunctions; } - public void setMatchedFunctions(@javax.annotation.Nonnull List matchedFunctions) { + public void setMatchedFunctions(@javax.annotation.Nullable List matchedFunctions) { this.matchedFunctions = matchedFunctions; } - public FunctionMatch confidences(@javax.annotation.Nullable List confidences) { - this.confidences = confidences; - return this; - } - - public FunctionMatch addConfidencesItem(NameConfidence confidencesItem) { - if (this.confidences == null) { - this.confidences = new ArrayList<>(); - } - this.confidences.add(confidencesItem); - return this; - } - - /** - * Get confidences - * @return confidences - */ - @javax.annotation.Nullable - public List getConfidences() { - return confidences; - } - - public void setConfidences(@javax.annotation.Nullable List confidences) { - this.confidences = confidences; - } - - /** - * 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 FunctionMatch instance itself - */ - public FunctionMatch 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) { @@ -199,10 +155,9 @@ public boolean equals(Object o) { return false; } FunctionMatch functionMatch = (FunctionMatch) o; - return Objects.equals(this.functionId, functionMatch.functionId) && - Objects.equals(this.matchedFunctions, functionMatch.matchedFunctions) && - Objects.equals(this.confidences, functionMatch.confidences)&& - Objects.equals(this.additionalProperties, functionMatch.additionalProperties); + return Objects.equals(this.confidences, functionMatch.confidences) && + Objects.equals(this.functionId, functionMatch.functionId) && + Objects.equals(this.matchedFunctions, functionMatch.matchedFunctions); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -211,7 +166,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(functionId, matchedFunctions, confidences, additionalProperties); + return Objects.hash(confidences, functionId, matchedFunctions); } private static int hashCodeNullable(JsonNullable a) { @@ -225,10 +180,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FunctionMatch {\n"); + sb.append(" confidences: ").append(toIndentedString(confidences)).append("\n"); sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); sb.append(" matchedFunctions: ").append(toIndentedString(matchedFunctions)).append("\n"); - sb.append(" confidences: ").append(toIndentedString(confidences)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -247,7 +201,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("function_id", "matched_functions", "confidences")); + openapiFields = new HashSet(Arrays.asList("confidences", "function_id", "matched_functions")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("function_id", "matched_functions")); @@ -266,6 +220,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionMatch.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionMatch` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionMatch.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -273,16 +235,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("matched_functions") != null) { - if (!jsonObj.get("matched_functions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `matched_functions` to be an array in the JSON string but got `%s`", jsonObj.get("matched_functions").toString())); - } - JsonArray jsonArraymatchedFunctions = jsonObj.getAsJsonArray("matched_functions"); - // validate the required field `matched_functions` (array) - for (int i = 0; i < jsonArraymatchedFunctions.size(); i++) { - MatchedFunction.validateJsonElement(jsonArraymatchedFunctions.get(i)); - } - } if (jsonObj.get("confidences") != null && !jsonObj.get("confidences").isJsonNull()) { JsonArray jsonArrayconfidences = jsonObj.getAsJsonArray("confidences"); if (jsonArrayconfidences != null) { @@ -297,6 +249,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + if (jsonObj.get("matched_functions") != null && !jsonObj.get("matched_functions").isJsonNull()) { + if (!jsonObj.get("matched_functions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `matched_functions` to be an array in the JSON string but got `%s`", jsonObj.get("matched_functions").toString())); + } + JsonArray jsonArraymatchedFunctions = jsonObj.getAsJsonArray("matched_functions"); + // validate the required field `matched_functions` (array) + for (int i = 0; i < jsonArraymatchedFunctions.size(); i++) { + MatchedFunction.validateJsonElement(jsonArraymatchedFunctions.get(i)); + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -314,28 +276,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionMatch 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); } @@ -343,28 +283,7 @@ else if (entry.getValue() instanceof Character) public FunctionMatch read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionMatch 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionMatchingResponse.java b/src/main/java/ai/reveng/model/FunctionMatchingResponse.java index e83da28c..2cf5616c 100644 --- a/src/main/java/ai/reveng/model/FunctionMatchingResponse.java +++ b/src/main/java/ai/reveng/model/FunctionMatchingResponse.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.FunctionMatch; +import ai.reveng.model.V2FunctionMatch; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -86,7 +86,7 @@ public class FunctionMatchingResponse { public static final String SERIALIZED_NAME_MATCHES = "matches"; @SerializedName(SERIALIZED_NAME_MATCHES) @javax.annotation.Nullable - private List matches; + private List matches; public static final String SERIALIZED_NAME_NUM_MATCHES = "num_matches"; @SerializedName(SERIALIZED_NAME_NUM_MATCHES) @@ -220,12 +220,12 @@ public void setTotalPages(@javax.annotation.Nullable Integer totalPages) { } - public FunctionMatchingResponse matches(@javax.annotation.Nullable List matches) { + public FunctionMatchingResponse matches(@javax.annotation.Nullable List matches) { this.matches = matches; return this; } - public FunctionMatchingResponse addMatchesItem(FunctionMatch matchesItem) { + public FunctionMatchingResponse addMatchesItem(V2FunctionMatch matchesItem) { if (this.matches == null) { this.matches = new ArrayList<>(); } @@ -238,11 +238,11 @@ public FunctionMatchingResponse addMatchesItem(FunctionMatch matchesItem) { * @return matches */ @javax.annotation.Nullable - public List getMatches() { + public List getMatches() { return matches; } - public void setMatches(@javax.annotation.Nullable List matches) { + public void setMatches(@javax.annotation.Nullable List matches) { this.matches = matches; } @@ -455,7 +455,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `matches` (array) for (int i = 0; i < jsonArraymatches.size(); i++) { - FunctionMatch.validateJsonElement(jsonArraymatches.get(i)); + V2FunctionMatch.validateJsonElement(jsonArraymatches.get(i)); }; } } diff --git a/src/main/java/ai/reveng/model/FunctionStackVariable.java b/src/main/java/ai/reveng/model/FunctionStackVariable.java index 6a5de235..b54a14aa 100644 --- a/src/main/java/ai/reveng/model/FunctionStackVariable.java +++ b/src/main/java/ai/reveng/model/FunctionStackVariable.java @@ -20,7 +20,6 @@ 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; @@ -62,7 +61,7 @@ public class FunctionStackVariable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OFFSET = "offset"; @@ -82,7 +81,7 @@ public class FunctionStackVariable { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String type; public FunctionStackVariable() { @@ -113,7 +112,7 @@ public FunctionStackVariable lastChange(@javax.annotation.Nullable String lastCh } /** - * Search is applied to string value + * Get lastChange * @return lastChange */ @javax.annotation.Nullable @@ -126,21 +125,21 @@ public void setLastChange(@javax.annotation.Nullable String lastChange) { } - public FunctionStackVariable name(@javax.annotation.Nullable String name) { + public FunctionStackVariable name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Search is applied to string value + * Get name * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } @@ -170,7 +169,7 @@ public FunctionStackVariable scope(@javax.annotation.Nullable String scope) { } /** - * Search is applied to string value + * Get scope * @return scope */ @javax.annotation.Nullable @@ -202,68 +201,24 @@ public void setSize(@javax.annotation.Nonnull Long size) { } - public FunctionStackVariable type(@javax.annotation.Nullable String type) { + public FunctionStackVariable type(@javax.annotation.Nonnull String type) { this.type = type; return this; } /** - * Search is applied to string value + * Get type * @return type */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getType() { return type; } - public void setType(@javax.annotation.Nullable String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - /** - * 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 FunctionStackVariable instance itself - */ - public FunctionStackVariable 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 @@ -281,24 +236,12 @@ public boolean equals(Object o) { Objects.equals(this.offset, functionStackVariable.offset) && Objects.equals(this.scope, functionStackVariable.scope) && Objects.equals(this.size, functionStackVariable.size) && - Objects.equals(this.type, functionStackVariable.type)&& - Objects.equals(this.additionalProperties, functionStackVariable.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())); + Objects.equals(this.type, functionStackVariable.type); } @Override public int hashCode() { - return Objects.hash(addr, lastChange, name, offset, scope, size, type, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(addr, lastChange, name, offset, scope, size, type); } @Override @@ -312,7 +255,6 @@ public String toString() { sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -350,6 +292,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionStackVariable.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionStackVariable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionStackVariable.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -360,13 +310,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -386,28 +336,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionStackVariable 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); } @@ -415,28 +343,7 @@ else if (entry.getValue() instanceof Character) public FunctionStackVariable read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionStackVariable 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/FunctionType.java b/src/main/java/ai/reveng/model/FunctionType.java index 2241523d..35f8eccc 100644 --- a/src/main/java/ai/reveng/model/FunctionType.java +++ b/src/main/java/ai/reveng/model/FunctionType.java @@ -14,7 +14,7 @@ import java.util.Objects; import ai.reveng.model.FunctionHeader; -import ai.reveng.model.StackVariable; +import ai.reveng.model.FunctionStackVariable; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,7 +24,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,103 +53,89 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FunctionType { - public static final String SERIALIZED_NAME_LAST_CHANGE = "last_change"; - @SerializedName(SERIALIZED_NAME_LAST_CHANGE) - @javax.annotation.Nullable - private String lastChange; - public static final String SERIALIZED_NAME_ADDR = "addr"; @SerializedName(SERIALIZED_NAME_ADDR) @javax.annotation.Nonnull - private Integer addr; + private Long addr; - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - @javax.annotation.Nonnull - private Integer size; + public static final String SERIALIZED_NAME_ARTIFACT_TYPE = "artifact_type"; + @SerializedName(SERIALIZED_NAME_ARTIFACT_TYPE) + @javax.annotation.Nullable + private String artifactType; public static final String SERIALIZED_NAME_HEADER = "header"; @SerializedName(SERIALIZED_NAME_HEADER) @javax.annotation.Nonnull private FunctionHeader header; - public static final String SERIALIZED_NAME_STACK_VARS = "stack_vars"; - @SerializedName(SERIALIZED_NAME_STACK_VARS) + public static final String SERIALIZED_NAME_LAST_CHANGE = "last_change"; + @SerializedName(SERIALIZED_NAME_LAST_CHANGE) @javax.annotation.Nullable - private Map stackVars; + private String lastChange; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull private String name; + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nullable + private String scope; + + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + @javax.annotation.Nonnull + private Long size; + + public static final String SERIALIZED_NAME_STACK_VARS = "stack_vars"; + @SerializedName(SERIALIZED_NAME_STACK_VARS) + @javax.annotation.Nullable + private Map stackVars = new HashMap<>(); + public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull private String type; - public static final String SERIALIZED_NAME_ARTIFACT_TYPE = "artifact_type"; - @SerializedName(SERIALIZED_NAME_ARTIFACT_TYPE) - @javax.annotation.Nullable - private String artifactType = "Function"; - public FunctionType() { } - public FunctionType lastChange(@javax.annotation.Nullable String lastChange) { - this.lastChange = lastChange; - return this; - } - - /** - * Timestamp of the last change to this function type - * @return lastChange - */ - @javax.annotation.Nullable - public String getLastChange() { - return lastChange; - } - - public void setLastChange(@javax.annotation.Nullable String lastChange) { - this.lastChange = lastChange; - } - - - public FunctionType addr(@javax.annotation.Nonnull Integer addr) { + public FunctionType addr(@javax.annotation.Nonnull Long addr) { this.addr = addr; return this; } /** - * Memory address of the function + * Get addr * @return addr */ @javax.annotation.Nonnull - public Integer getAddr() { + public Long getAddr() { return addr; } - public void setAddr(@javax.annotation.Nonnull Integer addr) { + public void setAddr(@javax.annotation.Nonnull Long addr) { this.addr = addr; } - public FunctionType size(@javax.annotation.Nonnull Integer size) { - this.size = size; + public FunctionType artifactType(@javax.annotation.Nullable String artifactType) { + this.artifactType = artifactType; return this; } /** - * Size of the function in bytes - * @return size + * Get artifactType + * @return artifactType */ - @javax.annotation.Nonnull - public Integer getSize() { - return size; + @javax.annotation.Nullable + public String getArtifactType() { + return artifactType; } - public void setSize(@javax.annotation.Nonnull Integer size) { - this.size = size; + public void setArtifactType(@javax.annotation.Nullable String artifactType) { + this.artifactType = artifactType; } @@ -160,7 +145,7 @@ public FunctionType header(@javax.annotation.Nonnull FunctionHeader header) { } /** - * Function header information + * Get header * @return header */ @javax.annotation.Nonnull @@ -173,30 +158,22 @@ public void setHeader(@javax.annotation.Nonnull FunctionHeader header) { } - public FunctionType stackVars(@javax.annotation.Nullable Map stackVars) { - this.stackVars = stackVars; - return this; - } - - public FunctionType putStackVarsItem(String key, StackVariable stackVarsItem) { - if (this.stackVars == null) { - this.stackVars = new HashMap<>(); - } - this.stackVars.put(key, stackVarsItem); + public FunctionType lastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; return this; } /** - * Dictionary of stack variables - * @return stackVars + * Get lastChange + * @return lastChange */ @javax.annotation.Nullable - public Map getStackVars() { - return stackVars; + public String getLastChange() { + return lastChange; } - public void setStackVars(@javax.annotation.Nullable Map stackVars) { - this.stackVars = stackVars; + public void setLastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; } @@ -206,7 +183,7 @@ public FunctionType name(@javax.annotation.Nonnull String name) { } /** - * Name of the function + * Get name * @return name */ @javax.annotation.Nonnull @@ -219,88 +196,90 @@ public void setName(@javax.annotation.Nonnull String name) { } - public FunctionType type(@javax.annotation.Nonnull String type) { - this.type = type; + public FunctionType scope(@javax.annotation.Nullable String scope) { + this.scope = scope; return this; } /** - * Return type of the function - * @return type + * Get scope + * @return scope */ - @javax.annotation.Nonnull - public String getType() { - return type; + @javax.annotation.Nullable + public String getScope() { + return scope; } - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; + public void setScope(@javax.annotation.Nullable String scope) { + this.scope = scope; } - public FunctionType artifactType(@javax.annotation.Nullable String artifactType) { - this.artifactType = artifactType; + public FunctionType size(@javax.annotation.Nonnull Long size) { + this.size = size; return this; } /** - * Type of artifact that the structure is associated with - * @return artifactType + * Get size + * @return size */ - @javax.annotation.Nullable - public String getArtifactType() { - return artifactType; + @javax.annotation.Nonnull + public Long getSize() { + return size; } - public void setArtifactType(@javax.annotation.Nullable String artifactType) { - this.artifactType = artifactType; + public void setSize(@javax.annotation.Nonnull Long size) { + this.size = size; } - /** - * 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 FunctionType instance itself - */ - public FunctionType putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + public FunctionType stackVars(@javax.annotation.Nullable Map stackVars) { + this.stackVars = stackVars; + return this; + } + + public FunctionType putStackVarsItem(String key, FunctionStackVariable stackVarsItem) { + if (this.stackVars == null) { + this.stackVars = new HashMap<>(); } - this.additionalProperties.put(key, value); + this.stackVars.put(key, stackVarsItem); return this; } /** - * Return the additional (undeclared) property. - * - * @return a map of objects + * Stack variables keyed by offset hex. + * @return stackVars */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public Map getStackVars() { + return stackVars; + } + + public void setStackVars(@javax.annotation.Nullable Map stackVars) { + this.stackVars = stackVars; + } + + + public FunctionType type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; } /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object + * Get type + * @return type */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + @javax.annotation.Nonnull + public String getType() { + return type; } + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + @Override public boolean equals(Object o) { @@ -311,46 +290,35 @@ public boolean equals(Object o) { return false; } FunctionType functionType = (FunctionType) o; - return Objects.equals(this.lastChange, functionType.lastChange) && - Objects.equals(this.addr, functionType.addr) && - Objects.equals(this.size, functionType.size) && + return Objects.equals(this.addr, functionType.addr) && + Objects.equals(this.artifactType, functionType.artifactType) && Objects.equals(this.header, functionType.header) && - Objects.equals(this.stackVars, functionType.stackVars) && + Objects.equals(this.lastChange, functionType.lastChange) && Objects.equals(this.name, functionType.name) && - Objects.equals(this.type, functionType.type) && - Objects.equals(this.artifactType, functionType.artifactType)&& - Objects.equals(this.additionalProperties, functionType.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())); + Objects.equals(this.scope, functionType.scope) && + Objects.equals(this.size, functionType.size) && + Objects.equals(this.stackVars, functionType.stackVars) && + Objects.equals(this.type, functionType.type); } @Override public int hashCode() { - return Objects.hash(lastChange, addr, size, header, stackVars, name, type, artifactType, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(addr, artifactType, header, lastChange, name, scope, size, stackVars, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FunctionType {\n"); - sb.append(" lastChange: ").append(toIndentedString(lastChange)).append("\n"); sb.append(" addr: ").append(toIndentedString(addr)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" artifactType: ").append(toIndentedString(artifactType)).append("\n"); sb.append(" header: ").append(toIndentedString(header)).append("\n"); - sb.append(" stackVars: ").append(toIndentedString(stackVars)).append("\n"); + sb.append(" lastChange: ").append(toIndentedString(lastChange)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" stackVars: ").append(toIndentedString(stackVars)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" artifactType: ").append(toIndentedString(artifactType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -369,10 +337,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("last_change", "addr", "size", "header", "stack_vars", "name", "type", "artifact_type")); + openapiFields = new HashSet(Arrays.asList("addr", "artifact_type", "header", "last_change", "name", "scope", "size", "stack_vars", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("addr", "size", "header", "name", "type")); + openapiRequiredFields = new HashSet(Arrays.asList("addr", "header", "name", "size", "type")); } /** @@ -388,6 +356,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FunctionType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FunctionType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FunctionType.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -395,20 +371,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); + if ((jsonObj.get("artifact_type") != null && !jsonObj.get("artifact_type").isJsonNull()) && !jsonObj.get("artifact_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `artifact_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("artifact_type").toString())); } // validate the required field `header` FunctionHeader.validateJsonElement(jsonObj.get("header")); + if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); + } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - if ((jsonObj.get("artifact_type") != null && !jsonObj.get("artifact_type").isJsonNull()) && !jsonObj.get("artifact_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `artifact_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("artifact_type").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -426,28 +405,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FunctionType 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); } @@ -455,28 +412,7 @@ else if (entry.getValue() instanceof Character) public FunctionType read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FunctionType 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/MatchedFunction.java b/src/main/java/ai/reveng/model/MatchedFunction.java index 2fabc40d..3ff49533 100644 --- a/src/main/java/ai/reveng/model/MatchedFunction.java +++ b/src/main/java/ai/reveng/model/MatchedFunction.java @@ -19,9 +19,7 @@ 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.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,15 +49,35 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MatchedFunction { - public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; - @SerializedName(SERIALIZED_NAME_FUNCTION_ID) + public static final String SERIALIZED_NAME_ANALYSIS_ID = "analysis_id"; + @SerializedName(SERIALIZED_NAME_ANALYSIS_ID) @javax.annotation.Nonnull - private Long functionId; + private Long analysisId; public static final String SERIALIZED_NAME_BINARY_ID = "binary_id"; @SerializedName(SERIALIZED_NAME_BINARY_ID) @javax.annotation.Nonnull - private Integer binaryId; + private Long 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_CONFIDENCE = "confidence"; + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nonnull + private Double confidence; + + public static final String SERIALIZED_NAME_DEBUG = "debug"; + @SerializedName(SERIALIZED_NAME_DEBUG) + @javax.annotation.Nonnull + private Boolean debug; + + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; + @SerializedName(SERIALIZED_NAME_FUNCTION_ID) + @javax.annotation.Nonnull + private Long functionId; public static final String SERIALIZED_NAME_FUNCTION_NAME = "function_name"; @SerializedName(SERIALIZED_NAME_FUNCTION_NAME) @@ -76,245 +94,225 @@ public class MatchedFunction { @javax.annotation.Nonnull private String mangledName; - public static final String SERIALIZED_NAME_DEBUG = "debug"; - @SerializedName(SERIALIZED_NAME_DEBUG) - @javax.annotation.Nonnull - private Boolean debug; - - 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_ID = "analysis_id"; - @SerializedName(SERIALIZED_NAME_ANALYSIS_ID) - @javax.annotation.Nonnull - private Integer analysisId; - public static final String SERIALIZED_NAME_SIMILARITY = "similarity"; @SerializedName(SERIALIZED_NAME_SIMILARITY) - @javax.annotation.Nullable - private BigDecimal similarity; - - public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; - @SerializedName(SERIALIZED_NAME_CONFIDENCE) - @javax.annotation.Nullable - private BigDecimal confidence; + @javax.annotation.Nonnull + private Double similarity; public MatchedFunction() { } - public MatchedFunction functionId(@javax.annotation.Nonnull Long functionId) { - this.functionId = functionId; + public MatchedFunction analysisId(@javax.annotation.Nonnull Long analysisId) { + this.analysisId = analysisId; return this; } /** - * Unique identifier of the matched function - * @return functionId + * Analysis the candidate's binary belongs to + * @return analysisId */ @javax.annotation.Nonnull - public Long getFunctionId() { - return functionId; + public Long getAnalysisId() { + return analysisId; } - public void setFunctionId(@javax.annotation.Nonnull Long functionId) { - this.functionId = functionId; + public void setAnalysisId(@javax.annotation.Nonnull Long analysisId) { + this.analysisId = analysisId; } - public MatchedFunction binaryId(@javax.annotation.Nonnull Integer binaryId) { + public MatchedFunction binaryId(@javax.annotation.Nonnull Long binaryId) { this.binaryId = binaryId; return this; } /** - * Get binaryId + * Binary the candidate belongs to * @return binaryId */ @javax.annotation.Nonnull - public Integer getBinaryId() { + public Long getBinaryId() { return binaryId; } - public void setBinaryId(@javax.annotation.Nonnull Integer binaryId) { + public void setBinaryId(@javax.annotation.Nonnull Long binaryId) { this.binaryId = binaryId; } - public MatchedFunction functionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; + public MatchedFunction binaryName(@javax.annotation.Nonnull String binaryName) { + this.binaryName = binaryName; return this; } /** - * Get functionName - * @return functionName + * Binary name + * @return binaryName */ @javax.annotation.Nonnull - public String getFunctionName() { - return functionName; + public String getBinaryName() { + return binaryName; } - public void setFunctionName(@javax.annotation.Nonnull String functionName) { - this.functionName = functionName; + public void setBinaryName(@javax.annotation.Nonnull String binaryName) { + this.binaryName = binaryName; } - public MatchedFunction functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { - this.functionVaddr = functionVaddr; + public MatchedFunction confidence(@javax.annotation.Nonnull Double confidence) { + this.confidence = confidence; return this; } /** - * Get functionVaddr - * @return functionVaddr + * Softmax-normalised confidence over the candidate pool + * @return confidence */ @javax.annotation.Nonnull - public Long getFunctionVaddr() { - return functionVaddr; + public Double getConfidence() { + return confidence; } - public void setFunctionVaddr(@javax.annotation.Nonnull Long functionVaddr) { - this.functionVaddr = functionVaddr; + public void setConfidence(@javax.annotation.Nonnull Double confidence) { + this.confidence = confidence; } - public MatchedFunction mangledName(@javax.annotation.Nonnull String mangledName) { - this.mangledName = mangledName; + public MatchedFunction debug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; return this; } /** - * Get mangledName - * @return mangledName + * Whether the candidate's name came from debug info + * @return debug */ @javax.annotation.Nonnull - public String getMangledName() { - return mangledName; + public Boolean getDebug() { + return debug; } - public void setMangledName(@javax.annotation.Nonnull String mangledName) { - this.mangledName = mangledName; + public void setDebug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; } - public MatchedFunction debug(@javax.annotation.Nonnull Boolean debug) { - this.debug = debug; + public MatchedFunction functionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; return this; } /** - * Get debug - * @return debug + * Candidate function ID + * @return functionId */ @javax.annotation.Nonnull - public Boolean getDebug() { - return debug; + public Long getFunctionId() { + return functionId; } - public void setDebug(@javax.annotation.Nonnull Boolean debug) { - this.debug = debug; + public void setFunctionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; } - public MatchedFunction binaryName(@javax.annotation.Nonnull String binaryName) { - this.binaryName = binaryName; + public MatchedFunction functionName(@javax.annotation.Nonnull String functionName) { + this.functionName = functionName; return this; } /** - * Get binaryName - * @return binaryName + * Candidate function name + * @return functionName */ @javax.annotation.Nonnull - public String getBinaryName() { - return binaryName; + public String getFunctionName() { + return functionName; } - public void setBinaryName(@javax.annotation.Nonnull String binaryName) { - this.binaryName = binaryName; + public void setFunctionName(@javax.annotation.Nonnull String functionName) { + this.functionName = functionName; } - public MatchedFunction sha256Hash(@javax.annotation.Nonnull String sha256Hash) { - this.sha256Hash = sha256Hash; + public MatchedFunction functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { + this.functionVaddr = functionVaddr; return this; } /** - * Get sha256Hash - * @return sha256Hash + * Candidate's virtual address inside its binary + * @return functionVaddr */ @javax.annotation.Nonnull - public String getSha256Hash() { - return sha256Hash; + public Long getFunctionVaddr() { + return functionVaddr; } - public void setSha256Hash(@javax.annotation.Nonnull String sha256Hash) { - this.sha256Hash = sha256Hash; + public void setFunctionVaddr(@javax.annotation.Nonnull Long functionVaddr) { + this.functionVaddr = functionVaddr; } - public MatchedFunction analysisId(@javax.annotation.Nonnull Integer analysisId) { - this.analysisId = analysisId; + public MatchedFunction mangledName(@javax.annotation.Nonnull String mangledName) { + this.mangledName = mangledName; return this; } /** - * Get analysisId - * @return analysisId + * Mangled name when available + * @return mangledName */ @javax.annotation.Nonnull - public Integer getAnalysisId() { - return analysisId; + public String getMangledName() { + return mangledName; } - public void setAnalysisId(@javax.annotation.Nonnull Integer analysisId) { - this.analysisId = analysisId; + public void setMangledName(@javax.annotation.Nonnull String mangledName) { + this.mangledName = mangledName; } - public MatchedFunction similarity(@javax.annotation.Nullable BigDecimal similarity) { - this.similarity = similarity; + public MatchedFunction sha256Hash(@javax.annotation.Nonnull String sha256Hash) { + this.sha256Hash = sha256Hash; return this; } /** - * Get similarity - * @return similarity + * SHA-256 of the candidate's binary + * @return sha256Hash */ - @javax.annotation.Nullable - public BigDecimal getSimilarity() { - return similarity; + @javax.annotation.Nonnull + public String getSha256Hash() { + return sha256Hash; } - public void setSimilarity(@javax.annotation.Nullable BigDecimal similarity) { - this.similarity = similarity; + public void setSha256Hash(@javax.annotation.Nonnull String sha256Hash) { + this.sha256Hash = sha256Hash; } - public MatchedFunction confidence(@javax.annotation.Nullable BigDecimal confidence) { - this.confidence = confidence; + public MatchedFunction similarity(@javax.annotation.Nonnull Double similarity) { + this.similarity = similarity; return this; } /** - * Get confidence - * @return confidence + * Cosine similarity scaled to a percentage + * @return similarity */ - @javax.annotation.Nullable - public BigDecimal getConfidence() { - return confidence; + @javax.annotation.Nonnull + public Double getSimilarity() { + return similarity; } - public void setConfidence(@javax.annotation.Nullable BigDecimal confidence) { - this.confidence = confidence; + public void setSimilarity(@javax.annotation.Nonnull Double similarity) { + this.similarity = similarity; } /** @@ -372,51 +370,40 @@ public boolean equals(Object o) { return false; } MatchedFunction matchedFunction = (MatchedFunction) o; - return Objects.equals(this.functionId, matchedFunction.functionId) && + return Objects.equals(this.analysisId, matchedFunction.analysisId) && Objects.equals(this.binaryId, matchedFunction.binaryId) && + Objects.equals(this.binaryName, matchedFunction.binaryName) && + Objects.equals(this.confidence, matchedFunction.confidence) && + Objects.equals(this.debug, matchedFunction.debug) && + Objects.equals(this.functionId, matchedFunction.functionId) && Objects.equals(this.functionName, matchedFunction.functionName) && Objects.equals(this.functionVaddr, matchedFunction.functionVaddr) && Objects.equals(this.mangledName, matchedFunction.mangledName) && - Objects.equals(this.debug, matchedFunction.debug) && - Objects.equals(this.binaryName, matchedFunction.binaryName) && Objects.equals(this.sha256Hash, matchedFunction.sha256Hash) && - Objects.equals(this.analysisId, matchedFunction.analysisId) && - Objects.equals(this.similarity, matchedFunction.similarity) && - Objects.equals(this.confidence, matchedFunction.confidence)&& + Objects.equals(this.similarity, matchedFunction.similarity)&& Objects.equals(this.additionalProperties, matchedFunction.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(functionId, binaryId, functionName, functionVaddr, mangledName, debug, binaryName, sha256Hash, analysisId, similarity, confidence, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(analysisId, binaryId, binaryName, confidence, debug, functionId, functionName, functionVaddr, mangledName, sha256Hash, similarity, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MatchedFunction {\n"); - sb.append(" functionId: ").append(toIndentedString(functionId)).append("\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(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" debug: ").append(toIndentedString(debug)).append("\n"); + sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n"); sb.append(" functionVaddr: ").append(toIndentedString(functionVaddr)).append("\n"); sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n"); - sb.append(" debug: ").append(toIndentedString(debug)).append("\n"); - sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); sb.append(" sha256Hash: ").append(toIndentedString(sha256Hash)).append("\n"); - sb.append(" analysisId: ").append(toIndentedString(analysisId)).append("\n"); sb.append(" similarity: ").append(toIndentedString(similarity)).append("\n"); - sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -436,10 +423,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("function_id", "binary_id", "function_name", "function_vaddr", "mangled_name", "debug", "binary_name", "sha_256_hash", "analysis_id", "similarity", "confidence")); + openapiFields = new HashSet(Arrays.asList("analysis_id", "binary_id", "binary_name", "confidence", "debug", "function_id", "function_name", "function_vaddr", "mangled_name", "sha_256_hash", "similarity")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_id", "binary_id", "function_name", "function_vaddr", "mangled_name", "debug", "binary_name", "sha_256_hash", "analysis_id")); + openapiRequiredFields = new HashSet(Arrays.asList("analysis_id", "binary_id", "binary_name", "confidence", "debug", "function_id", "function_name", "function_vaddr", "mangled_name", "sha_256_hash", "similarity")); } /** @@ -462,15 +449,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("binary_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.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("function_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("function_name").toString())); } if (!jsonObj.get("mangled_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mangled_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mangled_name").toString())); } - if (!jsonObj.get("binary_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.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(java.util.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())); } diff --git a/src/main/java/ai/reveng/model/NameConfidence.java b/src/main/java/ai/reveng/model/NameConfidence.java index 7a7c5cf2..767d48af 100644 --- a/src/main/java/ai/reveng/model/NameConfidence.java +++ b/src/main/java/ai/reveng/model/NameConfidence.java @@ -19,7 +19,6 @@ 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; @@ -50,104 +49,58 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class NameConfidence { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; @SerializedName(SERIALIZED_NAME_CONFIDENCE) @javax.annotation.Nonnull - private BigDecimal confidence; - - public NameConfidence() { - } - - public NameConfidence name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } + private Double confidence; - /** - * The suggested function name - * @return name - */ + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull - public String getName() { - return name; - } + private String name; - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; + public NameConfidence() { } - - public NameConfidence confidence(@javax.annotation.Nonnull BigDecimal confidence) { + public NameConfidence confidence(@javax.annotation.Nonnull Double confidence) { this.confidence = confidence; return this; } /** - * Confidence score as a percentage - * minimum: 0 - * maximum: 100 + * Softmax-normalised confidence for this name * @return confidence */ @javax.annotation.Nonnull - public BigDecimal getConfidence() { + public Double getConfidence() { return confidence; } - public void setConfidence(@javax.annotation.Nonnull BigDecimal confidence) { + public void setConfidence(@javax.annotation.Nonnull Double confidence) { this.confidence = confidence; } - /** - * 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 NameConfidence instance itself - */ - public NameConfidence putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public NameConfidence name(@javax.annotation.Nonnull String name) { + this.name = name; return this; } /** - * Return the additional (undeclared) property. - * - * @return a map of objects + * Candidate name + * @return name */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nonnull + public String getName() { + return name; } - /** - * 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); + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { @@ -157,23 +110,21 @@ public boolean equals(Object o) { return false; } NameConfidence nameConfidence = (NameConfidence) o; - return Objects.equals(this.name, nameConfidence.name) && - Objects.equals(this.confidence, nameConfidence.confidence)&& - Objects.equals(this.additionalProperties, nameConfidence.additionalProperties); + return Objects.equals(this.confidence, nameConfidence.confidence) && + Objects.equals(this.name, nameConfidence.name); } @Override public int hashCode() { - return Objects.hash(name, confidence, additionalProperties); + return Objects.hash(confidence, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NameConfidence {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); } @@ -192,10 +143,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "confidence")); + openapiFields = new HashSet(Arrays.asList("confidence", "name")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "confidence")); + openapiRequiredFields = new HashSet(Arrays.asList("confidence", "name")); } /** @@ -211,6 +162,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NameConfidence.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NameConfidence` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NameConfidence.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -238,28 +197,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NameConfidence 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); } @@ -267,28 +204,7 @@ else if (entry.getValue() instanceof Character) public NameConfidence read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - NameConfidence 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/UpdateDataTypesInputBody.java b/src/main/java/ai/reveng/model/UpdateDataTypesInputBody.java index b7d50b7c..2cbf8882 100644 --- a/src/main/java/ai/reveng/model/UpdateDataTypesInputBody.java +++ b/src/main/java/ai/reveng/model/UpdateDataTypesInputBody.java @@ -100,50 +100,6 @@ public void setDataTypesVersion(@javax.annotation.Nonnull Long dataTypesVersion) this.dataTypesVersion = dataTypesVersion; } - /** - * 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 UpdateDataTypesInputBody instance itself - */ - public UpdateDataTypesInputBody 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 @@ -156,13 +112,12 @@ public boolean equals(Object o) { } UpdateDataTypesInputBody updateDataTypesInputBody = (UpdateDataTypesInputBody) o; return Objects.equals(this.dataTypes, updateDataTypesInputBody.dataTypes) && - Objects.equals(this.dataTypesVersion, updateDataTypesInputBody.dataTypesVersion)&& - Objects.equals(this.additionalProperties, updateDataTypesInputBody.additionalProperties); + Objects.equals(this.dataTypesVersion, updateDataTypesInputBody.dataTypesVersion); } @Override public int hashCode() { - return Objects.hash(dataTypes, dataTypesVersion, additionalProperties); + return Objects.hash(dataTypes, dataTypesVersion); } @Override @@ -171,7 +126,6 @@ public String toString() { sb.append("class UpdateDataTypesInputBody {\n"); sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); sb.append(" dataTypesVersion: ").append(toIndentedString(dataTypesVersion)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -209,6 +163,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateDataTypesInputBody.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateDataTypesInputBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateDataTypesInputBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -233,28 +195,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UpdateDataTypesInputBody 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); } @@ -262,28 +202,7 @@ else if (entry.getValue() instanceof Character) public UpdateDataTypesInputBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UpdateDataTypesInputBody 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/UpdateDataTypesOutputBody.java b/src/main/java/ai/reveng/model/UpdateDataTypesOutputBody.java index 71fc62c0..07874d0d 100644 --- a/src/main/java/ai/reveng/model/UpdateDataTypesOutputBody.java +++ b/src/main/java/ai/reveng/model/UpdateDataTypesOutputBody.java @@ -123,50 +123,6 @@ public void setFunctionId(@javax.annotation.Nonnull Long functionId) { this.functionId = functionId; } - /** - * 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 UpdateDataTypesOutputBody instance itself - */ - public UpdateDataTypesOutputBody 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 @@ -180,13 +136,12 @@ public boolean equals(Object o) { UpdateDataTypesOutputBody updateDataTypesOutputBody = (UpdateDataTypesOutputBody) o; return Objects.equals(this.dataTypes, updateDataTypesOutputBody.dataTypes) && Objects.equals(this.dataTypesVersion, updateDataTypesOutputBody.dataTypesVersion) && - Objects.equals(this.functionId, updateDataTypesOutputBody.functionId)&& - Objects.equals(this.additionalProperties, updateDataTypesOutputBody.additionalProperties); + Objects.equals(this.functionId, updateDataTypesOutputBody.functionId); } @Override public int hashCode() { - return Objects.hash(dataTypes, dataTypesVersion, functionId, additionalProperties); + return Objects.hash(dataTypes, dataTypesVersion, functionId); } @Override @@ -196,7 +151,6 @@ public String toString() { sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); sb.append(" dataTypesVersion: ").append(toIndentedString(dataTypesVersion)).append("\n"); sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -234,6 +188,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateDataTypesOutputBody.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateDataTypesOutputBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateDataTypesOutputBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -258,28 +220,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UpdateDataTypesOutputBody 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); } @@ -287,28 +227,7 @@ else if (entry.getValue() instanceof Character) public UpdateDataTypesOutputBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UpdateDataTypesOutputBody 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(java.util.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; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/ai/reveng/model/UpdateProfileInputBody.java b/src/main/java/ai/reveng/model/UpdateProfileInputBody.java index a91c8321..f691e14d 100644 --- a/src/main/java/ai/reveng/model/UpdateProfileInputBody.java +++ b/src/main/java/ai/reveng/model/UpdateProfileInputBody.java @@ -59,6 +59,11 @@ public class UpdateProfileInputBody { @javax.annotation.Nullable private String firstName; + public static final String SERIALIZED_NAME_HIDE_EXAMPLE_BINARIES = "hide_example_binaries"; + @SerializedName(SERIALIZED_NAME_HIDE_EXAMPLE_BINARIES) + @javax.annotation.Nullable + private Boolean hideExampleBinaries; + public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; @SerializedName(SERIALIZED_NAME_LAST_NAME) @javax.annotation.Nullable @@ -116,6 +121,25 @@ public void setFirstName(@javax.annotation.Nullable String firstName) { } + public UpdateProfileInputBody hideExampleBinaries(@javax.annotation.Nullable Boolean hideExampleBinaries) { + this.hideExampleBinaries = hideExampleBinaries; + return this; + } + + /** + * Hide the Examples tab in the analyses listing + * @return hideExampleBinaries + */ + @javax.annotation.Nullable + public Boolean getHideExampleBinaries() { + return hideExampleBinaries; + } + + public void setHideExampleBinaries(@javax.annotation.Nullable Boolean hideExampleBinaries) { + this.hideExampleBinaries = hideExampleBinaries; + } + + public UpdateProfileInputBody lastName(@javax.annotation.Nullable String lastName) { this.lastName = lastName; return this; @@ -229,6 +253,7 @@ public boolean equals(Object o) { UpdateProfileInputBody updateProfileInputBody = (UpdateProfileInputBody) o; return Objects.equals(this.defaultTeamId, updateProfileInputBody.defaultTeamId) && Objects.equals(this.firstName, updateProfileInputBody.firstName) && + Objects.equals(this.hideExampleBinaries, updateProfileInputBody.hideExampleBinaries) && Objects.equals(this.lastName, updateProfileInputBody.lastName) && Objects.equals(this.timeZone, updateProfileInputBody.timeZone) && Objects.equals(this.username, updateProfileInputBody.username)&& @@ -237,7 +262,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(defaultTeamId, firstName, lastName, timeZone, username, additionalProperties); + return Objects.hash(defaultTeamId, firstName, hideExampleBinaries, lastName, timeZone, username, additionalProperties); } @Override @@ -246,6 +271,7 @@ public String toString() { sb.append("class UpdateProfileInputBody {\n"); sb.append(" defaultTeamId: ").append(toIndentedString(defaultTeamId)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" hideExampleBinaries: ").append(toIndentedString(hideExampleBinaries)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); @@ -268,7 +294,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("default_team_id", "first_name", "last_name", "time_zone", "username")); + openapiFields = new HashSet(Arrays.asList("default_team_id", "first_name", "hide_example_binaries", "last_name", "time_zone", "username")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/src/main/java/ai/reveng/model/UserProfile.java b/src/main/java/ai/reveng/model/UserProfile.java index e4b800b9..b254d783 100644 --- a/src/main/java/ai/reveng/model/UserProfile.java +++ b/src/main/java/ai/reveng/model/UserProfile.java @@ -59,6 +59,11 @@ public class UserProfile { @javax.annotation.Nonnull private String firstName; + public static final String SERIALIZED_NAME_HIDE_EXAMPLE_BINARIES = "hide_example_binaries"; + @SerializedName(SERIALIZED_NAME_HIDE_EXAMPLE_BINARIES) + @javax.annotation.Nonnull + private Boolean hideExampleBinaries; + public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; @SerializedName(SERIALIZED_NAME_LAST_NAME) @javax.annotation.Nonnull @@ -115,6 +120,25 @@ public void setFirstName(@javax.annotation.Nonnull String firstName) { } + public UserProfile hideExampleBinaries(@javax.annotation.Nonnull Boolean hideExampleBinaries) { + this.hideExampleBinaries = hideExampleBinaries; + return this; + } + + /** + * Get hideExampleBinaries + * @return hideExampleBinaries + */ + @javax.annotation.Nonnull + public Boolean getHideExampleBinaries() { + return hideExampleBinaries; + } + + public void setHideExampleBinaries(@javax.annotation.Nonnull Boolean hideExampleBinaries) { + this.hideExampleBinaries = hideExampleBinaries; + } + + public UserProfile lastName(@javax.annotation.Nonnull String lastName) { this.lastName = lastName; return this; @@ -184,6 +208,7 @@ public boolean equals(Object o) { UserProfile userProfile = (UserProfile) o; return Objects.equals(this.defaultTeamId, userProfile.defaultTeamId) && Objects.equals(this.firstName, userProfile.firstName) && + Objects.equals(this.hideExampleBinaries, userProfile.hideExampleBinaries) && Objects.equals(this.lastName, userProfile.lastName) && Objects.equals(this.timeZone, userProfile.timeZone) && Objects.equals(this.username, userProfile.username); @@ -191,7 +216,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(defaultTeamId, firstName, lastName, timeZone, username); + return Objects.hash(defaultTeamId, firstName, hideExampleBinaries, lastName, timeZone, username); } @Override @@ -200,6 +225,7 @@ public String toString() { sb.append("class UserProfile {\n"); sb.append(" defaultTeamId: ").append(toIndentedString(defaultTeamId)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" hideExampleBinaries: ").append(toIndentedString(hideExampleBinaries)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); @@ -221,10 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("default_team_id", "first_name", "last_name", "time_zone", "username")); + openapiFields = new HashSet(Arrays.asList("default_team_id", "first_name", "hide_example_binaries", "last_name", "time_zone", "username")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("first_name", "last_name", "time_zone", "username")); + openapiRequiredFields = new HashSet(Arrays.asList("first_name", "hide_example_binaries", "last_name", "time_zone", "username")); } /** diff --git a/src/main/java/ai/reveng/model/V2FunctionHeader.java b/src/main/java/ai/reveng/model/V2FunctionHeader.java new file mode 100644 index 00000000..119e9121 --- /dev/null +++ b/src/main/java/ai/reveng/model/V2FunctionHeader.java @@ -0,0 +1,422 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import ai.reveng.model.Argument; +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 java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import ai.reveng.invoker.JSON; + +/** + * V2FunctionHeader + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2FunctionHeader { + public static final String SERIALIZED_NAME_LAST_CHANGE = "last_change"; + @SerializedName(SERIALIZED_NAME_LAST_CHANGE) + @javax.annotation.Nullable + private String lastChange; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ADDR = "addr"; + @SerializedName(SERIALIZED_NAME_ADDR) + @javax.annotation.Nonnull + private Integer addr; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public static final String SERIALIZED_NAME_ARGS = "args"; + @SerializedName(SERIALIZED_NAME_ARGS) + @javax.annotation.Nonnull + private Map args = new HashMap<>(); + + public V2FunctionHeader() { + } + + public V2FunctionHeader lastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; + return this; + } + + /** + * Timestamp of the last change to this function header + * @return lastChange + */ + @javax.annotation.Nullable + public String getLastChange() { + return lastChange; + } + + public void setLastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; + } + + + public V2FunctionHeader name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the function + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public V2FunctionHeader addr(@javax.annotation.Nonnull Integer addr) { + this.addr = addr; + return this; + } + + /** + * Memory address of the function + * @return addr + */ + @javax.annotation.Nonnull + public Integer getAddr() { + return addr; + } + + public void setAddr(@javax.annotation.Nonnull Integer addr) { + this.addr = addr; + } + + + public V2FunctionHeader type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Return type of the function + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public V2FunctionHeader args(@javax.annotation.Nonnull Map args) { + this.args = args; + return this; + } + + public V2FunctionHeader putArgsItem(String key, Argument argsItem) { + if (this.args == null) { + this.args = new HashMap<>(); + } + this.args.put(key, argsItem); + return this; + } + + /** + * Dictionary of function arguments + * @return args + */ + @javax.annotation.Nonnull + public Map getArgs() { + return args; + } + + public void setArgs(@javax.annotation.Nonnull Map args) { + this.args = args; + } + + /** + * 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 V2FunctionHeader instance itself + */ + public V2FunctionHeader 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; + } + V2FunctionHeader v2FunctionHeader = (V2FunctionHeader) o; + return Objects.equals(this.lastChange, v2FunctionHeader.lastChange) && + Objects.equals(this.name, v2FunctionHeader.name) && + Objects.equals(this.addr, v2FunctionHeader.addr) && + Objects.equals(this.type, v2FunctionHeader.type) && + Objects.equals(this.args, v2FunctionHeader.args)&& + Objects.equals(this.additionalProperties, v2FunctionHeader.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(lastChange, name, addr, type, args, 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 V2FunctionHeader {\n"); + sb.append(" lastChange: ").append(toIndentedString(lastChange)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" addr: ").append(toIndentedString(addr)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" args: ").append(toIndentedString(args)).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) { + return o == null ? "null" : 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("last_change", "name", "addr", "type", "args")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "addr", "type", "args")); + } + + /** + * 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 V2FunctionHeader + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2FunctionHeader.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2FunctionHeader is not found in the empty JSON string", V2FunctionHeader.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2FunctionHeader.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2FunctionHeader.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2FunctionHeader' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2FunctionHeader.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2FunctionHeader 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 V2FunctionHeader read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2FunctionHeader 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(java.util.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 V2FunctionHeader given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2FunctionHeader + * @throws IOException if the JSON string is invalid with respect to V2FunctionHeader + */ + public static V2FunctionHeader fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2FunctionHeader.class); + } + + /** + * Convert an instance of V2FunctionHeader to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/V2FunctionInfo.java b/src/main/java/ai/reveng/model/V2FunctionInfo.java new file mode 100644 index 00000000..f9637f3b --- /dev/null +++ b/src/main/java/ai/reveng/model/V2FunctionInfo.java @@ -0,0 +1,350 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import ai.reveng.model.FuncDepsInner; +import ai.reveng.model.V2FunctionType; +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 ai.reveng.invoker.JSON; + +/** + * V2FunctionInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2FunctionInfo { + public static final String SERIALIZED_NAME_FUNC_TYPES = "func_types"; + @SerializedName(SERIALIZED_NAME_FUNC_TYPES) + @javax.annotation.Nullable + private V2FunctionType funcTypes; + + public static final String SERIALIZED_NAME_FUNC_DEPS = "func_deps"; + @SerializedName(SERIALIZED_NAME_FUNC_DEPS) + @javax.annotation.Nonnull + private List funcDeps = new ArrayList<>(); + + public V2FunctionInfo() { + } + + public V2FunctionInfo funcTypes(@javax.annotation.Nullable V2FunctionType funcTypes) { + this.funcTypes = funcTypes; + return this; + } + + /** + * Function type information + * @return funcTypes + */ + @javax.annotation.Nullable + public V2FunctionType getFuncTypes() { + return funcTypes; + } + + public void setFuncTypes(@javax.annotation.Nullable V2FunctionType funcTypes) { + this.funcTypes = funcTypes; + } + + + public V2FunctionInfo funcDeps(@javax.annotation.Nonnull List funcDeps) { + this.funcDeps = funcDeps; + return this; + } + + public V2FunctionInfo addFuncDepsItem(FuncDepsInner funcDepsItem) { + if (this.funcDeps == null) { + this.funcDeps = new ArrayList<>(); + } + this.funcDeps.add(funcDepsItem); + return this; + } + + /** + * List of function dependencies + * @return funcDeps + */ + @javax.annotation.Nonnull + public List getFuncDeps() { + return funcDeps; + } + + public void setFuncDeps(@javax.annotation.Nonnull List funcDeps) { + this.funcDeps = funcDeps; + } + + /** + * 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 V2FunctionInfo instance itself + */ + public V2FunctionInfo 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; + } + V2FunctionInfo v2FunctionInfo = (V2FunctionInfo) o; + return Objects.equals(this.funcTypes, v2FunctionInfo.funcTypes) && + Objects.equals(this.funcDeps, v2FunctionInfo.funcDeps)&& + Objects.equals(this.additionalProperties, v2FunctionInfo.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(funcTypes, funcDeps, 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 V2FunctionInfo {\n"); + sb.append(" funcTypes: ").append(toIndentedString(funcTypes)).append("\n"); + sb.append(" funcDeps: ").append(toIndentedString(funcDeps)).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) { + return o == null ? "null" : 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("func_types", "func_deps")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("func_deps")); + } + + /** + * 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 V2FunctionInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2FunctionInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2FunctionInfo is not found in the empty JSON string", V2FunctionInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2FunctionInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `func_types` + if (jsonObj.get("func_types") != null && !jsonObj.get("func_types").isJsonNull()) { + V2FunctionType.validateJsonElement(jsonObj.get("func_types")); + } + if (jsonObj.get("func_deps") != null) { + if (!jsonObj.get("func_deps").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `func_deps` to be an array in the JSON string but got `%s`", jsonObj.get("func_deps").toString())); + } + JsonArray jsonArrayfuncDeps = jsonObj.getAsJsonArray("func_deps"); + // validate the required field `func_deps` (array) + for (int i = 0; i < jsonArrayfuncDeps.size(); i++) { + FuncDepsInner.validateJsonElement(jsonArrayfuncDeps.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2FunctionInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2FunctionInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2FunctionInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2FunctionInfo 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 V2FunctionInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2FunctionInfo 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(java.util.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 V2FunctionInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2FunctionInfo + * @throws IOException if the JSON string is invalid with respect to V2FunctionInfo + */ + public static V2FunctionInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2FunctionInfo.class); + } + + /** + * Convert an instance of V2FunctionInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/V2FunctionMatch.java b/src/main/java/ai/reveng/model/V2FunctionMatch.java new file mode 100644 index 00000000..ec1974d8 --- /dev/null +++ b/src/main/java/ai/reveng/model/V2FunctionMatch.java @@ -0,0 +1,394 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import ai.reveng.model.V2MatchedFunction; +import ai.reveng.model.V2NameConfidence; +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 ai.reveng.invoker.JSON; + +/** + * V2FunctionMatch + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2FunctionMatch { + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; + @SerializedName(SERIALIZED_NAME_FUNCTION_ID) + @javax.annotation.Nonnull + private Long functionId; + + public static final String SERIALIZED_NAME_MATCHED_FUNCTIONS = "matched_functions"; + @SerializedName(SERIALIZED_NAME_MATCHED_FUNCTIONS) + @javax.annotation.Nonnull + private List matchedFunctions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CONFIDENCES = "confidences"; + @SerializedName(SERIALIZED_NAME_CONFIDENCES) + @javax.annotation.Nullable + private List confidences; + + public V2FunctionMatch() { + } + + public V2FunctionMatch functionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; + return this; + } + + /** + * Unique identifier of the function + * @return functionId + */ + @javax.annotation.Nonnull + public Long getFunctionId() { + return functionId; + } + + public void setFunctionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; + } + + + public V2FunctionMatch matchedFunctions(@javax.annotation.Nonnull List matchedFunctions) { + this.matchedFunctions = matchedFunctions; + return this; + } + + public V2FunctionMatch addMatchedFunctionsItem(V2MatchedFunction matchedFunctionsItem) { + if (this.matchedFunctions == null) { + this.matchedFunctions = new ArrayList<>(); + } + this.matchedFunctions.add(matchedFunctionsItem); + return this; + } + + /** + * Get matchedFunctions + * @return matchedFunctions + */ + @javax.annotation.Nonnull + public List getMatchedFunctions() { + return matchedFunctions; + } + + public void setMatchedFunctions(@javax.annotation.Nonnull List matchedFunctions) { + this.matchedFunctions = matchedFunctions; + } + + + public V2FunctionMatch confidences(@javax.annotation.Nullable List confidences) { + this.confidences = confidences; + return this; + } + + public V2FunctionMatch addConfidencesItem(V2NameConfidence confidencesItem) { + if (this.confidences == null) { + this.confidences = new ArrayList<>(); + } + this.confidences.add(confidencesItem); + return this; + } + + /** + * Get confidences + * @return confidences + */ + @javax.annotation.Nullable + public List getConfidences() { + return confidences; + } + + public void setConfidences(@javax.annotation.Nullable List confidences) { + this.confidences = confidences; + } + + /** + * 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 V2FunctionMatch instance itself + */ + public V2FunctionMatch 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; + } + V2FunctionMatch v2FunctionMatch = (V2FunctionMatch) o; + return Objects.equals(this.functionId, v2FunctionMatch.functionId) && + Objects.equals(this.matchedFunctions, v2FunctionMatch.matchedFunctions) && + Objects.equals(this.confidences, v2FunctionMatch.confidences)&& + Objects.equals(this.additionalProperties, v2FunctionMatch.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(functionId, matchedFunctions, confidences, 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 V2FunctionMatch {\n"); + sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); + sb.append(" matchedFunctions: ").append(toIndentedString(matchedFunctions)).append("\n"); + sb.append(" confidences: ").append(toIndentedString(confidences)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("function_id", "matched_functions", "confidences")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("function_id", "matched_functions")); + } + + /** + * 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 V2FunctionMatch + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2FunctionMatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2FunctionMatch is not found in the empty JSON string", V2FunctionMatch.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2FunctionMatch.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("matched_functions") != null) { + if (!jsonObj.get("matched_functions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `matched_functions` to be an array in the JSON string but got `%s`", jsonObj.get("matched_functions").toString())); + } + JsonArray jsonArraymatchedFunctions = jsonObj.getAsJsonArray("matched_functions"); + // validate the required field `matched_functions` (array) + for (int i = 0; i < jsonArraymatchedFunctions.size(); i++) { + V2MatchedFunction.validateJsonElement(jsonArraymatchedFunctions.get(i)); + } + } + if (jsonObj.get("confidences") != null && !jsonObj.get("confidences").isJsonNull()) { + JsonArray jsonArrayconfidences = jsonObj.getAsJsonArray("confidences"); + if (jsonArrayconfidences != null) { + // ensure the json data is an array + if (!jsonObj.get("confidences").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `confidences` to be an array in the JSON string but got `%s`", jsonObj.get("confidences").toString())); + } + + // validate the optional field `confidences` (array) + for (int i = 0; i < jsonArrayconfidences.size(); i++) { + V2NameConfidence.validateJsonElement(jsonArrayconfidences.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2FunctionMatch.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2FunctionMatch' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2FunctionMatch.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2FunctionMatch 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 V2FunctionMatch read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2FunctionMatch 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(java.util.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 V2FunctionMatch given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2FunctionMatch + * @throws IOException if the JSON string is invalid with respect to V2FunctionMatch + */ + public static V2FunctionMatch fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2FunctionMatch.class); + } + + /** + * Convert an instance of V2FunctionMatch to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/V2FunctionType.java b/src/main/java/ai/reveng/model/V2FunctionType.java new file mode 100644 index 00000000..38d6fe3c --- /dev/null +++ b/src/main/java/ai/reveng/model/V2FunctionType.java @@ -0,0 +1,506 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import ai.reveng.model.StackVariable; +import ai.reveng.model.V2FunctionHeader; +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 java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import ai.reveng.invoker.JSON; + +/** + * V2FunctionType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2FunctionType { + public static final String SERIALIZED_NAME_LAST_CHANGE = "last_change"; + @SerializedName(SERIALIZED_NAME_LAST_CHANGE) + @javax.annotation.Nullable + private String lastChange; + + public static final String SERIALIZED_NAME_ADDR = "addr"; + @SerializedName(SERIALIZED_NAME_ADDR) + @javax.annotation.Nonnull + private Integer addr; + + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + @javax.annotation.Nonnull + private Integer size; + + public static final String SERIALIZED_NAME_HEADER = "header"; + @SerializedName(SERIALIZED_NAME_HEADER) + @javax.annotation.Nonnull + private V2FunctionHeader header; + + public static final String SERIALIZED_NAME_STACK_VARS = "stack_vars"; + @SerializedName(SERIALIZED_NAME_STACK_VARS) + @javax.annotation.Nullable + private Map stackVars; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public static final String SERIALIZED_NAME_ARTIFACT_TYPE = "artifact_type"; + @SerializedName(SERIALIZED_NAME_ARTIFACT_TYPE) + @javax.annotation.Nullable + private String artifactType = "Function"; + + public V2FunctionType() { + } + + public V2FunctionType lastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; + return this; + } + + /** + * Timestamp of the last change to this function type + * @return lastChange + */ + @javax.annotation.Nullable + public String getLastChange() { + return lastChange; + } + + public void setLastChange(@javax.annotation.Nullable String lastChange) { + this.lastChange = lastChange; + } + + + public V2FunctionType addr(@javax.annotation.Nonnull Integer addr) { + this.addr = addr; + return this; + } + + /** + * Memory address of the function + * @return addr + */ + @javax.annotation.Nonnull + public Integer getAddr() { + return addr; + } + + public void setAddr(@javax.annotation.Nonnull Integer addr) { + this.addr = addr; + } + + + public V2FunctionType size(@javax.annotation.Nonnull Integer size) { + this.size = size; + return this; + } + + /** + * Size of the function in bytes + * @return size + */ + @javax.annotation.Nonnull + public Integer getSize() { + return size; + } + + public void setSize(@javax.annotation.Nonnull Integer size) { + this.size = size; + } + + + public V2FunctionType header(@javax.annotation.Nonnull V2FunctionHeader header) { + this.header = header; + return this; + } + + /** + * Function header information + * @return header + */ + @javax.annotation.Nonnull + public V2FunctionHeader getHeader() { + return header; + } + + public void setHeader(@javax.annotation.Nonnull V2FunctionHeader header) { + this.header = header; + } + + + public V2FunctionType stackVars(@javax.annotation.Nullable Map stackVars) { + this.stackVars = stackVars; + return this; + } + + public V2FunctionType putStackVarsItem(String key, StackVariable stackVarsItem) { + if (this.stackVars == null) { + this.stackVars = new HashMap<>(); + } + this.stackVars.put(key, stackVarsItem); + return this; + } + + /** + * Dictionary of stack variables + * @return stackVars + */ + @javax.annotation.Nullable + public Map getStackVars() { + return stackVars; + } + + public void setStackVars(@javax.annotation.Nullable Map stackVars) { + this.stackVars = stackVars; + } + + + public V2FunctionType name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the function + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public V2FunctionType type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Return type of the function + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public V2FunctionType artifactType(@javax.annotation.Nullable String artifactType) { + this.artifactType = artifactType; + return this; + } + + /** + * Type of artifact that the structure is associated with + * @return artifactType + */ + @javax.annotation.Nullable + public String getArtifactType() { + return artifactType; + } + + public void setArtifactType(@javax.annotation.Nullable String artifactType) { + this.artifactType = artifactType; + } + + /** + * 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 V2FunctionType instance itself + */ + public V2FunctionType 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; + } + V2FunctionType v2FunctionType = (V2FunctionType) o; + return Objects.equals(this.lastChange, v2FunctionType.lastChange) && + Objects.equals(this.addr, v2FunctionType.addr) && + Objects.equals(this.size, v2FunctionType.size) && + Objects.equals(this.header, v2FunctionType.header) && + Objects.equals(this.stackVars, v2FunctionType.stackVars) && + Objects.equals(this.name, v2FunctionType.name) && + Objects.equals(this.type, v2FunctionType.type) && + Objects.equals(this.artifactType, v2FunctionType.artifactType)&& + Objects.equals(this.additionalProperties, v2FunctionType.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(lastChange, addr, size, header, stackVars, name, type, artifactType, 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 V2FunctionType {\n"); + sb.append(" lastChange: ").append(toIndentedString(lastChange)).append("\n"); + sb.append(" addr: ").append(toIndentedString(addr)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" stackVars: ").append(toIndentedString(stackVars)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" artifactType: ").append(toIndentedString(artifactType)).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) { + return o == null ? "null" : 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("last_change", "addr", "size", "header", "stack_vars", "name", "type", "artifact_type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("addr", "size", "header", "name", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2FunctionType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2FunctionType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2FunctionType is not found in the empty JSON string", V2FunctionType.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2FunctionType.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("last_change") != null && !jsonObj.get("last_change").isJsonNull()) && !jsonObj.get("last_change").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_change` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_change").toString())); + } + // validate the required field `header` + V2FunctionHeader.validateJsonElement(jsonObj.get("header")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("artifact_type") != null && !jsonObj.get("artifact_type").isJsonNull()) && !jsonObj.get("artifact_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `artifact_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("artifact_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2FunctionType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2FunctionType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2FunctionType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2FunctionType 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 V2FunctionType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2FunctionType 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(java.util.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 V2FunctionType given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2FunctionType + * @throws IOException if the JSON string is invalid with respect to V2FunctionType + */ + public static V2FunctionType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2FunctionType.class); + } + + /** + * Convert an instance of V2FunctionType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/V2MatchedFunction.java b/src/main/java/ai/reveng/model/V2MatchedFunction.java new file mode 100644 index 00000000..5ae42ca4 --- /dev/null +++ b/src/main/java/ai/reveng/model/V2MatchedFunction.java @@ -0,0 +1,571 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import 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.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 ai.reveng.invoker.JSON; + +/** + * V2MatchedFunction + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2MatchedFunction { + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; + @SerializedName(SERIALIZED_NAME_FUNCTION_ID) + @javax.annotation.Nonnull + private Long functionId; + + 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_FUNCTION_NAME = "function_name"; + @SerializedName(SERIALIZED_NAME_FUNCTION_NAME) + @javax.annotation.Nonnull + private String functionName; + + public static final String SERIALIZED_NAME_FUNCTION_VADDR = "function_vaddr"; + @SerializedName(SERIALIZED_NAME_FUNCTION_VADDR) + @javax.annotation.Nonnull + private Long functionVaddr; + + public static final String SERIALIZED_NAME_MANGLED_NAME = "mangled_name"; + @SerializedName(SERIALIZED_NAME_MANGLED_NAME) + @javax.annotation.Nonnull + private String mangledName; + + public static final String SERIALIZED_NAME_DEBUG = "debug"; + @SerializedName(SERIALIZED_NAME_DEBUG) + @javax.annotation.Nonnull + private Boolean debug; + + 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_ID = "analysis_id"; + @SerializedName(SERIALIZED_NAME_ANALYSIS_ID) + @javax.annotation.Nonnull + private Integer analysisId; + + public static final String SERIALIZED_NAME_SIMILARITY = "similarity"; + @SerializedName(SERIALIZED_NAME_SIMILARITY) + @javax.annotation.Nullable + private BigDecimal similarity; + + public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nullable + private BigDecimal confidence; + + public V2MatchedFunction() { + } + + public V2MatchedFunction functionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; + return this; + } + + /** + * Unique identifier of the matched function + * @return functionId + */ + @javax.annotation.Nonnull + public Long getFunctionId() { + return functionId; + } + + public void setFunctionId(@javax.annotation.Nonnull Long functionId) { + this.functionId = functionId; + } + + + public V2MatchedFunction 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 V2MatchedFunction functionName(@javax.annotation.Nonnull String functionName) { + this.functionName = functionName; + return this; + } + + /** + * Get functionName + * @return functionName + */ + @javax.annotation.Nonnull + public String getFunctionName() { + return functionName; + } + + public void setFunctionName(@javax.annotation.Nonnull String functionName) { + this.functionName = functionName; + } + + + public V2MatchedFunction functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { + this.functionVaddr = functionVaddr; + return this; + } + + /** + * Get functionVaddr + * @return functionVaddr + */ + @javax.annotation.Nonnull + public Long getFunctionVaddr() { + return functionVaddr; + } + + public void setFunctionVaddr(@javax.annotation.Nonnull Long functionVaddr) { + this.functionVaddr = functionVaddr; + } + + + public V2MatchedFunction mangledName(@javax.annotation.Nonnull String mangledName) { + this.mangledName = mangledName; + return this; + } + + /** + * Get mangledName + * @return mangledName + */ + @javax.annotation.Nonnull + public String getMangledName() { + return mangledName; + } + + public void setMangledName(@javax.annotation.Nonnull String mangledName) { + this.mangledName = mangledName; + } + + + public V2MatchedFunction debug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; + return this; + } + + /** + * Get debug + * @return debug + */ + @javax.annotation.Nonnull + public Boolean getDebug() { + return debug; + } + + public void setDebug(@javax.annotation.Nonnull Boolean debug) { + this.debug = debug; + } + + + public V2MatchedFunction 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 V2MatchedFunction 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 V2MatchedFunction 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 V2MatchedFunction similarity(@javax.annotation.Nullable BigDecimal similarity) { + this.similarity = similarity; + return this; + } + + /** + * Get similarity + * @return similarity + */ + @javax.annotation.Nullable + public BigDecimal getSimilarity() { + return similarity; + } + + public void setSimilarity(@javax.annotation.Nullable BigDecimal similarity) { + this.similarity = similarity; + } + + + public V2MatchedFunction confidence(@javax.annotation.Nullable BigDecimal confidence) { + this.confidence = confidence; + return this; + } + + /** + * Get confidence + * @return confidence + */ + @javax.annotation.Nullable + public BigDecimal getConfidence() { + return confidence; + } + + public void setConfidence(@javax.annotation.Nullable BigDecimal confidence) { + this.confidence = confidence; + } + + /** + * 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 V2MatchedFunction instance itself + */ + public V2MatchedFunction 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; + } + V2MatchedFunction v2MatchedFunction = (V2MatchedFunction) o; + return Objects.equals(this.functionId, v2MatchedFunction.functionId) && + Objects.equals(this.binaryId, v2MatchedFunction.binaryId) && + Objects.equals(this.functionName, v2MatchedFunction.functionName) && + Objects.equals(this.functionVaddr, v2MatchedFunction.functionVaddr) && + Objects.equals(this.mangledName, v2MatchedFunction.mangledName) && + Objects.equals(this.debug, v2MatchedFunction.debug) && + Objects.equals(this.binaryName, v2MatchedFunction.binaryName) && + Objects.equals(this.sha256Hash, v2MatchedFunction.sha256Hash) && + Objects.equals(this.analysisId, v2MatchedFunction.analysisId) && + Objects.equals(this.similarity, v2MatchedFunction.similarity) && + Objects.equals(this.confidence, v2MatchedFunction.confidence)&& + Objects.equals(this.additionalProperties, v2MatchedFunction.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(functionId, binaryId, functionName, functionVaddr, mangledName, debug, binaryName, sha256Hash, analysisId, similarity, confidence, 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 V2MatchedFunction {\n"); + sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); + sb.append(" binaryId: ").append(toIndentedString(binaryId)).append("\n"); + sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n"); + sb.append(" functionVaddr: ").append(toIndentedString(functionVaddr)).append("\n"); + sb.append(" mangledName: ").append(toIndentedString(mangledName)).append("\n"); + sb.append(" debug: ").append(toIndentedString(debug)).append("\n"); + sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); + sb.append(" sha256Hash: ").append(toIndentedString(sha256Hash)).append("\n"); + sb.append(" analysisId: ").append(toIndentedString(analysisId)).append("\n"); + sb.append(" similarity: ").append(toIndentedString(similarity)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("function_id", "binary_id", "function_name", "function_vaddr", "mangled_name", "debug", "binary_name", "sha_256_hash", "analysis_id", "similarity", "confidence")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("function_id", "binary_id", "function_name", "function_vaddr", "mangled_name", "debug", "binary_name", "sha_256_hash", "analysis_id")); + } + + /** + * 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 V2MatchedFunction + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MatchedFunction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2MatchedFunction is not found in the empty JSON string", V2MatchedFunction.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2MatchedFunction.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("function_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `function_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("function_name").toString())); + } + if (!jsonObj.get("mangled_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mangled_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mangled_name").toString())); + } + if (!jsonObj.get("binary_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.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(java.util.Locale.ROOT, "Expected the field `sha_256_hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sha_256_hash").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2MatchedFunction.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2MatchedFunction' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2MatchedFunction.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2MatchedFunction 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 V2MatchedFunction read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2MatchedFunction 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(java.util.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 V2MatchedFunction given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2MatchedFunction + * @throws IOException if the JSON string is invalid with respect to V2MatchedFunction + */ + public static V2MatchedFunction fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2MatchedFunction.class); + } + + /** + * Convert an instance of V2MatchedFunction to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/V2NameConfidence.java b/src/main/java/ai/reveng/model/V2NameConfidence.java new file mode 100644 index 00000000..bc70a26f --- /dev/null +++ b/src/main/java/ai/reveng/model/V2NameConfidence.java @@ -0,0 +1,318 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import 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 ai.reveng.invoker.JSON; + +/** + * V2NameConfidence + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class V2NameConfidence { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nonnull + private BigDecimal confidence; + + public V2NameConfidence() { + } + + public V2NameConfidence name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The suggested function name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public V2NameConfidence confidence(@javax.annotation.Nonnull BigDecimal confidence) { + this.confidence = confidence; + return this; + } + + /** + * Confidence score as a percentage + * minimum: 0 + * maximum: 100 + * @return confidence + */ + @javax.annotation.Nonnull + public BigDecimal getConfidence() { + return confidence; + } + + public void setConfidence(@javax.annotation.Nonnull BigDecimal confidence) { + this.confidence = confidence; + } + + /** + * 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 V2NameConfidence instance itself + */ + public V2NameConfidence 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; + } + V2NameConfidence v2NameConfidence = (V2NameConfidence) o; + return Objects.equals(this.name, v2NameConfidence.name) && + Objects.equals(this.confidence, v2NameConfidence.confidence)&& + Objects.equals(this.additionalProperties, v2NameConfidence.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, confidence, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V2NameConfidence {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).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) { + return o == null ? "null" : 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("name", "confidence")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "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 V2NameConfidence + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2NameConfidence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in V2NameConfidence is not found in the empty JSON string", V2NameConfidence.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V2NameConfidence.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V2NameConfidence.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2NameConfidence' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(V2NameConfidence.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, V2NameConfidence 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 V2NameConfidence read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V2NameConfidence 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(java.util.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 V2NameConfidence given an JSON string + * + * @param jsonString JSON string + * @return An instance of V2NameConfidence + * @throws IOException if the JSON string is invalid with respect to V2NameConfidence + */ + public static V2NameConfidence fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V2NameConfidence.class); + } + + /** + * Convert an instance of V2NameConfidence to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} +