diff --git a/.sdk-version b/.sdk-version index 21f74272..8aa2922b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.75.0 +v4.77.1 diff --git a/README.md b/README.md index f5b3d89c..bad709a2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 4.75.0 + 4.77.1 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:4.75.0" + implementation "ai.reveng:sdk:4.77.1" } ``` @@ -158,13 +158,13 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**insertAnalysisLog**](docs/AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis *AnalysesCoreApi* | [**listAnalyses**](docs/AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookupBinaryId**](docs/AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID -*AnalysesCoreApi* | [**putAnalysisStrings**](docs/AnalysesCoreApi.md#putAnalysisStrings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis *AnalysesCoreApi* | [**requeueAnalysis**](docs/AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis *AnalysesCoreApi* | [**startAnalysisFunctionMatching**](docs/AnalysesCoreApi.md#startAnalysisFunctionMatching) | **POST** /v3/analyses/{analysis_id}/functions/matches | Start function matching for an analysis *AnalysesCoreApi* | [**updateAnalysis**](docs/AnalysesCoreApi.md#updateAnalysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**updateAnalysisTags**](docs/AnalysesCoreApi.md#updateAnalysisTags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreApi* | [**uploadFile**](docs/AnalysesCoreApi.md#uploadFile) | **POST** /v2/upload | Upload File *AnalysesCoreApi* | [**v3CreateAnalysis**](docs/AnalysesCoreApi.md#v3CreateAnalysis) | **POST** /v3/analyses | Create an analysis +*AnalysesCoreApi* | [**v3CreateDynamicExecutionRun**](docs/AnalysesCoreApi.md#v3CreateDynamicExecutionRun) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs | Start a dynamic execution run. *AnalysesCoreApi* | [**v3DeleteAnalysis**](docs/AnalysesCoreApi.md#v3DeleteAnalysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. *AnalysesCoreApi* | [**v3DownloadBinaryExport**](docs/AnalysesCoreApi.md#v3DownloadBinaryExport) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export *AnalysesCoreApi* | [**v3GetAnalysis**](docs/AnalysesCoreApi.md#v3GetAnalysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. @@ -177,30 +177,31 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**v3GetAnalysisStrings**](docs/AnalysesCoreApi.md#v3GetAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. *AnalysesCoreApi* | [**v3GetAnalysisStringsStatus**](docs/AnalysesCoreApi.md#v3GetAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. *AnalysesCoreApi* | [**v3GetBinaryExportOperation**](docs/AnalysesCoreApi.md#v3GetBinaryExportOperation) | **GET** /v3/operations/binary-export/{task_id} | Get a binary export operation -*AnalysesCoreApi* | [**v3GetDynamicExecutionArtifact**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionArtifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256} | Download an artifact. -*AnalysesCoreApi* | [**v3GetDynamicExecutionLogsDownload**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionLogsDownload) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/logs/download | Download the execution logs archive. -*AnalysesCoreApi* | [**v3GetDynamicExecutionMemdump**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionMemdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256} | Download a memory dump. -*AnalysesCoreApi* | [**v3GetDynamicExecutionOperation**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionOperation) | **GET** /v3/operations/dynamic-execution/{analysis_id} | Get a dynamic execution operation. -*AnalysesCoreApi* | [**v3GetDynamicExecutionPcap**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionPcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/pcap | Download the network capture. -*AnalysesCoreApi* | [**v3GetDynamicExecutionReport**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionReport) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/report | Get the dynamic execution report. -*AnalysesCoreApi* | [**v3GetDynamicExecutionScreenshot**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionScreenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index} | Download a screenshot. -*AnalysesCoreApi* | [**v3GetDynamicExecutionSummary**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionSummary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/summary | Get the dynamic execution summary. -*AnalysesCoreApi* | [**v3GetDynamicExecutionSummaryOperation**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionSummaryOperation) | **GET** /v3/operations/dynamic-execution-summary/{analysis_id} | Get a dynamic execution summary operation. -*AnalysesCoreApi* | [**v3GetDynamicExecutionWiresharkKeys**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionWiresharkKeys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys | Download Wireshark TLS session keys. +*AnalysesCoreApi* | [**v3GetDynamicExecutionOperation**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionOperation) | **GET** /v3/operations/dynamic-execution/{run_id} | Get a dynamic execution operation. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRun**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRun) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id} | Get a dynamic execution run. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunArtifact**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunArtifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256} | Download a run's artifact. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunLogsDownload**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunLogsDownload) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download | Download a run's execution logs archive. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunMemdump**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunMemdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256} | Download a run's memory dump. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunPcap**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunPcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap | Download a run's network capture. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunReport**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunReport) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report | Get a run's dynamic execution report. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunScreenshot**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunScreenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index} | Download a run's screenshot. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunSummary**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunSummary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary | Get a run's dynamic execution summary. +*AnalysesCoreApi* | [**v3GetDynamicExecutionRunWiresharkKeys**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionRunWiresharkKeys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys | Download a run's Wireshark TLS session keys. +*AnalysesCoreApi* | [**v3GetDynamicExecutionSummaryOperation**](docs/AnalysesCoreApi.md#v3GetDynamicExecutionSummaryOperation) | **GET** /v3/operations/dynamic-execution-summary/{run_id} | Get a dynamic execution summary operation. *AnalysesCoreApi* | [**v3GrantAnalysisAccess**](docs/AnalysesCoreApi.md#v3GrantAnalysisAccess) | **POST** /v3/analyses/{analysis_id}/access-rules | Share an analysis with a user or team *AnalysesCoreApi* | [**v3ListAnalyses**](docs/AnalysesCoreApi.md#v3ListAnalyses) | **GET** /v3/analyses | List analyses *AnalysesCoreApi* | [**v3ListAnalysisAccessRules**](docs/AnalysesCoreApi.md#v3ListAnalysisAccessRules) | **GET** /v3/analyses/{analysis_id}/access-rules | List who an analysis is shared with *AnalysesCoreApi* | [**v3ListAnalysisGlobals**](docs/AnalysesCoreApi.md#v3ListAnalysisGlobals) | **GET** /v3/analyses/{analysis_id}/globals | List the global variables in an analysis. *AnalysesCoreApi* | [**v3ListAnalysisOperations**](docs/AnalysesCoreApi.md#v3ListAnalysisOperations) | **GET** /v3/analyses/{analysis_id}/operations | List the operations run on an analysis. -*AnalysesCoreApi* | [**v3ListDynamicExecutionScreenshots**](docs/AnalysesCoreApi.md#v3ListDynamicExecutionScreenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots | List the screenshots captured during execution. +*AnalysesCoreApi* | [**v3ListDynamicExecutionRunScreenshots**](docs/AnalysesCoreApi.md#v3ListDynamicExecutionRunScreenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots | List a run's screenshots. +*AnalysesCoreApi* | [**v3ListDynamicExecutionRuns**](docs/AnalysesCoreApi.md#v3ListDynamicExecutionRuns) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs | List the dynamic execution runs. *AnalysesCoreApi* | [**v3ListExampleAnalyses**](docs/AnalysesCoreApi.md#v3ListExampleAnalyses) | **GET** /v3/analyses/examples | List example analyses *AnalysesCoreApi* | [**v3ListGlobalFunctions**](docs/AnalysesCoreApi.md#v3ListGlobalFunctions) | **GET** /v3/analyses/{analysis_id}/globals/{vaddr}/functions | List the functions referencing a global variable. *AnalysesCoreApi* | [**v3LookupAnalysisByBinaryId**](docs/AnalysesCoreApi.md#v3LookupAnalysisByBinaryId) | **GET** /v3/analyses/lookup/{binary_id} | Look up the most recent analysis for a binary. *AnalysesCoreApi* | [**v3QueueBinaryExport**](docs/AnalysesCoreApi.md#v3QueueBinaryExport) | **POST** /v3/analyses/{analysis_id}/binary-export | Queue a binary export *AnalysesCoreApi* | [**v3RequeueAnalysis**](docs/AnalysesCoreApi.md#v3RequeueAnalysis) | **POST** /v3/analyses/{analysis_id}/requeue | Requeue an analysis *AnalysesCoreApi* | [**v3RevokeAnalysisAccess**](docs/AnalysesCoreApi.md#v3RevokeAnalysisAccess) | **DELETE** /v3/analyses/{analysis_id}/access-rules | Stop sharing an analysis with a user or team -*AnalysesCoreApi* | [**v3RunDynamicExecution**](docs/AnalysesCoreApi.md#v3RunDynamicExecution) | **POST** /v3/analyses/{analysis_id}/dynamic-execution:run | Trigger a dynamic execution run. -*AnalysesCoreApi* | [**v3RunDynamicExecutionSummary**](docs/AnalysesCoreApi.md#v3RunDynamicExecutionSummary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/summary:run | Regenerate the dynamic execution summary. +*AnalysesCoreApi* | [**v3RunDynamicExecutionRunSummary**](docs/AnalysesCoreApi.md#v3RunDynamicExecutionRunSummary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run | Regenerate a run's dynamic execution summary. *AnalysesCoreApi* | [**v3SearchTags**](docs/AnalysesCoreApi.md#v3SearchTags) | **GET** /v3/tags | Search tags *AnalysesCoreApi* | [**v3UpdateAnalysis**](docs/AnalysesCoreApi.md#v3UpdateAnalysis) | **PATCH** /v3/analyses/{analysis_id} | Update an analysis. *AnalysesCoreApi* | [**v3UpdateAnalysisGlobal**](docs/AnalysesCoreApi.md#v3UpdateAnalysisGlobal) | **PATCH** /v3/analyses/{analysis_id}/globals/{vaddr} | Edit a global variable. @@ -210,9 +211,11 @@ Class | Method | HTTP request | Description *AnalysesResultsMetadataApi* | [**getCapabilities**](docs/AnalysesResultsMetadataApi.md#getCapabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis *AnalysesResultsMetadataApi* | [**getFunctionsList**](docs/AnalysesResultsMetadataApi.md#getFunctionsList) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis *AnalysesResultsMetadataApi* | [**getTags**](docs/AnalysesResultsMetadataApi.md#getTags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score +*AnalysesResultsMetadataApi* | [**v3GetAnalysisFeedback**](docs/AnalysesResultsMetadataApi.md#v3GetAnalysisFeedback) | **GET** /v3/analyses/{analysis_id}/feedback/{type} | Get the caller's feedback on an analysis. *AnalysesResultsMetadataApi* | [**v3GetAnalysisXref**](docs/AnalysesResultsMetadataApi.md#v3GetAnalysisXref) | **GET** /v3/analyses/{analysis_id}/xrefs/{vaddr} | Look up xrefs by virtual address. *AnalysesResultsMetadataApi* | [**v3ListAnalysisCapabilities**](docs/AnalysesResultsMetadataApi.md#v3ListAnalysisCapabilities) | **GET** /v3/analyses/{analysis_id}/capabilities | List the capabilities found in an analysis. *AnalysesResultsMetadataApi* | [**v3ListAnalysisTags**](docs/AnalysesResultsMetadataApi.md#v3ListAnalysisTags) | **GET** /v3/analyses/{analysis_id}/tags | List the tags on an analysis. +*AnalysesResultsMetadataApi* | [**v3UpsertAnalysisFeedback**](docs/AnalysesResultsMetadataApi.md#v3UpsertAnalysisFeedback) | **PUT** /v3/analyses/{analysis_id}/feedback/{type} | Record feedback on an analysis. *AnalysesXRefsApi* | [**getXrefByVaddr**](docs/AnalysesXRefsApi.md#getXrefByVaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address *AuthenticationUsersApi* | [**getUser**](docs/AuthenticationUsersApi.md#getUser) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**getUserActivity**](docs/AuthenticationUsersApi.md#getUserActivity) | **GET** /v2/users/activity | Get auth user activity @@ -223,6 +226,7 @@ Class | Method | HTTP request | Description *AuthenticationUsersApi* | [**v3ListTeams**](docs/AuthenticationUsersApi.md#v3ListTeams) | **GET** /v3/teams | Search teams *AuthenticationUsersApi* | [**v3ListUsers**](docs/AuthenticationUsersApi.md#v3ListUsers) | **GET** /v3/users | Search users *AuthenticationUsersApi* | [**v3SubmitUserFeedback**](docs/AuthenticationUsersApi.md#v3SubmitUserFeedback) | **POST** /v3/users/feedback | Submit feedback +*BillingApi* | [**v3GetCreditEstimates**](docs/BillingApi.md#v3GetCreditEstimates) | **GET** /v3/credit-estimates | Get credit estimates. *BinariesApi* | [**downloadZippedBinary**](docs/BinariesApi.md#downloadZippedBinary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**getBinaryAdditionalDetails**](docs/BinariesApi.md#getBinaryAdditionalDetails) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary *BinariesApi* | [**getBinaryAdditionalDetailsStatus**](docs/BinariesApi.md#getBinaryAdditionalDetailsStatus) | **GET** /v2/binaries/{binary_id}/additional-details/status | Gets the status of the additional details task for a binary @@ -238,6 +242,7 @@ Class | Method | HTTP request | Description *BinariesApi* | [**v3GetBinaryExternals**](docs/BinariesApi.md#v3GetBinaryExternals) | **GET** /v3/binaries/{binary_id}/externals | Get third-party threat-intel lookups for a binary. *BinariesApi* | [**v3GetBinaryRelated**](docs/BinariesApi.md#v3GetBinaryRelated) | **GET** /v3/binaries/{binary_id}/related | Get the binaries related to this one by unpacking. *BinariesApi* | [**v3GetBinaryRelatedStatus**](docs/BinariesApi.md#v3GetBinaryRelatedStatus) | **GET** /v3/binaries/{binary_id}/related/status | Get the archive-unpacking status for a binary. +*BinariesApi* | [**v3ListMalwareFamilies**](docs/BinariesApi.md#v3ListMalwareFamilies) | **GET** /v3/malware-families | Look up the malware families of binaries in the RevEng.AI malware corpus. *BinariesApi* | [**v3SearchBinaries**](docs/BinariesApi.md#v3SearchBinaries) | **GET** /v3/binaries | Search binaries *BinariesApi* | [**v3UploadFile**](docs/BinariesApi.md#v3UploadFile) | **POST** /v3/upload | Upload a file. *CollectionsApi* | [**createCollection**](docs/CollectionsApi.md#createCollection) | **POST** /v2/collections | Creates new collection information @@ -304,8 +309,6 @@ Class | Method | HTTP request | Description *FunctionsAiDecompilationApi* | [**v3UpsertAiDecompilationRating**](docs/FunctionsAiDecompilationApi.md#v3UpsertAiDecompilationRating) | **PATCH** /v3/functions/{function_id}/ai-decompilation/rating | Upsert AI decompilation rating *FunctionsCoreApi* | [**addFunctionCallee**](docs/FunctionsCoreApi.md#addFunctionCallee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function *FunctionsCoreApi* | [**addUserStringToFunction**](docs/FunctionsCoreApi.md#addUserStringToFunction) | **POST** /v3/functions/{function_id}/user-provided-strings | Add a user-provided string to a function. -*FunctionsCoreApi* | [**getAnalysisStrings**](docs/FunctionsCoreApi.md#getAnalysisStrings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis -*FunctionsCoreApi* | [**getAnalysisStringsStatus**](docs/FunctionsCoreApi.md#getAnalysisStringsStatus) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis *FunctionsCoreApi* | [**getFunctionBlocks**](docs/FunctionsCoreApi.md#getFunctionBlocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function *FunctionsCoreApi* | [**getFunctionBlocks_0**](docs/FunctionsCoreApi.md#getFunctionBlocks_0) | **GET** /v3/functions/{function_id}/blocks | Get function disassembly *FunctionsCoreApi* | [**getFunctionCalleesCallers**](docs/FunctionsCoreApi.md#getFunctionCalleesCallers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function @@ -316,8 +319,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**getFunctionDetails**](docs/FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**getFunctionDetails_0**](docs/FunctionsCoreApi.md#getFunctionDetails_0) | **GET** /v3/functions/{function_id} | Get function details *FunctionsCoreApi* | [**getFunctionIndirectCallSites**](docs/FunctionsCoreApi.md#getFunctionIndirectCallSites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function -*FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -*FunctionsCoreApi* | [**getFunctionStrings_0**](docs/FunctionsCoreApi.md#getFunctionStrings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. +*FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v3/functions/{function_id}/strings | List strings for a function. *FunctionsCoreApi* | [**getFunctionsCalleesCallers**](docs/FunctionsCoreApi.md#getFunctionsCalleesCallers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions *FunctionsCoreApi* | [**getFunctionsMatches**](docs/FunctionsCoreApi.md#getFunctionsMatches) | **GET** /v3/functions/matches | Get function-matching results for an explicit set of functions *FunctionsCoreApi* | [**getFunctionsMatchingStatus**](docs/FunctionsCoreApi.md#getFunctionsMatchingStatus) | **GET** /v3/functions/matches/status | Get function-matching status for an explicit set of functions @@ -327,8 +329,10 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**startFunctionsMatching**](docs/FunctionsCoreApi.md#startFunctionsMatching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions *FunctionsCoreApi* | [**v3CanonicalizeFunctionNames**](docs/FunctionsCoreApi.md#v3CanonicalizeFunctionNames) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names *FunctionsCoreApi* | [**v3GetAnalysisFuncMaps**](docs/FunctionsCoreApi.md#v3GetAnalysisFuncMaps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis +*FunctionsCoreApi* | [**v3GetFunctionFeedback**](docs/FunctionsCoreApi.md#v3GetFunctionFeedback) | **GET** /v3/functions/{function_id}/feedback/{type} | Get the caller's feedback on a function. *FunctionsCoreApi* | [**v3ListFunctionGlobals**](docs/FunctionsCoreApi.md#v3ListFunctionGlobals) | **GET** /v3/functions/{function_id}/globals | List the global variables a function references. *FunctionsCoreApi* | [**v3SearchFunctions**](docs/FunctionsCoreApi.md#v3SearchFunctions) | **GET** /v3/functions | Search functions +*FunctionsCoreApi* | [**v3UpsertFunctionFeedback**](docs/FunctionsCoreApi.md#v3UpsertFunctionFeedback) | **PUT** /v3/functions/{function_id}/feedback/{type} | Record feedback on a function. *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 @@ -421,10 +425,7 @@ Class | Method | HTTP request | Description - [AnalysisRequirement](docs/AnalysisRequirement.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringFunction](docs/AnalysisStringFunction.md) - - [AnalysisStringInput](docs/AnalysisStringInput.md) - [AnalysisStringItem](docs/AnalysisStringItem.md) - - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) - - [AnalysisStringsStatusResponse](docs/AnalysisStringsStatusResponse.md) - [AnalysisTagBody](docs/AnalysisTagBody.md) - [AnalysisTags](docs/AnalysisTags.md) - [AnalysisTagsOutputBody](docs/AnalysisTagsOutputBody.md) @@ -437,8 +438,6 @@ Class | Method | HTTP request | Description - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) - - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md) - [ArchiveContentEntry](docs/ArchiveContentEntry.md) - [ArrayDataType](docs/ArrayDataType.md) @@ -458,8 +457,6 @@ Class | Method | HTTP request | Description - [BaseResponseAnalysisFunctionMapping](docs/BaseResponseAnalysisFunctionMapping.md) - [BaseResponseAnalysisFunctions](docs/BaseResponseAnalysisFunctions.md) - [BaseResponseAnalysisFunctionsList](docs/BaseResponseAnalysisFunctionsList.md) - - [BaseResponseAnalysisStringsResponse](docs/BaseResponseAnalysisStringsResponse.md) - - [BaseResponseAnalysisStringsStatusResponse](docs/BaseResponseAnalysisStringsStatusResponse.md) - [BaseResponseAnalysisTags](docs/BaseResponseAnalysisTags.md) - [BaseResponseAnalysisUpdateTagsResponse](docs/BaseResponseAnalysisUpdateTagsResponse.md) - [BaseResponseBasic](docs/BaseResponseBasic.md) @@ -484,7 +481,6 @@ Class | Method | HTTP request | Description - [BaseResponseFunctionBlocksResponse](docs/BaseResponseFunctionBlocksResponse.md) - [BaseResponseFunctionCapabilityResponse](docs/BaseResponseFunctionCapabilityResponse.md) - [BaseResponseFunctionSearchResponse](docs/BaseResponseFunctionSearchResponse.md) - - [BaseResponseFunctionStringsResponse](docs/BaseResponseFunctionStringsResponse.md) - [BaseResponseFunctionsDetailResponse](docs/BaseResponseFunctionsDetailResponse.md) - [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md) - [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md) @@ -517,7 +513,6 @@ Class | Method | HTTP request | Description - [BatchRenameItem](docs/BatchRenameItem.md) - [BatchRenameOutputBody](docs/BatchRenameOutputBody.md) - [BinariesRelatedStatusResponse](docs/BinariesRelatedStatusResponse.md) - - [BinariesTaskStatus](docs/BinariesTaskStatus.md) - [Binary](docs/Binary.md) - [BinaryAdditionalDetailsDataResponse](docs/BinaryAdditionalDetailsDataResponse.md) - [BinaryAdditionalResponse](docs/BinaryAdditionalResponse.md) @@ -557,6 +552,7 @@ Class | Method | HTTP request | Description - [CapabilitiesResult](docs/CapabilitiesResult.md) - [Capability](docs/Capability.md) - [CapabilityEntry](docs/CapabilityEntry.md) + - [CapabilityImplementation](docs/CapabilityImplementation.md) - [ChildBinariesResponse](docs/ChildBinariesResponse.md) - [CodeSignatureModel](docs/CodeSignatureModel.md) - [CollectionBinariesUpdateRequest](docs/CollectionBinariesUpdateRequest.md) @@ -633,6 +629,7 @@ Class | Method | HTTP request | Description - [CryptoScanMetadata](docs/CryptoScanMetadata.md) - [CryptoScanResult](docs/CryptoScanResult.md) - [CryptoVerification](docs/CryptoVerification.md) + - [CurrentUser](docs/CurrentUser.md) - [DailyAnalysesCountOutputBody](docs/DailyAnalysesCountOutputBody.md) - [DailyCountBody](docs/DailyCountBody.md) - [DataTypeEntry](docs/DataTypeEntry.md) @@ -647,6 +644,7 @@ Class | Method | HTTP request | Description - [DecompilationData](docs/DecompilationData.md) - [DecompilerSummary](docs/DecompilerSummary.md) - [DecompilerSummaryEvidence](docs/DecompilerSummaryEvidence.md) + - [DeleteMeBody](docs/DeleteMeBody.md) - [DieMatch](docs/DieMatch.md) - [DisassemblyOutputBody](docs/DisassemblyOutputBody.md) - [DisassemblySummaryEvidence](docs/DisassemblySummaryEvidence.md) @@ -655,6 +653,8 @@ Class | Method | HTTP request | Description - [DrakvufFileMetadata](docs/DrakvufFileMetadata.md) - [DynamicExecutionMetadata](docs/DynamicExecutionMetadata.md) - [DynamicExecutionResult](docs/DynamicExecutionResult.md) + - [DynamicExecutionRun](docs/DynamicExecutionRun.md) + - [DynamicExecutionRunConfig](docs/DynamicExecutionRunConfig.md) - [DynamicExecutionStatus](docs/DynamicExecutionStatus.md) - [DynamicExecutionSummary](docs/DynamicExecutionSummary.md) - [DynamicExecutionSummaryMetadata](docs/DynamicExecutionSummaryMetadata.md) @@ -725,6 +725,7 @@ Class | Method | HTTP request | Description - [ExtractedURL](docs/ExtractedURL.md) - [ExtractionFailure](docs/ExtractionFailure.md) - [FeedbackOutputBody](docs/FeedbackOutputBody.md) + - [FeedbackSubmission](docs/FeedbackSubmission.md) - [FileActivityEntry](docs/FileActivityEntry.md) - [FileFormat](docs/FileFormat.md) - [FileHashes](docs/FileHashes.md) @@ -743,6 +744,7 @@ Class | Method | HTTP request | Description - [FindingBody](docs/FindingBody.md) - [FindingCountsBody](docs/FindingCountsBody.md) - [FormFile](docs/FormFile.md) + - [Function](docs/Function.md) - [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md) - [FunctionBlockResponse](docs/FunctionBlockResponse.md) - [FunctionBlocksResponse](docs/FunctionBlocksResponse.md) @@ -769,9 +771,7 @@ Class | Method | HTTP request | Description - [FunctionSimilarity](docs/FunctionSimilarity.md) - [FunctionSimilarityEvidence](docs/FunctionSimilarityEvidence.md) - [FunctionSourceType](docs/FunctionSourceType.md) - - [FunctionString](docs/FunctionString.md) - [FunctionStringItem](docs/FunctionStringItem.md) - - [FunctionStringsResponse](docs/FunctionStringsResponse.md) - [FunctionTypeDefinition](docs/FunctionTypeDefinition.md) - [FunctionUsage](docs/FunctionUsage.md) - [FunctionsDetailResponse](docs/FunctionsDetailResponse.md) @@ -787,6 +787,7 @@ Class | Method | HTTP request | Description - [GetBinaryExternalsOutputBody](docs/GetBinaryExternalsOutputBody.md) - [GetCollectionOutputBody](docs/GetCollectionOutputBody.md) - [GetConfigOutputBody](docs/GetConfigOutputBody.md) + - [GetCreditEstimatesOutputBody](docs/GetCreditEstimatesOutputBody.md) - [GetDataTypeHistoryBody](docs/GetDataTypeHistoryBody.md) - [GetDieInfoOutputBody](docs/GetDieInfoOutputBody.md) - [GetFindingOutputBody](docs/GetFindingOutputBody.md) @@ -846,6 +847,7 @@ Class | Method | HTTP request | Description - [ListCollectionsOutputBody](docs/ListCollectionsOutputBody.md) - [ListConversationsOutputBody](docs/ListConversationsOutputBody.md) - [ListDataTypeFunctionsBody](docs/ListDataTypeFunctionsBody.md) + - [ListDynamicExecutionRunsOutputBody](docs/ListDynamicExecutionRunsOutputBody.md) - [ListExampleAnalysesOutputBody](docs/ListExampleAnalysesOutputBody.md) - [ListFindingsOutputBody](docs/ListFindingsOutputBody.md) - [ListFunctionGlobalsOutputBody](docs/ListFunctionGlobalsOutputBody.md) @@ -854,6 +856,7 @@ Class | Method | HTTP request | Description - [ListGlobalFunctionsOutputBody](docs/ListGlobalFunctionsOutputBody.md) - [ListImportedFunctionsOutputBody](docs/ListImportedFunctionsOutputBody.md) - [ListInvestigationsOutputBody](docs/ListInvestigationsOutputBody.md) + - [ListMalwareFamiliesOutputBody](docs/ListMalwareFamiliesOutputBody.md) - [ListOperationPrerequisitesOutputBody](docs/ListOperationPrerequisitesOutputBody.md) - [ListPrincipalsOutputBody](docs/ListPrincipalsOutputBody.md) - [ListPublicUsersOutputBody](docs/ListPublicUsersOutputBody.md) @@ -865,6 +868,7 @@ Class | Method | HTTP request | Description - [Logs](docs/Logs.md) - [LookupAnalysisByBinaryIDOutputBody](docs/LookupAnalysisByBinaryIDOutputBody.md) - [MITRETechnique](docs/MITRETechnique.md) + - [MalwareFamily](docs/MalwareFamily.md) - [MatchFilters](docs/MatchFilters.md) - [MatchedFunction](docs/MatchedFunction.md) - [MemdumpEntry](docs/MemdumpEntry.md) @@ -894,6 +898,7 @@ Class | Method | HTTP request | Description - [OIDCCallbackInputBody](docs/OIDCCallbackInputBody.md) - [OperandXref](docs/OperandXref.md) - [OperationBinaryExportMetadataBinaryExportResult](docs/OperationBinaryExportMetadataBinaryExportResult.md) + - [OperationCostBody](docs/OperationCostBody.md) - [OperationCreateMetadataCreateResult](docs/OperationCreateMetadataCreateResult.md) - [OperationCryptoExplainMetadataCryptoExplainResult](docs/OperationCryptoExplainMetadataCryptoExplainResult.md) - [OperationCryptoScanMetadataCryptoScanResult](docs/OperationCryptoScanMetadataCryptoScanResult.md) @@ -952,11 +957,11 @@ Class | Method | HTTP request | Description - [ProtocolsAgentResponse](docs/ProtocolsAgentResponse.md) - [PublicTeamBody](docs/PublicTeamBody.md) - [PublicUserBody](docs/PublicUserBody.md) - - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [RatingOutputBody](docs/RatingOutputBody.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) + - [RecordedFeedback](docs/RecordedFeedback.md) - [ReferencedConstant](docs/ReferencedConstant.md) - [ReferencedConstantEvidence](docs/ReferencedConstantEvidence.md) - [RefreshBody](docs/RefreshBody.md) @@ -1045,6 +1050,7 @@ Class | Method | HTTP request | Description - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) - [SingleSectionModel](docs/SingleSectionModel.md) + - [SizeBucketBody](docs/SizeBucketBody.md) - [SoftwareTypeCountsBody](docs/SoftwareTypeCountsBody.md) - [SourceDeltaEvent](docs/SourceDeltaEvent.md) - [SourceResetEvent](docs/SourceResetEvent.md) @@ -1079,10 +1085,8 @@ Class | Method | HTTP request | Description - [StatusResponse](docs/StatusResponse.md) - [StepFinishedData](docs/StepFinishedData.md) - [StepStartedData](docs/StepStartedData.md) - - [StringFunctions](docs/StringFunctions.md) - [StringMatch](docs/StringMatch.md) - [StringMatchEvidence](docs/StringMatchEvidence.md) - - [StringSource](docs/StringSource.md) - [StructDataType](docs/StructDataType.md) - [StructDefinition](docs/StructDefinition.md) - [Subject](docs/Subject.md) diff --git a/build.gradle b/build.gradle index 76c2a180..1f2054bf 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '4.75.0' +version = '4.77.1' @@ -174,7 +174,7 @@ mavenPublishing { // key, and signing without one fails the build. if (project.hasProperty("signingInMemoryKey")) signAllPublications() - coordinates("ai.reveng", "sdk", "4.75.0") + coordinates("ai.reveng", "sdk", "4.77.1") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index defdc1bd..498da3fe 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "4.75.0", + version := "4.77.1", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AgentApi.md b/docs/AgentApi.md index 3e614b43..0fabe2a4 100644 --- a/docs/AgentApi.md +++ b/docs/AgentApi.md @@ -3148,7 +3148,7 @@ This endpoint does not need any parameter. Run the capabilities agent. -Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3306,7 +3306,7 @@ public class Example { Run the crypto-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3386,7 +3386,7 @@ public class Example { Run the cryptography agent. -Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3546,7 +3546,7 @@ public class Example { Run the execution-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3707,7 +3707,7 @@ public class Example { Run the filesystem-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3868,7 +3868,7 @@ public class Example { Run the networking-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -3948,7 +3948,7 @@ public class Example { Run the protocols agent. -Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4027,7 +4027,7 @@ public class Example { Run the remediation agent. -Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4106,7 +4106,7 @@ public class Example { Run the report-analysis agent. -Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4185,7 +4185,7 @@ public class Example { Run the secrets agent. -Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4264,7 +4264,7 @@ public class Example { Run the security-scan agent. -Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits +Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4345,7 +4345,7 @@ public class Example { Run the triage agent. -Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -4424,7 +4424,7 @@ public class Example { Run the rename-unnamed-functions agent. -Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits +Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 9b5a01b2..5b261916 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -19,13 +19,13 @@ All URIs are relative to *https://api.reveng.ai* | [**insertAnalysisLog**](AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis | | [**listAnalyses**](AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses | | [**lookupBinaryId**](AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID | -| [**putAnalysisStrings**](AnalysesCoreApi.md#putAnalysisStrings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis | | [**requeueAnalysis**](AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis | | [**startAnalysisFunctionMatching**](AnalysesCoreApi.md#startAnalysisFunctionMatching) | **POST** /v3/analyses/{analysis_id}/functions/matches | Start function matching for an analysis | | [**updateAnalysis**](AnalysesCoreApi.md#updateAnalysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis | | [**updateAnalysisTags**](AnalysesCoreApi.md#updateAnalysisTags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags | | [**uploadFile**](AnalysesCoreApi.md#uploadFile) | **POST** /v2/upload | Upload File | | [**v3CreateAnalysis**](AnalysesCoreApi.md#v3CreateAnalysis) | **POST** /v3/analyses | Create an analysis | +| [**v3CreateDynamicExecutionRun**](AnalysesCoreApi.md#v3CreateDynamicExecutionRun) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs | Start a dynamic execution run. | | [**v3DeleteAnalysis**](AnalysesCoreApi.md#v3DeleteAnalysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. | | [**v3DownloadBinaryExport**](AnalysesCoreApi.md#v3DownloadBinaryExport) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export | | [**v3GetAnalysis**](AnalysesCoreApi.md#v3GetAnalysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. | @@ -38,30 +38,31 @@ All URIs are relative to *https://api.reveng.ai* | [**v3GetAnalysisStrings**](AnalysesCoreApi.md#v3GetAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. | | [**v3GetAnalysisStringsStatus**](AnalysesCoreApi.md#v3GetAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. | | [**v3GetBinaryExportOperation**](AnalysesCoreApi.md#v3GetBinaryExportOperation) | **GET** /v3/operations/binary-export/{task_id} | Get a binary export operation | -| [**v3GetDynamicExecutionArtifact**](AnalysesCoreApi.md#v3GetDynamicExecutionArtifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256} | Download an artifact. | -| [**v3GetDynamicExecutionLogsDownload**](AnalysesCoreApi.md#v3GetDynamicExecutionLogsDownload) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/logs/download | Download the execution logs archive. | -| [**v3GetDynamicExecutionMemdump**](AnalysesCoreApi.md#v3GetDynamicExecutionMemdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256} | Download a memory dump. | -| [**v3GetDynamicExecutionOperation**](AnalysesCoreApi.md#v3GetDynamicExecutionOperation) | **GET** /v3/operations/dynamic-execution/{analysis_id} | Get a dynamic execution operation. | -| [**v3GetDynamicExecutionPcap**](AnalysesCoreApi.md#v3GetDynamicExecutionPcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/pcap | Download the network capture. | -| [**v3GetDynamicExecutionReport**](AnalysesCoreApi.md#v3GetDynamicExecutionReport) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/report | Get the dynamic execution report. | -| [**v3GetDynamicExecutionScreenshot**](AnalysesCoreApi.md#v3GetDynamicExecutionScreenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index} | Download a screenshot. | -| [**v3GetDynamicExecutionSummary**](AnalysesCoreApi.md#v3GetDynamicExecutionSummary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/summary | Get the dynamic execution summary. | -| [**v3GetDynamicExecutionSummaryOperation**](AnalysesCoreApi.md#v3GetDynamicExecutionSummaryOperation) | **GET** /v3/operations/dynamic-execution-summary/{analysis_id} | Get a dynamic execution summary operation. | -| [**v3GetDynamicExecutionWiresharkKeys**](AnalysesCoreApi.md#v3GetDynamicExecutionWiresharkKeys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys | Download Wireshark TLS session keys. | +| [**v3GetDynamicExecutionOperation**](AnalysesCoreApi.md#v3GetDynamicExecutionOperation) | **GET** /v3/operations/dynamic-execution/{run_id} | Get a dynamic execution operation. | +| [**v3GetDynamicExecutionRun**](AnalysesCoreApi.md#v3GetDynamicExecutionRun) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id} | Get a dynamic execution run. | +| [**v3GetDynamicExecutionRunArtifact**](AnalysesCoreApi.md#v3GetDynamicExecutionRunArtifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256} | Download a run's artifact. | +| [**v3GetDynamicExecutionRunLogsDownload**](AnalysesCoreApi.md#v3GetDynamicExecutionRunLogsDownload) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download | Download a run's execution logs archive. | +| [**v3GetDynamicExecutionRunMemdump**](AnalysesCoreApi.md#v3GetDynamicExecutionRunMemdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256} | Download a run's memory dump. | +| [**v3GetDynamicExecutionRunPcap**](AnalysesCoreApi.md#v3GetDynamicExecutionRunPcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap | Download a run's network capture. | +| [**v3GetDynamicExecutionRunReport**](AnalysesCoreApi.md#v3GetDynamicExecutionRunReport) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report | Get a run's dynamic execution report. | +| [**v3GetDynamicExecutionRunScreenshot**](AnalysesCoreApi.md#v3GetDynamicExecutionRunScreenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index} | Download a run's screenshot. | +| [**v3GetDynamicExecutionRunSummary**](AnalysesCoreApi.md#v3GetDynamicExecutionRunSummary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary | Get a run's dynamic execution summary. | +| [**v3GetDynamicExecutionRunWiresharkKeys**](AnalysesCoreApi.md#v3GetDynamicExecutionRunWiresharkKeys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys | Download a run's Wireshark TLS session keys. | +| [**v3GetDynamicExecutionSummaryOperation**](AnalysesCoreApi.md#v3GetDynamicExecutionSummaryOperation) | **GET** /v3/operations/dynamic-execution-summary/{run_id} | Get a dynamic execution summary operation. | | [**v3GrantAnalysisAccess**](AnalysesCoreApi.md#v3GrantAnalysisAccess) | **POST** /v3/analyses/{analysis_id}/access-rules | Share an analysis with a user or team | | [**v3ListAnalyses**](AnalysesCoreApi.md#v3ListAnalyses) | **GET** /v3/analyses | List analyses | | [**v3ListAnalysisAccessRules**](AnalysesCoreApi.md#v3ListAnalysisAccessRules) | **GET** /v3/analyses/{analysis_id}/access-rules | List who an analysis is shared with | | [**v3ListAnalysisGlobals**](AnalysesCoreApi.md#v3ListAnalysisGlobals) | **GET** /v3/analyses/{analysis_id}/globals | List the global variables in an analysis. | | [**v3ListAnalysisOperations**](AnalysesCoreApi.md#v3ListAnalysisOperations) | **GET** /v3/analyses/{analysis_id}/operations | List the operations run on an analysis. | -| [**v3ListDynamicExecutionScreenshots**](AnalysesCoreApi.md#v3ListDynamicExecutionScreenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots | List the screenshots captured during execution. | +| [**v3ListDynamicExecutionRunScreenshots**](AnalysesCoreApi.md#v3ListDynamicExecutionRunScreenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots | List a run's screenshots. | +| [**v3ListDynamicExecutionRuns**](AnalysesCoreApi.md#v3ListDynamicExecutionRuns) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs | List the dynamic execution runs. | | [**v3ListExampleAnalyses**](AnalysesCoreApi.md#v3ListExampleAnalyses) | **GET** /v3/analyses/examples | List example analyses | | [**v3ListGlobalFunctions**](AnalysesCoreApi.md#v3ListGlobalFunctions) | **GET** /v3/analyses/{analysis_id}/globals/{vaddr}/functions | List the functions referencing a global variable. | | [**v3LookupAnalysisByBinaryId**](AnalysesCoreApi.md#v3LookupAnalysisByBinaryId) | **GET** /v3/analyses/lookup/{binary_id} | Look up the most recent analysis for a binary. | | [**v3QueueBinaryExport**](AnalysesCoreApi.md#v3QueueBinaryExport) | **POST** /v3/analyses/{analysis_id}/binary-export | Queue a binary export | | [**v3RequeueAnalysis**](AnalysesCoreApi.md#v3RequeueAnalysis) | **POST** /v3/analyses/{analysis_id}/requeue | Requeue an analysis | | [**v3RevokeAnalysisAccess**](AnalysesCoreApi.md#v3RevokeAnalysisAccess) | **DELETE** /v3/analyses/{analysis_id}/access-rules | Stop sharing an analysis with a user or team | -| [**v3RunDynamicExecution**](AnalysesCoreApi.md#v3RunDynamicExecution) | **POST** /v3/analyses/{analysis_id}/dynamic-execution:run | Trigger a dynamic execution run. | -| [**v3RunDynamicExecutionSummary**](AnalysesCoreApi.md#v3RunDynamicExecutionSummary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/summary:run | Regenerate the dynamic execution summary. | +| [**v3RunDynamicExecutionRunSummary**](AnalysesCoreApi.md#v3RunDynamicExecutionRunSummary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run | Regenerate a run's dynamic execution summary. | | [**v3SearchTags**](AnalysesCoreApi.md#v3SearchTags) | **GET** /v3/tags | Search tags | | [**v3UpdateAnalysis**](AnalysesCoreApi.md#v3UpdateAnalysis) | **PATCH** /v3/analyses/{analysis_id} | Update an analysis. | | [**v3UpdateAnalysisGlobal**](AnalysesCoreApi.md#v3UpdateAnalysisGlobal) | **PATCH** /v3/analyses/{analysis_id}/globals/{vaddr} | Edit a global variable. | @@ -75,7 +76,7 @@ All URIs are relative to *https://api.reveng.ai* Add a user-provided string to an analysis. -Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -145,6 +146,7 @@ public class Example { | **201** | Created | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | @@ -1232,82 +1234,6 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | - -# **putAnalysisStrings** -> BaseResponse putAnalysisStrings(analysisId, putAnalysisStringsRequest) - -Add strings to the analysis - -Add strings to the analysis. Rejects if any string already exists at the given vaddr. - -### Example -```java -// Import classes: -import ai.reveng.invoker.ApiClient; -import ai.reveng.invoker.ApiException; -import ai.reveng.invoker.Configuration; -import ai.reveng.invoker.auth.*; -import ai.reveng.invoker.models.*; -import ai.reveng.api.AnalysesCoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.reveng.ai"); - - // Configure API key authorization: APIKey - ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); - APIKey.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //APIKey.setApiKeyPrefix("Token"); - - // 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 | - try { - BaseResponse result = apiInstance.putAnalysisStrings(analysisId, putAnalysisStringsRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#putAnalysisStrings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | -| **putAnalysisStringsRequest** | [**PutAnalysisStringsRequest**](PutAnalysisStringsRequest.md)| | | - -### Return type - -[**BaseResponse**](BaseResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | - | -| **422** | Invalid request parameters | - | - # **requeueAnalysis** > BaseResponseCreated requeueAnalysis(analysisId, reAnalysisForm, xRevEngApplication) @@ -1394,7 +1320,7 @@ public class Example { Start function matching for an analysis -Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -1465,6 +1391,7 @@ public class Example { | **400** | Bad Request | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | @@ -1781,6 +1708,86 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3CreateDynamicExecutionRun** +> OperationDynamicExecutionMetadataDynamicExecutionResult v3CreateDynamicExecutionRun(analysisId, runDynamicExecutionInputBody) + +Start a dynamic execution run. + +Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // 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 + RunDynamicExecutionInputBody runDynamicExecutionInputBody = new RunDynamicExecutionInputBody(); // RunDynamicExecutionInputBody | + try { + OperationDynamicExecutionMetadataDynamicExecutionResult result = apiInstance.v3CreateDynamicExecutionRun(analysisId, runDynamicExecutionInputBody); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesCoreApi#v3CreateDynamicExecutionRun"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | +| **runDynamicExecutionInputBody** | [**RunDynamicExecutionInputBody**](RunDynamicExecutionInputBody.md)| | [optional] | + +### Return type + +[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **v3DeleteAnalysis** > v3DeleteAnalysis(analysisId) @@ -2723,13 +2730,13 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionArtifact** -> v3GetDynamicExecutionArtifact(analysisId, sha256, filename) + +# **v3GetDynamicExecutionOperation** +> OperationDynamicExecutionMetadataDynamicExecutionResult v3GetDynamicExecutionOperation(runId) -Download an artifact. +Get a dynamic execution operation. -Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied ### Example ```java @@ -2757,13 +2764,12 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); - Long analysisId = 56L; // Long | Analysis ID - String sha256 = "sha256_example"; // String | SHA-256 hex digest of the artifact - String filename = "filename_example"; // String | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. + String runId = "runId_example"; // String | Dynamic execution run ID try { - apiInstance.v3GetDynamicExecutionArtifact(analysisId, sha256, filename); + OperationDynamicExecutionMetadataDynamicExecutionResult result = apiInstance.v3GetDynamicExecutionOperation(runId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionArtifact"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionOperation"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2777,13 +2783,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **analysisId** | **Long**| Analysis ID | | -| **sha256** | **String**| SHA-256 hex digest of the artifact | | -| **filename** | **String**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] | +| **runId** | **String**| Dynamic execution run ID | | ### Return type -null (empty response body) +[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) ### Authorization @@ -2800,17 +2804,16 @@ null (empty response body) | **200** | OK | - | | **403** | Forbidden | - | | **404** | Not Found | - | -| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionLogsDownload** -> v3GetDynamicExecutionLogsDownload(analysisId) + +# **v3GetDynamicExecutionRun** +> DynamicExecutionRun v3GetDynamicExecutionRun(analysisId, runId) -Download the execution logs archive. +Get a dynamic execution run. -Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied ### Example ```java @@ -2839,10 +2842,12 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - apiInstance.v3GetDynamicExecutionLogsDownload(analysisId); + DynamicExecutionRun result = apiInstance.v3GetDynamicExecutionRun(analysisId, runId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionLogsDownload"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRun"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2857,10 +2862,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type -null (empty response body) +[**DynamicExecutionRun**](DynamicExecutionRun.md) ### Authorization @@ -2877,17 +2883,16 @@ null (empty response body) | **200** | OK | - | | **403** | Forbidden | - | | **404** | Not Found | - | -| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionMemdump** -> v3GetDynamicExecutionMemdump(analysisId, sha256, filename) + +# **v3GetDynamicExecutionRunArtifact** +> v3GetDynamicExecutionRunArtifact(analysisId, runId, sha256, filename) -Download a memory dump. +Download a run's artifact. -Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -2916,12 +2921,13 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID String sha256 = "sha256_example"; // String | SHA-256 hex digest of the artifact String filename = "filename_example"; // String | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. try { - apiInstance.v3GetDynamicExecutionMemdump(analysisId, sha256, filename); + apiInstance.v3GetDynamicExecutionRunArtifact(analysisId, runId, sha256, filename); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionMemdump"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunArtifact"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2936,6 +2942,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | | **sha256** | **String**| SHA-256 hex digest of the artifact | | | **filename** | **String**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] | @@ -2962,13 +2969,13 @@ null (empty response body) | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionOperation** -> OperationDynamicExecutionMetadataDynamicExecutionResult v3GetDynamicExecutionOperation(analysisId) + +# **v3GetDynamicExecutionRunLogsDownload** +> v3GetDynamicExecutionRunLogsDownload(analysisId, runId) -Get a dynamic execution operation. +Download a run's execution logs archive. -Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -2997,11 +3004,11 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - OperationDynamicExecutionMetadataDynamicExecutionResult result = apiInstance.v3GetDynamicExecutionOperation(analysisId); - System.out.println(result); + apiInstance.v3GetDynamicExecutionRunLogsDownload(analysisId, runId); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionOperation"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunLogsDownload"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3016,10 +3023,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type -[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) +null (empty response body) ### Authorization @@ -3036,16 +3044,17 @@ public class Example { | **200** | OK | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionPcap** -> v3GetDynamicExecutionPcap(analysisId) + +# **v3GetDynamicExecutionRunMemdump** +> v3GetDynamicExecutionRunMemdump(analysisId, runId, sha256, filename) -Download the network capture. +Download a run's memory dump. -Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -3074,10 +3083,13 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID + String sha256 = "sha256_example"; // String | SHA-256 hex digest of the artifact + String filename = "filename_example"; // String | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. try { - apiInstance.v3GetDynamicExecutionPcap(analysisId); + apiInstance.v3GetDynamicExecutionRunMemdump(analysisId, runId, sha256, filename); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionPcap"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunMemdump"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3092,6 +3104,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | +| **sha256** | **String**| SHA-256 hex digest of the artifact | | +| **filename** | **String**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] | ### Return type @@ -3116,13 +3131,13 @@ null (empty response body) | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionReport** -> AnalysisReport v3GetDynamicExecutionReport(analysisId) + +# **v3GetDynamicExecutionRunPcap** +> v3GetDynamicExecutionRunPcap(analysisId, runId) -Get the dynamic execution report. +Download a run's network capture. -Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -3151,11 +3166,91 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - AnalysisReport result = apiInstance.v3GetDynamicExecutionReport(analysisId); + apiInstance.v3GetDynamicExecutionRunPcap(analysisId, runId); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunPcap"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | + +### Return type + +null (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **409** | Conflict | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + + +# **v3GetDynamicExecutionRunReport** +> AnalysisReport v3GetDynamicExecutionRunReport(analysisId, runId) + +Get a run's dynamic execution report. + +Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // 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 + String runId = "runId_example"; // String | Dynamic execution run ID + try { + AnalysisReport result = apiInstance.v3GetDynamicExecutionRunReport(analysisId, runId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionReport"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunReport"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3170,6 +3265,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type @@ -3194,13 +3290,13 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionScreenshot** -> v3GetDynamicExecutionScreenshot(analysisId, index) + +# **v3GetDynamicExecutionRunScreenshot** +> v3GetDynamicExecutionRunScreenshot(analysisId, runId, index) -Download a screenshot. +Download a run's screenshot. -Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -3229,11 +3325,12 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID Long index = 56L; // Long | Index of the screenshot, as listed by the screenshots endpoint try { - apiInstance.v3GetDynamicExecutionScreenshot(analysisId, index); + apiInstance.v3GetDynamicExecutionRunScreenshot(analysisId, runId, index); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionScreenshot"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunScreenshot"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3248,6 +3345,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | | **index** | **Long**| Index of the screenshot, as listed by the screenshots endpoint | | ### Return type @@ -3273,11 +3371,11 @@ null (empty response body) | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionSummary** -> DynamicExecutionSummary v3GetDynamicExecutionSummary(analysisId) + +# **v3GetDynamicExecutionRunSummary** +> DynamicExecutionSummary v3GetDynamicExecutionRunSummary(analysisId, runId) -Get the dynamic execution summary. +Get a run's dynamic execution summary. Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete @@ -3308,11 +3406,12 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - DynamicExecutionSummary result = apiInstance.v3GetDynamicExecutionSummary(analysisId); + DynamicExecutionSummary result = apiInstance.v3GetDynamicExecutionRunSummary(analysisId, runId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionSummary"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunSummary"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3327,6 +3426,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type @@ -3351,13 +3451,13 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionSummaryOperation** -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3GetDynamicExecutionSummaryOperation(analysisId) + +# **v3GetDynamicExecutionRunWiresharkKeys** +> v3GetDynamicExecutionRunWiresharkKeys(analysisId, runId) -Get a dynamic execution summary operation. +Download a run's Wireshark TLS session keys. -Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -3386,11 +3486,11 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult result = apiInstance.v3GetDynamicExecutionSummaryOperation(analysisId); - System.out.println(result); + apiInstance.v3GetDynamicExecutionRunWiresharkKeys(analysisId, runId); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionSummaryOperation"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionRunWiresharkKeys"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3405,10 +3505,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type -[**OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult**](OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult.md) +null (empty response body) ### Authorization @@ -3425,16 +3526,17 @@ public class Example { | **200** | OK | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3GetDynamicExecutionWiresharkKeys** -> v3GetDynamicExecutionWiresharkKeys(analysisId) + +# **v3GetDynamicExecutionSummaryOperation** +> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3GetDynamicExecutionSummaryOperation(runId) -Download Wireshark TLS session keys. +Get a dynamic execution summary operation. -Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied ### Example ```java @@ -3462,11 +3564,12 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); - Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - apiInstance.v3GetDynamicExecutionWiresharkKeys(analysisId); + OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult result = apiInstance.v3GetDynamicExecutionSummaryOperation(runId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionWiresharkKeys"); + System.err.println("Exception when calling AnalysesCoreApi#v3GetDynamicExecutionSummaryOperation"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3480,11 +3583,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type -null (empty response body) +[**OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult**](OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult.md) ### Authorization @@ -3501,7 +3604,6 @@ null (empty response body) | **200** | OK | - | | **403** | Forbidden | - | | **404** | Not Found | - | -| **409** | Conflict | - | | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | @@ -3862,7 +3964,7 @@ public class Example { List the operations run on an analysis. -Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied ### Example ```java @@ -3933,13 +4035,13 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3ListDynamicExecutionScreenshots** -> ScreenshotsIndex v3ListDynamicExecutionScreenshots(analysisId) + +# **v3ListDynamicExecutionRunScreenshots** +> ScreenshotsIndex v3ListDynamicExecutionRunScreenshots(analysisId, runId) -List the screenshots captured during execution. +List a run's screenshots. -Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -3968,11 +4070,12 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - ScreenshotsIndex result = apiInstance.v3ListDynamicExecutionScreenshots(analysisId); + ScreenshotsIndex result = apiInstance.v3ListDynamicExecutionRunScreenshots(analysisId, runId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3ListDynamicExecutionScreenshots"); + System.err.println("Exception when calling AnalysesCoreApi#v3ListDynamicExecutionRunScreenshots"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3987,6 +4090,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type @@ -4011,6 +4115,83 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3ListDynamicExecutionRuns** +> ListDynamicExecutionRunsOutputBody v3ListDynamicExecutionRuns(analysisId) + +List the dynamic execution runs. + +Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // 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 { + ListDynamicExecutionRunsOutputBody result = apiInstance.v3ListDynamicExecutionRuns(analysisId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesCoreApi#v3ListDynamicExecutionRuns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | + +### Return type + +[**ListDynamicExecutionRunsOutputBody**](ListDynamicExecutionRunsOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **v3ListExampleAnalyses** > ListExampleAnalysesOutputBody v3ListExampleAnalyses() @@ -4477,94 +4658,13 @@ null (empty response body) | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **v3RunDynamicExecution** -> OperationDynamicExecutionMetadataDynamicExecutionResult v3RunDynamicExecution(analysisId, runDynamicExecutionInputBody) - -Trigger a dynamic execution run. - -Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - -### Example -```java -// Import classes: -import ai.reveng.invoker.ApiClient; -import ai.reveng.invoker.ApiException; -import ai.reveng.invoker.Configuration; -import ai.reveng.invoker.auth.*; -import ai.reveng.invoker.models.*; -import ai.reveng.api.AnalysesCoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.reveng.ai"); - - // Configure API key authorization: APIKey - ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); - APIKey.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //APIKey.setApiKeyPrefix("Token"); - - // 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 - RunDynamicExecutionInputBody runDynamicExecutionInputBody = new RunDynamicExecutionInputBody(); // RunDynamicExecutionInputBody | - try { - OperationDynamicExecutionMetadataDynamicExecutionResult result = apiInstance.v3RunDynamicExecution(analysisId, runDynamicExecutionInputBody); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3RunDynamicExecution"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Long**| Analysis ID | | -| **runDynamicExecutionInputBody** | [**RunDynamicExecutionInputBody**](RunDynamicExecutionInputBody.md)| | [optional] | - -### Return type - -[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP 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 | - | - - -# **v3RunDynamicExecutionSummary** -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3RunDynamicExecutionSummary(analysisId) + +# **v3RunDynamicExecutionRunSummary** +> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3RunDynamicExecutionRunSummary(analysisId, runId) -Regenerate the dynamic execution summary. +Regenerate a run's dynamic execution summary. -Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete +Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example ```java @@ -4593,11 +4693,12 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID + String runId = "runId_example"; // String | Dynamic execution run ID try { - OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult result = apiInstance.v3RunDynamicExecutionSummary(analysisId); + OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult result = apiInstance.v3RunDynamicExecutionRunSummary(analysisId, runId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalysesCoreApi#v3RunDynamicExecutionSummary"); + System.err.println("Exception when calling AnalysesCoreApi#v3RunDynamicExecutionRunSummary"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -4612,6 +4713,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | +| **runId** | **String**| Dynamic execution run ID | | ### Return type @@ -4630,7 +4732,6 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **409** | Conflict | - | @@ -4802,7 +4903,7 @@ public class Example { Edit a global variable. -Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists +Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 77912948..21e9a194 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -8,9 +8,11 @@ All URIs are relative to *https://api.reveng.ai* | [**getCapabilities**](AnalysesResultsMetadataApi.md#getCapabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis | | [**getFunctionsList**](AnalysesResultsMetadataApi.md#getFunctionsList) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis | | [**getTags**](AnalysesResultsMetadataApi.md#getTags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score | +| [**v3GetAnalysisFeedback**](AnalysesResultsMetadataApi.md#v3GetAnalysisFeedback) | **GET** /v3/analyses/{analysis_id}/feedback/{type} | Get the caller's feedback on an analysis. | | [**v3GetAnalysisXref**](AnalysesResultsMetadataApi.md#v3GetAnalysisXref) | **GET** /v3/analyses/{analysis_id}/xrefs/{vaddr} | Look up xrefs by virtual address. | | [**v3ListAnalysisCapabilities**](AnalysesResultsMetadataApi.md#v3ListAnalysisCapabilities) | **GET** /v3/analyses/{analysis_id}/capabilities | List the capabilities found in an analysis. | | [**v3ListAnalysisTags**](AnalysesResultsMetadataApi.md#v3ListAnalysisTags) | **GET** /v3/analyses/{analysis_id}/tags | List the tags on an analysis. | +| [**v3UpsertAnalysisFeedback**](AnalysesResultsMetadataApi.md#v3UpsertAnalysisFeedback) | **PUT** /v3/analyses/{analysis_id}/feedback/{type} | Record feedback on an analysis. | @@ -321,6 +323,85 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | + +# **v3GetAnalysisFeedback** +> RecordedFeedback v3GetAnalysisFeedback(analysisId, type) + +Get the caller's feedback on an analysis. + +Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesResultsMetadataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); + Long analysisId = 56L; // Long | Analysis ID + String type = "function-matching"; // String | What the feedback is about + try { + RecordedFeedback result = apiInstance.v3GetAnalysisFeedback(analysisId, type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesResultsMetadataApi#v3GetAnalysisFeedback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | +| **type** | **String**| What the feedback is about | [enum: function-matching] | + +### Return type + +[**RecordedFeedback**](RecordedFeedback.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **v3GetAnalysisXref** > AnalysisXrefOutputBody v3GetAnalysisXref(analysisId, vaddr) @@ -554,3 +635,83 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3UpsertAnalysisFeedback** +> v3UpsertAnalysisFeedback(analysisId, type, feedbackSubmission) + +Record feedback on an analysis. + +Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesResultsMetadataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AnalysesResultsMetadataApi apiInstance = new AnalysesResultsMetadataApi(defaultClient); + Long analysisId = 56L; // Long | Analysis ID + String type = "function-matching"; // String | What the feedback is about + FeedbackSubmission feedbackSubmission = new FeedbackSubmission(); // FeedbackSubmission | + try { + apiInstance.v3UpsertAnalysisFeedback(analysisId, type, feedbackSubmission); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesResultsMetadataApi#v3UpsertAnalysisFeedback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | +| **type** | **String**| What the feedback is about | [enum: function-matching] | +| **feedbackSubmission** | [**FeedbackSubmission**](FeedbackSubmission.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + diff --git a/docs/AnalysisBasicInfoOutputBody.md b/docs/AnalysisBasicInfoOutputBody.md index cbf4ca4c..2a19f324 100644 --- a/docs/AnalysisBasicInfoOutputBody.md +++ b/docs/AnalysisBasicInfoOutputBody.md @@ -20,7 +20,7 @@ |**detectedBinaryType** | **String** | Detected operating-system platform; empty when unavailable | | |**detectedLanguage** | **String** | Detected source language; empty when unavailable | | |**functionCount** | **Long** | Number of functions in the binary | | -|**isAdvanced** | **Boolean** | True when the analysis was run in advanced mode | | +|**isAdvanced** | **Boolean** | Always false; advanced (DFG) analysis has been removed | | |**isOwner** | **Boolean** | True when the caller is the analysis owner | | |**isSystem** | **Boolean** | True when the analysis is owned by a system user | | |**modelId** | **Long** | Model ID | | diff --git a/docs/AnalysisConfig.md b/docs/AnalysisConfig.md index 2660c0c3..5a592067 100644 --- a/docs/AnalysisConfig.md +++ b/docs/AnalysisConfig.md @@ -10,7 +10,6 @@ |**scrapeThirdPartyConfig** | **ScrapeThirdPartyConfig** | Settings to scrape third party sources | [optional] | |**generateCapabilities** | **Boolean** | A configuration option for generating capabilities of a binary | [optional] | |**noCache** | **Boolean** | When enabled, skips using cached data within the processing. | [optional] | -|**advancedAnalysis** | **Boolean** | Enables an advanced security analysis. | [optional] | |**sandboxConfig** | [**SandboxOptions**](SandboxOptions.md) | Including a sandbox config enables the dynamic execution sandbox | [optional] | diff --git a/docs/AnalysisFunctions.md b/docs/AnalysisFunctions.md index d3e0607e..7a17b3c5 100644 --- a/docs/AnalysisFunctions.md +++ b/docs/AnalysisFunctions.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**functions** | [**List<AppApiRestV2FunctionsTypesFunction>**](AppApiRestV2FunctionsTypesFunction.md) | The functions associated with the analysis | | +|**functions** | [**List<Function>**](Function.md) | The functions associated with the analysis | | diff --git a/docs/AnalysisOperationsOutputBody.md b/docs/AnalysisOperationsOutputBody.md index 56bb0c40..84fc6139 100644 --- a/docs/AnalysisOperationsOutputBody.md +++ b/docs/AnalysisOperationsOutputBody.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**operations** | **List<AnalysisOperationBody>** | The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary. Operations that have never run are omitted | | +|**operations** | **List<AnalysisOperationBody>** | The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary, then one dynamic-execution operation per sandbox run of the analysis, newest first. Operations that have never run are omitted | | diff --git a/docs/AnalysisStringInput.md b/docs/AnalysisStringInput.md deleted file mode 100644 index b87b8c12..00000000 --- a/docs/AnalysisStringInput.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AnalysisStringInput - -Input model for inserting a string into an analysis. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**value** | **String** | The string literal value | | -|**vaddr** | **Integer** | The virtual address of the string | | -|**source** | **StringSource** | The source of the string | | - - - diff --git a/docs/AnalysisStringsResponse.md b/docs/AnalysisStringsResponse.md deleted file mode 100644 index 52b7eaa3..00000000 --- a/docs/AnalysisStringsResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AnalysisStringsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**strings** | [**List<StringFunctions>**](StringFunctions.md) | The strings associated with the analysis | | -|**totalStrings** | **Integer** | The total number of strings associated with this analysis | | - - - diff --git a/docs/AnalysisStringsStatusResponse.md b/docs/AnalysisStringsStatusResponse.md deleted file mode 100644 index 6cfea76a..00000000 --- a/docs/AnalysisStringsStatusResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AnalysisStringsStatusResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **BinariesTaskStatus** | The current status of the strings extraction task | | - - - diff --git a/docs/AppApiRestV2FunctionsResponsesFunction.md b/docs/AppApiRestV2FunctionsResponsesFunction.md deleted file mode 100644 index be7aeb02..00000000 --- a/docs/AppApiRestV2FunctionsResponsesFunction.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# AppApiRestV2FunctionsResponsesFunction - -Function schema used in function strings response. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**functionId** | **Integer** | | [optional] | -|**functionVaddr** | **Long** | Function virtual address | | - - - diff --git a/docs/BaseResponseAnalysisStringsResponse.md b/docs/BaseResponseAnalysisStringsResponse.md deleted file mode 100644 index e51f701b..00000000 --- a/docs/BaseResponseAnalysisStringsResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseAnalysisStringsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**AnalysisStringsResponse**](AnalysisStringsResponse.md) | Response data | [optional] | -|**message** | **String** | Response message | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | List of errors | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseAnalysisStringsStatusResponse.md b/docs/BaseResponseAnalysisStringsStatusResponse.md deleted file mode 100644 index a194a5ac..00000000 --- a/docs/BaseResponseAnalysisStringsStatusResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseAnalysisStringsStatusResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**AnalysisStringsStatusResponse**](AnalysisStringsStatusResponse.md) | Response data | [optional] | -|**message** | **String** | Response message | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | List of errors | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/BaseResponseFunctionStringsResponse.md b/docs/BaseResponseFunctionStringsResponse.md deleted file mode 100644 index 3ae8b7c6..00000000 --- a/docs/BaseResponseFunctionStringsResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseFunctionStringsResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**FunctionStringsResponse**](FunctionStringsResponse.md) | Response data | [optional] | -|**message** | **String** | Response message | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | List of errors | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/Basic.md b/docs/Basic.md index 571d396a..42d418eb 100644 --- a/docs/Basic.md +++ b/docs/Basic.md @@ -20,7 +20,7 @@ |**isOwner** | **Boolean** | Whether the current user is the owner | | |**debug** | **Boolean** | Whether the current analysis was analysed with debug symbols | | |**functionCount** | **Integer** | The number of functions in the binary | | -|**isAdvanced** | **Boolean** | Whether the analysis was advanced | | +|**isAdvanced** | **Boolean** | Always false; advanced (DFG) analysis has been removed | [optional] | |**baseAddress** | **Integer** | The base address of the binary | | |**binaryUuid** | **String** | The UUID of the binary | [optional] | |**sequencerVersion** | **String** | The sequencer version used for analysis | [optional] | diff --git a/docs/BatchFunctionSignatureEntry.md b/docs/BatchFunctionSignatureEntry.md index 34002c37..ec6b59a7 100644 --- a/docs/BatchFunctionSignatureEntry.md +++ b/docs/BatchFunctionSignatureEntry.md @@ -27,6 +27,7 @@ | SYSTEM | "SYSTEM" | | USER | "USER" | | AUTO_UNSTRIP | "AUTO_UNSTRIP" | +| AI_AGENT | "AI_AGENT" | | UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/docs/BillingApi.md b/docs/BillingApi.md new file mode 100644 index 00000000..fb6ed8d6 --- /dev/null +++ b/docs/BillingApi.md @@ -0,0 +1,79 @@ +# BillingApi + +All URIs are relative to *https://api.reveng.ai* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**v3GetCreditEstimates**](BillingApi.md#v3GetCreditEstimates) | **GET** /v3/credit-estimates | Get credit estimates. | + + + +# **v3GetCreditEstimates** +> GetCreditEstimatesOutputBody v3GetCreditEstimates() + +Get credit estimates. + +Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.BillingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + BillingApi apiInstance = new BillingApi(defaultClient); + try { + GetCreditEstimatesOutputBody result = apiInstance.v3GetCreditEstimates(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BillingApi#v3GetCreditEstimates"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetCreditEstimatesOutputBody**](GetCreditEstimatesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **0** | Error | - | + diff --git a/docs/BinariesApi.md b/docs/BinariesApi.md index 91bdd033..d4e9057c 100644 --- a/docs/BinariesApi.md +++ b/docs/BinariesApi.md @@ -19,6 +19,7 @@ All URIs are relative to *https://api.reveng.ai* | [**v3GetBinaryExternals**](BinariesApi.md#v3GetBinaryExternals) | **GET** /v3/binaries/{binary_id}/externals | Get third-party threat-intel lookups for a binary. | | [**v3GetBinaryRelated**](BinariesApi.md#v3GetBinaryRelated) | **GET** /v3/binaries/{binary_id}/related | Get the binaries related to this one by unpacking. | | [**v3GetBinaryRelatedStatus**](BinariesApi.md#v3GetBinaryRelatedStatus) | **GET** /v3/binaries/{binary_id}/related/status | Get the archive-unpacking status for a binary. | +| [**v3ListMalwareFamilies**](BinariesApi.md#v3ListMalwareFamilies) | **GET** /v3/malware-families | Look up the malware families of binaries in the RevEng.AI malware corpus. | | [**v3SearchBinaries**](BinariesApi.md#v3SearchBinaries) | **GET** /v3/binaries | Search binaries | | [**v3UploadFile**](BinariesApi.md#v3UploadFile) | **POST** /v3/upload | Upload a file. | @@ -1138,6 +1139,80 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3ListMalwareFamilies** +> ListMalwareFamiliesOutputBody v3ListMalwareFamilies(binaryIds) + +Look up the malware families of binaries in the RevEng.AI malware corpus. + +Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.BinariesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + BinariesApi apiInstance = new BinariesApi(defaultClient); + List binaryIds = Arrays.asList(); // List | Binaries to look up, typically those a function-matching run found in the malware corpus. + try { + ListMalwareFamiliesOutputBody result = apiInstance.v3ListMalwareFamilies(binaryIds); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BinariesApi#v3ListMalwareFamilies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **binaryIds** | [**List<Long>**](Long.md)| Binaries to look up, typically those a function-matching run found in the malware corpus. | | + +### Return type + +[**ListMalwareFamiliesOutputBody**](ListMalwareFamiliesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **0** | Error | - | + # **v3SearchBinaries** > SearchBinariesOutputBody v3SearchBinaries(partialName, partialSha256, tags, modelName, userFilesOnly, excludeBinaryId, userIds, limit, offset) diff --git a/docs/BinariesTaskStatus.md b/docs/BinariesTaskStatus.md deleted file mode 100644 index 89355dba..00000000 --- a/docs/BinariesTaskStatus.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# BinariesTaskStatus - -## Enum - - -* `UNINITIALISED` (value: `"UNINITIALISED"`) - -* `PENDING` (value: `"PENDING"`) - -* `RUNNING` (value: `"RUNNING"`) - -* `COMPLETED` (value: `"COMPLETED"`) - -* `FAILED` (value: `"FAILED"`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `"unknown_default_open_api"`) - - - diff --git a/docs/BulkCreateUserResult.md b/docs/BulkCreateUserResult.md index 6ef39762..8df6cdd1 100644 --- a/docs/BulkCreateUserResult.md +++ b/docs/BulkCreateUserResult.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**email** | **String** | Search is applied to string value | | +|**email** | **String** | | | |**error** | **String** | Error description; present on failure | [optional] | |**index** | **Long** | 1-based row index in the CSV | | |**success** | **Boolean** | | | |**user** | **User** | Created user; present on success | [optional] | -|**username** | **String** | Search is applied to string value | | +|**username** | **String** | | | diff --git a/docs/CallEdge.md b/docs/CallEdge.md index 93635294..539d7ec4 100644 --- a/docs/CallEdge.md +++ b/docs/CallEdge.md @@ -15,7 +15,18 @@ |**callerVaddr** | **Long** | Entry vaddr of the caller function (joined from function_t). | | |**importedFunctionId** | **Long** | Imported function ID for an external callee, resolved via the thunk/stub address. | [optional] | |**isExternal** | **Boolean** | | | +|**source** | [**SourceEnum**](#SourceEnum) | Who found the edge: SYSTEM for the analysis, AI_AGENT for a call AI decompilation recovered that the analysis missed. | | |**thunkedVaddr** | **Long** | | [optional] | +## Enum: SourceEnum + +| Name | Value | +|---- | -----| +| SYSTEM | "SYSTEM" | +| AI_AGENT | "AI_AGENT" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/CapabilityImplementation.md b/docs/CapabilityImplementation.md new file mode 100644 index 00000000..a2c3b497 --- /dev/null +++ b/docs/CapabilityImplementation.md @@ -0,0 +1,14 @@ + + +# CapabilityImplementation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**capability** | **String** | Capability this summary describes | | +|**summary** | **String** | How the function implements this capability | | + + + diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md new file mode 100644 index 00000000..c84e7fe6 --- /dev/null +++ b/docs/CurrentUser.md @@ -0,0 +1,55 @@ + + +# CurrentUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**email** | **String** | | | +|**isActive** | **Boolean** | Inactive users cannot authenticate | | +|**profile** | **UserProfile** | | | +|**role** | [**RoleEnum**](#RoleEnum) | | | +|**signsInWith** | [**SignsInWithEnum**](#SignsInWithEnum) | How the user re-authenticates to delete their account: 'password' sends their current password, 'sso' signs in again at their identity provider. | | +|**tier** | [**TierEnum**](#TierEnum) | | [optional] | +|**userId** | **Long** | | | + + + +## Enum: RoleEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| ADMIN | "ADMIN" | +| SUPERADMIN | "SUPERADMIN" | +| SYSTEM | "SYSTEM" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + +## Enum: SignsInWithEnum + +| Name | Value | +|---- | -----| +| PASSWORD | "password" | +| SSO | "sso" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + +## Enum: TierEnum + +| Name | Value | +|---- | -----| +| ENTHUSIAST | "ENTHUSIAST" | +| REVERSER | "REVERSER" | +| BUG_HUNTER | "BUG_HUNTER" | +| MALWARE_ANALYST | "MALWARE_ANALYST" | +| SECURITY_RESEARCHER | "SECURITY_RESEARCHER" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/DataTypesApi.md b/docs/DataTypesApi.md index d7073465..6f9f956a 100644 --- a/docs/DataTypesApi.md +++ b/docs/DataTypesApi.md @@ -23,7 +23,7 @@ All URIs are relative to *https://api.reveng.ai* Copy function signatures -Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -104,7 +104,7 @@ public class Example { Create an analysis's data types -Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -758,7 +758,7 @@ public class Example { Update an analysis's data types -Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -839,7 +839,7 @@ public class Example { Update a function's signature -Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -912,6 +912,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/DeleteMeBody.md b/docs/DeleteMeBody.md new file mode 100644 index 00000000..03da81db --- /dev/null +++ b/docs/DeleteMeBody.md @@ -0,0 +1,13 @@ + + +# DeleteMeBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**password** | **String** | Current password. Required for users who sign in with a password; ignored for users from an external identity provider. | [optional] | + + + diff --git a/docs/DisassemblyOutputBody.md b/docs/DisassemblyOutputBody.md index 632c4188..16fb7945 100644 --- a/docs/DisassemblyOutputBody.md +++ b/docs/DisassemblyOutputBody.md @@ -12,8 +12,6 @@ |**globalVariables** | **Object** | | [optional] | |**localVariables** | **Object** | | [optional] | |**operandXrefs** | **List<OperandXref>** | Instruction operands that reference a pointer slot, sorted by instruction_vaddr, target_vaddr, pointed_vaddr. | [optional] | -|**params** | **Object** | | [optional] | -|**returnType** | **String** | | [optional] | |**returns** | **Boolean** | | | diff --git a/docs/DynamicExecutionMetadata.md b/docs/DynamicExecutionMetadata.md index 2c16c955..653a0cfe 100644 --- a/docs/DynamicExecutionMetadata.md +++ b/docs/DynamicExecutionMetadata.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**logs** | **AnalysisLogs** | Sandbox status log messages captured during the run. Empty when none have been captured yet. | | -|**status** | [**StatusEnum**](#StatusEnum) | Run status. UNINITIALISED means this analysis has never had a run triggered. | | +|**status** | [**StatusEnum**](#StatusEnum) | Run status | | @@ -16,7 +16,6 @@ | Name | Value | |---- | -----| -| UNINITIALISED | "UNINITIALISED" | | PENDING | "PENDING" | | RUNNING | "RUNNING" | | COMPLETED | "COMPLETED" | diff --git a/docs/DynamicExecutionRun.md b/docs/DynamicExecutionRun.md new file mode 100644 index 00000000..cf14ffaa --- /dev/null +++ b/docs/DynamicExecutionRun.md @@ -0,0 +1,28 @@ + + +# DynamicExecutionRun + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**config** | **DynamicExecutionRunConfig** | Parameters the run was started with | | +|**createdAt** | **OffsetDateTime** | When the run was started | | +|**id** | **String** | Run ID | | +|**status** | [**StatusEnum**](#StatusEnum) | Run status | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| RUNNING | "RUNNING" | +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/DynamicExecutionRunConfig.md b/docs/DynamicExecutionRunConfig.md new file mode 100644 index 00000000..27a34a9e --- /dev/null +++ b/docs/DynamicExecutionRunConfig.md @@ -0,0 +1,29 @@ + + +# DynamicExecutionRunConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**archiveEntryPath** | **String** | Relative path of the archive entry executed. Empty when no archive was used. | | +|**archiveSha256Hash** | **String** | SHA-256 of the archive sent to the sandbox instead of the analysed binary. Empty when no archive was used. | | +|**commandLineArgs** | **String** | Command-line arguments passed to the sample. Empty when none were given. | | +|**hasArchivePassword** | **Boolean** | Whether a password was given for the archive. The password itself is never returned. | | +|**startMethod** | [**StartMethodEnum**](#StartMethodEnum) | How the sandbox launched the sample. Null when the sandbox's standard behaviour was used. | | +|**timeoutSeconds** | **Long** | Maximum sandbox execution time in seconds | | +|**url** | **String** | URL opened in the sandbox's browser instead of a sample. Empty for a sample run. | | + + + +## Enum: StartMethodEnum + +| Name | Value | +|---- | -----| +| STANDARD_USER_PROCESS | "standard_user_process" | +| ADMINISTRATOR_PROCESS | "administrator_process" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/DynamicExecutionSummaryMetadata.md b/docs/DynamicExecutionSummaryMetadata.md index 2f4f7005..2f97ee14 100644 --- a/docs/DynamicExecutionSummaryMetadata.md +++ b/docs/DynamicExecutionSummaryMetadata.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | Status of the most recent summary attempt. UNINITIALISED means no summary has been attempted for this analysis. | | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the run's most recent summary attempt. UNINITIALISED means no summary has been attempted for the run. | | diff --git a/docs/ErrorBody.md b/docs/ErrorBody.md index 767da579..1451b6ce 100644 --- a/docs/ErrorBody.md +++ b/docs/ErrorBody.md @@ -60,6 +60,7 @@ | PASSWORD_RESET_REQUIRED | "PASSWORD_RESET_REQUIRED" | | PAYMENT_REQUIRED | "PAYMENT_REQUIRED" | | PRECONDITION_FAILED | "PRECONDITION_FAILED" | +| REAUTH_REQUIRED | "REAUTH_REQUIRED" | | REPORT_RENDER_FAILED | "REPORT_RENDER_FAILED" | | REQUEST_ENTITY_TOO_LARGE | "REQUEST_ENTITY_TOO_LARGE" | | RUN_ALREADY_ACTIVE | "RUN_ALREADY_ACTIVE" | diff --git a/docs/EventData.md b/docs/EventData.md index 491ae903..8af9db3d 100644 --- a/docs/EventData.md +++ b/docs/EventData.md @@ -21,6 +21,8 @@ The payload of the event type in type. |**toolArgs** | **String** | | [optional] | |**toolCallId** | **String** | | [optional] | |**toolName** | **String** | | [optional] | +|**binaryName** | **String** | | | +|**functionName** | **String** | | [optional] | |**isError** | **Boolean** | | [optional] | |**result** | **String** | | [optional] | |**updated** | **List<EntityUpdate>** | | [optional] | @@ -32,7 +34,6 @@ The payload of the event type in type. |**message** | **String** | | [optional] | |**agent** | **AgentRunUpdateAgent** | | | |**analysisId** | **Long** | The earliest-added analysis of the file in the investigation that the conversation's starter may see. | | -|**binaryName** | **String** | | | |**card** | **AgentRunUpdateCard** | A summary of the agent's result. Absent until the run is done, and when its result cannot be summarised. | [optional] | |**createdAt** | **OffsetDateTime** | | | |**investigationId** | **Long** | | | diff --git a/docs/FeedbackSubmission.md b/docs/FeedbackSubmission.md new file mode 100644 index 00000000..38a31c81 --- /dev/null +++ b/docs/FeedbackSubmission.md @@ -0,0 +1,25 @@ + + +# FeedbackSubmission + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | **Map<String, Object>** | Context the client captured with the feedback, stored as-is (e.g. the binary hash and the matches the caller was shown) | [optional] | +|**sentiment** | [**SentimentEnum**](#SentimentEnum) | How useful the caller found the result | | + + + +## Enum: SentimentEnum + +| Name | Value | +|---- | -----| +| POSITIVE | "POSITIVE" | +| NEUTRAL | "NEUTRAL" | +| NEGATIVE | "NEGATIVE" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/FormFile.md b/docs/FormFile.md index 5dad580e..2b00f249 100644 --- a/docs/FormFile.md +++ b/docs/FormFile.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**contentType** | **String** | Search is applied to string value | | -|**filename** | **String** | Search is applied to string value | | +|**contentType** | **String** | | | +|**filename** | **String** | | | |**isSet** | **Boolean** | | | |**size** | **Long** | | | diff --git a/docs/AppApiRestV2FunctionsTypesFunction.md b/docs/Function.md similarity index 92% rename from docs/AppApiRestV2FunctionsTypesFunction.md rename to docs/Function.md index 9c9ab279..0e8e3cde 100644 --- a/docs/AppApiRestV2FunctionsTypesFunction.md +++ b/docs/Function.md @@ -1,6 +1,6 @@ -# AppApiRestV2FunctionsTypesFunction +# Function ## Properties diff --git a/docs/FunctionSignatureBody.md b/docs/FunctionSignatureBody.md index d1f49bd2..79a63fff 100644 --- a/docs/FunctionSignatureBody.md +++ b/docs/FunctionSignatureBody.md @@ -27,6 +27,7 @@ | SYSTEM | "SYSTEM" | | USER | "USER" | | AUTO_UNSTRIP | "AUTO_UNSTRIP" | +| AI_AGENT | "AI_AGENT" | | UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/docs/FunctionSignatureEntry.md b/docs/FunctionSignatureEntry.md index 34f4e491..549ffe43 100644 --- a/docs/FunctionSignatureEntry.md +++ b/docs/FunctionSignatureEntry.md @@ -26,6 +26,7 @@ | SYSTEM | "SYSTEM" | | USER | "USER" | | AUTO_UNSTRIP | "AUTO_UNSTRIP" | +| AI_AGENT | "AI_AGENT" | | UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/docs/FunctionString.md b/docs/FunctionString.md deleted file mode 100644 index 30fca476..00000000 --- a/docs/FunctionString.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FunctionString - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**value** | **String** | The value of the string literal | | -|**vaddr** | **Integer** | The vaddr of the string value | | -|**source** | **StringSource** | The source of the string | [optional] | - - - diff --git a/docs/FunctionStringsResponse.md b/docs/FunctionStringsResponse.md deleted file mode 100644 index 4569e9f5..00000000 --- a/docs/FunctionStringsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FunctionStringsResponse - -Response for listing all the strings of a function. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**strings** | [**List<FunctionString>**](FunctionString.md) | The strings associated with this function | | -|**totalStrings** | **Integer** | The total number of strings associated with this function | | - - - diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 0dfefd15..f9da8cf2 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -6,8 +6,6 @@ All URIs are relative to *https://api.reveng.ai* |------------- | ------------- | -------------| | [**addFunctionCallee**](FunctionsCoreApi.md#addFunctionCallee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function | | [**addUserStringToFunction**](FunctionsCoreApi.md#addUserStringToFunction) | **POST** /v3/functions/{function_id}/user-provided-strings | Add a user-provided string to a function. | -| [**getAnalysisStrings**](FunctionsCoreApi.md#getAnalysisStrings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis | -| [**getAnalysisStringsStatus**](FunctionsCoreApi.md#getAnalysisStringsStatus) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis | | [**getFunctionBlocks**](FunctionsCoreApi.md#getFunctionBlocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function | | [**getFunctionBlocks_0**](FunctionsCoreApi.md#getFunctionBlocks_0) | **GET** /v3/functions/{function_id}/blocks | Get function disassembly | | [**getFunctionCalleesCallers**](FunctionsCoreApi.md#getFunctionCalleesCallers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function | @@ -18,8 +16,7 @@ All URIs are relative to *https://api.reveng.ai* | [**getFunctionDetails**](FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details | | [**getFunctionDetails_0**](FunctionsCoreApi.md#getFunctionDetails_0) | **GET** /v3/functions/{function_id} | Get function details | | [**getFunctionIndirectCallSites**](FunctionsCoreApi.md#getFunctionIndirectCallSites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function | -| [**getFunctionStrings**](FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function | -| [**getFunctionStrings_0**](FunctionsCoreApi.md#getFunctionStrings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. | +| [**getFunctionStrings**](FunctionsCoreApi.md#getFunctionStrings) | **GET** /v3/functions/{function_id}/strings | List strings for a function. | | [**getFunctionsCalleesCallers**](FunctionsCoreApi.md#getFunctionsCalleesCallers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions | | [**getFunctionsMatches**](FunctionsCoreApi.md#getFunctionsMatches) | **GET** /v3/functions/matches | Get function-matching results for an explicit set of functions | | [**getFunctionsMatchingStatus**](FunctionsCoreApi.md#getFunctionsMatchingStatus) | **GET** /v3/functions/matches/status | Get function-matching status for an explicit set of functions | @@ -29,8 +26,10 @@ All URIs are relative to *https://api.reveng.ai* | [**startFunctionsMatching**](FunctionsCoreApi.md#startFunctionsMatching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions | | [**v3CanonicalizeFunctionNames**](FunctionsCoreApi.md#v3CanonicalizeFunctionNames) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names | | [**v3GetAnalysisFuncMaps**](FunctionsCoreApi.md#v3GetAnalysisFuncMaps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis | +| [**v3GetFunctionFeedback**](FunctionsCoreApi.md#v3GetFunctionFeedback) | **GET** /v3/functions/{function_id}/feedback/{type} | Get the caller's feedback on a function. | | [**v3ListFunctionGlobals**](FunctionsCoreApi.md#v3ListFunctionGlobals) | **GET** /v3/functions/{function_id}/globals | List the global variables a function references. | | [**v3SearchFunctions**](FunctionsCoreApi.md#v3SearchFunctions) | **GET** /v3/functions | Search functions | +| [**v3UpsertFunctionFeedback**](FunctionsCoreApi.md#v3UpsertFunctionFeedback) | **PUT** /v3/functions/{function_id}/feedback/{type} | Record feedback on a function. | @@ -192,166 +191,6 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | - -# **getAnalysisStrings** -> BaseResponseAnalysisStringsResponse getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder) - -Get string information found in the Analysis - -Get string information found in the analysis - -### Example -```java -// Import classes: -import ai.reveng.invoker.ApiClient; -import ai.reveng.invoker.ApiException; -import ai.reveng.invoker.Configuration; -import ai.reveng.invoker.auth.*; -import ai.reveng.invoker.models.*; -import ai.reveng.api.FunctionsCoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.reveng.ai"); - - // Configure API key authorization: APIKey - ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); - APIKey.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //APIKey.setApiKeyPrefix("Token"); - - // 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. - Integer pageSize = 100; // Integer | Number of items per page. - String search = "search_example"; // String | Search is applied to string value - String functionSearch = "functionSearch_example"; // String | Search is applied to function names - String orderBy = "length"; // String | Order by field - String sortOrder = "ASC"; // String | Sort order for the results - try { - BaseResponseAnalysisStringsResponse result = apiInstance.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FunctionsCoreApi#getAnalysisStrings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | -| **page** | **Integer**| The page number to retrieve. | [optional] [default to 1] | -| **pageSize** | **Integer**| Number of items per page. | [optional] [default to 100] | -| **search** | **String**| Search is applied to string value | [optional] | -| **functionSearch** | **String**| Search is applied to function names | [optional] | -| **orderBy** | **String**| Order by field | [optional] [default to value] [enum: length, value] | -| **sortOrder** | **String**| Sort order for the results | [optional] [default to ASC] [enum: ASC, DESC] | - -### Return type - -[**BaseResponseAnalysisStringsResponse**](BaseResponseAnalysisStringsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - - -# **getAnalysisStringsStatus** -> BaseResponseAnalysisStringsStatusResponse getAnalysisStringsStatus(analysisId) - -Get string processing state for the Analysis - -Get string processing state for the Analysis - -### Example -```java -// Import classes: -import ai.reveng.invoker.ApiClient; -import ai.reveng.invoker.ApiException; -import ai.reveng.invoker.Configuration; -import ai.reveng.invoker.auth.*; -import ai.reveng.invoker.models.*; -import ai.reveng.api.FunctionsCoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.reveng.ai"); - - // Configure API key authorization: APIKey - ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); - APIKey.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //APIKey.setApiKeyPrefix("Token"); - - // 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 { - BaseResponseAnalysisStringsStatusResponse result = apiInstance.getAnalysisStringsStatus(analysisId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FunctionsCoreApi#getAnalysisStringsStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **analysisId** | **Integer**| | | - -### Return type - -[**BaseResponseAnalysisStringsStatusResponse**](BaseResponseAnalysisStringsStatusResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - # **getFunctionBlocks** > BaseResponseFunctionBlocksResponse getFunctionBlocks(functionId) @@ -433,7 +272,7 @@ public class Example { Get function disassembly -Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready +Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example ```java @@ -1104,87 +943,7 @@ public class Example { # **getFunctionStrings** -> BaseResponseFunctionStringsResponse getFunctionStrings(functionId, page, pageSize, search) - -Get string information found in the function - -Get string information found in the function - -### Example -```java -// Import classes: -import ai.reveng.invoker.ApiClient; -import ai.reveng.invoker.ApiException; -import ai.reveng.invoker.Configuration; -import ai.reveng.invoker.auth.*; -import ai.reveng.invoker.models.*; -import ai.reveng.api.FunctionsCoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.reveng.ai"); - - // Configure API key authorization: APIKey - ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); - APIKey.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //APIKey.setApiKeyPrefix("Token"); - - // 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. - Integer pageSize = 100; // Integer | Number of items per page. - String search = "search_example"; // String | Search is applied to string value - try { - BaseResponseFunctionStringsResponse result = apiInstance.getFunctionStrings(functionId, page, pageSize, search); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FunctionsCoreApi#getFunctionStrings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **functionId** | **Integer**| | | -| **page** | **Integer**| The page number to retrieve. | [optional] [default to 1] | -| **pageSize** | **Integer**| Number of items per page. | [optional] [default to 100] | -| **search** | **String**| Search is applied to string value | [optional] | - -### Return type - -[**BaseResponseFunctionStringsResponse**](BaseResponseFunctionStringsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - - -# **getFunctionStrings_0** -> ListFunctionStringsOutputBody getFunctionStrings_0(functionId, page, pageSize, search) +> ListFunctionStringsOutputBody getFunctionStrings(functionId, page, pageSize, search) List strings for a function. @@ -1221,10 +980,10 @@ public class Example { Long pageSize = 100L; // Long | Number of results per page. String search = "search_example"; // String | Filter by string value (case-insensitive substring match). try { - ListFunctionStringsOutputBody result = apiInstance.getFunctionStrings_0(functionId, page, pageSize, search); + ListFunctionStringsOutputBody result = apiInstance.getFunctionStrings(functionId, page, pageSize, search); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FunctionsCoreApi#getFunctionStrings_0"); + System.err.println("Exception when calling FunctionsCoreApi#getFunctionStrings"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1976,6 +1735,85 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3GetFunctionFeedback** +> RecordedFeedback v3GetFunctionFeedback(functionId, type) + +Get the caller's feedback on a function. + +Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.FunctionsCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // 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 + String type = "function-matching"; // String | What the feedback is about + try { + RecordedFeedback result = apiInstance.v3GetFunctionFeedback(functionId, type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FunctionsCoreApi#v3GetFunctionFeedback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **functionId** | **Long**| Function ID | | +| **type** | **String**| What the feedback is about | [enum: function-matching] | + +### Return type + +[**RecordedFeedback**](RecordedFeedback.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **v3ListFunctionGlobals** > ListFunctionGlobalsOutputBody v3ListFunctionGlobals(functionId) @@ -2134,3 +1972,83 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **v3UpsertFunctionFeedback** +> v3UpsertFunctionFeedback(functionId, type, feedbackSubmission) + +Record feedback on a function. + +Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.FunctionsCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + // 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 + String type = "function-matching"; // String | What the feedback is about + FeedbackSubmission feedbackSubmission = new FeedbackSubmission(); // FeedbackSubmission | + try { + apiInstance.v3UpsertFunctionFeedback(functionId, type, feedbackSubmission); + } catch (ApiException e) { + System.err.println("Exception when calling FunctionsCoreApi#v3UpsertFunctionFeedback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **functionId** | **Long**| Function ID | | +| **type** | **String**| What the feedback is about | [enum: function-matching] | +| **feedbackSubmission** | [**FeedbackSubmission**](FeedbackSubmission.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + diff --git a/docs/GetCreditEstimatesOutputBody.md b/docs/GetCreditEstimatesOutputBody.md new file mode 100644 index 00000000..0c8d4929 --- /dev/null +++ b/docs/GetCreditEstimatesOutputBody.md @@ -0,0 +1,14 @@ + + +# GetCreditEstimatesOutputBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operations** | **List<OperationCostBody>** | Estimated cost of each operation | | +|**sizeBuckets** | **List<SizeBucketBody>** | Size buckets in ascending order of size | | + + + diff --git a/docs/IamUsersApi.md b/docs/IamUsersApi.md index f70800d7..3271993a 100644 --- a/docs/IamUsersApi.md +++ b/docs/IamUsersApi.md @@ -10,11 +10,11 @@ All URIs are relative to *https://api.reveng.ai* # **getMe** -> User getMe() +> CurrentUser getMe() Get current user -Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found ### Example ```java @@ -43,7 +43,7 @@ public class Example { IamUsersApi apiInstance = new IamUsersApi(defaultClient); try { - User result = apiInstance.getMe(); + CurrentUser result = apiInstance.getMe(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IamUsersApi#getMe"); @@ -61,7 +61,7 @@ This endpoint does not need any parameter. ### Return type -[**User**](User.md) +[**CurrentUser**](CurrentUser.md) ### Authorization diff --git a/docs/ListDynamicExecutionRunsOutputBody.md b/docs/ListDynamicExecutionRunsOutputBody.md new file mode 100644 index 00000000..febdd36d --- /dev/null +++ b/docs/ListDynamicExecutionRunsOutputBody.md @@ -0,0 +1,13 @@ + + +# ListDynamicExecutionRunsOutputBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**runs** | **List<DynamicExecutionRun>** | The analysis's runs, newest first | | + + + diff --git a/docs/ListMalwareFamiliesOutputBody.md b/docs/ListMalwareFamiliesOutputBody.md new file mode 100644 index 00000000..1954d14d --- /dev/null +++ b/docs/ListMalwareFamiliesOutputBody.md @@ -0,0 +1,13 @@ + + +# ListMalwareFamiliesOutputBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**families** | **List<MalwareFamily>** | Families of the requested binaries, sorted by name | | + + + diff --git a/docs/MalwareFamily.md b/docs/MalwareFamily.md new file mode 100644 index 00000000..165d18c4 --- /dev/null +++ b/docs/MalwareFamily.md @@ -0,0 +1,15 @@ + + +# MalwareFamily + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**binaryIds** | **List<Long>** | Every binary in the RevEng.AI malware corpus in this family, matched or not | | +|**matchedBinaryIds** | **List<Long>** | Requested binaries in this family | | +|**name** | **String** | Family name, lowercase without punctuation | | + + + diff --git a/docs/ModelInterpretation.md b/docs/ModelInterpretation.md index 49cad196..3685203c 100644 --- a/docs/ModelInterpretation.md +++ b/docs/ModelInterpretation.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**interpretation** | **String** | Search is applied to string value | [optional] | +|**interpretation** | **String** | | [optional] | diff --git a/docs/OperationCostBody.md b/docs/OperationCostBody.md new file mode 100644 index 00000000..198f9dcd --- /dev/null +++ b/docs/OperationCostBody.md @@ -0,0 +1,15 @@ + + +# OperationCostBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseCredits** | **Double** | Credits the operation is estimated to use regardless of the binary's size | | +|**creditsPerFunction** | **Double** | Credits the operation is estimated to use per function in the binary | | +|**operation** | **String** | The operation, as requested when creating an analysis, or binary-analysis for the analysis itself | | + + + diff --git a/docs/Organisation.md b/docs/Organisation.md index e9d1a995..21d52bbf 100644 --- a/docs/Organisation.md +++ b/docs/Organisation.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**createdAt** | **OffsetDateTime** | | | -|**name** | **String** | Search is applied to string value | | +|**name** | **String** | | | |**organisationId** | **Long** | | | |**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/OrganisationGroup.md b/docs/OrganisationGroup.md index b5847477..9aa2c28c 100644 --- a/docs/OrganisationGroup.md +++ b/docs/OrganisationGroup.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**createdAt** | **OffsetDateTime** | | | -|**name** | **String** | Search is applied to string value | | +|**name** | **String** | | | |**organisationGroupId** | **Long** | | | |**organisationId** | **Long** | | | |**teamId** | **Long** | | | diff --git a/docs/OrganisationIssuer.md b/docs/OrganisationIssuer.md index b8b7091b..35fa1fe3 100644 --- a/docs/OrganisationIssuer.md +++ b/docs/OrganisationIssuer.md @@ -10,7 +10,7 @@ |**clientId** | **String** | OIDC client ID registered with the identity provider. Used to validate the audience (aud) claim in JWTs. | [optional] | |**createdAt** | **OffsetDateTime** | | | |**enabled** | **Boolean** | | | -|**issuerUrl** | **String** | Search is applied to string value | | +|**issuerUrl** | **String** | | | |**jwksUri** | **String** | JSON Web Key Set URI discovered from the issuer's OIDC configuration. Populated automatically during issuer registration. | | |**organisationId** | **Long** | | | |**organisationIssuerId** | **Long** | | | diff --git a/docs/PutAnalysisStringsRequest.md b/docs/PutAnalysisStringsRequest.md deleted file mode 100644 index b9f26694..00000000 --- a/docs/PutAnalysisStringsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PutAnalysisStringsRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**strings** | [**List<AnalysisStringInput>**](AnalysisStringInput.md) | The strings to add to the analysis | | - - - diff --git a/docs/RecordedFeedback.md b/docs/RecordedFeedback.md new file mode 100644 index 00000000..58b1f376 --- /dev/null +++ b/docs/RecordedFeedback.md @@ -0,0 +1,25 @@ + + +# RecordedFeedback + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | **Map<String, Object>** | The context recorded with the feedback, or null when there is none | | +|**sentiment** | [**SentimentEnum**](#SentimentEnum) | The sentiment the caller recorded, or null when they have not left any | | + + + +## Enum: SentimentEnum + +| Name | Value | +|---- | -----| +| POSITIVE | "POSITIVE" | +| NEUTRAL | "NEUTRAL" | +| NEGATIVE | "NEGATIVE" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/RenderedToken.md b/docs/RenderedToken.md index 227f7c97..de281491 100644 --- a/docs/RenderedToken.md +++ b/docs/RenderedToken.md @@ -8,6 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**dataTypeId** | **Long** | Data type this token names, or for a field the type that declares it. Scoped by the response's analysis_id. | [optional] | +|**enumValue** | **String** | Integer value of an enum the decompiler recovered a name for. Absent for an unnamed enum, which already renders as its value. | [optional] | |**functionId** | **Long** | Function this token calls or names. Absent when the address reaches no function of this binary. | [optional] | |**importedFunctionId** | **Long** | Imported function this token calls. Set instead of function_id for an external call. | [optional] | |**kind** | [**KindEnum**](#KindEnum) | What the token names. | | diff --git a/docs/ResolvedEntity.md b/docs/ResolvedEntity.md index fa7714ab..ca8579a6 100644 --- a/docs/ResolvedEntity.md +++ b/docs/ResolvedEntity.md @@ -17,16 +17,16 @@ |**fieldStatus** | [**FieldStatusEnum**](#FieldStatusEnum) | | [optional] | |**functionId** | **Long** | | [optional] | |**importedFunctionId** | **Long** | | [optional] | -|**kind** | **String** | Search is applied to string value | | -|**name** | **String** | Search is applied to string value | | +|**kind** | **String** | | | +|**name** | **String** | | | |**nameSource** | [**NameSourceEnum**](#NameSourceEnum) | | | |**needsNaming** | **Boolean** | | | -|**provenance** | **String** | Search is applied to string value | | +|**provenance** | **String** | | | |**resolvedName** | **String** | | | -|**suggestedName** | **String** | Search is applied to string value | [optional] | +|**suggestedName** | **String** | | [optional] | |**suggestedType** | **String** | | | |**suggestionConfidence** | **String** | | | -|**token** | **String** | Search is applied to string value | | +|**token** | **String** | | | |**typeIndex** | **Long** | | | |**typeSource** | **String** | | | |**vaddr** | **Long** | | | diff --git a/docs/SizeBucketBody.md b/docs/SizeBucketBody.md new file mode 100644 index 00000000..149c03a0 --- /dev/null +++ b/docs/SizeBucketBody.md @@ -0,0 +1,15 @@ + + +# SizeBucketBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**belowBytes** | **Long** | Exclusive upper bound of the bucket, in bytes. Null for the last bucket, which has no upper bound. | | +|**functions** | **Long** | Functions a binary this size is estimated to have | | +|**uncertain** | **Boolean** | True where too few operations have run on binaries this size for the estimate to be reliable | | + + + diff --git a/docs/Status.md b/docs/Status.md index c07461d9..5b5b20e6 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -60,6 +60,7 @@ | PASSWORD_RESET_REQUIRED | "PASSWORD_RESET_REQUIRED" | | PAYMENT_REQUIRED | "PAYMENT_REQUIRED" | | PRECONDITION_FAILED | "PRECONDITION_FAILED" | +| REAUTH_REQUIRED | "REAUTH_REQUIRED" | | REPORT_RENDER_FAILED | "REPORT_RENDER_FAILED" | | REQUEST_ENTITY_TOO_LARGE | "REQUEST_ENTITY_TOO_LARGE" | | RUN_ALREADY_ACTIVE | "RUN_ALREADY_ACTIVE" | diff --git a/docs/StringFunctions.md b/docs/StringFunctions.md deleted file mode 100644 index dff7184e..00000000 --- a/docs/StringFunctions.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# StringFunctions - -This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**value** | **String** | The value of the string literal | | -|**functions** | [**List<AppApiRestV2FunctionsResponsesFunction>**](AppApiRestV2FunctionsResponsesFunction.md) | The function ids the string literal was found within | | -|**source** | **StringSource** | The source of the string | [optional] | - - - diff --git a/docs/StringSource.md b/docs/StringSource.md deleted file mode 100644 index 196b58de..00000000 --- a/docs/StringSource.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# StringSource - -## Enum - - -* `SYSTEM` (value: `"SYSTEM"`) - -* `USER` (value: `"USER"`) - -* `AI_AGENT` (value: `"AI_AGENT"`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `"unknown_default_open_api"`) - - - diff --git a/docs/Team.md b/docs/Team.md index e5b96570..e836ea0f 100644 --- a/docs/Team.md +++ b/docs/Team.md @@ -10,7 +10,7 @@ |**organisationId** | **Long** | Organisation this team belongs to, if any | [optional] | |**plan** | [**PlanEnum**](#PlanEnum) | | | |**teamId** | **Long** | | | -|**teamName** | **String** | Search is applied to string value | | +|**teamName** | **String** | | | diff --git a/docs/TeamMember.md b/docs/TeamMember.md index a9ee3a31..fa7be54d 100644 --- a/docs/TeamMember.md +++ b/docs/TeamMember.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**email** | **String** | Search is applied to string value | | +|**email** | **String** | | | |**isAdmin** | **Boolean** | | | |**role** | [**RoleEnum**](#RoleEnum) | | | |**userId** | **Long** | | | -|**username** | **String** | Search is applied to string value | | +|**username** | **String** | | | diff --git a/docs/ToolCallResultData.md b/docs/ToolCallResultData.md index b71988df..ec839102 100644 --- a/docs/ToolCallResultData.md +++ b/docs/ToolCallResultData.md @@ -7,6 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**binaryName** | **String** | | [optional] | +|**functionName** | **String** | | [optional] | |**isError** | **Boolean** | | [optional] | |**result** | **String** | | [optional] | |**toolCallId** | **String** | | [optional] | diff --git a/docs/TriageFunction.md b/docs/TriageFunction.md index b35fa508..26bd0752 100644 --- a/docs/TriageFunction.md +++ b/docs/TriageFunction.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**address** | **Long** | Virtual address of the function | | |**capabilities** | **List<String>** | Capability categories the function exhibits | | +|**capabilityImplementations** | **List<CapabilityImplementation>** | How the function implements each assigned capability. Absent when the run did not record any. | [optional] | |**id** | **Long** | ID of the function | | |**score** | **Double** | Maliciousness score for the function, 0 to 1 | | |**summary** | **String** | What the function does | | diff --git a/docs/UpdateProfileInputBody.md b/docs/UpdateProfileInputBody.md index 4b3dcfb2..6a4dbb58 100644 --- a/docs/UpdateProfileInputBody.md +++ b/docs/UpdateProfileInputBody.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**agentChatLayout** | [**AgentChatLayoutEnum**](#AgentChatLayoutEnum) | Agent chat layout: floating over the page, or fixed below it | [optional] | |**defaultTeamId** | **Long** | Default team ID | [optional] | |**firstName** | **String** | First name | [optional] | |**hideAiDecompilationComments** | **Boolean** | Hide AI decompilation comments across the platform | [optional] | @@ -17,3 +18,13 @@ +## Enum: AgentChatLayoutEnum + +| Name | Value | +|---- | -----| +| FLOATING | "floating" | +| FIXED | "fixed" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/docs/UserIdentity.md b/docs/UserIdentity.md index f5db9731..035ab486 100644 --- a/docs/UserIdentity.md +++ b/docs/UserIdentity.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**createdAt** | **OffsetDateTime** | | | -|**issuerUrl** | **String** | Search is applied to string value | | -|**subject** | **String** | Search is applied to string value | | +|**issuerUrl** | **String** | | | +|**subject** | **String** | | | |**updatedAt** | **OffsetDateTime** | | | |**userId** | **Long** | | | |**userIdentityId** | **Long** | | | diff --git a/docs/UserProfile.md b/docs/UserProfile.md index eaa6ba5c..ba43ac52 100644 --- a/docs/UserProfile.md +++ b/docs/UserProfile.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**agentChatLayout** | [**AgentChatLayoutEnum**](#AgentChatLayoutEnum) | | | |**defaultTeamId** | **Long** | | [optional] | |**firstName** | **String** | | | |**hideAiDecompilationComments** | **Boolean** | | | @@ -17,3 +18,13 @@ +## Enum: AgentChatLayoutEnum + +| Name | Value | +|---- | -----| +| FLOATING | "floating" | +| FIXED | "fixed" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + diff --git a/pom.xml b/pom.xml index d006aae5..62c22fbb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 4.75.0 + 4.77.1 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 c7ede99d..467b8cdc 100644 --- a/src/main/java/ai/reveng/api/AgentApi.java +++ b/src/main/java/ai/reveng/api/AgentApi.java @@ -6013,7 +6013,7 @@ private okhttp3.Call v3RunCapabilitiesValidateBeforeCall(@javax.annotation.Nonnu /** * Run the capabilities agent. - * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataCapabilitiesResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -6037,7 +6037,7 @@ public OperationMetadataCapabilitiesResult v3RunCapabilities(@javax.annotation.N /** * Run the capabilities agent. - * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataCapabilitiesResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -6062,7 +6062,7 @@ public ApiResponse v3RunCapabilitiesWithHtt /** * Run the capabilities agent. (asynchronously) - * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -6321,7 +6321,7 @@ private okhttp3.Call v3RunCryptoScanValidateBeforeCall(@javax.annotation.Nonnull /** * Run the crypto-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerCryptoScanInputBody (required) * @return OperationCryptoScanMetadataCryptoScanResult @@ -6345,7 +6345,7 @@ public OperationCryptoScanMetadataCryptoScanResult v3RunCryptoScan(@javax.annota /** * Run the crypto-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerCryptoScanInputBody (required) * @return ApiResponse<OperationCryptoScanMetadataCryptoScanResult> @@ -6370,7 +6370,7 @@ public ApiResponse v3RunCryptoScanW /** * Run the crypto-scan agent. (asynchronously) - * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerCryptoScanInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -6472,7 +6472,7 @@ private okhttp3.Call v3RunCryptographyValidateBeforeCall(@javax.annotation.Nonnu /** * Run the cryptography agent. - * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataReportResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -6496,7 +6496,7 @@ public OperationMetadataReportResult v3RunCryptography(@javax.annotation.Nonnull /** * Run the cryptography agent. - * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataReportResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -6521,7 +6521,7 @@ public ApiResponse v3RunCryptographyWithHttpInfo( /** * Run the cryptography agent. (asynchronously) - * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -6790,7 +6790,7 @@ private okhttp3.Call v3RunExecutionScanValidateBeforeCall(@javax.annotation.Nonn /** * Run the execution-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerExecutionScanInputBody (required) * @return OperationExecutionScanMetadataExecutionScanResult @@ -6814,7 +6814,7 @@ public OperationExecutionScanMetadataExecutionScanResult v3RunExecutionScan(@jav /** * Run the execution-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerExecutionScanInputBody (required) * @return ApiResponse<OperationExecutionScanMetadataExecutionScanResult> @@ -6839,7 +6839,7 @@ public ApiResponse v3RunExecu /** * Run the execution-scan agent. (asynchronously) - * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerExecutionScanInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -7108,7 +7108,7 @@ private okhttp3.Call v3RunFilesystemScanValidateBeforeCall(@javax.annotation.Non /** * Run the filesystem-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerFilesystemScanInputBody (required) * @return OperationFilesystemScanMetadataFilesystemScanResult @@ -7132,7 +7132,7 @@ public OperationFilesystemScanMetadataFilesystemScanResult v3RunFilesystemScan(@ /** * Run the filesystem-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerFilesystemScanInputBody (required) * @return ApiResponse<OperationFilesystemScanMetadataFilesystemScanResult> @@ -7157,7 +7157,7 @@ public ApiResponse v3RunFil /** * Run the filesystem-scan agent. (asynchronously) - * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerFilesystemScanInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -7426,7 +7426,7 @@ private okhttp3.Call v3RunNetworkingScanValidateBeforeCall(@javax.annotation.Non /** * Run the networking-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerNetworkingScanInputBody (required) * @return OperationNetworkingScanMetadataNetworkingScanResult @@ -7450,7 +7450,7 @@ public OperationNetworkingScanMetadataNetworkingScanResult v3RunNetworkingScan(@ /** * Run the networking-scan agent. - * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerNetworkingScanInputBody (required) * @return ApiResponse<OperationNetworkingScanMetadataNetworkingScanResult> @@ -7475,7 +7475,7 @@ public ApiResponse v3RunNet /** * Run the networking-scan agent. (asynchronously) - * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerNetworkingScanInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -7577,7 +7577,7 @@ private okhttp3.Call v3RunProtocolsValidateBeforeCall(@javax.annotation.Nonnull /** * Run the protocols agent. - * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataReportResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7601,7 +7601,7 @@ public OperationMetadataReportResult v3RunProtocols(@javax.annotation.Nonnull Lo /** * Run the protocols agent. - * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataReportResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7626,7 +7626,7 @@ public ApiResponse v3RunProtocolsWithHttpInfo(@ja /** * Run the protocols agent. (asynchronously) - * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -7728,7 +7728,7 @@ private okhttp3.Call v3RunRemediationValidateBeforeCall(@javax.annotation.Nonnul /** * Run the remediation agent. - * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataRemediationResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7752,7 +7752,7 @@ public OperationMetadataRemediationResult v3RunRemediation(@javax.annotation.Non /** * Run the remediation agent. - * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataRemediationResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7777,7 +7777,7 @@ public ApiResponse v3RunRemediationWithHttpI /** * Run the remediation agent. (asynchronously) - * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -7879,7 +7879,7 @@ private okhttp3.Call v3RunReportAnalysisValidateBeforeCall(@javax.annotation.Non /** * Run the report-analysis agent. - * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataThreatReportResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7903,7 +7903,7 @@ public OperationMetadataThreatReportResult v3RunReportAnalysis(@javax.annotation /** * Run the report-analysis agent. - * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataThreatReportResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7928,7 +7928,7 @@ public ApiResponse v3RunReportAnalysisWithH /** * Run the report-analysis agent. (asynchronously) - * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -8030,7 +8030,7 @@ private okhttp3.Call v3RunSecretsValidateBeforeCall(@javax.annotation.Nonnull Lo /** * Run the secrets agent. - * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataReportResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8054,7 +8054,7 @@ public OperationMetadataReportResult v3RunSecrets(@javax.annotation.Nonnull Long /** * Run the secrets agent. - * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataReportResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8079,7 +8079,7 @@ public ApiResponse v3RunSecretsWithHttpInfo(@java /** * Run the secrets agent. (asynchronously) - * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -8188,7 +8188,7 @@ private okhttp3.Call v3RunSecurityScanValidateBeforeCall(@javax.annotation.Nonnu /** * Run the security-scan agent. - * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerSecurityScanInputBody (required) * @return OperationSecurityScanMetadataSecurityScanResult @@ -8213,7 +8213,7 @@ public OperationSecurityScanMetadataSecurityScanResult v3RunSecurityScan(@javax. /** * Run the security-scan agent. - * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerSecurityScanInputBody (required) * @return ApiResponse<OperationSecurityScanMetadataSecurityScanResult> @@ -8239,7 +8239,7 @@ public ApiResponse v3RunSecurit /** * Run the security-scan agent. (asynchronously) - * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerSecurityScanInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -8342,7 +8342,7 @@ private okhttp3.Call v3RunTriageValidateBeforeCall(@javax.annotation.Nonnull Lon /** * Run the triage agent. - * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return OperationMetadataTriageResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8366,7 +8366,7 @@ public OperationMetadataTriageResult v3RunTriage(@javax.annotation.Nonnull Long /** * Run the triage agent. - * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @return ApiResponse<OperationMetadataTriageResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8391,7 +8391,7 @@ public ApiResponse v3RunTriageWithHttpInfo(@javax /** * Run the triage agent. (asynchronously) - * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + * Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -8500,7 +8500,7 @@ private okhttp3.Call v3TriggerRenameUnnamedFunctionsValidateBeforeCall(@javax.an /** * Run the rename-unnamed-functions agent. - * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerRenameUnnamedFunctionsInputBody (required) * @return StatusBody @@ -8525,7 +8525,7 @@ public StatusBody v3TriggerRenameUnnamedFunctions(@javax.annotation.Nonnull Long /** * Run the rename-unnamed-functions agent. - * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerRenameUnnamedFunctionsInputBody (required) * @return ApiResponse<StatusBody> @@ -8551,7 +8551,7 @@ public ApiResponse v3TriggerRenameUnnamedFunctionsWithHttpInfo(@java /** * Run the rename-unnamed-functions agent. (asynchronously) - * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + * Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param triggerRenameUnnamedFunctionsInputBody (required) * @param _callback The callback to be executed when the API call finishes diff --git a/src/main/java/ai/reveng/api/AnalysesCoreApi.java b/src/main/java/ai/reveng/api/AnalysesCoreApi.java index 91f5ec6b..85c84326 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -52,6 +52,7 @@ import ai.reveng.model.BaseResponseStatus; import ai.reveng.model.BaseResponseUploadResponse; import ai.reveng.model.CreateRequest; +import ai.reveng.model.DynamicExecutionRun; import ai.reveng.model.DynamicExecutionStatus; import ai.reveng.model.DynamicExecutionSummary; import java.io.File; @@ -68,6 +69,7 @@ import ai.reveng.model.ListAnalysesOutputBody; import ai.reveng.model.ListAnalysisGlobalsOutputBody; import ai.reveng.model.ListAnalysisStringsOutputBody; +import ai.reveng.model.ListDynamicExecutionRunsOutputBody; import ai.reveng.model.ListExampleAnalysesOutputBody; import ai.reveng.model.ListGlobalFunctionsOutputBody; import ai.reveng.model.LookupAnalysisByBinaryIDOutputBody; @@ -77,7 +79,6 @@ import ai.reveng.model.OperationDynamicExecutionMetadataDynamicExecutionResult; import ai.reveng.model.OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult; import ai.reveng.model.Order; -import ai.reveng.model.PutAnalysisStringsRequest; import ai.reveng.model.ReAnalysisForm; import ai.reveng.model.RequeueAnalysisRequest; import ai.reveng.model.RunDynamicExecutionInputBody; @@ -150,6 +151,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Created - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -218,7 +220,7 @@ private okhttp3.Call addUserStringToAnalysisValidateBeforeCall(@javax.annotation /** * Add a user-provided string to an analysis. - * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param addUserStringInputBody (required) * @return Object @@ -230,6 +232,7 @@ private okhttp3.Call addUserStringToAnalysisValidateBeforeCall(@javax.annotation 201 Created - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -241,7 +244,7 @@ public Object addUserStringToAnalysis(@javax.annotation.Nonnull Long analysisId, /** * Add a user-provided string to an analysis. - * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param addUserStringInputBody (required) * @return ApiResponse<Object> @@ -253,6 +256,7 @@ public Object addUserStringToAnalysis(@javax.annotation.Nonnull Long analysisId, 201 Created - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -265,7 +269,7 @@ public ApiResponse addUserStringToAnalysisWithHttpInfo(@javax.annotation /** * Add a user-provided string to an analysis. (asynchronously) - * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param addUserStringInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -278,6 +282,7 @@ public ApiResponse addUserStringToAnalysisWithHttpInfo(@javax.annotation 201 Created - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -2397,156 +2402,6 @@ public okhttp3.Call lookupBinaryIdAsync(@javax.annotation.Nonnull Integer binary localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for putAnalysisStrings - * @param analysisId (required) - * @param putAnalysisStringsRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
201 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public okhttp3.Call putAnalysisStringsCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull PutAnalysisStringsRequest putAnalysisStringsRequest, 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 = putAnalysisStringsRequest; - - // create path and map variables - String localVarPath = "/v2/analyses/{analysis_id}/strings" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call putAnalysisStringsValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull PutAnalysisStringsRequest putAnalysisStringsRequest, 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 putAnalysisStrings(Async)"); - } - - // verify the required parameter 'putAnalysisStringsRequest' is set - if (putAnalysisStringsRequest == null) { - throw new ApiException("Missing the required parameter 'putAnalysisStringsRequest' when calling putAnalysisStrings(Async)"); - } - - return putAnalysisStringsCall(analysisId, putAnalysisStringsRequest, _callback); - - } - - /** - * Add strings to the analysis - * Add strings to the analysis. Rejects if any string already exists at the given vaddr. - * @param analysisId (required) - * @param putAnalysisStringsRequest (required) - * @return BaseResponse - * @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
201 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public BaseResponse putAnalysisStrings(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull PutAnalysisStringsRequest putAnalysisStringsRequest) throws ApiException { - ApiResponse localVarResp = putAnalysisStringsWithHttpInfo(analysisId, putAnalysisStringsRequest); - return localVarResp.getData(); - } - - /** - * Add strings to the analysis - * Add strings to the analysis. Rejects if any string already exists at the given vaddr. - * @param analysisId (required) - * @param putAnalysisStringsRequest (required) - * @return ApiResponse<BaseResponse> - * @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
201 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public ApiResponse putAnalysisStringsWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull PutAnalysisStringsRequest putAnalysisStringsRequest) throws ApiException { - okhttp3.Call localVarCall = putAnalysisStringsValidateBeforeCall(analysisId, putAnalysisStringsRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Add strings to the analysis (asynchronously) - * Add strings to the analysis. Rejects if any string already exists at the given vaddr. - * @param analysisId (required) - * @param putAnalysisStringsRequest (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
201 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public okhttp3.Call putAnalysisStringsAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull PutAnalysisStringsRequest putAnalysisStringsRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = putAnalysisStringsValidateBeforeCall(analysisId, putAnalysisStringsRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for requeueAnalysis * @param analysisId (required) @@ -2729,6 +2584,7 @@ public okhttp3.Call requeueAnalysisAsync(@javax.annotation.Nonnull Integer analy 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -2797,7 +2653,7 @@ private okhttp3.Call startAnalysisFunctionMatchingValidateBeforeCall(@javax.anno /** * Start function matching for an analysis - * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param startMatchingForAnalysisInputBody (required) * @return StartMatchingOutputBody @@ -2810,6 +2666,7 @@ private okhttp3.Call startAnalysisFunctionMatchingValidateBeforeCall(@javax.anno 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -2821,7 +2678,7 @@ public StartMatchingOutputBody startAnalysisFunctionMatching(@javax.annotation.N /** * Start function matching for an analysis - * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param startMatchingForAnalysisInputBody (required) * @return ApiResponse<StartMatchingOutputBody> @@ -2834,6 +2691,7 @@ public StartMatchingOutputBody startAnalysisFunctionMatching(@javax.annotation.N 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -2846,7 +2704,7 @@ public ApiResponse startAnalysisFunctionMatchingWithHtt /** * Start function matching for an analysis (asynchronously) - * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param startMatchingForAnalysisInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -2860,6 +2718,7 @@ public ApiResponse startAnalysisFunctionMatchingWithHtt 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -3513,8 +3372,9 @@ public okhttp3.Call v3CreateAnalysisAsync(@javax.annotation.Nonnull CreateReques return localVarCall; } /** - * Build call for v3DeleteAnalysis + * Build call for v3CreateDynamicExecutionRun * @param analysisId Analysis ID (required) + * @param runDynamicExecutionInputBody (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3522,14 +3382,15 @@ public okhttp3.Call v3CreateAnalysisAsync(@javax.annotation.Nonnull CreateReques - + +
Response Details
Status Code Description Response Headers
204 No Content -
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public okhttp3.Call v3DeleteAnalysisCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3CreateDynamicExecutionRunCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3543,10 +3404,10 @@ public okhttp3.Call v3DeleteAnalysisCall(@javax.annotation.Nonnull Long analysis basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = runDynamicExecutionInputBody; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}" + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs" .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); List localVarQueryParams = new ArrayList(); @@ -3564,6 +3425,7 @@ public okhttp3.Call v3DeleteAnalysisCall(@javax.annotation.Nonnull Long analysis } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -3571,66 +3433,74 @@ public okhttp3.Call v3DeleteAnalysisCall(@javax.annotation.Nonnull Long analysis } String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call v3DeleteAnalysisValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3CreateDynamicExecutionRunValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, 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 v3DeleteAnalysis(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3CreateDynamicExecutionRun(Async)"); } - return v3DeleteAnalysisCall(analysisId, _callback); + return v3CreateDynamicExecutionRunCall(analysisId, runDynamicExecutionInputBody, _callback); } /** - * Delete an analysis. - * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Start a dynamic execution run. + * Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request * @param analysisId Analysis ID (required) + * @param runDynamicExecutionInputBody (optional) + * @return OperationDynamicExecutionMetadataDynamicExecutionResult * @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
204 No Content -
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public void v3DeleteAnalysis(@javax.annotation.Nonnull Long analysisId) throws ApiException { - v3DeleteAnalysisWithHttpInfo(analysisId); + public OperationDynamicExecutionMetadataDynamicExecutionResult v3CreateDynamicExecutionRun(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody) throws ApiException { + ApiResponse localVarResp = v3CreateDynamicExecutionRunWithHttpInfo(analysisId, runDynamicExecutionInputBody); + return localVarResp.getData(); } /** - * Delete an analysis. - * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Start a dynamic execution run. + * Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request * @param analysisId Analysis ID (required) - * @return ApiResponse<Void> + * @param runDynamicExecutionInputBody (optional) + * @return ApiResponse<OperationDynamicExecutionMetadataDynamicExecutionResult> * @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
204 No Content -
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3DeleteAnalysisWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3DeleteAnalysisValidateBeforeCall(analysisId, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse v3CreateDynamicExecutionRunWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody) throws ApiException { + okhttp3.Call localVarCall = v3CreateDynamicExecutionRunValidateBeforeCall(analysisId, runDynamicExecutionInputBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete an analysis. (asynchronously) - * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Start a dynamic execution run. (asynchronously) + * Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request * @param analysisId Analysis ID (required) + * @param runDynamicExecutionInputBody (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3638,23 +3508,24 @@ public ApiResponse v3DeleteAnalysisWithHttpInfo(@javax.annotation.Nonnull - + +
Response Details
Status Code Description Response Headers
204 No Content -
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public okhttp3.Call v3DeleteAnalysisAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3CreateDynamicExecutionRunAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3DeleteAnalysisValidateBeforeCall(analysisId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = v3CreateDynamicExecutionRunValidateBeforeCall(analysisId, runDynamicExecutionInputBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v3DownloadBinaryExport + * Build call for v3DeleteAnalysis * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by queueing the export (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3662,14 +3533,14 @@ public okhttp3.Call v3DeleteAnalysisAsync(@javax.annotation.Nonnull Long analysi - +
Response Details
Status Code Description Response Headers
200 OK -
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public okhttp3.Call v3DownloadBinaryExportCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3DeleteAnalysisCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3686,7 +3557,7 @@ public okhttp3.Call v3DownloadBinaryExportCall(@javax.annotation.Nonnull Long an Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/binary-export" + String localVarPath = "/v3/analyses/{analysis_id}" .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); List localVarQueryParams = new ArrayList(); @@ -3695,10 +3566,6 @@ public okhttp3.Call v3DownloadBinaryExportCall(@javax.annotation.Nonnull Long an Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (taskId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId)); - } - final String[] localVarAccepts = { "application/json" }; @@ -3715,74 +3582,66 @@ public okhttp3.Call v3DownloadBinaryExportCall(@javax.annotation.Nonnull Long an } String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call v3DownloadBinaryExportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3DeleteAnalysisValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'analysisId' is set if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling v3DownloadBinaryExport(Async)"); - } - - // verify the required parameter 'taskId' is set - if (taskId == null) { - throw new ApiException("Missing the required parameter 'taskId' when calling v3DownloadBinaryExport(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3DeleteAnalysis(Async)"); } - return v3DownloadBinaryExportCall(analysisId, taskId, _callback); + return v3DeleteAnalysisCall(analysisId, _callback); } /** - * Download a binary export - * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Delete an analysis. + * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by queueing the export (required) * @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 -
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public void v3DownloadBinaryExport(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - v3DownloadBinaryExportWithHttpInfo(analysisId, taskId); + public void v3DeleteAnalysis(@javax.annotation.Nonnull Long analysisId) throws ApiException { + v3DeleteAnalysisWithHttpInfo(analysisId); } /** - * Download a binary export - * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Delete an analysis. + * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by queueing the export (required) * @return ApiResponse<Void> * @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 -
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3DownloadBinaryExportWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - okhttp3.Call localVarCall = v3DownloadBinaryExportValidateBeforeCall(analysisId, taskId, null); + public ApiResponse v3DeleteAnalysisWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { + okhttp3.Call localVarCall = v3DeleteAnalysisValidateBeforeCall(analysisId, null); return localVarApiClient.execute(localVarCall); } /** - * Download a binary export (asynchronously) - * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Delete an analysis. (asynchronously) + * Deactivates the analysis. Only the owner may call it. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by queueing the export (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 @@ -3790,22 +3649,23 @@ public ApiResponse v3DownloadBinaryExportWithHttpInfo(@javax.annotation.No - +
Response Details
Status Code Description Response Headers
200 OK -
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public okhttp3.Call v3DownloadBinaryExportAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3DeleteAnalysisAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3DownloadBinaryExportValidateBeforeCall(analysisId, taskId, _callback); + okhttp3.Call localVarCall = v3DeleteAnalysisValidateBeforeCall(analysisId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetAnalysis + * Build call for v3DownloadBinaryExport * @param analysisId Analysis ID (required) + * @param taskId Task ID returned by queueing the export (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3820,7 +3680,7 @@ public okhttp3.Call v3DownloadBinaryExportAsync(@javax.annotation.Nonnull Long a 500 Internal Server Error - */ - public okhttp3.Call v3GetAnalysisCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3DownloadBinaryExportCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3837,7 +3697,7 @@ public okhttp3.Call v3GetAnalysisCall(@javax.annotation.Nonnull Long analysisId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}" + String localVarPath = "/v3/analyses/{analysis_id}/binary-export" .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); List localVarQueryParams = new ArrayList(); @@ -3846,6 +3706,10 @@ public okhttp3.Call v3GetAnalysisCall(@javax.annotation.Nonnull Long analysisId, Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (taskId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -3866,14 +3730,161 @@ public okhttp3.Call v3GetAnalysisCall(@javax.annotation.Nonnull Long analysisId, } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetAnalysisValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3DownloadBinaryExportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, 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 v3GetAnalysis(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3DownloadBinaryExport(Async)"); } - return v3GetAnalysisCall(analysisId, _callback); - + // verify the required parameter 'taskId' is set + if (taskId == null) { + throw new ApiException("Missing the required parameter 'taskId' when calling v3DownloadBinaryExport(Async)"); + } + + return v3DownloadBinaryExportCall(analysisId, taskId, _callback); + + } + + /** + * Download a binary export + * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param taskId Task ID returned by queueing the export (required) + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public void v3DownloadBinaryExport(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { + v3DownloadBinaryExportWithHttpInfo(analysisId, taskId); + } + + /** + * Download a binary export + * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param taskId Task ID returned by queueing the export (required) + * @return ApiResponse<Void> + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3DownloadBinaryExportWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { + okhttp3.Call localVarCall = v3DownloadBinaryExportValidateBeforeCall(analysisId, taskId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Download a binary export (asynchronously) + * Streams the exported binary. Returns 404 if the task is not complete or its result has expired -- export again in either case. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param taskId Task ID returned by queueing the export (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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3DownloadBinaryExportAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3DownloadBinaryExportValidateBeforeCall(analysisId, taskId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for v3GetAnalysis + * @param analysisId Analysis ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetAnalysisCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v3/analyses/{analysis_id}" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + 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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3GetAnalysisValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'analysisId' is set + if (analysisId == null) { + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetAnalysis(Async)"); + } + + return v3GetAnalysisCall(analysisId, _callback); + } /** @@ -5310,10 +5321,8 @@ public okhttp3.Call v3GetBinaryExportOperationAsync(@javax.annotation.Nonnull St return localVarCall; } /** - * Build call for v3GetDynamicExecutionArtifact - * @param analysisId Analysis ID (required) - * @param sha256 SHA-256 hex digest of the artifact (required) - * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) + * Build call for v3GetDynamicExecutionOperation + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5324,12 +5333,11 @@ public okhttp3.Call v3GetBinaryExportOperationAsync(@javax.annotation.Nonnull St 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionArtifactCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionOperationCall(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5346,9 +5354,8 @@ public okhttp3.Call v3GetDynamicExecutionArtifactCall(@javax.annotation.Nonnull Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256}" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) - .replace("{" + "sha256" + "}", localVarApiClient.escapeString(sha256.toString())); + String localVarPath = "/v3/operations/dynamic-execution/{run_id}" + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5356,10 +5363,6 @@ public okhttp3.Call v3GetDynamicExecutionArtifactCall(@javax.annotation.Nonnull Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (filename != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("filename", filename)); - } - final String[] localVarAccepts = { "application/json" }; @@ -5380,27 +5383,21 @@ public okhttp3.Call v3GetDynamicExecutionArtifactCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionArtifactValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, 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 v3GetDynamicExecutionArtifact(Async)"); - } - - // verify the required parameter 'sha256' is set - if (sha256 == null) { - throw new ApiException("Missing the required parameter 'sha256' when calling v3GetDynamicExecutionArtifact(Async)"); + private okhttp3.Call v3GetDynamicExecutionOperationValidateBeforeCall(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionOperation(Async)"); } - return v3GetDynamicExecutionArtifactCall(analysisId, sha256, filename, _callback); + return v3GetDynamicExecutionOperationCall(runId, _callback); } /** - * Download an artifact. - * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) - * @param sha256 SHA-256 hex digest of the artifact (required) - * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) + * Get a dynamic execution operation. + * Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (required) + * @return OperationDynamicExecutionMetadataDynamicExecutionResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5409,22 +5406,20 @@ private okhttp3.Call v3GetDynamicExecutionArtifactValidateBeforeCall(@javax.anno -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public void v3GetDynamicExecutionArtifact(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { - v3GetDynamicExecutionArtifactWithHttpInfo(analysisId, sha256, filename); + public OperationDynamicExecutionMetadataDynamicExecutionResult v3GetDynamicExecutionOperation(@javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3GetDynamicExecutionOperationWithHttpInfo(runId); + return localVarResp.getData(); } /** - * Download an artifact. - * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) - * @param sha256 SHA-256 hex digest of the artifact (required) - * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) - * @return ApiResponse<Void> + * Get a dynamic execution operation. + * Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<OperationDynamicExecutionMetadataDynamicExecutionResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5433,22 +5428,20 @@ public void v3GetDynamicExecutionArtifact(@javax.annotation.Nonnull Long analysi -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3GetDynamicExecutionArtifactWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionArtifactValidateBeforeCall(analysisId, sha256, filename, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse v3GetDynamicExecutionOperationWithHttpInfo(@javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionOperationValidateBeforeCall(runId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Download an artifact. (asynchronously) - * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) - * @param sha256 SHA-256 hex digest of the artifact (required) - * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) + * Get a dynamic execution operation. (asynchronously) + * Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (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 @@ -5459,20 +5452,21 @@ public ApiResponse v3GetDynamicExecutionArtifactWithHttpInfo(@javax.annota 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionArtifactAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionOperationAsync(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionArtifactValidateBeforeCall(analysisId, sha256, filename, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionOperationValidateBeforeCall(runId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionLogsDownload + * Build call for v3GetDynamicExecutionRun * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5483,12 +5477,11 @@ public okhttp3.Call v3GetDynamicExecutionArtifactAsync(@javax.annotation.Nonnull 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionLogsDownloadCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5505,8 +5498,9 @@ public okhttp3.Call v3GetDynamicExecutionLogsDownloadCall(@javax.annotation.Nonn Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/logs/download" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5534,20 +5528,27 @@ public okhttp3.Call v3GetDynamicExecutionLogsDownloadCall(@javax.annotation.Nonn } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionLogsDownloadValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionLogsDownload(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRun(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRun(Async)"); } - return v3GetDynamicExecutionLogsDownloadCall(analysisId, _callback); + return v3GetDynamicExecutionRunCall(analysisId, runId, _callback); } /** - * Download the execution logs archive. - * Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Get a dynamic execution run. + * Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @return DynamicExecutionRun * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5556,20 +5557,21 @@ private okhttp3.Call v3GetDynamicExecutionLogsDownloadValidateBeforeCall(@javax. -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public void v3GetDynamicExecutionLogsDownload(@javax.annotation.Nonnull Long analysisId) throws ApiException { - v3GetDynamicExecutionLogsDownloadWithHttpInfo(analysisId); + public DynamicExecutionRun v3GetDynamicExecutionRun(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3GetDynamicExecutionRunWithHttpInfo(analysisId, runId); + return localVarResp.getData(); } /** - * Download the execution logs archive. - * Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Get a dynamic execution run. + * Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) - * @return ApiResponse<Void> + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<DynamicExecutionRun> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5578,20 +5580,21 @@ public void v3GetDynamicExecutionLogsDownload(@javax.annotation.Nonnull Long ana -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3GetDynamicExecutionLogsDownloadWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionLogsDownloadValidateBeforeCall(analysisId, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse v3GetDynamicExecutionRunWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunValidateBeforeCall(analysisId, runId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Download the execution logs archive. (asynchronously) - * Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Get a dynamic execution run. (asynchronously) + * Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -5602,20 +5605,21 @@ public ApiResponse v3GetDynamicExecutionLogsDownloadWithHttpInfo(@javax.an 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionLogsDownloadAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionLogsDownloadValidateBeforeCall(analysisId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunValidateBeforeCall(analysisId, runId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionMemdump + * Build call for v3GetDynamicExecutionRunArtifact * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param sha256 SHA-256 hex digest of the artifact (required) * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @param _callback Callback for upload/download progress @@ -5633,7 +5637,7 @@ public okhttp3.Call v3GetDynamicExecutionLogsDownloadAsync(@javax.annotation.Non 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionMemdumpCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunArtifactCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5650,8 +5654,9 @@ public okhttp3.Call v3GetDynamicExecutionMemdumpCall(@javax.annotation.Nonnull L Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256}" + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256}" .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())) .replace("{" + "sha256" + "}", localVarApiClient.escapeString(sha256.toString())); List localVarQueryParams = new ArrayList(); @@ -5684,25 +5689,31 @@ public okhttp3.Call v3GetDynamicExecutionMemdumpCall(@javax.annotation.Nonnull L } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionMemdumpValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunArtifactValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, 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 v3GetDynamicExecutionMemdump(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunArtifact(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunArtifact(Async)"); } // verify the required parameter 'sha256' is set if (sha256 == null) { - throw new ApiException("Missing the required parameter 'sha256' when calling v3GetDynamicExecutionMemdump(Async)"); + throw new ApiException("Missing the required parameter 'sha256' when calling v3GetDynamicExecutionRunArtifact(Async)"); } - return v3GetDynamicExecutionMemdumpCall(analysisId, sha256, filename, _callback); + return v3GetDynamicExecutionRunArtifactCall(analysisId, runId, sha256, filename, _callback); } /** - * Download a memory dump. - * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's artifact. + * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param sha256 SHA-256 hex digest of the artifact (required) * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -5718,14 +5729,15 @@ private okhttp3.Call v3GetDynamicExecutionMemdumpValidateBeforeCall(@javax.annot 500 Internal Server Error - */ - public void v3GetDynamicExecutionMemdump(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { - v3GetDynamicExecutionMemdumpWithHttpInfo(analysisId, sha256, filename); + public void v3GetDynamicExecutionRunArtifact(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { + v3GetDynamicExecutionRunArtifactWithHttpInfo(analysisId, runId, sha256, filename); } /** - * Download a memory dump. - * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's artifact. + * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param sha256 SHA-256 hex digest of the artifact (required) * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @return ApiResponse<Void> @@ -5742,15 +5754,16 @@ public void v3GetDynamicExecutionMemdump(@javax.annotation.Nonnull Long analysis 500 Internal Server Error - */ - public ApiResponse v3GetDynamicExecutionMemdumpWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionMemdumpValidateBeforeCall(analysisId, sha256, filename, null); + public ApiResponse v3GetDynamicExecutionRunArtifactWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunArtifactValidateBeforeCall(analysisId, runId, sha256, filename, null); return localVarApiClient.execute(localVarCall); } /** - * Download a memory dump. (asynchronously) - * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's artifact. (asynchronously) + * Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param sha256 SHA-256 hex digest of the artifact (required) * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @param _callback The callback to be executed when the API call finishes @@ -5768,15 +5781,16 @@ public ApiResponse v3GetDynamicExecutionMemdumpWithHttpInfo(@javax.annotat 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionMemdumpAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunArtifactAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionMemdumpValidateBeforeCall(analysisId, sha256, filename, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunArtifactValidateBeforeCall(analysisId, runId, sha256, filename, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionOperation + * Build call for v3GetDynamicExecutionRunLogsDownload * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5787,11 +5801,12 @@ public okhttp3.Call v3GetDynamicExecutionMemdumpAsync(@javax.annotation.Nonnull 200 OK - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionOperationCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunLogsDownloadCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5808,8 +5823,9 @@ public okhttp3.Call v3GetDynamicExecutionOperationCall(@javax.annotation.Nonnull Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/operations/dynamic-execution/{analysis_id}" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5837,21 +5853,26 @@ public okhttp3.Call v3GetDynamicExecutionOperationCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionOperationValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunLogsDownloadValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionOperation(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunLogsDownload(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunLogsDownload(Async)"); } - return v3GetDynamicExecutionOperationCall(analysisId, _callback); + return v3GetDynamicExecutionRunLogsDownloadCall(analysisId, runId, _callback); } /** - * Get a dynamic execution operation. - * Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's execution logs archive. + * Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) - * @return OperationDynamicExecutionMetadataDynamicExecutionResult + * @param runId Dynamic execution run ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5860,20 +5881,21 @@ private okhttp3.Call v3GetDynamicExecutionOperationValidateBeforeCall(@javax.ann +
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public OperationDynamicExecutionMetadataDynamicExecutionResult v3GetDynamicExecutionOperation(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3GetDynamicExecutionOperationWithHttpInfo(analysisId); - return localVarResp.getData(); + public void v3GetDynamicExecutionRunLogsDownload(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + v3GetDynamicExecutionRunLogsDownloadWithHttpInfo(analysisId, runId); } /** - * Get a dynamic execution operation. - * Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's execution logs archive. + * Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) - * @return ApiResponse<OperationDynamicExecutionMetadataDynamicExecutionResult> + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5882,20 +5904,21 @@ public OperationDynamicExecutionMetadataDynamicExecutionResult v3GetDynamicExecu +
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3GetDynamicExecutionOperationWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionOperationValidateBeforeCall(analysisId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse v3GetDynamicExecutionRunLogsDownloadWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunLogsDownloadValidateBeforeCall(analysisId, runId, null); + return localVarApiClient.execute(localVarCall); } /** - * Get a dynamic execution operation. (asynchronously) - * Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's execution logs archive. (asynchronously) + * Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -5906,20 +5929,23 @@ public ApiResponse v3Ge 200 OK - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionOperationAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunLogsDownloadAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionOperationValidateBeforeCall(analysisId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunLogsDownloadValidateBeforeCall(analysisId, runId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionPcap + * Build call for v3GetDynamicExecutionRunMemdump * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @param sha256 SHA-256 hex digest of the artifact (required) + * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5935,7 +5961,7 @@ public okhttp3.Call v3GetDynamicExecutionOperationAsync(@javax.annotation.Nonnul 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionPcapCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunMemdumpCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5952,8 +5978,10 @@ public okhttp3.Call v3GetDynamicExecutionPcapCall(@javax.annotation.Nonnull Long Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/pcap" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256}" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())) + .replace("{" + "sha256" + "}", localVarApiClient.escapeString(sha256.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5961,6 +5989,10 @@ public okhttp3.Call v3GetDynamicExecutionPcapCall(@javax.annotation.Nonnull Long Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (filename != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filename", filename)); + } + final String[] localVarAccepts = { "application/json" }; @@ -5981,20 +6013,33 @@ public okhttp3.Call v3GetDynamicExecutionPcapCall(@javax.annotation.Nonnull Long } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionPcapValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunMemdumpValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, 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 v3GetDynamicExecutionPcap(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunMemdump(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunMemdump(Async)"); } - return v3GetDynamicExecutionPcapCall(analysisId, _callback); + // verify the required parameter 'sha256' is set + if (sha256 == null) { + throw new ApiException("Missing the required parameter 'sha256' when calling v3GetDynamicExecutionRunMemdump(Async)"); + } + + return v3GetDynamicExecutionRunMemdumpCall(analysisId, runId, sha256, filename, _callback); } /** - * Download the network capture. - * Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's memory dump. + * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @param sha256 SHA-256 hex digest of the artifact (required) + * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6008,14 +6053,17 @@ private okhttp3.Call v3GetDynamicExecutionPcapValidateBeforeCall(@javax.annotati
500 Internal Server Error -
*/ - public void v3GetDynamicExecutionPcap(@javax.annotation.Nonnull Long analysisId) throws ApiException { - v3GetDynamicExecutionPcapWithHttpInfo(analysisId); + public void v3GetDynamicExecutionRunMemdump(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { + v3GetDynamicExecutionRunMemdumpWithHttpInfo(analysisId, runId, sha256, filename); } /** - * Download the network capture. - * Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's memory dump. + * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @param sha256 SHA-256 hex digest of the artifact (required) + * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6030,15 +6078,18 @@ public void v3GetDynamicExecutionPcap(@javax.annotation.Nonnull Long analysisId) 500 Internal Server Error - */ - public ApiResponse v3GetDynamicExecutionPcapWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionPcapValidateBeforeCall(analysisId, null); + public ApiResponse v3GetDynamicExecutionRunMemdumpWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunMemdumpValidateBeforeCall(analysisId, runId, sha256, filename, null); return localVarApiClient.execute(localVarCall); } /** - * Download the network capture. (asynchronously) - * Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's memory dump. (asynchronously) + * Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @param sha256 SHA-256 hex digest of the artifact (required) + * @param filename Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6054,15 +6105,16 @@ public ApiResponse v3GetDynamicExecutionPcapWithHttpInfo(@javax.annotation 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionPcapAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunMemdumpAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull String sha256, @javax.annotation.Nullable String filename, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionPcapValidateBeforeCall(analysisId, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunMemdumpValidateBeforeCall(analysisId, runId, sha256, filename, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionReport + * Build call for v3GetDynamicExecutionRunPcap * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6078,7 +6130,7 @@ public okhttp3.Call v3GetDynamicExecutionPcapAsync(@javax.annotation.Nonnull Lon 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionReportCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunPcapCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6095,8 +6147,9 @@ public okhttp3.Call v3GetDynamicExecutionReportCall(@javax.annotation.Nonnull Lo Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/report" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6124,21 +6177,26 @@ public okhttp3.Call v3GetDynamicExecutionReportCall(@javax.annotation.Nonnull Lo } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionReportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunPcapValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionReport(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunPcap(Async)"); } - return v3GetDynamicExecutionReportCall(analysisId, _callback); + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunPcap(Async)"); + } + + return v3GetDynamicExecutionRunPcapCall(analysisId, runId, _callback); } /** - * Get the dynamic execution report. - * Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's network capture. + * Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) - * @return AnalysisReport + * @param runId Dynamic execution run ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6152,15 +6210,170 @@ private okhttp3.Call v3GetDynamicExecutionReportValidateBeforeCall(@javax.annota
500 Internal Server Error -
*/ - public AnalysisReport v3GetDynamicExecutionReport(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3GetDynamicExecutionReportWithHttpInfo(analysisId); - return localVarResp.getData(); + public void v3GetDynamicExecutionRunPcap(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + v3GetDynamicExecutionRunPcapWithHttpInfo(analysisId, runId); } /** - * Get the dynamic execution report. - * Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's network capture. + * Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<Void> + * @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 -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3GetDynamicExecutionRunPcapWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunPcapValidateBeforeCall(analysisId, runId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Download a run's network capture. (asynchronously) + * Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetDynamicExecutionRunPcapAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3GetDynamicExecutionRunPcapValidateBeforeCall(analysisId, runId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for v3GetDynamicExecutionRunReport + * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetDynamicExecutionRunReportCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.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", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3GetDynamicExecutionRunReportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionRunReport(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunReport(Async)"); + } + + return v3GetDynamicExecutionRunReportCall(analysisId, runId, _callback); + + } + + /** + * Get a run's dynamic execution report. + * Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) + * @return AnalysisReport + * @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 -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public AnalysisReport v3GetDynamicExecutionRunReport(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3GetDynamicExecutionRunReportWithHttpInfo(analysisId, runId); + return localVarResp.getData(); + } + + /** + * Get a run's dynamic execution report. + * Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return ApiResponse<AnalysisReport> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6175,16 +6388,17 @@ public AnalysisReport v3GetDynamicExecutionReport(@javax.annotation.Nonnull Long 500 Internal Server Error - */ - public ApiResponse v3GetDynamicExecutionReportWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionReportValidateBeforeCall(analysisId, null); + public ApiResponse v3GetDynamicExecutionRunReportWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunReportValidateBeforeCall(analysisId, runId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get the dynamic execution report. (asynchronously) - * Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Get a run's dynamic execution report. (asynchronously) + * Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -6200,16 +6414,17 @@ public ApiResponse v3GetDynamicExecutionReportWithHttpInfo(@java 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionReportAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunReportAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionReportValidateBeforeCall(analysisId, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunReportValidateBeforeCall(analysisId, runId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionScreenshot + * Build call for v3GetDynamicExecutionRunScreenshot * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param index Index of the screenshot, as listed by the screenshots endpoint (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -6226,7 +6441,7 @@ public okhttp3.Call v3GetDynamicExecutionReportAsync(@javax.annotation.Nonnull L 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionScreenshotCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long index, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunScreenshotCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull Long index, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6243,8 +6458,9 @@ public okhttp3.Call v3GetDynamicExecutionScreenshotCall(@javax.annotation.Nonnul Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index}" + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index}" .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())) .replace("{" + "index" + "}", localVarApiClient.escapeString(index.toString())); List localVarQueryParams = new ArrayList(); @@ -6273,25 +6489,31 @@ public okhttp3.Call v3GetDynamicExecutionScreenshotCall(@javax.annotation.Nonnul } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionScreenshotValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long index, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunScreenshotValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull Long index, 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 v3GetDynamicExecutionScreenshot(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunScreenshot(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunScreenshot(Async)"); } // verify the required parameter 'index' is set if (index == null) { - throw new ApiException("Missing the required parameter 'index' when calling v3GetDynamicExecutionScreenshot(Async)"); + throw new ApiException("Missing the required parameter 'index' when calling v3GetDynamicExecutionRunScreenshot(Async)"); } - return v3GetDynamicExecutionScreenshotCall(analysisId, index, _callback); + return v3GetDynamicExecutionRunScreenshotCall(analysisId, runId, index, _callback); } /** - * Download a screenshot. - * Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's screenshot. + * Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param index Index of the screenshot, as listed by the screenshots endpoint (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6306,14 +6528,15 @@ private okhttp3.Call v3GetDynamicExecutionScreenshotValidateBeforeCall(@javax.an 500 Internal Server Error - */ - public void v3GetDynamicExecutionScreenshot(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long index) throws ApiException { - v3GetDynamicExecutionScreenshotWithHttpInfo(analysisId, index); + public void v3GetDynamicExecutionRunScreenshot(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull Long index) throws ApiException { + v3GetDynamicExecutionRunScreenshotWithHttpInfo(analysisId, runId, index); } /** - * Download a screenshot. - * Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's screenshot. + * Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param index Index of the screenshot, as listed by the screenshots endpoint (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -6329,15 +6552,16 @@ public void v3GetDynamicExecutionScreenshot(@javax.annotation.Nonnull Long analy 500 Internal Server Error - */ - public ApiResponse v3GetDynamicExecutionScreenshotWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long index) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionScreenshotValidateBeforeCall(analysisId, index, null); + public ApiResponse v3GetDynamicExecutionRunScreenshotWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull Long index) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunScreenshotValidateBeforeCall(analysisId, runId, index, null); return localVarApiClient.execute(localVarCall); } /** - * Download a screenshot. (asynchronously) - * Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Download a run's screenshot. (asynchronously) + * Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param index Index of the screenshot, as listed by the screenshots endpoint (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -6354,15 +6578,16 @@ public ApiResponse v3GetDynamicExecutionScreenshotWithHttpInfo(@javax.anno 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionScreenshotAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull Long index, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunScreenshotAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, @javax.annotation.Nonnull Long index, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionScreenshotValidateBeforeCall(analysisId, index, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunScreenshotValidateBeforeCall(analysisId, runId, index, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionSummary + * Build call for v3GetDynamicExecutionRunSummary * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6378,7 +6603,7 @@ public okhttp3.Call v3GetDynamicExecutionScreenshotAsync(@javax.annotation.Nonnu 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionSummaryCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunSummaryCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6395,8 +6620,9 @@ public okhttp3.Call v3GetDynamicExecutionSummaryCall(@javax.annotation.Nonnull L Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/summary" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6424,20 +6650,26 @@ public okhttp3.Call v3GetDynamicExecutionSummaryCall(@javax.annotation.Nonnull L } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionSummaryValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunSummaryValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionSummary(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunSummary(Async)"); + } + + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunSummary(Async)"); } - return v3GetDynamicExecutionSummaryCall(analysisId, _callback); + return v3GetDynamicExecutionRunSummaryCall(analysisId, runId, _callback); } /** - * Get the dynamic execution summary. + * Get a run's dynamic execution summary. * Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return DynamicExecutionSummary * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6452,15 +6684,16 @@ private okhttp3.Call v3GetDynamicExecutionSummaryValidateBeforeCall(@javax.annot 500 Internal Server Error - */ - public DynamicExecutionSummary v3GetDynamicExecutionSummary(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3GetDynamicExecutionSummaryWithHttpInfo(analysisId); + public DynamicExecutionSummary v3GetDynamicExecutionRunSummary(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3GetDynamicExecutionRunSummaryWithHttpInfo(analysisId, runId); return localVarResp.getData(); } /** - * Get the dynamic execution summary. + * Get a run's dynamic execution summary. * Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return ApiResponse<DynamicExecutionSummary> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6475,16 +6708,17 @@ public DynamicExecutionSummary v3GetDynamicExecutionSummary(@javax.annotation.No 500 Internal Server Error - */ - public ApiResponse v3GetDynamicExecutionSummaryWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryValidateBeforeCall(analysisId, null); + public ApiResponse v3GetDynamicExecutionRunSummaryWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunSummaryValidateBeforeCall(analysisId, runId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get the dynamic execution summary. (asynchronously) + * Get a run's dynamic execution summary. (asynchronously) * Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -6500,16 +6734,17 @@ public ApiResponse v3GetDynamicExecutionSummaryWithHttp 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionSummaryAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunSummaryAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryValidateBeforeCall(analysisId, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunSummaryValidateBeforeCall(analysisId, runId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionSummaryOperation + * Build call for v3GetDynamicExecutionRunWiresharkKeys * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6520,11 +6755,12 @@ public okhttp3.Call v3GetDynamicExecutionSummaryAsync(@javax.annotation.Nonnull 200 OK - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionSummaryOperationCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunWiresharkKeysCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6541,8 +6777,9 @@ public okhttp3.Call v3GetDynamicExecutionSummaryOperationCall(@javax.annotation. Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/operations/dynamic-execution-summary/{analysis_id}" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6570,21 +6807,26 @@ public okhttp3.Call v3GetDynamicExecutionSummaryOperationCall(@javax.annotation. } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionSummaryOperationValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3GetDynamicExecutionRunWiresharkKeysValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3GetDynamicExecutionSummaryOperation(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionRunWiresharkKeys(Async)"); } - return v3GetDynamicExecutionSummaryOperationCall(analysisId, _callback); + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionRunWiresharkKeys(Async)"); + } + + return v3GetDynamicExecutionRunWiresharkKeysCall(analysisId, runId, _callback); } /** - * Get a dynamic execution summary operation. - * Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's Wireshark TLS session keys. + * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) - * @return OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult + * @param runId Dynamic execution run ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6593,20 +6835,21 @@ private okhttp3.Call v3GetDynamicExecutionSummaryOperationValidateBeforeCall(@ja +
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3GetDynamicExecutionSummaryOperation(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3GetDynamicExecutionSummaryOperationWithHttpInfo(analysisId); - return localVarResp.getData(); + public void v3GetDynamicExecutionRunWiresharkKeys(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + v3GetDynamicExecutionRunWiresharkKeysWithHttpInfo(analysisId, runId); } /** - * Get a dynamic execution summary operation. - * Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's Wireshark TLS session keys. + * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) - * @return ApiResponse<OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult> + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6615,20 +6858,21 @@ public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3G +
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3GetDynamicExecutionSummaryOperationWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryOperationValidateBeforeCall(analysisId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse v3GetDynamicExecutionRunWiresharkKeysWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionRunWiresharkKeysValidateBeforeCall(analysisId, runId, null); + return localVarApiClient.execute(localVarCall); } /** - * Get a dynamic execution summary operation. (asynchronously) - * Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Download a run's Wireshark TLS session keys. (asynchronously) + * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -6639,20 +6883,20 @@ public ApiResponse 200 OK - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionSummaryOperationAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionRunWiresharkKeysAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryOperationValidateBeforeCall(analysisId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionRunWiresharkKeysValidateBeforeCall(analysisId, runId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for v3GetDynamicExecutionWiresharkKeys - * @param analysisId Analysis ID (required) + * Build call for v3GetDynamicExecutionSummaryOperation + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6663,12 +6907,11 @@ public okhttp3.Call v3GetDynamicExecutionSummaryOperationAsync(@javax.annotation 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionWiresharkKeysCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionSummaryOperationCall(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6685,8 +6928,8 @@ public okhttp3.Call v3GetDynamicExecutionWiresharkKeysCall(@javax.annotation.Non Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/operations/dynamic-execution-summary/{run_id}" + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6714,20 +6957,21 @@ public okhttp3.Call v3GetDynamicExecutionWiresharkKeysCall(@javax.annotation.Non } @SuppressWarnings("rawtypes") - private okhttp3.Call v3GetDynamicExecutionWiresharkKeysValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling v3GetDynamicExecutionWiresharkKeys(Async)"); + private okhttp3.Call v3GetDynamicExecutionSummaryOperationValidateBeforeCall(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3GetDynamicExecutionSummaryOperation(Async)"); } - return v3GetDynamicExecutionWiresharkKeysCall(analysisId, _callback); + return v3GetDynamicExecutionSummaryOperationCall(runId, _callback); } /** - * Download Wireshark TLS session keys. - * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) + * Get a dynamic execution summary operation. + * Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (required) + * @return OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6736,20 +6980,20 @@ private okhttp3.Call v3GetDynamicExecutionWiresharkKeysValidateBeforeCall(@javax -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public void v3GetDynamicExecutionWiresharkKeys(@javax.annotation.Nonnull Long analysisId) throws ApiException { - v3GetDynamicExecutionWiresharkKeysWithHttpInfo(analysisId); + public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3GetDynamicExecutionSummaryOperation(@javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3GetDynamicExecutionSummaryOperationWithHttpInfo(runId); + return localVarResp.getData(); } /** - * Download Wireshark TLS session keys. - * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) - * @return ApiResponse<Void> + * Get a dynamic execution summary operation. + * Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (required) + * @return ApiResponse<OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6758,20 +7002,20 @@ public void v3GetDynamicExecutionWiresharkKeys(@javax.annotation.Nonnull Long an -
200 OK -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
*/ - public ApiResponse v3GetDynamicExecutionWiresharkKeysWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionWiresharkKeysValidateBeforeCall(analysisId, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse v3GetDynamicExecutionSummaryOperationWithHttpInfo(@javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryOperationValidateBeforeCall(runId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Download Wireshark TLS session keys. (asynchronously) - * Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete - * @param analysisId Analysis ID (required) + * Get a dynamic execution summary operation. (asynchronously) + * Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param runId Dynamic execution run ID (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 @@ -6782,15 +7026,15 @@ public ApiResponse v3GetDynamicExecutionWiresharkKeysWithHttpInfo(@javax.a 200 OK - 403 Forbidden - 404 Not Found - - 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - */ - public okhttp3.Call v3GetDynamicExecutionWiresharkKeysAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3GetDynamicExecutionSummaryOperationAsync(@javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3GetDynamicExecutionWiresharkKeysValidateBeforeCall(analysisId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = v3GetDynamicExecutionSummaryOperationValidateBeforeCall(runId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** @@ -7612,7 +7856,7 @@ private okhttp3.Call v3ListAnalysisOperationsValidateBeforeCall(@javax.annotatio /** * List the operations run on an analysis. - * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) * @return AnalysisOperationsOutputBody * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7634,7 +7878,7 @@ public AnalysisOperationsOutputBody v3ListAnalysisOperations(@javax.annotation.N /** * List the operations run on an analysis. - * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) * @return ApiResponse<AnalysisOperationsOutputBody> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -7657,7 +7901,7 @@ public ApiResponse v3ListAnalysisOperationsWithHtt /** * List the operations run on an analysis. (asynchronously) - * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -7681,8 +7925,9 @@ public okhttp3.Call v3ListAnalysisOperationsAsync(@javax.annotation.Nonnull Long return localVarCall; } /** - * Build call for v3ListDynamicExecutionScreenshots + * Build call for v3ListDynamicExecutionRunScreenshots * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7698,7 +7943,7 @@ public okhttp3.Call v3ListAnalysisOperationsAsync(@javax.annotation.Nonnull Long 500 Internal Server Error - */ - public okhttp3.Call v3ListDynamicExecutionScreenshotsCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3ListDynamicExecutionRunScreenshotsCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7715,8 +7960,9 @@ public okhttp3.Call v3ListDynamicExecutionScreenshotsCall(@javax.annotation.Nonn Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/screenshots" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7744,20 +7990,26 @@ public okhttp3.Call v3ListDynamicExecutionScreenshotsCall(@javax.annotation.Nonn } @SuppressWarnings("rawtypes") - private okhttp3.Call v3ListDynamicExecutionScreenshotsValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3ListDynamicExecutionRunScreenshotsValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3ListDynamicExecutionScreenshots(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3ListDynamicExecutionRunScreenshots(Async)"); } - return v3ListDynamicExecutionScreenshotsCall(analysisId, _callback); + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3ListDynamicExecutionRunScreenshots(Async)"); + } + + return v3ListDynamicExecutionRunScreenshotsCall(analysisId, runId, _callback); } /** - * List the screenshots captured during execution. - * Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * List a run's screenshots. + * Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return ScreenshotsIndex * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7772,15 +8024,16 @@ private okhttp3.Call v3ListDynamicExecutionScreenshotsValidateBeforeCall(@javax. 500 Internal Server Error - */ - public ScreenshotsIndex v3ListDynamicExecutionScreenshots(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3ListDynamicExecutionScreenshotsWithHttpInfo(analysisId); + public ScreenshotsIndex v3ListDynamicExecutionRunScreenshots(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3ListDynamicExecutionRunScreenshotsWithHttpInfo(analysisId, runId); return localVarResp.getData(); } /** - * List the screenshots captured during execution. - * Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * List a run's screenshots. + * Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return ApiResponse<ScreenshotsIndex> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7795,16 +8048,17 @@ public ScreenshotsIndex v3ListDynamicExecutionScreenshots(@javax.annotation.Nonn 500 Internal Server Error - */ - public ApiResponse v3ListDynamicExecutionScreenshotsWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3ListDynamicExecutionScreenshotsValidateBeforeCall(analysisId, null); + public ApiResponse v3ListDynamicExecutionRunScreenshotsWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3ListDynamicExecutionRunScreenshotsValidateBeforeCall(analysisId, runId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List the screenshots captured during execution. (asynchronously) - * Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * List a run's screenshots. (asynchronously) + * Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -7820,13 +8074,156 @@ public ApiResponse v3ListDynamicExecutionScreenshotsWithHttpIn 500 Internal Server Error - */ - public okhttp3.Call v3ListDynamicExecutionScreenshotsAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3ListDynamicExecutionRunScreenshotsAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3ListDynamicExecutionScreenshotsValidateBeforeCall(analysisId, _callback); + okhttp3.Call localVarCall = v3ListDynamicExecutionRunScreenshotsValidateBeforeCall(analysisId, runId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3ListDynamicExecutionRuns + * @param analysisId Analysis ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3ListDynamicExecutionRunsCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3ListDynamicExecutionRunsValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'analysisId' is set + if (analysisId == null) { + throw new ApiException("Missing the required parameter 'analysisId' when calling v3ListDynamicExecutionRuns(Async)"); + } + + return v3ListDynamicExecutionRunsCall(analysisId, _callback); + + } + + /** + * List the dynamic execution runs. + * Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @return ListDynamicExecutionRunsOutputBody + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ListDynamicExecutionRunsOutputBody v3ListDynamicExecutionRuns(@javax.annotation.Nonnull Long analysisId) throws ApiException { + ApiResponse localVarResp = v3ListDynamicExecutionRunsWithHttpInfo(analysisId); + return localVarResp.getData(); + } + + /** + * List the dynamic execution runs. + * Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @return ApiResponse<ListDynamicExecutionRunsOutputBody> + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3ListDynamicExecutionRunsWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { + okhttp3.Call localVarCall = v3ListDynamicExecutionRunsValidateBeforeCall(analysisId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List the dynamic execution runs. (asynchronously) + * Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3ListDynamicExecutionRunsAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3ListDynamicExecutionRunsValidateBeforeCall(analysisId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for v3ListExampleAnalyses * @param _callback Callback for upload/download progress @@ -8712,9 +9109,9 @@ public okhttp3.Call v3RevokeAnalysisAccessAsync(@javax.annotation.Nonnull Long a return localVarCall; } /** - * Build call for v3RunDynamicExecution + * Build call for v3RunDynamicExecutionRunSummary * @param analysisId Analysis ID (required) - * @param runDynamicExecutionInputBody (optional) + * @param runId Dynamic execution run ID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8723,7 +9120,6 @@ public okhttp3.Call v3RevokeAnalysisAccessAsync(@javax.annotation.Nonnull Long a Response Details Status Code Description Response Headers 200 OK - - 400 Bad Request - 403 Forbidden - 404 Not Found - 409 Conflict - @@ -8731,7 +9127,7 @@ public okhttp3.Call v3RevokeAnalysisAccessAsync(@javax.annotation.Nonnull Long a 500 Internal Server Error - */ - public okhttp3.Call v3RunDynamicExecutionCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3RunDynamicExecutionRunSummaryCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8745,11 +9141,12 @@ public okhttp3.Call v3RunDynamicExecutionCall(@javax.annotation.Nonnull Long ana basePath = null; } - Object localVarPostBody = runDynamicExecutionInputBody; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution:run" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8766,7 +9163,6 @@ public okhttp3.Call v3RunDynamicExecutionCall(@javax.annotation.Nonnull Long ana } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -8778,174 +9174,26 @@ public okhttp3.Call v3RunDynamicExecutionCall(@javax.annotation.Nonnull Long ana } @SuppressWarnings("rawtypes") - private okhttp3.Call v3RunDynamicExecutionValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, final ApiCallback _callback) throws ApiException { + private okhttp3.Call v3RunDynamicExecutionRunSummaryValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, 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 v3RunDynamicExecution(Async)"); + throw new ApiException("Missing the required parameter 'analysisId' when calling v3RunDynamicExecutionRunSummary(Async)"); } - return v3RunDynamicExecutionCall(analysisId, runDynamicExecutionInputBody, _callback); - - } - - /** - * Trigger a dynamic execution run. - * Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - * @param analysisId Analysis ID (required) - * @param runDynamicExecutionInputBody (optional) - * @return OperationDynamicExecutionMetadataDynamicExecutionResult - * @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 OperationDynamicExecutionMetadataDynamicExecutionResult v3RunDynamicExecution(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody) throws ApiException { - ApiResponse localVarResp = v3RunDynamicExecutionWithHttpInfo(analysisId, runDynamicExecutionInputBody); - return localVarResp.getData(); - } - - /** - * Trigger a dynamic execution run. - * Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - * @param analysisId Analysis ID (required) - * @param runDynamicExecutionInputBody (optional) - * @return ApiResponse<OperationDynamicExecutionMetadataDynamicExecutionResult> - * @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 v3RunDynamicExecutionWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody) throws ApiException { - okhttp3.Call localVarCall = v3RunDynamicExecutionValidateBeforeCall(analysisId, runDynamicExecutionInputBody, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Trigger a dynamic execution run. (asynchronously) - * Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - * @param analysisId Analysis ID (required) - * @param runDynamicExecutionInputBody (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - - - - -
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
- */ - public okhttp3.Call v3RunDynamicExecutionAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable RunDynamicExecutionInputBody runDynamicExecutionInputBody, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = v3RunDynamicExecutionValidateBeforeCall(analysisId, runDynamicExecutionInputBody, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for v3RunDynamicExecutionSummary - * @param analysisId Analysis ID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - - - - -
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -
- */ - public okhttp3.Call v3RunDynamicExecutionSummaryCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/dynamic-execution/summary:run" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call v3RunDynamicExecutionSummaryValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling v3RunDynamicExecutionSummary(Async)"); + // verify the required parameter 'runId' is set + if (runId == null) { + throw new ApiException("Missing the required parameter 'runId' when calling v3RunDynamicExecutionRunSummary(Async)"); } - return v3RunDynamicExecutionSummaryCall(analysisId, _callback); + return v3RunDynamicExecutionRunSummaryCall(analysisId, runId, _callback); } /** - * Regenerate the dynamic execution summary. - * Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Regenerate a run's dynamic execution summary. + * Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8953,7 +9201,6 @@ private okhttp3.Call v3RunDynamicExecutionSummaryValidateBeforeCall(@javax.annot Response Details Status Code Description Response Headers 200 OK - - 400 Bad Request - 403 Forbidden - 404 Not Found - 409 Conflict - @@ -8961,15 +9208,16 @@ private okhttp3.Call v3RunDynamicExecutionSummaryValidateBeforeCall(@javax.annot 500 Internal Server Error - */ - public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3RunDynamicExecutionSummary(@javax.annotation.Nonnull Long analysisId) throws ApiException { - ApiResponse localVarResp = v3RunDynamicExecutionSummaryWithHttpInfo(analysisId); + public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3RunDynamicExecutionRunSummary(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + ApiResponse localVarResp = v3RunDynamicExecutionRunSummaryWithHttpInfo(analysisId, runId); return localVarResp.getData(); } /** - * Regenerate the dynamic execution summary. - * Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Regenerate a run's dynamic execution summary. + * Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (required) * @return ApiResponse<OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8977,7 +9225,6 @@ public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3R Response Details Status Code Description Response Headers 200 OK - - 400 Bad Request - 403 Forbidden - 404 Not Found - 409 Conflict - @@ -8985,16 +9232,17 @@ public OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3R 500 Internal Server Error - */ - public ApiResponse v3RunDynamicExecutionSummaryWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { - okhttp3.Call localVarCall = v3RunDynamicExecutionSummaryValidateBeforeCall(analysisId, null); + public ApiResponse v3RunDynamicExecutionRunSummaryWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId) throws ApiException { + okhttp3.Call localVarCall = v3RunDynamicExecutionRunSummaryValidateBeforeCall(analysisId, runId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Regenerate the dynamic execution summary. (asynchronously) - * Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + * Regenerate a run's dynamic execution summary. (asynchronously) + * Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete * @param analysisId Analysis ID (required) + * @param runId Dynamic execution run ID (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 @@ -9003,7 +9251,6 @@ public ApiResponseResponse Details Status Code Description Response Headers 200 OK - - 400 Bad Request - 403 Forbidden - 404 Not Found - 409 Conflict - @@ -9011,9 +9258,9 @@ public ApiResponse 500 Internal Server Error - */ - public okhttp3.Call v3RunDynamicExecutionSummaryAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call v3RunDynamicExecutionRunSummaryAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String runId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = v3RunDynamicExecutionSummaryValidateBeforeCall(analysisId, _callback); + okhttp3.Call localVarCall = v3RunDynamicExecutionRunSummaryValidateBeforeCall(analysisId, runId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -9415,7 +9662,7 @@ private okhttp3.Call v3UpdateAnalysisGlobalValidateBeforeCall(@javax.annotation. /** * Edit a global variable. - * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param vaddr Virtual address of the global variable. (required) * @param updateAnalysisGlobalInputBody (required) @@ -9441,7 +9688,7 @@ public GlobalVariable v3UpdateAnalysisGlobal(@javax.annotation.Nonnull Long anal /** * Edit a global variable. - * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param vaddr Virtual address of the global variable. (required) * @param updateAnalysisGlobalInputBody (required) @@ -9468,7 +9715,7 @@ public ApiResponse v3UpdateAnalysisGlobalWithHttpInfo(@javax.ann /** * Edit a global variable. (asynchronously) - * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + * Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param vaddr Virtual address of the global variable. (required) * @param updateAnalysisGlobalInputBody (required) diff --git a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java index e7fd6f4b..6292b60c 100644 --- a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java +++ b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java @@ -35,6 +35,8 @@ import ai.reveng.model.BaseResponseAnalysisFunctionsList; import ai.reveng.model.BaseResponseAnalysisTags; import ai.reveng.model.BaseResponseCapabilities; +import ai.reveng.model.FeedbackSubmission; +import ai.reveng.model.RecordedFeedback; import java.lang.reflect.Type; import java.util.ArrayList; @@ -703,6 +705,159 @@ public okhttp3.Call getTagsAsync(@javax.annotation.Nonnull Integer analysisId, f localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3GetAnalysisFeedback + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetAnalysisFeedbackCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, 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 = "/v3/analyses/{analysis_id}/feedback/{type}" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "type" + "}", localVarApiClient.escapeString(type.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", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3GetAnalysisFeedbackValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, 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 v3GetAnalysisFeedback(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling v3GetAnalysisFeedback(Async)"); + } + + return v3GetAnalysisFeedbackCall(analysisId, type, _callback); + + } + + /** + * Get the caller's feedback on an analysis. + * Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @return RecordedFeedback + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public RecordedFeedback v3GetAnalysisFeedback(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type) throws ApiException { + ApiResponse localVarResp = v3GetAnalysisFeedbackWithHttpInfo(analysisId, type); + return localVarResp.getData(); + } + + /** + * Get the caller's feedback on an analysis. + * Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @return ApiResponse<RecordedFeedback> + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3GetAnalysisFeedbackWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type) throws ApiException { + okhttp3.Call localVarCall = v3GetAnalysisFeedbackValidateBeforeCall(analysisId, type, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the caller's feedback on an analysis. (asynchronously) + * Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetAnalysisFeedbackAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3GetAnalysisFeedbackValidateBeforeCall(analysisId, type, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for v3GetAnalysisXref * @param analysisId Analysis ID (required) @@ -1142,4 +1297,163 @@ public okhttp3.Call v3ListAnalysisTagsAsync(@javax.annotation.Nonnull Long analy localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3UpsertAnalysisFeedback + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3UpsertAnalysisFeedbackCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, 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 = feedbackSubmission; + + // create path and map variables + String localVarPath = "/v3/analyses/{analysis_id}/feedback/{type}" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) + .replace("{" + "type" + "}", localVarApiClient.escapeString(type.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 v3UpsertAnalysisFeedbackValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, 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 v3UpsertAnalysisFeedback(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling v3UpsertAnalysisFeedback(Async)"); + } + + // verify the required parameter 'feedbackSubmission' is set + if (feedbackSubmission == null) { + throw new ApiException("Missing the required parameter 'feedbackSubmission' when calling v3UpsertAnalysisFeedback(Async)"); + } + + return v3UpsertAnalysisFeedbackCall(analysisId, type, feedbackSubmission, _callback); + + } + + /** + * Record feedback on an analysis. + * Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public void v3UpsertAnalysisFeedback(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission) throws ApiException { + v3UpsertAnalysisFeedbackWithHttpInfo(analysisId, type, feedbackSubmission); + } + + /** + * Record feedback on an analysis. + * Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @return ApiResponse<Void> + * @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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3UpsertAnalysisFeedbackWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission) throws ApiException { + okhttp3.Call localVarCall = v3UpsertAnalysisFeedbackValidateBeforeCall(analysisId, type, feedbackSubmission, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Record feedback on an analysis. (asynchronously) + * Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param analysisId Analysis ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3UpsertAnalysisFeedbackAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3UpsertAnalysisFeedbackValidateBeforeCall(analysisId, type, feedbackSubmission, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } } diff --git a/src/main/java/ai/reveng/api/BillingApi.java b/src/main/java/ai/reveng/api/BillingApi.java new file mode 100644 index 00000000..d8f1c3cf --- /dev/null +++ b/src/main/java/ai/reveng/api/BillingApi.java @@ -0,0 +1,196 @@ +/* + * 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.api; + +import ai.reveng.invoker.ApiCallback; +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.ApiResponse; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.Pair; +import ai.reveng.invoker.ProgressRequestBody; +import ai.reveng.invoker.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import ai.reveng.model.APIError; +import ai.reveng.model.GetCreditEstimatesOutputBody; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class BillingApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BillingApi() { + this(Configuration.getDefaultApiClient()); + } + + public BillingApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for v3GetCreditEstimates + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Error -
+ */ + public okhttp3.Call v3GetCreditEstimatesCall(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 = "/v3/credit-estimates"; + + 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", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3GetCreditEstimatesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return v3GetCreditEstimatesCall(_callback); + + } + + /** + * Get credit estimates. + * Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + * @return GetCreditEstimatesOutputBody + * @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 -
0 Error -
+ */ + public GetCreditEstimatesOutputBody v3GetCreditEstimates() throws ApiException { + ApiResponse localVarResp = v3GetCreditEstimatesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get credit estimates. + * Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + * @return ApiResponse<GetCreditEstimatesOutputBody> + * @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 -
0 Error -
+ */ + public ApiResponse v3GetCreditEstimatesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = v3GetCreditEstimatesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get credit estimates. (asynchronously) + * Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + * @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 -
0 Error -
+ */ + public okhttp3.Call v3GetCreditEstimatesAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3GetCreditEstimatesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/ai/reveng/api/BinariesApi.java b/src/main/java/ai/reveng/api/BinariesApi.java index 6306c600..69ceeed6 100644 --- a/src/main/java/ai/reveng/api/BinariesApi.java +++ b/src/main/java/ai/reveng/api/BinariesApi.java @@ -42,6 +42,7 @@ import ai.reveng.model.GetDieInfoOutputBody; import ai.reveng.model.GetRelatedBinariesOutputBody; import ai.reveng.model.GetRelatedStatusOutputBody; +import ai.reveng.model.ListMalwareFamiliesOutputBody; import ai.reveng.model.SearchBinariesOutputBody; import ai.reveng.model.UploadOutputBody; @@ -2210,6 +2211,140 @@ public okhttp3.Call v3GetBinaryRelatedStatusAsync(@javax.annotation.Nonnull Long localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3ListMalwareFamilies + * @param binaryIds Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Error -
+ */ + public okhttp3.Call v3ListMalwareFamiliesCall(@javax.annotation.Nullable List binaryIds, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v3/malware-families"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (binaryIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "binary_ids", binaryIds)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3ListMalwareFamiliesValidateBeforeCall(@javax.annotation.Nullable List binaryIds, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'binaryIds' is set + if (binaryIds == null) { + throw new ApiException("Missing the required parameter 'binaryIds' when calling v3ListMalwareFamilies(Async)"); + } + + return v3ListMalwareFamiliesCall(binaryIds, _callback); + + } + + /** + * Look up the malware families of binaries in the RevEng.AI malware corpus. + * Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + * @param binaryIds Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + * @return ListMalwareFamiliesOutputBody + * @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 -
0 Error -
+ */ + public ListMalwareFamiliesOutputBody v3ListMalwareFamilies(@javax.annotation.Nullable List binaryIds) throws ApiException { + ApiResponse localVarResp = v3ListMalwareFamiliesWithHttpInfo(binaryIds); + return localVarResp.getData(); + } + + /** + * Look up the malware families of binaries in the RevEng.AI malware corpus. + * Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + * @param binaryIds Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + * @return ApiResponse<ListMalwareFamiliesOutputBody> + * @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 -
0 Error -
+ */ + public ApiResponse v3ListMalwareFamiliesWithHttpInfo(@javax.annotation.Nullable List binaryIds) throws ApiException { + okhttp3.Call localVarCall = v3ListMalwareFamiliesValidateBeforeCall(binaryIds, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Look up the malware families of binaries in the RevEng.AI malware corpus. (asynchronously) + * Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + * @param binaryIds Binaries to look up, typically those a function-matching run found in the malware corpus. (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 -
0 Error -
+ */ + public okhttp3.Call v3ListMalwareFamiliesAsync(@javax.annotation.Nullable List binaryIds, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3ListMalwareFamiliesValidateBeforeCall(binaryIds, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for v3SearchBinaries * @param partialName Partial or full binary name to search for (optional) diff --git a/src/main/java/ai/reveng/api/DataTypesApi.java b/src/main/java/ai/reveng/api/DataTypesApi.java index d9c39083..3c8a4933 100644 --- a/src/main/java/ai/reveng/api/DataTypesApi.java +++ b/src/main/java/ai/reveng/api/DataTypesApi.java @@ -169,7 +169,7 @@ private okhttp3.Call v3CopyFunctionSignaturesValidateBeforeCall(@javax.annotatio /** * Copy function signatures - * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param copyFunctionSignaturesInputBody (required) * @return CopyFunctionSignaturesOutputBody @@ -194,7 +194,7 @@ public CopyFunctionSignaturesOutputBody v3CopyFunctionSignatures(@javax.annotati /** * Copy function signatures - * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param copyFunctionSignaturesInputBody (required) * @return ApiResponse<CopyFunctionSignaturesOutputBody> @@ -220,7 +220,7 @@ public ApiResponse v3CopyFunctionSignaturesWit /** * Copy function signatures (asynchronously) - * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param copyFunctionSignaturesInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -330,7 +330,7 @@ private okhttp3.Call v3CreateAnalysisDataTypesValidateBeforeCall(@javax.annotati /** * Create an analysis's data types - * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param createAnalysisDataTypesInputBody (required) * @return AnalysisDataTypesOutputBody @@ -355,7 +355,7 @@ public AnalysisDataTypesOutputBody v3CreateAnalysisDataTypes(@javax.annotation.N /** * Create an analysis's data types - * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param createAnalysisDataTypesInputBody (required) * @return ApiResponse<AnalysisDataTypesOutputBody> @@ -381,7 +381,7 @@ public ApiResponse v3CreateAnalysisDataTypesWithHtt /** * Create an analysis's data types (asynchronously) - * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param createAnalysisDataTypesInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -1641,7 +1641,7 @@ private okhttp3.Call v3UpdateAnalysisDataTypesValidateBeforeCall(@javax.annotati /** * Update an analysis's data types - * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param updateAnalysisDataTypesInputBody (required) * @return AnalysisDataTypesOutputBody @@ -1666,7 +1666,7 @@ public AnalysisDataTypesOutputBody v3UpdateAnalysisDataTypes(@javax.annotation.N /** * Update an analysis's data types - * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param updateAnalysisDataTypesInputBody (required) * @return ApiResponse<AnalysisDataTypesOutputBody> @@ -1692,7 +1692,7 @@ public ApiResponse v3UpdateAnalysisDataTypesWithHtt /** * Update an analysis's data types (asynchronously) - * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param updateAnalysisDataTypesInputBody (required) * @param _callback The callback to be executed when the API call finishes @@ -1734,6 +1734,7 @@ public okhttp3.Call v3UpdateAnalysisDataTypesAsync(@javax.annotation.Nonnull Lon 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -1808,7 +1809,7 @@ private okhttp3.Call v3UpdateFunctionSignatureValidateBeforeCall(@javax.annotati /** * Update a function's signature - * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param functionId Function ID (required) * @param updateFunctionSignatureInputBody (required) @@ -1822,6 +1823,7 @@ private okhttp3.Call v3UpdateFunctionSignatureValidateBeforeCall(@javax.annotati 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -1833,7 +1835,7 @@ public FunctionSignatureEntry v3UpdateFunctionSignature(@javax.annotation.Nonnul /** * Update a function's signature - * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param functionId Function ID (required) * @param updateFunctionSignatureInputBody (required) @@ -1847,6 +1849,7 @@ public FunctionSignatureEntry v3UpdateFunctionSignature(@javax.annotation.Nonnul 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - @@ -1859,7 +1862,7 @@ public ApiResponse v3UpdateFunctionSignatureWithHttpInfo /** * Update a function's signature (asynchronously) - * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **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 - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param analysisId Analysis ID (required) * @param functionId Function ID (required) * @param updateFunctionSignatureInputBody (required) @@ -1874,6 +1877,7 @@ public ApiResponse v3UpdateFunctionSignatureWithHttpInfo 400 Bad Request - 403 Forbidden - 404 Not Found - + 409 Conflict - 422 Unprocessable Entity - 500 Internal Server Error - diff --git a/src/main/java/ai/reveng/api/FunctionsCoreApi.java b/src/main/java/ai/reveng/api/FunctionsCoreApi.java index 5f245a00..5f8f1a35 100644 --- a/src/main/java/ai/reveng/api/FunctionsCoreApi.java +++ b/src/main/java/ai/reveng/api/FunctionsCoreApi.java @@ -30,12 +30,9 @@ import ai.reveng.model.AddCalleeInputBody; import ai.reveng.model.AddUserStringToFunctionInputBody; import ai.reveng.model.BaseResponse; -import ai.reveng.model.BaseResponseAnalysisStringsResponse; -import ai.reveng.model.BaseResponseAnalysisStringsStatusResponse; import ai.reveng.model.BaseResponseCalleesCallerFunctionsResponse; import ai.reveng.model.BaseResponseFunctionBlocksResponse; import ai.reveng.model.BaseResponseFunctionCapabilityResponse; -import ai.reveng.model.BaseResponseFunctionStringsResponse; import ai.reveng.model.BaseResponseFunctionsDetailResponse; import ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse; import ai.reveng.model.CallEdgesOutputBody; @@ -43,6 +40,7 @@ import ai.reveng.model.CanonicalizeNamesOutputBody; import ai.reveng.model.CapabilitiesOutputBody; import ai.reveng.model.DisassemblyOutputBody; +import ai.reveng.model.FeedbackSubmission; import ai.reveng.model.FunctionDetailsOutputBody; import ai.reveng.model.GetFunctionMapsOutputBody; import ai.reveng.model.GetMatchesOutputBody; @@ -53,6 +51,7 @@ import ai.reveng.model.ListFunctionGlobalsOutputBody; import ai.reveng.model.ListFunctionStringsOutputBody; import ai.reveng.model.ListImportedFunctionsOutputBody; +import ai.reveng.model.RecordedFeedback; import ai.reveng.model.SearchFunctionsOutputBody; import ai.reveng.model.StartMatchingForFunctionsInputBody; import ai.reveng.model.StartMatchingOutputBody; @@ -410,334 +409,6 @@ public okhttp3.Call addUserStringToFunctionAsync(@javax.annotation.Nonnull Long localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getAnalysisStrings - * @param analysisId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param functionSearch Search is applied to function names (optional) - * @param orderBy Order by field (optional, default to value) - * @param sortOrder Sort order for the results (optional, default to ASC) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, 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/strings" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); - } - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (functionSearch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("function_search", functionSearch)); - } - - if (orderBy != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_by", orderBy)); - } - - if (sortOrder != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort_order", sortOrder)); - } - - 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", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call getAnalysisStringsValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, 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 getAnalysisStrings(Async)"); - } - - return getAnalysisStringsCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _callback); - - } - - /** - * Get string information found in the Analysis - * Get string information found in the analysis - * @param analysisId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param functionSearch Search is applied to function names (optional) - * @param orderBy Order by field (optional, default to value) - * @param sortOrder Sort order for the results (optional, default to ASC) - * @return BaseResponseAnalysisStringsResponse - * @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 BaseResponseAnalysisStringsResponse getAnalysisStrings(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder) throws ApiException { - ApiResponse localVarResp = getAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder); - return localVarResp.getData(); - } - - /** - * Get string information found in the Analysis - * Get string information found in the analysis - * @param analysisId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param functionSearch Search is applied to function names (optional) - * @param orderBy Order by field (optional, default to value) - * @param sortOrder Sort order for the results (optional, default to ASC) - * @return ApiResponse<BaseResponseAnalysisStringsResponse> - * @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 getAnalysisStringsWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder) throws ApiException { - okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get string information found in the Analysis (asynchronously) - * Get string information found in the analysis - * @param analysisId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param functionSearch Search is applied to function names (optional) - * @param orderBy Order by field (optional, default to value) - * @param sortOrder Sort order for the results (optional, default to ASC) - * @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 getAnalysisStringsAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAnalysisStringsStatus - * @param analysisId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getAnalysisStringsStatusCall(@javax.annotation.Nonnull Integer analysisId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v2/analyses/{analysis_id}/functions/strings/status" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call getAnalysisStringsStatusValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'analysisId' is set - if (analysisId == null) { - throw new ApiException("Missing the required parameter 'analysisId' when calling getAnalysisStringsStatus(Async)"); - } - - return getAnalysisStringsStatusCall(analysisId, _callback); - - } - - /** - * Get string processing state for the Analysis - * Get string processing state for the Analysis - * @param analysisId (required) - * @return BaseResponseAnalysisStringsStatusResponse - * @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 BaseResponseAnalysisStringsStatusResponse getAnalysisStringsStatus(@javax.annotation.Nonnull Integer analysisId) throws ApiException { - ApiResponse localVarResp = getAnalysisStringsStatusWithHttpInfo(analysisId); - return localVarResp.getData(); - } - - /** - * Get string processing state for the Analysis - * Get string processing state for the Analysis - * @param analysisId (required) - * @return ApiResponse<BaseResponseAnalysisStringsStatusResponse> - * @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 getAnalysisStringsStatusWithHttpInfo(@javax.annotation.Nonnull Integer analysisId) throws ApiException { - okhttp3.Call localVarCall = getAnalysisStringsStatusValidateBeforeCall(analysisId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get string processing state for the Analysis (asynchronously) - * Get string processing state for the Analysis - * @param analysisId (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 getAnalysisStringsStatusAsync(@javax.annotation.Nonnull Integer analysisId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAnalysisStringsStatusValidateBeforeCall(analysisId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getFunctionBlocks * @param functionId (required) @@ -958,7 +629,7 @@ private okhttp3.Call getFunctionBlocks_0ValidateBeforeCall(@javax.annotation.Non /** * Get function disassembly - * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param functionId Function ID (required) * @return DisassemblyOutputBody * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -981,7 +652,7 @@ public DisassemblyOutputBody getFunctionBlocks_0(@javax.annotation.Nonnull Long /** * Get function disassembly - * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param functionId Function ID (required) * @return ApiResponse<DisassemblyOutputBody> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1005,7 +676,7 @@ public ApiResponse getFunctionBlocks_0WithHttpInfo(@javax /** * Get function disassembly (asynchronously) - * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + * Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready * @param functionId Function ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -2154,186 +1825,22 @@ public ApiResponse getFunctionIndirectCallSitesWith - - - - - -
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
- */ - public okhttp3.Call getFunctionIndirectCallSitesAsync(@javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getFunctionIndirectCallSitesValidateBeforeCall(functionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getFunctionStrings - * @param functionId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getFunctionStringsCall(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v2/functions/{function_id}/strings" - .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); - } - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - 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", "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionStringsValidateBeforeCall(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'functionId' is set - if (functionId == null) { - throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionStrings(Async)"); - } - - return getFunctionStringsCall(functionId, page, pageSize, search, _callback); - - } - - /** - * Get string information found in the function - * Get string information found in the function - * @param functionId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @return BaseResponseFunctionStringsResponse - * @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 BaseResponseFunctionStringsResponse getFunctionStrings(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search) throws ApiException { - ApiResponse localVarResp = getFunctionStringsWithHttpInfo(functionId, page, pageSize, search); - return localVarResp.getData(); - } - - /** - * Get string information found in the function - * Get string information found in the function - * @param functionId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @return ApiResponse<BaseResponseFunctionStringsResponse> - * @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 getFunctionStringsWithHttpInfo(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search) throws ApiException { - okhttp3.Call localVarCall = getFunctionStringsValidateBeforeCall(functionId, page, pageSize, search, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get string information found in the function (asynchronously) - * Get string information found in the function - * @param functionId (required) - * @param page The page number to retrieve. (optional, default to 1) - * @param pageSize Number of items per page. (optional, default to 100) - * @param search Search is applied to string value (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
- * @deprecated */ - @Deprecated - public okhttp3.Call getFunctionStringsAsync(@javax.annotation.Nonnull Integer functionId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionIndirectCallSitesAsync(@javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFunctionStringsValidateBeforeCall(functionId, page, pageSize, search, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getFunctionIndirectCallSitesValidateBeforeCall(functionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getFunctionStrings_0 + * Build call for getFunctionStrings * @param functionId Function ID (required) * @param page Page number (1-indexed). (optional, default to 1) * @param pageSize Number of results per page. (optional, default to 100) @@ -2352,7 +1859,7 @@ public okhttp3.Call getFunctionStringsAsync(@javax.annotation.Nonnull Integer fu 500 Internal Server Error - */ - public okhttp3.Call getFunctionStrings_0Call(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionStringsCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2410,13 +1917,13 @@ public okhttp3.Call getFunctionStrings_0Call(@javax.annotation.Nonnull Long func } @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionStrings_0ValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFunctionStringsValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { // verify the required parameter 'functionId' is set if (functionId == null) { - throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionStrings_0(Async)"); + throw new ApiException("Missing the required parameter 'functionId' when calling getFunctionStrings(Async)"); } - return getFunctionStrings_0Call(functionId, page, pageSize, search, _callback); + return getFunctionStringsCall(functionId, page, pageSize, search, _callback); } @@ -2440,8 +1947,8 @@ private okhttp3.Call getFunctionStrings_0ValidateBeforeCall(@javax.annotation.No 500 Internal Server Error - */ - public ListFunctionStringsOutputBody getFunctionStrings_0(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search) throws ApiException { - ApiResponse localVarResp = getFunctionStrings_0WithHttpInfo(functionId, page, pageSize, search); + public ListFunctionStringsOutputBody getFunctionStrings(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search) throws ApiException { + ApiResponse localVarResp = getFunctionStringsWithHttpInfo(functionId, page, pageSize, search); return localVarResp.getData(); } @@ -2465,8 +1972,8 @@ public ListFunctionStringsOutputBody getFunctionStrings_0(@javax.annotation.Nonn 500 Internal Server Error - */ - public ApiResponse getFunctionStrings_0WithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search) throws ApiException { - okhttp3.Call localVarCall = getFunctionStrings_0ValidateBeforeCall(functionId, page, pageSize, search, null); + public ApiResponse getFunctionStringsWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search) throws ApiException { + okhttp3.Call localVarCall = getFunctionStringsValidateBeforeCall(functionId, page, pageSize, search, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -2492,9 +1999,9 @@ public ApiResponse getFunctionStrings_0WithHttpIn 500 Internal Server Error - */ - public okhttp3.Call getFunctionStrings_0Async(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionStringsAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Long page, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFunctionStrings_0ValidateBeforeCall(functionId, page, pageSize, search, _callback); + okhttp3.Call localVarCall = getFunctionStringsValidateBeforeCall(functionId, page, pageSize, search, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -3859,6 +3366,159 @@ public okhttp3.Call v3GetAnalysisFuncMapsAsync(@javax.annotation.Nonnull Long an localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3GetFunctionFeedback + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetFunctionFeedbackCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, 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 = "/v3/functions/{function_id}/feedback/{type}" + .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())) + .replace("{" + "type" + "}", localVarApiClient.escapeString(type.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", "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call v3GetFunctionFeedbackValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'functionId' is set + if (functionId == null) { + throw new ApiException("Missing the required parameter 'functionId' when calling v3GetFunctionFeedback(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling v3GetFunctionFeedback(Async)"); + } + + return v3GetFunctionFeedbackCall(functionId, type, _callback); + + } + + /** + * Get the caller's feedback on a function. + * Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @return RecordedFeedback + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public RecordedFeedback v3GetFunctionFeedback(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type) throws ApiException { + ApiResponse localVarResp = v3GetFunctionFeedbackWithHttpInfo(functionId, type); + return localVarResp.getData(); + } + + /** + * Get the caller's feedback on a function. + * Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @return ApiResponse<RecordedFeedback> + * @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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3GetFunctionFeedbackWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type) throws ApiException { + okhttp3.Call localVarCall = v3GetFunctionFeedbackValidateBeforeCall(functionId, type, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the caller's feedback on a function. (asynchronously) + * Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (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 -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3GetFunctionFeedbackAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3GetFunctionFeedbackValidateBeforeCall(functionId, type, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for v3ListFunctionGlobals * @param functionId Function ID (required) @@ -4159,4 +3819,163 @@ public okhttp3.Call v3SearchFunctionsAsync(@javax.annotation.Nullable String par localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for v3UpsertFunctionFeedback + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3UpsertFunctionFeedbackCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, 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 = feedbackSubmission; + + // create path and map variables + String localVarPath = "/v3/functions/{function_id}/feedback/{type}" + .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())) + .replace("{" + "type" + "}", localVarApiClient.escapeString(type.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 v3UpsertFunctionFeedbackValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'functionId' is set + if (functionId == null) { + throw new ApiException("Missing the required parameter 'functionId' when calling v3UpsertFunctionFeedback(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling v3UpsertFunctionFeedback(Async)"); + } + + // verify the required parameter 'feedbackSubmission' is set + if (feedbackSubmission == null) { + throw new ApiException("Missing the required parameter 'feedbackSubmission' when calling v3UpsertFunctionFeedback(Async)"); + } + + return v3UpsertFunctionFeedbackCall(functionId, type, feedbackSubmission, _callback); + + } + + /** + * Record feedback on a function. + * Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public void v3UpsertFunctionFeedback(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission) throws ApiException { + v3UpsertFunctionFeedbackWithHttpInfo(functionId, type, feedbackSubmission); + } + + /** + * Record feedback on a function. + * Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (required) + * @return ApiResponse<Void> + * @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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse v3UpsertFunctionFeedbackWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission) throws ApiException { + okhttp3.Call localVarCall = v3UpsertFunctionFeedbackValidateBeforeCall(functionId, type, feedbackSubmission, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Record feedback on a function. (asynchronously) + * Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * @param functionId Function ID (required) + * @param type What the feedback is about (required) + * @param feedbackSubmission (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
204 No Content -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call v3UpsertFunctionFeedbackAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull FeedbackSubmission feedbackSubmission, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = v3UpsertFunctionFeedbackValidateBeforeCall(functionId, type, feedbackSubmission, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } } diff --git a/src/main/java/ai/reveng/api/IamUsersApi.java b/src/main/java/ai/reveng/api/IamUsersApi.java index bb910d6d..67ec8143 100644 --- a/src/main/java/ai/reveng/api/IamUsersApi.java +++ b/src/main/java/ai/reveng/api/IamUsersApi.java @@ -27,8 +27,8 @@ import ai.reveng.model.APIError; +import ai.reveng.model.CurrentUser; import ai.reveng.model.Permissions; -import ai.reveng.model.User; import java.lang.reflect.Type; import java.util.ArrayList; @@ -139,8 +139,8 @@ private okhttp3.Call getMeValidateBeforeCall(final ApiCallback _callback) throws /** * Get current user - * Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - * @return User + * Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @return CurrentUser * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -151,15 +151,15 @@ private okhttp3.Call getMeValidateBeforeCall(final ApiCallback _callback) throws
500 Internal Server Error -
*/ - public User getMe() throws ApiException { - ApiResponse localVarResp = getMeWithHttpInfo(); + public CurrentUser getMe() throws ApiException { + ApiResponse localVarResp = getMeWithHttpInfo(); return localVarResp.getData(); } /** * Get current user - * Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - * @return ApiResponse<User> + * Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @return ApiResponse<CurrentUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,15 +170,15 @@ public User getMe() throws ApiException {
500 Internal Server Error -
*/ - public ApiResponse getMeWithHttpInfo() throws ApiException { + public ApiResponse getMeWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getMeValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get current user (asynchronously) - * Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @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 @@ -191,10 +191,10 @@ public ApiResponse getMeWithHttpInfo() throws ApiException { 500 Internal Server Error - */ - public okhttp3.Call getMeAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMeAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMeValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 1e5eeada..787a5a17 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -148,7 +148,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/4.75.0/java"); + setUserAgent("OpenAPI-Generator/4.77.1/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 6a0b760a..3c7d7c81 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 = "4.75.0"; + public static final String VERSION = "4.77.1"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index 3b48a111..8c3f0b93 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -250,10 +250,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisReport.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisRequirement.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisStringFunction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisStringInput.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisStringItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisStringsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisStringsStatusResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisTagBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisTags.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisTagsOutputBody.CustomTypeAdapterFactory()); @@ -264,8 +261,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ApiCall.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ApiKeyBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2AgentSchemaCapability.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2FunctionsResponsesFunction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2FunctionsTypesFunction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2InfoTypesCapability.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ArchiveContentEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ArrayDataType.CustomTypeAdapterFactory()); @@ -285,8 +280,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisFunctionMapping.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisFunctions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisFunctionsList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisStringsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisStringsStatusResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisTags.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisUpdateTagsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseBasic.CustomTypeAdapterFactory()); @@ -311,7 +304,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseFunctionBlocksResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseFunctionCapabilityResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseFunctionSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseFunctionStringsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseFunctionsDetailResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetPublicUserResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse.CustomTypeAdapterFactory()); @@ -382,6 +374,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CapabilitiesResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Capability.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CapabilityEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CapabilityImplementation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ChildBinariesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CodeSignatureModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CollectionBinariesUpdateRequest.CustomTypeAdapterFactory()); @@ -457,6 +450,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CryptoScanMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CryptoScanResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CryptoVerification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CurrentUser.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DailyAnalysesCountOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DailyCountBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DataTypeEntry.CustomTypeAdapterFactory()); @@ -471,6 +465,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilationData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilerSummary.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilerSummaryEvidence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DeleteMeBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DieMatch.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DisassemblyOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DisassemblySummaryEvidence.CustomTypeAdapterFactory()); @@ -478,6 +473,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DrakvufFileMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionRun.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionRunConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionSummary.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionSummaryMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DynamicExecutionSummaryResult.CustomTypeAdapterFactory()); @@ -544,6 +541,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExtractedURL.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExtractionFailure.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FeedbackOutputBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FeedbackSubmission.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FileActivityEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FileHashes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FileMetadata.CustomTypeAdapterFactory()); @@ -560,6 +558,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FindingBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FindingCountsBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FormFile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Function.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBlockDestinationResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBlockResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionBlocksResponse.CustomTypeAdapterFactory()); @@ -585,9 +584,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionSignatureVersion.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionSimilarity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionSimilarityEvidence.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionString.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionStringItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionStringsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionTypeDefinition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionUsage.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.FunctionsDetailResponse.CustomTypeAdapterFactory()); @@ -603,6 +600,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetBinaryExternalsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetCollectionOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetConfigOutputBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetCreditEstimatesOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetDataTypeHistoryBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetDieInfoOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetFindingOutputBody.CustomTypeAdapterFactory()); @@ -661,6 +659,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListCollectionsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListConversationsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListDataTypeFunctionsBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListDynamicExecutionRunsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListExampleAnalysesOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListFindingsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListFunctionGlobalsOutputBody.CustomTypeAdapterFactory()); @@ -669,6 +668,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListGlobalFunctionsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListImportedFunctionsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListInvestigationsOutputBody.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListMalwareFamiliesOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListOperationPrerequisitesOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListPrincipalsOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ListPublicUsersOutputBody.CustomTypeAdapterFactory()); @@ -680,6 +680,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Logs.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.LookupAnalysisByBinaryIDOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MITRETechnique.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MalwareFamily.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MatchFilters.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MatchedFunction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.MemdumpEntry.CustomTypeAdapterFactory()); @@ -708,6 +709,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OIDCCallbackInputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperandXref.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperationBinaryExportMetadataBinaryExportResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperationCostBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperationCreateMetadataCreateResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperationCryptoExplainMetadataCryptoExplainResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.OperationCryptoScanMetadataCryptoScanResult.CustomTypeAdapterFactory()); @@ -764,11 +766,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProtocolsAgentResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PublicTeamBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PublicUserBody.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PutAnalysisStringsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.QueuedWorkflowTaskResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RatingOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ReAnalysisForm.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Recent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RecordedFeedback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ReferencedConstant.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ReferencedConstantEvidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RefreshBody.CustomTypeAdapterFactory()); @@ -853,6 +855,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleCodeSignatureModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SinglePDBEntryModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleSectionModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SizeBucketBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SoftwareTypeCountsBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SourceDeltaEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SourceResetEvent.CustomTypeAdapterFactory()); @@ -886,7 +889,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StatusResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StepFinishedData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StepStartedData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StringFunctions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StringMatch.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StringMatchEvidence.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StructDataType.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/AnalysisBasicInfoOutputBody.java b/src/main/java/ai/reveng/model/AnalysisBasicInfoOutputBody.java index 3ae3ed48..a4bc9c34 100644 --- a/src/main/java/ai/reveng/model/AnalysisBasicInfoOutputBody.java +++ b/src/main/java/ai/reveng/model/AnalysisBasicInfoOutputBody.java @@ -172,6 +172,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private Long functionCount; public static final String SERIALIZED_NAME_IS_ADVANCED = "is_advanced"; + @Deprecated @SerializedName(SERIALIZED_NAME_IS_ADVANCED) @javax.annotation.Nonnull private Boolean isAdvanced; @@ -486,20 +487,24 @@ public void setFunctionCount(@javax.annotation.Nonnull Long functionCount) { } + @Deprecated public AnalysisBasicInfoOutputBody isAdvanced(@javax.annotation.Nonnull Boolean isAdvanced) { this.isAdvanced = isAdvanced; return this; } /** - * True when the analysis was run in advanced mode + * Always false; advanced (DFG) analysis has been removed * @return isAdvanced + * @deprecated */ + @Deprecated @javax.annotation.Nonnull public Boolean getIsAdvanced() { return isAdvanced; } + @Deprecated public void setIsAdvanced(@javax.annotation.Nonnull Boolean isAdvanced) { this.isAdvanced = isAdvanced; } diff --git a/src/main/java/ai/reveng/model/AnalysisConfig.java b/src/main/java/ai/reveng/model/AnalysisConfig.java index b475dda3..8fbe2f65 100644 --- a/src/main/java/ai/reveng/model/AnalysisConfig.java +++ b/src/main/java/ai/reveng/model/AnalysisConfig.java @@ -66,11 +66,6 @@ public class AnalysisConfig { @javax.annotation.Nullable private Boolean noCache = false; - public static final String SERIALIZED_NAME_ADVANCED_ANALYSIS = "advanced_analysis"; - @SerializedName(SERIALIZED_NAME_ADVANCED_ANALYSIS) - @javax.annotation.Nullable - private Boolean advancedAnalysis = false; - public static final String SERIALIZED_NAME_SANDBOX_CONFIG = "sandbox_config"; @SerializedName(SERIALIZED_NAME_SANDBOX_CONFIG) @javax.annotation.Nullable @@ -136,25 +131,6 @@ public void setNoCache(@javax.annotation.Nullable Boolean noCache) { } - public AnalysisConfig advancedAnalysis(@javax.annotation.Nullable Boolean advancedAnalysis) { - this.advancedAnalysis = advancedAnalysis; - return this; - } - - /** - * Enables an advanced security analysis. - * @return advancedAnalysis - */ - @javax.annotation.Nullable - public Boolean getAdvancedAnalysis() { - return advancedAnalysis; - } - - public void setAdvancedAnalysis(@javax.annotation.Nullable Boolean advancedAnalysis) { - this.advancedAnalysis = advancedAnalysis; - } - - public AnalysisConfig sandboxConfig(@javax.annotation.Nullable SandboxOptions sandboxConfig) { this.sandboxConfig = sandboxConfig; return this; @@ -231,14 +207,13 @@ public boolean equals(Object o) { return Objects.equals(this.scrapeThirdPartyConfig, analysisConfig.scrapeThirdPartyConfig) && Objects.equals(this.generateCapabilities, analysisConfig.generateCapabilities) && Objects.equals(this.noCache, analysisConfig.noCache) && - Objects.equals(this.advancedAnalysis, analysisConfig.advancedAnalysis) && Objects.equals(this.sandboxConfig, analysisConfig.sandboxConfig)&& Objects.equals(this.additionalProperties, analysisConfig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(scrapeThirdPartyConfig, generateCapabilities, noCache, advancedAnalysis, sandboxConfig, additionalProperties); + return Objects.hash(scrapeThirdPartyConfig, generateCapabilities, noCache, sandboxConfig, additionalProperties); } @Override @@ -248,7 +223,6 @@ public String toString() { sb.append(" scrapeThirdPartyConfig: ").append(toIndentedString(scrapeThirdPartyConfig)).append("\n"); sb.append(" generateCapabilities: ").append(toIndentedString(generateCapabilities)).append("\n"); sb.append(" noCache: ").append(toIndentedString(noCache)).append("\n"); - sb.append(" advancedAnalysis: ").append(toIndentedString(advancedAnalysis)).append("\n"); sb.append(" sandboxConfig: ").append(toIndentedString(sandboxConfig)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -269,7 +243,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("scrape_third_party_config", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config")); + openapiFields = new HashSet(Arrays.asList("scrape_third_party_config", "generate_capabilities", "no_cache", "sandbox_config")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/src/main/java/ai/reveng/model/AnalysisFunctions.java b/src/main/java/ai/reveng/model/AnalysisFunctions.java index 8e4d4a6e..17f3378e 100644 --- a/src/main/java/ai/reveng/model/AnalysisFunctions.java +++ b/src/main/java/ai/reveng/model/AnalysisFunctions.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.AppApiRestV2FunctionsTypesFunction; +import ai.reveng.model.Function; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -55,17 +55,17 @@ public class AnalysisFunctions { public static final String SERIALIZED_NAME_FUNCTIONS = "functions"; @SerializedName(SERIALIZED_NAME_FUNCTIONS) @javax.annotation.Nonnull - private List functions = new ArrayList<>(); + private List functions = new ArrayList<>(); public AnalysisFunctions() { } - public AnalysisFunctions functions(@javax.annotation.Nonnull List functions) { + public AnalysisFunctions functions(@javax.annotation.Nonnull List functions) { this.functions = functions; return this; } - public AnalysisFunctions addFunctionsItem(AppApiRestV2FunctionsTypesFunction functionsItem) { + public AnalysisFunctions addFunctionsItem(Function functionsItem) { if (this.functions == null) { this.functions = new ArrayList<>(); } @@ -78,11 +78,11 @@ public AnalysisFunctions addFunctionsItem(AppApiRestV2FunctionsTypesFunction fun * @return functions */ @javax.annotation.Nonnull - public List getFunctions() { + public List getFunctions() { return functions; } - public void setFunctions(@javax.annotation.Nonnull List functions) { + public void setFunctions(@javax.annotation.Nonnull List functions) { this.functions = functions; } @@ -207,7 +207,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayfunctions = jsonObj.getAsJsonArray("functions"); // validate the required field `functions` (array) for (int i = 0; i < jsonArrayfunctions.size(); i++) { - AppApiRestV2FunctionsTypesFunction.validateJsonElement(jsonArrayfunctions.get(i)); + Function.validateJsonElement(jsonArrayfunctions.get(i)); } } } diff --git a/src/main/java/ai/reveng/model/AnalysisOperationsOutputBody.java b/src/main/java/ai/reveng/model/AnalysisOperationsOutputBody.java index c56b88dd..d5a04935 100644 --- a/src/main/java/ai/reveng/model/AnalysisOperationsOutputBody.java +++ b/src/main/java/ai/reveng/model/AnalysisOperationsOutputBody.java @@ -74,7 +74,7 @@ public AnalysisOperationsOutputBody addOperationsItem(AnalysisOperationBody oper } /** - * The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary. Operations that have never run are omitted + * The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary, then one dynamic-execution operation per sandbox run of the analysis, newest first. Operations that have never run are omitted * @return operations */ @javax.annotation.Nonnull diff --git a/src/main/java/ai/reveng/model/AppApiRestV2FunctionsResponsesFunction.java b/src/main/java/ai/reveng/model/AppApiRestV2FunctionsResponsesFunction.java deleted file mode 100644 index ef0a9e95..00000000 --- a/src/main/java/ai/reveng/model/AppApiRestV2FunctionsResponsesFunction.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * 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.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; - -/** - * Function schema used in function strings response. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AppApiRestV2FunctionsResponsesFunction { - public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; - @SerializedName(SERIALIZED_NAME_FUNCTION_ID) - @javax.annotation.Nullable - private Integer functionId; - - public static final String SERIALIZED_NAME_FUNCTION_VADDR = "function_vaddr"; - @SerializedName(SERIALIZED_NAME_FUNCTION_VADDR) - @javax.annotation.Nonnull - private Long functionVaddr; - - public AppApiRestV2FunctionsResponsesFunction() { - } - - public AppApiRestV2FunctionsResponsesFunction functionId(@javax.annotation.Nullable Integer functionId) { - this.functionId = functionId; - return this; - } - - /** - * Get functionId - * @return functionId - */ - @javax.annotation.Nullable - public Integer getFunctionId() { - return functionId; - } - - public void setFunctionId(@javax.annotation.Nullable Integer functionId) { - this.functionId = functionId; - } - - - public AppApiRestV2FunctionsResponsesFunction functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { - this.functionVaddr = functionVaddr; - return this; - } - - /** - * Function virtual address - * @return functionVaddr - */ - @javax.annotation.Nonnull - public Long getFunctionVaddr() { - return functionVaddr; - } - - public void setFunctionVaddr(@javax.annotation.Nonnull Long functionVaddr) { - this.functionVaddr = functionVaddr; - } - - /** - * 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 AppApiRestV2FunctionsResponsesFunction instance itself - */ - public AppApiRestV2FunctionsResponsesFunction 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; - } - AppApiRestV2FunctionsResponsesFunction appApiRestV2FunctionsResponsesFunction = (AppApiRestV2FunctionsResponsesFunction) o; - return Objects.equals(this.functionId, appApiRestV2FunctionsResponsesFunction.functionId) && - Objects.equals(this.functionVaddr, appApiRestV2FunctionsResponsesFunction.functionVaddr)&& - Objects.equals(this.additionalProperties, appApiRestV2FunctionsResponsesFunction.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, functionVaddr, 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 AppApiRestV2FunctionsResponsesFunction {\n"); - sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); - sb.append(" functionVaddr: ").append(toIndentedString(functionVaddr)).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", "function_vaddr")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("function_vaddr")); - } - - /** - * 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 AppApiRestV2FunctionsResponsesFunction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AppApiRestV2FunctionsResponsesFunction.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 AppApiRestV2FunctionsResponsesFunction is not found in the empty JSON string", AppApiRestV2FunctionsResponsesFunction.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AppApiRestV2FunctionsResponsesFunction.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(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AppApiRestV2FunctionsResponsesFunction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AppApiRestV2FunctionsResponsesFunction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AppApiRestV2FunctionsResponsesFunction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AppApiRestV2FunctionsResponsesFunction 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 AppApiRestV2FunctionsResponsesFunction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AppApiRestV2FunctionsResponsesFunction 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 AppApiRestV2FunctionsResponsesFunction given an JSON string - * - * @param jsonString JSON string - * @return An instance of AppApiRestV2FunctionsResponsesFunction - * @throws IOException if the JSON string is invalid with respect to AppApiRestV2FunctionsResponsesFunction - */ - public static AppApiRestV2FunctionsResponsesFunction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AppApiRestV2FunctionsResponsesFunction.class); - } - - /** - * Convert an instance of AppApiRestV2FunctionsResponsesFunction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsResponse.java b/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsResponse.java deleted file mode 100644 index 686e8953..00000000 --- a/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsResponse.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * 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.AnalysisStringsResponse; -import ai.reveng.model.ErrorModel; -import ai.reveng.model.MetaModel; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import ai.reveng.invoker.JSON; - -/** - * BaseResponseAnalysisStringsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseAnalysisStringsResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private Boolean status = true; - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nullable - private AnalysisStringsResponse data; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - @javax.annotation.Nullable - private MetaModel meta; - - public BaseResponseAnalysisStringsResponse() { - } - - public BaseResponseAnalysisStringsResponse status(@javax.annotation.Nullable Boolean status) { - this.status = status; - return this; - } - - /** - * Response status on whether the request succeeded - * @return status - */ - @javax.annotation.Nullable - public Boolean getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable Boolean status) { - this.status = status; - } - - - public BaseResponseAnalysisStringsResponse data(@javax.annotation.Nullable AnalysisStringsResponse data) { - this.data = data; - return this; - } - - /** - * Response data - * @return data - */ - @javax.annotation.Nullable - public AnalysisStringsResponse getData() { - return data; - } - - public void setData(@javax.annotation.Nullable AnalysisStringsResponse data) { - this.data = data; - } - - - public BaseResponseAnalysisStringsResponse message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Response message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public BaseResponseAnalysisStringsResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseAnalysisStringsResponse addErrorsItem(ErrorModel errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * List of errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; - } - - - public BaseResponseAnalysisStringsResponse meta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - return this; - } - - /** - * Metadata - * @return meta - */ - @javax.annotation.Nullable - public MetaModel getMeta() { - return meta; - } - - public void setMeta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BaseResponseAnalysisStringsResponse instance itself - */ - public BaseResponseAnalysisStringsResponse 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; - } - BaseResponseAnalysisStringsResponse baseResponseAnalysisStringsResponse = (BaseResponseAnalysisStringsResponse) o; - return Objects.equals(this.status, baseResponseAnalysisStringsResponse.status) && - Objects.equals(this.data, baseResponseAnalysisStringsResponse.data) && - Objects.equals(this.message, baseResponseAnalysisStringsResponse.message) && - Objects.equals(this.errors, baseResponseAnalysisStringsResponse.errors) && - Objects.equals(this.meta, baseResponseAnalysisStringsResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseAnalysisStringsResponse.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(status, data, message, errors, meta, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseResponseAnalysisStringsResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - 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("status", "data", "message", "errors", "meta")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BaseResponseAnalysisStringsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseAnalysisStringsResponse.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 BaseResponseAnalysisStringsResponse is not found in the empty JSON string", BaseResponseAnalysisStringsResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AnalysisStringsResponse.validateJsonElement(jsonObj.get("data")); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - if (jsonArrayerrors != null) { - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - // validate the optional field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - ErrorModel.validateJsonElement(jsonArrayerrors.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - MetaModel.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BaseResponseAnalysisStringsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseAnalysisStringsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseAnalysisStringsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseAnalysisStringsResponse 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 BaseResponseAnalysisStringsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseAnalysisStringsResponse 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 BaseResponseAnalysisStringsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseAnalysisStringsResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseAnalysisStringsResponse - */ - public static BaseResponseAnalysisStringsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseAnalysisStringsResponse.class); - } - - /** - * Convert an instance of BaseResponseAnalysisStringsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsStatusResponse.java b/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsStatusResponse.java deleted file mode 100644 index ff0f8b09..00000000 --- a/src/main/java/ai/reveng/model/BaseResponseAnalysisStringsStatusResponse.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * 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.AnalysisStringsStatusResponse; -import ai.reveng.model.ErrorModel; -import ai.reveng.model.MetaModel; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import ai.reveng.invoker.JSON; - -/** - * BaseResponseAnalysisStringsStatusResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseAnalysisStringsStatusResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private Boolean status = true; - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nullable - private AnalysisStringsStatusResponse data; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - @javax.annotation.Nullable - private MetaModel meta; - - public BaseResponseAnalysisStringsStatusResponse() { - } - - public BaseResponseAnalysisStringsStatusResponse status(@javax.annotation.Nullable Boolean status) { - this.status = status; - return this; - } - - /** - * Response status on whether the request succeeded - * @return status - */ - @javax.annotation.Nullable - public Boolean getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable Boolean status) { - this.status = status; - } - - - public BaseResponseAnalysisStringsStatusResponse data(@javax.annotation.Nullable AnalysisStringsStatusResponse data) { - this.data = data; - return this; - } - - /** - * Response data - * @return data - */ - @javax.annotation.Nullable - public AnalysisStringsStatusResponse getData() { - return data; - } - - public void setData(@javax.annotation.Nullable AnalysisStringsStatusResponse data) { - this.data = data; - } - - - public BaseResponseAnalysisStringsStatusResponse message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Response message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public BaseResponseAnalysisStringsStatusResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseAnalysisStringsStatusResponse addErrorsItem(ErrorModel errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * List of errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; - } - - - public BaseResponseAnalysisStringsStatusResponse meta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - return this; - } - - /** - * Metadata - * @return meta - */ - @javax.annotation.Nullable - public MetaModel getMeta() { - return meta; - } - - public void setMeta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BaseResponseAnalysisStringsStatusResponse instance itself - */ - public BaseResponseAnalysisStringsStatusResponse 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; - } - BaseResponseAnalysisStringsStatusResponse baseResponseAnalysisStringsStatusResponse = (BaseResponseAnalysisStringsStatusResponse) o; - return Objects.equals(this.status, baseResponseAnalysisStringsStatusResponse.status) && - Objects.equals(this.data, baseResponseAnalysisStringsStatusResponse.data) && - Objects.equals(this.message, baseResponseAnalysisStringsStatusResponse.message) && - Objects.equals(this.errors, baseResponseAnalysisStringsStatusResponse.errors) && - Objects.equals(this.meta, baseResponseAnalysisStringsStatusResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseAnalysisStringsStatusResponse.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(status, data, message, errors, meta, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseResponseAnalysisStringsStatusResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - 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("status", "data", "message", "errors", "meta")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BaseResponseAnalysisStringsStatusResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseAnalysisStringsStatusResponse.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 BaseResponseAnalysisStringsStatusResponse is not found in the empty JSON string", BaseResponseAnalysisStringsStatusResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AnalysisStringsStatusResponse.validateJsonElement(jsonObj.get("data")); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - if (jsonArrayerrors != null) { - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - // validate the optional field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - ErrorModel.validateJsonElement(jsonArrayerrors.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - MetaModel.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BaseResponseAnalysisStringsStatusResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseAnalysisStringsStatusResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseAnalysisStringsStatusResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseAnalysisStringsStatusResponse 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 BaseResponseAnalysisStringsStatusResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseAnalysisStringsStatusResponse 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 BaseResponseAnalysisStringsStatusResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseAnalysisStringsStatusResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseAnalysisStringsStatusResponse - */ - public static BaseResponseAnalysisStringsStatusResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseAnalysisStringsStatusResponse.class); - } - - /** - * Convert an instance of BaseResponseAnalysisStringsStatusResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/BaseResponseFunctionStringsResponse.java b/src/main/java/ai/reveng/model/BaseResponseFunctionStringsResponse.java deleted file mode 100644 index d7229e46..00000000 --- a/src/main/java/ai/reveng/model/BaseResponseFunctionStringsResponse.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * 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.ErrorModel; -import ai.reveng.model.FunctionStringsResponse; -import ai.reveng.model.MetaModel; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import ai.reveng.invoker.JSON; - -/** - * BaseResponseFunctionStringsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseFunctionStringsResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private Boolean status = true; - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nullable - private FunctionStringsResponse data; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - @javax.annotation.Nullable - private MetaModel meta; - - public BaseResponseFunctionStringsResponse() { - } - - public BaseResponseFunctionStringsResponse status(@javax.annotation.Nullable Boolean status) { - this.status = status; - return this; - } - - /** - * Response status on whether the request succeeded - * @return status - */ - @javax.annotation.Nullable - public Boolean getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable Boolean status) { - this.status = status; - } - - - public BaseResponseFunctionStringsResponse data(@javax.annotation.Nullable FunctionStringsResponse data) { - this.data = data; - return this; - } - - /** - * Response data - * @return data - */ - @javax.annotation.Nullable - public FunctionStringsResponse getData() { - return data; - } - - public void setData(@javax.annotation.Nullable FunctionStringsResponse data) { - this.data = data; - } - - - public BaseResponseFunctionStringsResponse message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Response message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public BaseResponseFunctionStringsResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseFunctionStringsResponse addErrorsItem(ErrorModel errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * List of errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; - } - - - public BaseResponseFunctionStringsResponse meta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - return this; - } - - /** - * Metadata - * @return meta - */ - @javax.annotation.Nullable - public MetaModel getMeta() { - return meta; - } - - public void setMeta(@javax.annotation.Nullable MetaModel meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BaseResponseFunctionStringsResponse instance itself - */ - public BaseResponseFunctionStringsResponse 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; - } - BaseResponseFunctionStringsResponse baseResponseFunctionStringsResponse = (BaseResponseFunctionStringsResponse) o; - return Objects.equals(this.status, baseResponseFunctionStringsResponse.status) && - Objects.equals(this.data, baseResponseFunctionStringsResponse.data) && - Objects.equals(this.message, baseResponseFunctionStringsResponse.message) && - Objects.equals(this.errors, baseResponseFunctionStringsResponse.errors) && - Objects.equals(this.meta, baseResponseFunctionStringsResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseFunctionStringsResponse.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(status, data, message, errors, meta, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseResponseFunctionStringsResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - 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("status", "data", "message", "errors", "meta")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BaseResponseFunctionStringsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseFunctionStringsResponse.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 BaseResponseFunctionStringsResponse is not found in the empty JSON string", BaseResponseFunctionStringsResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - FunctionStringsResponse.validateJsonElement(jsonObj.get("data")); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - if (jsonArrayerrors != null) { - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - // validate the optional field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - ErrorModel.validateJsonElement(jsonArrayerrors.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - MetaModel.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BaseResponseFunctionStringsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseFunctionStringsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseFunctionStringsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseFunctionStringsResponse 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 BaseResponseFunctionStringsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseFunctionStringsResponse 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 BaseResponseFunctionStringsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseFunctionStringsResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseFunctionStringsResponse - */ - public static BaseResponseFunctionStringsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseFunctionStringsResponse.class); - } - - /** - * Convert an instance of BaseResponseFunctionStringsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/Basic.java b/src/main/java/ai/reveng/model/Basic.java index 440ad698..75844f64 100644 --- a/src/main/java/ai/reveng/model/Basic.java +++ b/src/main/java/ai/reveng/model/Basic.java @@ -117,9 +117,10 @@ public class Basic { private Integer functionCount; public static final String SERIALIZED_NAME_IS_ADVANCED = "is_advanced"; + @Deprecated @SerializedName(SERIALIZED_NAME_IS_ADVANCED) - @javax.annotation.Nonnull - private Boolean isAdvanced; + @javax.annotation.Nullable + private Boolean isAdvanced = false; public static final String SERIALIZED_NAME_BASE_ADDRESS = "base_address"; @SerializedName(SERIALIZED_NAME_BASE_ADDRESS) @@ -391,21 +392,25 @@ public void setFunctionCount(@javax.annotation.Nonnull Integer functionCount) { } - public Basic isAdvanced(@javax.annotation.Nonnull Boolean isAdvanced) { + @Deprecated + public Basic isAdvanced(@javax.annotation.Nullable Boolean isAdvanced) { this.isAdvanced = isAdvanced; return this; } /** - * Whether the analysis was advanced + * Always false; advanced (DFG) analysis has been removed * @return isAdvanced + * @deprecated */ - @javax.annotation.Nonnull + @Deprecated + @javax.annotation.Nullable public Boolean getIsAdvanced() { return isAdvanced; } - public void setIsAdvanced(@javax.annotation.Nonnull Boolean isAdvanced) { + @Deprecated + public void setIsAdvanced(@javax.annotation.Nullable Boolean isAdvanced) { this.isAdvanced = isAdvanced; } @@ -621,7 +626,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("binary_id", "binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "model_id", "owner_username", "is_system", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address", "binary_uuid", "sequencer_version", "team_id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("binary_id", "binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "model_id", "owner_username", "is_system", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address", "team_id")); + openapiRequiredFields = new HashSet(Arrays.asList("binary_id", "binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "model_id", "owner_username", "is_system", "analysis_scope", "is_owner", "debug", "function_count", "base_address", "team_id")); } /** diff --git a/src/main/java/ai/reveng/model/BatchFunctionSignatureEntry.java b/src/main/java/ai/reveng/model/BatchFunctionSignatureEntry.java index 654fad7b..60a9bbc5 100644 --- a/src/main/java/ai/reveng/model/BatchFunctionSignatureEntry.java +++ b/src/main/java/ai/reveng/model/BatchFunctionSignatureEntry.java @@ -109,6 +109,8 @@ public enum SourceTypeEnum { AUTO_UNSTRIP("AUTO_UNSTRIP"), + AI_AGENT("AI_AGENT"), + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; diff --git a/src/main/java/ai/reveng/model/BinariesTaskStatus.java b/src/main/java/ai/reveng/model/BinariesTaskStatus.java deleted file mode 100644 index a988aaf8..00000000 --- a/src/main/java/ai/reveng/model/BinariesTaskStatus.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets BinariesTaskStatus - */ -@JsonAdapter(BinariesTaskStatus.Adapter.class) -public enum BinariesTaskStatus { - - UNINITIALISED("UNINITIALISED"), - - PENDING("PENDING"), - - RUNNING("RUNNING"), - - COMPLETED("COMPLETED"), - - FAILED("FAILED"), - - UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); - - private String value; - - BinariesTaskStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BinariesTaskStatus fromValue(String value) { - for (BinariesTaskStatus b : BinariesTaskStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_DEFAULT_OPEN_API; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BinariesTaskStatus enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BinariesTaskStatus read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BinariesTaskStatus.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - BinariesTaskStatus.fromValue(value); - } -} - diff --git a/src/main/java/ai/reveng/model/BulkCreateUserResult.java b/src/main/java/ai/reveng/model/BulkCreateUserResult.java index b357dca6..0b887dcb 100644 --- a/src/main/java/ai/reveng/model/BulkCreateUserResult.java +++ b/src/main/java/ai/reveng/model/BulkCreateUserResult.java @@ -89,7 +89,7 @@ public BulkCreateUserResult email(@javax.annotation.Nullable String email) { } /** - * Search is applied to string value + * Get email * @return email */ @javax.annotation.Nullable @@ -184,7 +184,7 @@ public BulkCreateUserResult username(@javax.annotation.Nullable String username) } /** - * Search is applied to string value + * Get username * @return username */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/CallEdge.java b/src/main/java/ai/reveng/model/CallEdge.java index 5a28852b..9bf1b154 100644 --- a/src/main/java/ai/reveng/model/CallEdge.java +++ b/src/main/java/ai/reveng/model/CallEdge.java @@ -89,6 +89,65 @@ public class CallEdge { @javax.annotation.Nonnull private Boolean isExternal; + /** + * Who found the edge: SYSTEM for the analysis, AI_AGENT for a call AI decompilation recovered that the analysis missed. + */ + @JsonAdapter(SourceEnum.Adapter.class) + public enum SourceEnum { + SYSTEM("SYSTEM"), + + AI_AGENT("AI_AGENT"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SourceEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SourceEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SourceEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SourceEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + @javax.annotation.Nonnull + private SourceEnum source; + public static final String SERIALIZED_NAME_THUNKED_VADDR = "thunked_vaddr"; @SerializedName(SERIALIZED_NAME_THUNKED_VADDR) @javax.annotation.Nullable @@ -249,6 +308,25 @@ public void setIsExternal(@javax.annotation.Nonnull Boolean isExternal) { } + public CallEdge source(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Who found the edge: SYSTEM for the analysis, AI_AGENT for a call AI decompilation recovered that the analysis missed. + * @return source + */ + @javax.annotation.Nonnull + public SourceEnum getSource() { + return source; + } + + public void setSource(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + public CallEdge thunkedVaddr(@javax.annotation.Nullable Long thunkedVaddr) { this.thunkedVaddr = thunkedVaddr; return this; @@ -330,13 +408,14 @@ public boolean equals(Object o) { Objects.equals(this.callerVaddr, callEdge.callerVaddr) && Objects.equals(this.importedFunctionId, callEdge.importedFunctionId) && Objects.equals(this.isExternal, callEdge.isExternal) && + Objects.equals(this.source, callEdge.source) && Objects.equals(this.thunkedVaddr, callEdge.thunkedVaddr)&& Objects.equals(this.additionalProperties, callEdge.additionalProperties); } @Override public int hashCode() { - return Objects.hash(calleeFunctionId, calleeName, calleeVaddr, callerFunctionId, callerName, callerVaddr, importedFunctionId, isExternal, thunkedVaddr, additionalProperties); + return Objects.hash(calleeFunctionId, calleeName, calleeVaddr, callerFunctionId, callerName, callerVaddr, importedFunctionId, isExternal, source, thunkedVaddr, additionalProperties); } @Override @@ -351,6 +430,7 @@ public String toString() { sb.append(" callerVaddr: ").append(toIndentedString(callerVaddr)).append("\n"); sb.append(" importedFunctionId: ").append(toIndentedString(importedFunctionId)).append("\n"); sb.append(" isExternal: ").append(toIndentedString(isExternal)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" thunkedVaddr: ").append(toIndentedString(thunkedVaddr)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -371,10 +451,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("callee_function_id", "callee_name", "callee_vaddr", "caller_function_id", "caller_name", "caller_vaddr", "imported_function_id", "is_external", "thunked_vaddr")); + openapiFields = new HashSet(Arrays.asList("callee_function_id", "callee_name", "callee_vaddr", "caller_function_id", "caller_name", "caller_vaddr", "imported_function_id", "is_external", "source", "thunked_vaddr")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("callee_vaddr", "caller_function_id", "caller_vaddr", "is_external")); + openapiRequiredFields = new HashSet(Arrays.asList("callee_vaddr", "caller_function_id", "caller_vaddr", "is_external", "source")); } /** @@ -403,6 +483,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("caller_name") != null && !jsonObj.get("caller_name").isJsonNull()) && !jsonObj.get("caller_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `caller_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caller_name").toString())); } + if (!jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); + } + // validate the required field `source` + SourceEnum.validateJsonElement(jsonObj.get("source")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/AnalysisStringInput.java b/src/main/java/ai/reveng/model/CapabilityImplementation.java similarity index 67% rename from src/main/java/ai/reveng/model/AnalysisStringInput.java rename to src/main/java/ai/reveng/model/CapabilityImplementation.java index d6e36a12..19d89f8e 100644 --- a/src/main/java/ai/reveng/model/AnalysisStringInput.java +++ b/src/main/java/ai/reveng/model/CapabilityImplementation.java @@ -13,7 +13,6 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.StringSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,82 +45,58 @@ import ai.reveng.invoker.JSON; /** - * Input model for inserting a string into an analysis. + * CapabilityImplementation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AnalysisStringInput { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) +public class CapabilityImplementation { + public static final String SERIALIZED_NAME_CAPABILITY = "capability"; + @SerializedName(SERIALIZED_NAME_CAPABILITY) @javax.annotation.Nonnull - private String value; + private String capability; - public static final String SERIALIZED_NAME_VADDR = "vaddr"; - @SerializedName(SERIALIZED_NAME_VADDR) + public static final String SERIALIZED_NAME_SUMMARY = "summary"; + @SerializedName(SERIALIZED_NAME_SUMMARY) @javax.annotation.Nonnull - private Integer vaddr; + private String summary; - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - @javax.annotation.Nonnull - private StringSource source; - - public AnalysisStringInput() { - } - - public AnalysisStringInput value(@javax.annotation.Nonnull String value) { - this.value = value; - return this; - } - - /** - * The string literal value - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; + public CapabilityImplementation() { } - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; - } - - - public AnalysisStringInput vaddr(@javax.annotation.Nonnull Integer vaddr) { - this.vaddr = vaddr; + public CapabilityImplementation capability(@javax.annotation.Nonnull String capability) { + this.capability = capability; return this; } /** - * The virtual address of the string - * @return vaddr + * Capability this summary describes + * @return capability */ @javax.annotation.Nonnull - public Integer getVaddr() { - return vaddr; + public String getCapability() { + return capability; } - public void setVaddr(@javax.annotation.Nonnull Integer vaddr) { - this.vaddr = vaddr; + public void setCapability(@javax.annotation.Nonnull String capability) { + this.capability = capability; } - public AnalysisStringInput source(@javax.annotation.Nonnull StringSource source) { - this.source = source; + public CapabilityImplementation summary(@javax.annotation.Nonnull String summary) { + this.summary = summary; return this; } /** - * The source of the string - * @return source + * How the function implements this capability + * @return summary */ @javax.annotation.Nonnull - public StringSource getSource() { - return source; + public String getSummary() { + return summary; } - public void setSource(@javax.annotation.Nonnull StringSource source) { - this.source = source; + public void setSummary(@javax.annotation.Nonnull String summary) { + this.summary = summary; } /** @@ -137,9 +112,9 @@ public void setSource(@javax.annotation.Nonnull StringSource source) { * * @param key name of the property * @param value value of the property - * @return the AnalysisStringInput instance itself + * @return the CapabilityImplementation instance itself */ - public AnalysisStringInput putAdditionalProperty(String key, Object value) { + public CapabilityImplementation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,25 +153,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AnalysisStringInput analysisStringInput = (AnalysisStringInput) o; - return Objects.equals(this.value, analysisStringInput.value) && - Objects.equals(this.vaddr, analysisStringInput.vaddr) && - Objects.equals(this.source, analysisStringInput.source)&& - Objects.equals(this.additionalProperties, analysisStringInput.additionalProperties); + CapabilityImplementation capabilityImplementation = (CapabilityImplementation) o; + return Objects.equals(this.capability, capabilityImplementation.capability) && + Objects.equals(this.summary, capabilityImplementation.summary)&& + Objects.equals(this.additionalProperties, capabilityImplementation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(value, vaddr, source, additionalProperties); + return Objects.hash(capability, summary, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnalysisStringInput {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" vaddr: ").append(toIndentedString(vaddr)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("class CapabilityImplementation {\n"); + sb.append(" capability: ").append(toIndentedString(capability)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -216,53 +189,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("value", "vaddr", "source")); + openapiFields = new HashSet(Arrays.asList("capability", "summary")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("value", "vaddr", "source")); + openapiRequiredFields = new HashSet(Arrays.asList("capability", "summary")); } /** * 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 AnalysisStringInput + * @throws IOException if the JSON Element is invalid with respect to CapabilityImplementation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AnalysisStringInput.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 AnalysisStringInput is not found in the empty JSON string", AnalysisStringInput.openapiRequiredFields.toString())); + if (!CapabilityImplementation.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 CapabilityImplementation is not found in the empty JSON string", CapabilityImplementation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnalysisStringInput.openapiRequiredFields) { + for (String requiredField : CapabilityImplementation.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("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + if (!jsonObj.get("capability").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `capability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("capability").toString())); + } + if (!jsonObj.get("summary").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); } - // validate the required field `source` - StringSource.validateJsonElement(jsonObj.get("source")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnalysisStringInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnalysisStringInput' and its subtypes + if (!CapabilityImplementation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CapabilityImplementation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AnalysisStringInput.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CapabilityImplementation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AnalysisStringInput value) throws IOException { + public void write(JsonWriter out, CapabilityImplementation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -290,12 +264,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AnalysisStringInput read(JsonReader in) throws IOException { + public CapabilityImplementation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AnalysisStringInput instance = thisAdapter.fromJsonTree(jsonObj); + CapabilityImplementation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -322,18 +296,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AnalysisStringInput given an JSON string + * Create an instance of CapabilityImplementation given an JSON string * * @param jsonString JSON string - * @return An instance of AnalysisStringInput - * @throws IOException if the JSON string is invalid with respect to AnalysisStringInput + * @return An instance of CapabilityImplementation + * @throws IOException if the JSON string is invalid with respect to CapabilityImplementation */ - public static AnalysisStringInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnalysisStringInput.class); + public static CapabilityImplementation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CapabilityImplementation.class); } /** - * Convert an instance of AnalysisStringInput to an JSON string + * Convert an instance of CapabilityImplementation to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/CreateUserInputBody.java b/src/main/java/ai/reveng/model/CreateUserInputBody.java index 87627412..a9387278 100644 --- a/src/main/java/ai/reveng/model/CreateUserInputBody.java +++ b/src/main/java/ai/reveng/model/CreateUserInputBody.java @@ -226,6 +226,7 @@ public CreateUserInputBody credits(@javax.annotation.Nullable Long credits) { /** * Initial credit balance in credits (1 credit = 1000 units); defaults to 10 credits * minimum: 0 + * maximum: 2147483 * @return credits */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/CurrentUser.java b/src/main/java/ai/reveng/model/CurrentUser.java new file mode 100644 index 00000000..c834ccce --- /dev/null +++ b/src/main/java/ai/reveng/model/CurrentUser.java @@ -0,0 +1,662 @@ +/* + * 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.UserProfile; +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.time.OffsetDateTime; +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; + +/** + * CurrentUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CurrentUser { + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nonnull + private String email; + + public static final String SERIALIZED_NAME_IS_ACTIVE = "is_active"; + @SerializedName(SERIALIZED_NAME_IS_ACTIVE) + @javax.annotation.Nonnull + private Boolean isActive; + + public static final String SERIALIZED_NAME_PROFILE = "profile"; + @SerializedName(SERIALIZED_NAME_PROFILE) + @javax.annotation.Nonnull + private UserProfile profile; + + /** + * Gets or Sets role + */ + @JsonAdapter(RoleEnum.Adapter.class) + public enum RoleEnum { + USER("USER"), + + ADMIN("ADMIN"), + + SUPERADMIN("SUPERADMIN"), + + SYSTEM("SYSTEM"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + RoleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RoleEnum fromValue(String value) { + for (RoleEnum b : RoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RoleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RoleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RoleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ROLE = "role"; + @SerializedName(SERIALIZED_NAME_ROLE) + @javax.annotation.Nonnull + private RoleEnum role; + + /** + * How the user re-authenticates to delete their account: 'password' sends their current password, 'sso' signs in again at their identity provider. + */ + @JsonAdapter(SignsInWithEnum.Adapter.class) + public enum SignsInWithEnum { + PASSWORD("password"), + + SSO("sso"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + SignsInWithEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SignsInWithEnum fromValue(String value) { + for (SignsInWithEnum b : SignsInWithEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SignsInWithEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SignsInWithEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SignsInWithEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SignsInWithEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SIGNS_IN_WITH = "signs_in_with"; + @SerializedName(SERIALIZED_NAME_SIGNS_IN_WITH) + @javax.annotation.Nonnull + private SignsInWithEnum signsInWith; + + /** + * Gets or Sets tier + */ + @JsonAdapter(TierEnum.Adapter.class) + public enum TierEnum { + ENTHUSIAST("ENTHUSIAST"), + + REVERSER("REVERSER"), + + BUG_HUNTER("BUG_HUNTER"), + + MALWARE_ANALYST("MALWARE_ANALYST"), + + SECURITY_RESEARCHER("SECURITY_RESEARCHER"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TierEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TierEnum fromValue(String value) { + for (TierEnum b : TierEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TierEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TierEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TierEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TierEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIER = "tier"; + @SerializedName(SERIALIZED_NAME_TIER) + @javax.annotation.Nullable + private TierEnum tier; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull + private Long userId; + + public CurrentUser() { + } + + public CurrentUser createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CurrentUser email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public CurrentUser isActive(@javax.annotation.Nonnull Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Inactive users cannot authenticate + * @return isActive + */ + @javax.annotation.Nonnull + public Boolean getIsActive() { + return isActive; + } + + public void setIsActive(@javax.annotation.Nonnull Boolean isActive) { + this.isActive = isActive; + } + + + public CurrentUser profile(@javax.annotation.Nonnull UserProfile profile) { + this.profile = profile; + return this; + } + + /** + * Get profile + * @return profile + */ + @javax.annotation.Nonnull + public UserProfile getProfile() { + return profile; + } + + public void setProfile(@javax.annotation.Nonnull UserProfile profile) { + this.profile = profile; + } + + + public CurrentUser role(@javax.annotation.Nonnull RoleEnum role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @javax.annotation.Nonnull + public RoleEnum getRole() { + return role; + } + + public void setRole(@javax.annotation.Nonnull RoleEnum role) { + this.role = role; + } + + + public CurrentUser signsInWith(@javax.annotation.Nonnull SignsInWithEnum signsInWith) { + this.signsInWith = signsInWith; + return this; + } + + /** + * How the user re-authenticates to delete their account: 'password' sends their current password, 'sso' signs in again at their identity provider. + * @return signsInWith + */ + @javax.annotation.Nonnull + public SignsInWithEnum getSignsInWith() { + return signsInWith; + } + + public void setSignsInWith(@javax.annotation.Nonnull SignsInWithEnum signsInWith) { + this.signsInWith = signsInWith; + } + + + public CurrentUser tier(@javax.annotation.Nullable TierEnum tier) { + this.tier = tier; + return this; + } + + /** + * Get tier + * @return tier + */ + @javax.annotation.Nullable + public TierEnum getTier() { + return tier; + } + + public void setTier(@javax.annotation.Nullable TierEnum tier) { + this.tier = tier; + } + + + public CurrentUser userId(@javax.annotation.Nonnull Long userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + public Long getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull Long userId) { + this.userId = userId; + } + + /** + * 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 CurrentUser instance itself + */ + public CurrentUser 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; + } + CurrentUser currentUser = (CurrentUser) o; + return Objects.equals(this.createdAt, currentUser.createdAt) && + Objects.equals(this.email, currentUser.email) && + Objects.equals(this.isActive, currentUser.isActive) && + Objects.equals(this.profile, currentUser.profile) && + Objects.equals(this.role, currentUser.role) && + Objects.equals(this.signsInWith, currentUser.signsInWith) && + Objects.equals(this.tier, currentUser.tier) && + Objects.equals(this.userId, currentUser.userId)&& + Objects.equals(this.additionalProperties, currentUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, email, isActive, profile, role, signsInWith, tier, userId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CurrentUser {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append(" profile: ").append(toIndentedString(profile)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" signsInWith: ").append(toIndentedString(signsInWith)).append("\n"); + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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("created_at", "email", "is_active", "profile", "role", "signs_in_with", "tier", "user_id")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "email", "is_active", "profile", "role", "signs_in_with", "user_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 CurrentUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CurrentUser.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 CurrentUser is not found in the empty JSON string", CurrentUser.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CurrentUser.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("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("role").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); + } + // validate the required field `role` + RoleEnum.validateJsonElement(jsonObj.get("role")); + if (!jsonObj.get("signs_in_with").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `signs_in_with` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signs_in_with").toString())); + } + // validate the required field `signs_in_with` + SignsInWithEnum.validateJsonElement(jsonObj.get("signs_in_with")); + if ((jsonObj.get("tier") != null && !jsonObj.get("tier").isJsonNull()) && !jsonObj.get("tier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tier").toString())); + } + // validate the optional field `tier` + if (jsonObj.get("tier") != null && !jsonObj.get("tier").isJsonNull()) { + TierEnum.validateJsonElement(jsonObj.get("tier")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CurrentUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CurrentUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CurrentUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CurrentUser 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 CurrentUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CurrentUser 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 CurrentUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of CurrentUser + * @throws IOException if the JSON string is invalid with respect to CurrentUser + */ + public static CurrentUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CurrentUser.class); + } + + /** + * Convert an instance of CurrentUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/DeleteMeBody.java b/src/main/java/ai/reveng/model/DeleteMeBody.java new file mode 100644 index 00000000..0e3cc86b --- /dev/null +++ b/src/main/java/ai/reveng/model/DeleteMeBody.java @@ -0,0 +1,282 @@ +/* + * 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.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; + +/** + * DeleteMeBody + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteMeBody { + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public DeleteMeBody() { + } + + public DeleteMeBody password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Current password. Required for users who sign in with a password; ignored for users from an external identity provider. + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + /** + * 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 DeleteMeBody instance itself + */ + public DeleteMeBody 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; + } + DeleteMeBody deleteMeBody = (DeleteMeBody) o; + return Objects.equals(this.password, deleteMeBody.password)&& + Objects.equals(this.additionalProperties, deleteMeBody.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(password, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMeBody {\n"); + sb.append(" password: ").append(toIndentedString(password)).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("password")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMeBody + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMeBody.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 DeleteMeBody is not found in the empty JSON string", DeleteMeBody.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMeBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMeBody' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteMeBody.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMeBody 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 DeleteMeBody read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteMeBody 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 DeleteMeBody given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMeBody + * @throws IOException if the JSON string is invalid with respect to DeleteMeBody + */ + public static DeleteMeBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMeBody.class); + } + + /** + * Convert an instance of DeleteMeBody to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/DisassemblyOutputBody.java b/src/main/java/ai/reveng/model/DisassemblyOutputBody.java index 4be494ad..5a4f936b 100644 --- a/src/main/java/ai/reveng/model/DisassemblyOutputBody.java +++ b/src/main/java/ai/reveng/model/DisassemblyOutputBody.java @@ -78,16 +78,6 @@ public class DisassemblyOutputBody { @javax.annotation.Nullable private List operandXrefs; - public static final String SERIALIZED_NAME_PARAMS = "params"; - @SerializedName(SERIALIZED_NAME_PARAMS) - @javax.annotation.Nullable - private Object params = null; - - public static final String SERIALIZED_NAME_RETURN_TYPE = "return_type"; - @SerializedName(SERIALIZED_NAME_RETURN_TYPE) - @javax.annotation.Nullable - private String returnType; - public static final String SERIALIZED_NAME_RETURNS = "returns"; @SerializedName(SERIALIZED_NAME_RETURNS) @javax.annotation.Nonnull @@ -199,44 +189,6 @@ public void setOperandXrefs(@javax.annotation.Nullable List operand } - public DisassemblyOutputBody params(@javax.annotation.Nullable Object params) { - this.params = params; - return this; - } - - /** - * Get params - * @return params - */ - @javax.annotation.Nullable - public Object getParams() { - return params; - } - - public void setParams(@javax.annotation.Nullable Object params) { - this.params = params; - } - - - public DisassemblyOutputBody returnType(@javax.annotation.Nullable String returnType) { - this.returnType = returnType; - return this; - } - - /** - * Get returnType - * @return returnType - */ - @javax.annotation.Nullable - public String getReturnType() { - return returnType; - } - - public void setReturnType(@javax.annotation.Nullable String returnType) { - this.returnType = returnType; - } - - public DisassemblyOutputBody returns(@javax.annotation.Nonnull Boolean returns) { this.returns = returns; return this; @@ -315,8 +267,6 @@ public boolean equals(Object o) { Objects.equals(this.globalVariables, disassemblyOutputBody.globalVariables) && Objects.equals(this.localVariables, disassemblyOutputBody.localVariables) && Objects.equals(this.operandXrefs, disassemblyOutputBody.operandXrefs) && - Objects.equals(this.params, disassemblyOutputBody.params) && - Objects.equals(this.returnType, disassemblyOutputBody.returnType) && Objects.equals(this.returns, disassemblyOutputBody.returns)&& Objects.equals(this.additionalProperties, disassemblyOutputBody.additionalProperties); } @@ -327,7 +277,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(basicBlocks, functionId, globalVariables, localVariables, operandXrefs, params, returnType, returns, additionalProperties); + return Objects.hash(basicBlocks, functionId, globalVariables, localVariables, operandXrefs, returns, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -346,8 +296,6 @@ public String toString() { sb.append(" globalVariables: ").append(toIndentedString(globalVariables)).append("\n"); sb.append(" localVariables: ").append(toIndentedString(localVariables)).append("\n"); sb.append(" operandXrefs: ").append(toIndentedString(operandXrefs)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" returnType: ").append(toIndentedString(returnType)).append("\n"); sb.append(" returns: ").append(toIndentedString(returns)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -368,7 +316,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("basic_blocks", "function_id", "global_variables", "local_variables", "operand_xrefs", "params", "return_type", "returns")); + openapiFields = new HashSet(Arrays.asList("basic_blocks", "function_id", "global_variables", "local_variables", "operand_xrefs", "returns")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("function_id", "returns")); @@ -398,9 +346,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("operand_xrefs") != null && !jsonObj.get("operand_xrefs").isJsonNull() && !jsonObj.get("operand_xrefs").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `operand_xrefs` to be an array in the JSON string but got `%s`", jsonObj.get("operand_xrefs").toString())); } - if ((jsonObj.get("return_type") != null && !jsonObj.get("return_type").isJsonNull()) && !jsonObj.get("return_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `return_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("return_type").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/DynamicExecutionMetadata.java b/src/main/java/ai/reveng/model/DynamicExecutionMetadata.java index a59105df..c4c06e42 100644 --- a/src/main/java/ai/reveng/model/DynamicExecutionMetadata.java +++ b/src/main/java/ai/reveng/model/DynamicExecutionMetadata.java @@ -56,12 +56,10 @@ public class DynamicExecutionMetadata { private AnalysisLogs logs; /** - * Run status. UNINITIALISED means this analysis has never had a run triggered. + * Run status */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - UNINITIALISED("UNINITIALISED"), - PENDING("PENDING"), RUNNING("RUNNING"), @@ -148,7 +146,7 @@ public DynamicExecutionMetadata status(@javax.annotation.Nonnull StatusEnum stat } /** - * Run status. UNINITIALISED means this analysis has never had a run triggered. + * Run status * @return status */ @javax.annotation.Nonnull diff --git a/src/main/java/ai/reveng/model/DynamicExecutionRun.java b/src/main/java/ai/reveng/model/DynamicExecutionRun.java new file mode 100644 index 00000000..37841fba --- /dev/null +++ b/src/main/java/ai/reveng/model/DynamicExecutionRun.java @@ -0,0 +1,432 @@ +/* + * 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.DynamicExecutionRunConfig; +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.time.OffsetDateTime; +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; + +/** + * DynamicExecutionRun + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DynamicExecutionRun { + public static final String SERIALIZED_NAME_CONFIG = "config"; + @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nonnull + private DynamicExecutionRunConfig config; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + /** + * Run status + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + PENDING("PENDING"), + + RUNNING("RUNNING"), + + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public DynamicExecutionRun() { + } + + public DynamicExecutionRun config(@javax.annotation.Nonnull DynamicExecutionRunConfig config) { + this.config = config; + return this; + } + + /** + * Parameters the run was started with + * @return config + */ + @javax.annotation.Nonnull + public DynamicExecutionRunConfig getConfig() { + return config; + } + + public void setConfig(@javax.annotation.Nonnull DynamicExecutionRunConfig config) { + this.config = config; + } + + + public DynamicExecutionRun createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * When the run was started + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DynamicExecutionRun id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Run ID + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public DynamicExecutionRun status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Run status + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + /** + * 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 DynamicExecutionRun instance itself + */ + public DynamicExecutionRun 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; + } + DynamicExecutionRun dynamicExecutionRun = (DynamicExecutionRun) o; + return Objects.equals(this.config, dynamicExecutionRun.config) && + Objects.equals(this.createdAt, dynamicExecutionRun.createdAt) && + Objects.equals(this.id, dynamicExecutionRun.id) && + Objects.equals(this.status, dynamicExecutionRun.status)&& + Objects.equals(this.additionalProperties, dynamicExecutionRun.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(config, createdAt, id, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicExecutionRun {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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("config", "created_at", "id", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("config", "created_at", "id", "status")); + } + + /** + * 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 DynamicExecutionRun + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DynamicExecutionRun.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 DynamicExecutionRun is not found in the empty JSON string", DynamicExecutionRun.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DynamicExecutionRun.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("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DynamicExecutionRun.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DynamicExecutionRun' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DynamicExecutionRun.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DynamicExecutionRun 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 DynamicExecutionRun read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DynamicExecutionRun 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 DynamicExecutionRun given an JSON string + * + * @param jsonString JSON string + * @return An instance of DynamicExecutionRun + * @throws IOException if the JSON string is invalid with respect to DynamicExecutionRun + */ + public static DynamicExecutionRun fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DynamicExecutionRun.class); + } + + /** + * Convert an instance of DynamicExecutionRun to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/DynamicExecutionRunConfig.java b/src/main/java/ai/reveng/model/DynamicExecutionRunConfig.java new file mode 100644 index 00000000..3ae712fd --- /dev/null +++ b/src/main/java/ai/reveng/model/DynamicExecutionRunConfig.java @@ -0,0 +1,515 @@ +/* + * 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.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; + +/** + * DynamicExecutionRunConfig + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DynamicExecutionRunConfig { + public static final String SERIALIZED_NAME_ARCHIVE_ENTRY_PATH = "archive_entry_path"; + @SerializedName(SERIALIZED_NAME_ARCHIVE_ENTRY_PATH) + @javax.annotation.Nonnull + private String archiveEntryPath; + + public static final String SERIALIZED_NAME_ARCHIVE_SHA256_HASH = "archive_sha_256_hash"; + @SerializedName(SERIALIZED_NAME_ARCHIVE_SHA256_HASH) + @javax.annotation.Nonnull + private String archiveSha256Hash; + + public static final String SERIALIZED_NAME_COMMAND_LINE_ARGS = "command_line_args"; + @SerializedName(SERIALIZED_NAME_COMMAND_LINE_ARGS) + @javax.annotation.Nonnull + private String commandLineArgs; + + public static final String SERIALIZED_NAME_HAS_ARCHIVE_PASSWORD = "has_archive_password"; + @SerializedName(SERIALIZED_NAME_HAS_ARCHIVE_PASSWORD) + @javax.annotation.Nonnull + private Boolean hasArchivePassword; + + /** + * How the sandbox launched the sample. Null when the sandbox's standard behaviour was used. + */ + @JsonAdapter(StartMethodEnum.Adapter.class) + public enum StartMethodEnum { + STANDARD_USER_PROCESS("standard_user_process"), + + ADMINISTRATOR_PROCESS("administrator_process"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + StartMethodEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StartMethodEnum fromValue(String value) { + for (StartMethodEnum b : StartMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartMethodEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartMethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartMethodEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StartMethodEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_METHOD = "start_method"; + @SerializedName(SERIALIZED_NAME_START_METHOD) + @javax.annotation.Nullable + private StartMethodEnum startMethod; + + public static final String SERIALIZED_NAME_TIMEOUT_SECONDS = "timeout_seconds"; + @SerializedName(SERIALIZED_NAME_TIMEOUT_SECONDS) + @javax.annotation.Nonnull + private Long timeoutSeconds; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public DynamicExecutionRunConfig() { + } + + public DynamicExecutionRunConfig archiveEntryPath(@javax.annotation.Nonnull String archiveEntryPath) { + this.archiveEntryPath = archiveEntryPath; + return this; + } + + /** + * Relative path of the archive entry executed. Empty when no archive was used. + * @return archiveEntryPath + */ + @javax.annotation.Nonnull + public String getArchiveEntryPath() { + return archiveEntryPath; + } + + public void setArchiveEntryPath(@javax.annotation.Nonnull String archiveEntryPath) { + this.archiveEntryPath = archiveEntryPath; + } + + + public DynamicExecutionRunConfig archiveSha256Hash(@javax.annotation.Nonnull String archiveSha256Hash) { + this.archiveSha256Hash = archiveSha256Hash; + return this; + } + + /** + * SHA-256 of the archive sent to the sandbox instead of the analysed binary. Empty when no archive was used. + * @return archiveSha256Hash + */ + @javax.annotation.Nonnull + public String getArchiveSha256Hash() { + return archiveSha256Hash; + } + + public void setArchiveSha256Hash(@javax.annotation.Nonnull String archiveSha256Hash) { + this.archiveSha256Hash = archiveSha256Hash; + } + + + public DynamicExecutionRunConfig commandLineArgs(@javax.annotation.Nonnull String commandLineArgs) { + this.commandLineArgs = commandLineArgs; + return this; + } + + /** + * Command-line arguments passed to the sample. Empty when none were given. + * @return commandLineArgs + */ + @javax.annotation.Nonnull + public String getCommandLineArgs() { + return commandLineArgs; + } + + public void setCommandLineArgs(@javax.annotation.Nonnull String commandLineArgs) { + this.commandLineArgs = commandLineArgs; + } + + + public DynamicExecutionRunConfig hasArchivePassword(@javax.annotation.Nonnull Boolean hasArchivePassword) { + this.hasArchivePassword = hasArchivePassword; + return this; + } + + /** + * Whether a password was given for the archive. The password itself is never returned. + * @return hasArchivePassword + */ + @javax.annotation.Nonnull + public Boolean getHasArchivePassword() { + return hasArchivePassword; + } + + public void setHasArchivePassword(@javax.annotation.Nonnull Boolean hasArchivePassword) { + this.hasArchivePassword = hasArchivePassword; + } + + + public DynamicExecutionRunConfig startMethod(@javax.annotation.Nullable StartMethodEnum startMethod) { + this.startMethod = startMethod; + return this; + } + + /** + * How the sandbox launched the sample. Null when the sandbox's standard behaviour was used. + * @return startMethod + */ + @javax.annotation.Nullable + public StartMethodEnum getStartMethod() { + return startMethod; + } + + public void setStartMethod(@javax.annotation.Nullable StartMethodEnum startMethod) { + this.startMethod = startMethod; + } + + + public DynamicExecutionRunConfig timeoutSeconds(@javax.annotation.Nonnull Long timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return this; + } + + /** + * Maximum sandbox execution time in seconds + * @return timeoutSeconds + */ + @javax.annotation.Nonnull + public Long getTimeoutSeconds() { + return timeoutSeconds; + } + + public void setTimeoutSeconds(@javax.annotation.Nonnull Long timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + } + + + public DynamicExecutionRunConfig url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * URL opened in the sandbox's browser instead of a sample. Empty for a sample run. + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + /** + * 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 DynamicExecutionRunConfig instance itself + */ + public DynamicExecutionRunConfig 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; + } + DynamicExecutionRunConfig dynamicExecutionRunConfig = (DynamicExecutionRunConfig) o; + return Objects.equals(this.archiveEntryPath, dynamicExecutionRunConfig.archiveEntryPath) && + Objects.equals(this.archiveSha256Hash, dynamicExecutionRunConfig.archiveSha256Hash) && + Objects.equals(this.commandLineArgs, dynamicExecutionRunConfig.commandLineArgs) && + Objects.equals(this.hasArchivePassword, dynamicExecutionRunConfig.hasArchivePassword) && + Objects.equals(this.startMethod, dynamicExecutionRunConfig.startMethod) && + Objects.equals(this.timeoutSeconds, dynamicExecutionRunConfig.timeoutSeconds) && + Objects.equals(this.url, dynamicExecutionRunConfig.url)&& + Objects.equals(this.additionalProperties, dynamicExecutionRunConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(archiveEntryPath, archiveSha256Hash, commandLineArgs, hasArchivePassword, startMethod, timeoutSeconds, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicExecutionRunConfig {\n"); + sb.append(" archiveEntryPath: ").append(toIndentedString(archiveEntryPath)).append("\n"); + sb.append(" archiveSha256Hash: ").append(toIndentedString(archiveSha256Hash)).append("\n"); + sb.append(" commandLineArgs: ").append(toIndentedString(commandLineArgs)).append("\n"); + sb.append(" hasArchivePassword: ").append(toIndentedString(hasArchivePassword)).append("\n"); + sb.append(" startMethod: ").append(toIndentedString(startMethod)).append("\n"); + sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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("archive_entry_path", "archive_sha_256_hash", "command_line_args", "has_archive_password", "start_method", "timeout_seconds", "url")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("archive_entry_path", "archive_sha_256_hash", "command_line_args", "has_archive_password", "start_method", "timeout_seconds", "url")); + } + + /** + * 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 DynamicExecutionRunConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DynamicExecutionRunConfig.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 DynamicExecutionRunConfig is not found in the empty JSON string", DynamicExecutionRunConfig.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DynamicExecutionRunConfig.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("archive_entry_path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `archive_entry_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("archive_entry_path").toString())); + } + if (!jsonObj.get("archive_sha_256_hash").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `archive_sha_256_hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("archive_sha_256_hash").toString())); + } + if (!jsonObj.get("command_line_args").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `command_line_args` to be a primitive type in the JSON string but got `%s`", jsonObj.get("command_line_args").toString())); + } + if ((jsonObj.get("start_method") != null && !jsonObj.get("start_method").isJsonNull()) && !jsonObj.get("start_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `start_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_method").toString())); + } + if (jsonObj.get("start_method") != null && !jsonObj.get("start_method").isJsonNull()) { + // validate the required field `start_method` + StartMethodEnum.validateJsonElement(jsonObj.get("start_method")); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DynamicExecutionRunConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DynamicExecutionRunConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DynamicExecutionRunConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DynamicExecutionRunConfig 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 DynamicExecutionRunConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DynamicExecutionRunConfig 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 DynamicExecutionRunConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of DynamicExecutionRunConfig + * @throws IOException if the JSON string is invalid with respect to DynamicExecutionRunConfig + */ + public static DynamicExecutionRunConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DynamicExecutionRunConfig.class); + } + + /** + * Convert an instance of DynamicExecutionRunConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/DynamicExecutionSummaryMetadata.java b/src/main/java/ai/reveng/model/DynamicExecutionSummaryMetadata.java index ff91020e..408695a8 100644 --- a/src/main/java/ai/reveng/model/DynamicExecutionSummaryMetadata.java +++ b/src/main/java/ai/reveng/model/DynamicExecutionSummaryMetadata.java @@ -50,7 +50,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DynamicExecutionSummaryMetadata { /** - * Status of the most recent summary attempt. UNINITIALISED means no summary has been attempted for this analysis. + * Status of the run's most recent summary attempt. UNINITIALISED means no summary has been attempted for the run. */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { @@ -123,7 +123,7 @@ public DynamicExecutionSummaryMetadata status(@javax.annotation.Nonnull StatusEn } /** - * Status of the most recent summary attempt. UNINITIALISED means no summary has been attempted for this analysis. + * Status of the run's most recent summary attempt. UNINITIALISED means no summary has been attempted for the run. * @return status */ @javax.annotation.Nonnull diff --git a/src/main/java/ai/reveng/model/ErrorBody.java b/src/main/java/ai/reveng/model/ErrorBody.java index 5640bc4d..a09ba02e 100644 --- a/src/main/java/ai/reveng/model/ErrorBody.java +++ b/src/main/java/ai/reveng/model/ErrorBody.java @@ -136,6 +136,8 @@ public enum CodeEnum { PRECONDITION_FAILED("PRECONDITION_FAILED"), + REAUTH_REQUIRED("REAUTH_REQUIRED"), + REPORT_RENDER_FAILED("REPORT_RENDER_FAILED"), REQUEST_ENTITY_TOO_LARGE("REQUEST_ENTITY_TOO_LARGE"), diff --git a/src/main/java/ai/reveng/model/FeedbackSubmission.java b/src/main/java/ai/reveng/model/FeedbackSubmission.java new file mode 100644 index 00000000..9b055ca8 --- /dev/null +++ b/src/main/java/ai/reveng/model/FeedbackSubmission.java @@ -0,0 +1,383 @@ +/* + * 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.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +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; + +/** + * FeedbackSubmission + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeedbackSubmission { + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + /** + * How useful the caller found the result + */ + @JsonAdapter(SentimentEnum.Adapter.class) + public enum SentimentEnum { + POSITIVE("POSITIVE"), + + NEUTRAL("NEUTRAL"), + + NEGATIVE("NEGATIVE"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + SentimentEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SentimentEnum fromValue(String value) { + for (SentimentEnum b : SentimentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SentimentEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SentimentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SentimentEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SentimentEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SENTIMENT = "sentiment"; + @SerializedName(SERIALIZED_NAME_SENTIMENT) + @javax.annotation.Nonnull + private SentimentEnum sentiment; + + public FeedbackSubmission() { + } + + public FeedbackSubmission metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public FeedbackSubmission putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Context the client captured with the feedback, stored as-is (e.g. the binary hash and the matches the caller was shown) + * @return metadata + */ + @javax.annotation.Nullable + public Map getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public FeedbackSubmission sentiment(@javax.annotation.Nonnull SentimentEnum sentiment) { + this.sentiment = sentiment; + return this; + } + + /** + * How useful the caller found the result + * @return sentiment + */ + @javax.annotation.Nonnull + public SentimentEnum getSentiment() { + return sentiment; + } + + public void setSentiment(@javax.annotation.Nonnull SentimentEnum sentiment) { + this.sentiment = sentiment; + } + + /** + * 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 FeedbackSubmission instance itself + */ + public FeedbackSubmission 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; + } + FeedbackSubmission feedbackSubmission = (FeedbackSubmission) o; + return Objects.equals(this.metadata, feedbackSubmission.metadata) && + Objects.equals(this.sentiment, feedbackSubmission.sentiment)&& + Objects.equals(this.additionalProperties, feedbackSubmission.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, sentiment, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedbackSubmission {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" sentiment: ").append(toIndentedString(sentiment)).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("metadata", "sentiment")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("sentiment")); + } + + /** + * 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 FeedbackSubmission + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FeedbackSubmission.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 FeedbackSubmission is not found in the empty JSON string", FeedbackSubmission.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FeedbackSubmission.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("sentiment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sentiment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sentiment").toString())); + } + // validate the required field `sentiment` + SentimentEnum.validateJsonElement(jsonObj.get("sentiment")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FeedbackSubmission.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FeedbackSubmission' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FeedbackSubmission.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FeedbackSubmission 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 FeedbackSubmission read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FeedbackSubmission 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 FeedbackSubmission given an JSON string + * + * @param jsonString JSON string + * @return An instance of FeedbackSubmission + * @throws IOException if the JSON string is invalid with respect to FeedbackSubmission + */ + public static FeedbackSubmission fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FeedbackSubmission.class); + } + + /** + * Convert an instance of FeedbackSubmission to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/FormFile.java b/src/main/java/ai/reveng/model/FormFile.java index 3fdf1059..f29f757b 100644 --- a/src/main/java/ai/reveng/model/FormFile.java +++ b/src/main/java/ai/reveng/model/FormFile.java @@ -78,7 +78,7 @@ public FormFile contentType(@javax.annotation.Nullable String contentType) { } /** - * Search is applied to string value + * Get contentType * @return contentType */ @javax.annotation.Nullable @@ -97,7 +97,7 @@ public FormFile filename(@javax.annotation.Nullable String filename) { } /** - * Search is applied to string value + * Get filename * @return filename */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/AppApiRestV2FunctionsTypesFunction.java b/src/main/java/ai/reveng/model/Function.java similarity index 79% rename from src/main/java/ai/reveng/model/AppApiRestV2FunctionsTypesFunction.java rename to src/main/java/ai/reveng/model/Function.java index 84237b54..bd0372b2 100644 --- a/src/main/java/ai/reveng/model/AppApiRestV2FunctionsTypesFunction.java +++ b/src/main/java/ai/reveng/model/Function.java @@ -45,10 +45,10 @@ import ai.reveng.invoker.JSON; /** - * AppApiRestV2FunctionsTypesFunction + * Function */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AppApiRestV2FunctionsTypesFunction { +public class Function { public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; @SerializedName(SERIALIZED_NAME_FUNCTION_ID) @javax.annotation.Nonnull @@ -79,10 +79,10 @@ public class AppApiRestV2FunctionsTypesFunction { @javax.annotation.Nonnull private Boolean debug; - public AppApiRestV2FunctionsTypesFunction() { + public Function() { } - public AppApiRestV2FunctionsTypesFunction functionId(@javax.annotation.Nonnull Long functionId) { + public Function functionId(@javax.annotation.Nonnull Long functionId) { this.functionId = functionId; return this; } @@ -101,7 +101,7 @@ public void setFunctionId(@javax.annotation.Nonnull Long functionId) { } - public AppApiRestV2FunctionsTypesFunction functionName(@javax.annotation.Nonnull String functionName) { + public Function functionName(@javax.annotation.Nonnull String functionName) { this.functionName = functionName; return this; } @@ -120,7 +120,7 @@ public void setFunctionName(@javax.annotation.Nonnull String functionName) { } - public AppApiRestV2FunctionsTypesFunction functionMangledName(@javax.annotation.Nonnull String functionMangledName) { + public Function functionMangledName(@javax.annotation.Nonnull String functionMangledName) { this.functionMangledName = functionMangledName; return this; } @@ -139,7 +139,7 @@ public void setFunctionMangledName(@javax.annotation.Nonnull String functionMang } - public AppApiRestV2FunctionsTypesFunction functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { + public Function functionVaddr(@javax.annotation.Nonnull Long functionVaddr) { this.functionVaddr = functionVaddr; return this; } @@ -158,7 +158,7 @@ public void setFunctionVaddr(@javax.annotation.Nonnull Long functionVaddr) { } - public AppApiRestV2FunctionsTypesFunction functionSize(@javax.annotation.Nonnull Integer functionSize) { + public Function functionSize(@javax.annotation.Nonnull Integer functionSize) { this.functionSize = functionSize; return this; } @@ -177,7 +177,7 @@ public void setFunctionSize(@javax.annotation.Nonnull Integer functionSize) { } - public AppApiRestV2FunctionsTypesFunction debug(@javax.annotation.Nonnull Boolean debug) { + public Function debug(@javax.annotation.Nonnull Boolean debug) { this.debug = debug; return this; } @@ -208,9 +208,9 @@ public void setDebug(@javax.annotation.Nonnull Boolean debug) { * * @param key name of the property * @param value value of the property - * @return the AppApiRestV2FunctionsTypesFunction instance itself + * @return the Function instance itself */ - public AppApiRestV2FunctionsTypesFunction putAdditionalProperty(String key, Object value) { + public Function putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -249,14 +249,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AppApiRestV2FunctionsTypesFunction appApiRestV2FunctionsTypesFunction = (AppApiRestV2FunctionsTypesFunction) o; - return Objects.equals(this.functionId, appApiRestV2FunctionsTypesFunction.functionId) && - Objects.equals(this.functionName, appApiRestV2FunctionsTypesFunction.functionName) && - Objects.equals(this.functionMangledName, appApiRestV2FunctionsTypesFunction.functionMangledName) && - Objects.equals(this.functionVaddr, appApiRestV2FunctionsTypesFunction.functionVaddr) && - Objects.equals(this.functionSize, appApiRestV2FunctionsTypesFunction.functionSize) && - Objects.equals(this.debug, appApiRestV2FunctionsTypesFunction.debug)&& - Objects.equals(this.additionalProperties, appApiRestV2FunctionsTypesFunction.additionalProperties); + Function function = (Function) o; + return Objects.equals(this.functionId, function.functionId) && + Objects.equals(this.functionName, function.functionName) && + Objects.equals(this.functionMangledName, function.functionMangledName) && + Objects.equals(this.functionVaddr, function.functionVaddr) && + Objects.equals(this.functionSize, function.functionSize) && + Objects.equals(this.debug, function.debug)&& + Objects.equals(this.additionalProperties, function.additionalProperties); } @Override @@ -267,7 +267,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AppApiRestV2FunctionsTypesFunction {\n"); + sb.append("class Function {\n"); sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n"); sb.append(" functionMangledName: ").append(toIndentedString(functionMangledName)).append("\n"); @@ -303,17 +303,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AppApiRestV2FunctionsTypesFunction + * @throws IOException if the JSON Element is invalid with respect to Function */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AppApiRestV2FunctionsTypesFunction.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 AppApiRestV2FunctionsTypesFunction is not found in the empty JSON string", AppApiRestV2FunctionsTypesFunction.openapiRequiredFields.toString())); + if (!Function.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 Function is not found in the empty JSON string", Function.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AppApiRestV2FunctionsTypesFunction.openapiRequiredFields) { + for (String requiredField : Function.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())); } @@ -331,16 +331,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AppApiRestV2FunctionsTypesFunction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AppApiRestV2FunctionsTypesFunction' and its subtypes + if (!Function.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Function' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AppApiRestV2FunctionsTypesFunction.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Function.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AppApiRestV2FunctionsTypesFunction value) throws IOException { + public void write(JsonWriter out, Function value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -368,12 +368,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AppApiRestV2FunctionsTypesFunction read(JsonReader in) throws IOException { + public Function read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AppApiRestV2FunctionsTypesFunction instance = thisAdapter.fromJsonTree(jsonObj); + Function instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -400,18 +400,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AppApiRestV2FunctionsTypesFunction given an JSON string + * Create an instance of Function given an JSON string * * @param jsonString JSON string - * @return An instance of AppApiRestV2FunctionsTypesFunction - * @throws IOException if the JSON string is invalid with respect to AppApiRestV2FunctionsTypesFunction + * @return An instance of Function + * @throws IOException if the JSON string is invalid with respect to Function */ - public static AppApiRestV2FunctionsTypesFunction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AppApiRestV2FunctionsTypesFunction.class); + public static Function fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Function.class); } /** - * Convert an instance of AppApiRestV2FunctionsTypesFunction to an JSON string + * Convert an instance of Function to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/FunctionSignatureBody.java b/src/main/java/ai/reveng/model/FunctionSignatureBody.java index eb3ac889..e72b957d 100644 --- a/src/main/java/ai/reveng/model/FunctionSignatureBody.java +++ b/src/main/java/ai/reveng/model/FunctionSignatureBody.java @@ -111,6 +111,8 @@ public enum SourceTypeEnum { AUTO_UNSTRIP("AUTO_UNSTRIP"), + AI_AGENT("AI_AGENT"), + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; diff --git a/src/main/java/ai/reveng/model/FunctionSignatureEntry.java b/src/main/java/ai/reveng/model/FunctionSignatureEntry.java index fafb683d..aff45c8b 100644 --- a/src/main/java/ai/reveng/model/FunctionSignatureEntry.java +++ b/src/main/java/ai/reveng/model/FunctionSignatureEntry.java @@ -104,6 +104,8 @@ public enum SourceTypeEnum { AUTO_UNSTRIP("AUTO_UNSTRIP"), + AI_AGENT("AI_AGENT"), + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; diff --git a/src/main/java/ai/reveng/model/FunctionStringsResponse.java b/src/main/java/ai/reveng/model/GetCreditEstimatesOutputBody.java similarity index 61% rename from src/main/java/ai/reveng/model/FunctionStringsResponse.java rename to src/main/java/ai/reveng/model/GetCreditEstimatesOutputBody.java index 05f678ff..ad29655c 100644 --- a/src/main/java/ai/reveng/model/FunctionStringsResponse.java +++ b/src/main/java/ai/reveng/model/GetCreditEstimatesOutputBody.java @@ -13,7 +13,8 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.FunctionString; +import ai.reveng.model.OperationCostBody; +import ai.reveng.model.SizeBucketBody; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -48,66 +49,74 @@ import ai.reveng.invoker.JSON; /** - * Response for listing all the strings of a function. + * GetCreditEstimatesOutputBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FunctionStringsResponse { - public static final String SERIALIZED_NAME_STRINGS = "strings"; - @SerializedName(SERIALIZED_NAME_STRINGS) +public class GetCreditEstimatesOutputBody { + public static final String SERIALIZED_NAME_OPERATIONS = "operations"; + @SerializedName(SERIALIZED_NAME_OPERATIONS) @javax.annotation.Nonnull - private List strings = new ArrayList<>(); + private List operations = new ArrayList<>(); - public static final String SERIALIZED_NAME_TOTAL_STRINGS = "total_strings"; - @SerializedName(SERIALIZED_NAME_TOTAL_STRINGS) + public static final String SERIALIZED_NAME_SIZE_BUCKETS = "size_buckets"; + @SerializedName(SERIALIZED_NAME_SIZE_BUCKETS) @javax.annotation.Nonnull - private Integer totalStrings; + private List sizeBuckets = new ArrayList<>(); - public FunctionStringsResponse() { + public GetCreditEstimatesOutputBody() { } - public FunctionStringsResponse strings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public GetCreditEstimatesOutputBody operations(@javax.annotation.Nonnull List operations) { + this.operations = operations; return this; } - public FunctionStringsResponse addStringsItem(FunctionString stringsItem) { - if (this.strings == null) { - this.strings = new ArrayList<>(); + public GetCreditEstimatesOutputBody addOperationsItem(OperationCostBody operationsItem) { + if (this.operations == null) { + this.operations = new ArrayList<>(); } - this.strings.add(stringsItem); + this.operations.add(operationsItem); return this; } /** - * The strings associated with this function - * @return strings + * Estimated cost of each operation + * @return operations */ @javax.annotation.Nonnull - public List getStrings() { - return strings; + public List getOperations() { + return operations; } - public void setStrings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public void setOperations(@javax.annotation.Nonnull List operations) { + this.operations = operations; } - public FunctionStringsResponse totalStrings(@javax.annotation.Nonnull Integer totalStrings) { - this.totalStrings = totalStrings; + public GetCreditEstimatesOutputBody sizeBuckets(@javax.annotation.Nonnull List sizeBuckets) { + this.sizeBuckets = sizeBuckets; + return this; + } + + public GetCreditEstimatesOutputBody addSizeBucketsItem(SizeBucketBody sizeBucketsItem) { + if (this.sizeBuckets == null) { + this.sizeBuckets = new ArrayList<>(); + } + this.sizeBuckets.add(sizeBucketsItem); return this; } /** - * The total number of strings associated with this function - * @return totalStrings + * Size buckets in ascending order of size + * @return sizeBuckets */ @javax.annotation.Nonnull - public Integer getTotalStrings() { - return totalStrings; + public List getSizeBuckets() { + return sizeBuckets; } - public void setTotalStrings(@javax.annotation.Nonnull Integer totalStrings) { - this.totalStrings = totalStrings; + public void setSizeBuckets(@javax.annotation.Nonnull List sizeBuckets) { + this.sizeBuckets = sizeBuckets; } /** @@ -123,9 +132,9 @@ public void setTotalStrings(@javax.annotation.Nonnull Integer totalStrings) { * * @param key name of the property * @param value value of the property - * @return the FunctionStringsResponse instance itself + * @return the GetCreditEstimatesOutputBody instance itself */ - public FunctionStringsResponse putAdditionalProperty(String key, Object value) { + public GetCreditEstimatesOutputBody putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -164,23 +173,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FunctionStringsResponse functionStringsResponse = (FunctionStringsResponse) o; - return Objects.equals(this.strings, functionStringsResponse.strings) && - Objects.equals(this.totalStrings, functionStringsResponse.totalStrings)&& - Objects.equals(this.additionalProperties, functionStringsResponse.additionalProperties); + GetCreditEstimatesOutputBody getCreditEstimatesOutputBody = (GetCreditEstimatesOutputBody) o; + return Objects.equals(this.operations, getCreditEstimatesOutputBody.operations) && + Objects.equals(this.sizeBuckets, getCreditEstimatesOutputBody.sizeBuckets)&& + Objects.equals(this.additionalProperties, getCreditEstimatesOutputBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(strings, totalStrings, additionalProperties); + return Objects.hash(operations, sizeBuckets, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FunctionStringsResponse {\n"); - sb.append(" strings: ").append(toIndentedString(strings)).append("\n"); - sb.append(" totalStrings: ").append(toIndentedString(totalStrings)).append("\n"); + sb.append("class GetCreditEstimatesOutputBody {\n"); + sb.append(" operations: ").append(toIndentedString(operations)).append("\n"); + sb.append(" sizeBuckets: ").append(toIndentedString(sizeBuckets)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -200,41 +209,43 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("strings", "total_strings")); + openapiFields = new HashSet(Arrays.asList("operations", "size_buckets")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("strings", "total_strings")); + openapiRequiredFields = new HashSet(Arrays.asList("operations", "size_buckets")); } /** * 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 FunctionStringsResponse + * @throws IOException if the JSON Element is invalid with respect to GetCreditEstimatesOutputBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!FunctionStringsResponse.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 FunctionStringsResponse is not found in the empty JSON string", FunctionStringsResponse.openapiRequiredFields.toString())); + if (!GetCreditEstimatesOutputBody.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 GetCreditEstimatesOutputBody is not found in the empty JSON string", GetCreditEstimatesOutputBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FunctionStringsResponse.openapiRequiredFields) { + for (String requiredField : GetCreditEstimatesOutputBody.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("strings") != null) { - if (!jsonObj.get("strings").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `strings` to be an array in the JSON string but got `%s`", jsonObj.get("strings").toString())); - } - JsonArray jsonArraystrings = jsonObj.getAsJsonArray("strings"); - // validate the required field `strings` (array) - for (int i = 0; i < jsonArraystrings.size(); i++) { - FunctionString.validateJsonElement(jsonArraystrings.get(i)); - } + // ensure the required json array is present + if (jsonObj.get("operations") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("operations").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `operations` to be an array in the JSON string but got `%s`", jsonObj.get("operations").toString())); + } + // ensure the required json array is present + if (jsonObj.get("size_buckets") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("size_buckets").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `size_buckets` to be an array in the JSON string but got `%s`", jsonObj.get("size_buckets").toString())); } } @@ -242,16 +253,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!FunctionStringsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FunctionStringsResponse' and its subtypes + if (!GetCreditEstimatesOutputBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCreditEstimatesOutputBody' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FunctionStringsResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetCreditEstimatesOutputBody.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, FunctionStringsResponse value) throws IOException { + public void write(JsonWriter out, GetCreditEstimatesOutputBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -279,12 +290,12 @@ else if (entry.getValue() instanceof Character) } @Override - public FunctionStringsResponse read(JsonReader in) throws IOException { + public GetCreditEstimatesOutputBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - FunctionStringsResponse instance = thisAdapter.fromJsonTree(jsonObj); + GetCreditEstimatesOutputBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -311,18 +322,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of FunctionStringsResponse given an JSON string + * Create an instance of GetCreditEstimatesOutputBody given an JSON string * * @param jsonString JSON string - * @return An instance of FunctionStringsResponse - * @throws IOException if the JSON string is invalid with respect to FunctionStringsResponse + * @return An instance of GetCreditEstimatesOutputBody + * @throws IOException if the JSON string is invalid with respect to GetCreditEstimatesOutputBody */ - public static FunctionStringsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FunctionStringsResponse.class); + public static GetCreditEstimatesOutputBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetCreditEstimatesOutputBody.class); } /** - * Convert an instance of FunctionStringsResponse to an JSON string + * Convert an instance of GetCreditEstimatesOutputBody to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/PutAnalysisStringsRequest.java b/src/main/java/ai/reveng/model/ListDynamicExecutionRunsOutputBody.java similarity index 69% rename from src/main/java/ai/reveng/model/PutAnalysisStringsRequest.java rename to src/main/java/ai/reveng/model/ListDynamicExecutionRunsOutputBody.java index c09daaff..9da541f2 100644 --- a/src/main/java/ai/reveng/model/PutAnalysisStringsRequest.java +++ b/src/main/java/ai/reveng/model/ListDynamicExecutionRunsOutputBody.java @@ -13,7 +13,7 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.AnalysisStringInput; +import ai.reveng.model.DynamicExecutionRun; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -48,42 +48,42 @@ import ai.reveng.invoker.JSON; /** - * PutAnalysisStringsRequest + * ListDynamicExecutionRunsOutputBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PutAnalysisStringsRequest { - public static final String SERIALIZED_NAME_STRINGS = "strings"; - @SerializedName(SERIALIZED_NAME_STRINGS) +public class ListDynamicExecutionRunsOutputBody { + public static final String SERIALIZED_NAME_RUNS = "runs"; + @SerializedName(SERIALIZED_NAME_RUNS) @javax.annotation.Nonnull - private List strings = new ArrayList<>(); + private List runs = new ArrayList<>(); - public PutAnalysisStringsRequest() { + public ListDynamicExecutionRunsOutputBody() { } - public PutAnalysisStringsRequest strings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public ListDynamicExecutionRunsOutputBody runs(@javax.annotation.Nonnull List runs) { + this.runs = runs; return this; } - public PutAnalysisStringsRequest addStringsItem(AnalysisStringInput stringsItem) { - if (this.strings == null) { - this.strings = new ArrayList<>(); + public ListDynamicExecutionRunsOutputBody addRunsItem(DynamicExecutionRun runsItem) { + if (this.runs == null) { + this.runs = new ArrayList<>(); } - this.strings.add(stringsItem); + this.runs.add(runsItem); return this; } /** - * The strings to add to the analysis - * @return strings + * The analysis's runs, newest first + * @return runs */ @javax.annotation.Nonnull - public List getStrings() { - return strings; + public List getRuns() { + return runs; } - public void setStrings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public void setRuns(@javax.annotation.Nonnull List runs) { + this.runs = runs; } /** @@ -99,9 +99,9 @@ public void setStrings(@javax.annotation.Nonnull List strin * * @param key name of the property * @param value value of the property - * @return the PutAnalysisStringsRequest instance itself + * @return the ListDynamicExecutionRunsOutputBody instance itself */ - public PutAnalysisStringsRequest putAdditionalProperty(String key, Object value) { + public ListDynamicExecutionRunsOutputBody putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -140,21 +140,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PutAnalysisStringsRequest putAnalysisStringsRequest = (PutAnalysisStringsRequest) o; - return Objects.equals(this.strings, putAnalysisStringsRequest.strings)&& - Objects.equals(this.additionalProperties, putAnalysisStringsRequest.additionalProperties); + ListDynamicExecutionRunsOutputBody listDynamicExecutionRunsOutputBody = (ListDynamicExecutionRunsOutputBody) o; + return Objects.equals(this.runs, listDynamicExecutionRunsOutputBody.runs)&& + Objects.equals(this.additionalProperties, listDynamicExecutionRunsOutputBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(strings, additionalProperties); + return Objects.hash(runs, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PutAnalysisStringsRequest {\n"); - sb.append(" strings: ").append(toIndentedString(strings)).append("\n"); + sb.append("class ListDynamicExecutionRunsOutputBody {\n"); + sb.append(" runs: ").append(toIndentedString(runs)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -174,41 +174,37 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("strings")); + openapiFields = new HashSet(Arrays.asList("runs")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("strings")); + openapiRequiredFields = new HashSet(Arrays.asList("runs")); } /** * 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 PutAnalysisStringsRequest + * @throws IOException if the JSON Element is invalid with respect to ListDynamicExecutionRunsOutputBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PutAnalysisStringsRequest.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 PutAnalysisStringsRequest is not found in the empty JSON string", PutAnalysisStringsRequest.openapiRequiredFields.toString())); + if (!ListDynamicExecutionRunsOutputBody.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 ListDynamicExecutionRunsOutputBody is not found in the empty JSON string", ListDynamicExecutionRunsOutputBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PutAnalysisStringsRequest.openapiRequiredFields) { + for (String requiredField : ListDynamicExecutionRunsOutputBody.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("strings") != null) { - if (!jsonObj.get("strings").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `strings` to be an array in the JSON string but got `%s`", jsonObj.get("strings").toString())); - } - JsonArray jsonArraystrings = jsonObj.getAsJsonArray("strings"); - // validate the required field `strings` (array) - for (int i = 0; i < jsonArraystrings.size(); i++) { - AnalysisStringInput.validateJsonElement(jsonArraystrings.get(i)); - } + // ensure the required json array is present + if (jsonObj.get("runs") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("runs").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `runs` to be an array in the JSON string but got `%s`", jsonObj.get("runs").toString())); } } @@ -216,16 +212,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PutAnalysisStringsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PutAnalysisStringsRequest' and its subtypes + if (!ListDynamicExecutionRunsOutputBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListDynamicExecutionRunsOutputBody' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PutAnalysisStringsRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ListDynamicExecutionRunsOutputBody.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PutAnalysisStringsRequest value) throws IOException { + public void write(JsonWriter out, ListDynamicExecutionRunsOutputBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -253,12 +249,12 @@ else if (entry.getValue() instanceof Character) } @Override - public PutAnalysisStringsRequest read(JsonReader in) throws IOException { + public ListDynamicExecutionRunsOutputBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - PutAnalysisStringsRequest instance = thisAdapter.fromJsonTree(jsonObj); + ListDynamicExecutionRunsOutputBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -285,18 +281,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PutAnalysisStringsRequest given an JSON string + * Create an instance of ListDynamicExecutionRunsOutputBody given an JSON string * * @param jsonString JSON string - * @return An instance of PutAnalysisStringsRequest - * @throws IOException if the JSON string is invalid with respect to PutAnalysisStringsRequest + * @return An instance of ListDynamicExecutionRunsOutputBody + * @throws IOException if the JSON string is invalid with respect to ListDynamicExecutionRunsOutputBody */ - public static PutAnalysisStringsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PutAnalysisStringsRequest.class); + public static ListDynamicExecutionRunsOutputBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListDynamicExecutionRunsOutputBody.class); } /** - * Convert an instance of PutAnalysisStringsRequest to an JSON string + * Convert an instance of ListDynamicExecutionRunsOutputBody to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/AnalysisStringsStatusResponse.java b/src/main/java/ai/reveng/model/ListMalwareFamiliesOutputBody.java similarity index 70% rename from src/main/java/ai/reveng/model/AnalysisStringsStatusResponse.java rename to src/main/java/ai/reveng/model/ListMalwareFamiliesOutputBody.java index 0bb08a21..59f124c1 100644 --- a/src/main/java/ai/reveng/model/AnalysisStringsStatusResponse.java +++ b/src/main/java/ai/reveng/model/ListMalwareFamiliesOutputBody.java @@ -13,14 +13,16 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.BinariesTaskStatus; +import ai.reveng.model.MalwareFamily; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,34 +48,42 @@ import ai.reveng.invoker.JSON; /** - * AnalysisStringsStatusResponse + * ListMalwareFamiliesOutputBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AnalysisStringsStatusResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) +public class ListMalwareFamiliesOutputBody { + public static final String SERIALIZED_NAME_FAMILIES = "families"; + @SerializedName(SERIALIZED_NAME_FAMILIES) @javax.annotation.Nonnull - private BinariesTaskStatus status; + private List families = new ArrayList<>(); + + public ListMalwareFamiliesOutputBody() { + } - public AnalysisStringsStatusResponse() { + public ListMalwareFamiliesOutputBody families(@javax.annotation.Nonnull List families) { + this.families = families; + return this; } - public AnalysisStringsStatusResponse status(@javax.annotation.Nonnull BinariesTaskStatus status) { - this.status = status; + public ListMalwareFamiliesOutputBody addFamiliesItem(MalwareFamily familiesItem) { + if (this.families == null) { + this.families = new ArrayList<>(); + } + this.families.add(familiesItem); return this; } /** - * The current status of the strings extraction task - * @return status + * Families of the requested binaries, sorted by name + * @return families */ @javax.annotation.Nonnull - public BinariesTaskStatus getStatus() { - return status; + public List getFamilies() { + return families; } - public void setStatus(@javax.annotation.Nonnull BinariesTaskStatus status) { - this.status = status; + public void setFamilies(@javax.annotation.Nonnull List families) { + this.families = families; } /** @@ -89,9 +99,9 @@ public void setStatus(@javax.annotation.Nonnull BinariesTaskStatus status) { * * @param key name of the property * @param value value of the property - * @return the AnalysisStringsStatusResponse instance itself + * @return the ListMalwareFamiliesOutputBody instance itself */ - public AnalysisStringsStatusResponse putAdditionalProperty(String key, Object value) { + public ListMalwareFamiliesOutputBody putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,21 +140,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AnalysisStringsStatusResponse analysisStringsStatusResponse = (AnalysisStringsStatusResponse) o; - return Objects.equals(this.status, analysisStringsStatusResponse.status)&& - Objects.equals(this.additionalProperties, analysisStringsStatusResponse.additionalProperties); + ListMalwareFamiliesOutputBody listMalwareFamiliesOutputBody = (ListMalwareFamiliesOutputBody) o; + return Objects.equals(this.families, listMalwareFamiliesOutputBody.families)&& + Objects.equals(this.additionalProperties, listMalwareFamiliesOutputBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(status, additionalProperties); + return Objects.hash(families, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnalysisStringsStatusResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("class ListMalwareFamiliesOutputBody {\n"); + sb.append(" families: ").append(toIndentedString(families)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -164,50 +174,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("status")); + openapiFields = new HashSet(Arrays.asList("families")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("status")); + openapiRequiredFields = new HashSet(Arrays.asList("families")); } /** * 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 AnalysisStringsStatusResponse + * @throws IOException if the JSON Element is invalid with respect to ListMalwareFamiliesOutputBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AnalysisStringsStatusResponse.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 AnalysisStringsStatusResponse is not found in the empty JSON string", AnalysisStringsStatusResponse.openapiRequiredFields.toString())); + if (!ListMalwareFamiliesOutputBody.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 ListMalwareFamiliesOutputBody is not found in the empty JSON string", ListMalwareFamiliesOutputBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnalysisStringsStatusResponse.openapiRequiredFields) { + for (String requiredField : ListMalwareFamiliesOutputBody.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 required field `status` - BinariesTaskStatus.validateJsonElement(jsonObj.get("status")); + // ensure the required json array is present + if (jsonObj.get("families") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("families").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `families` to be an array in the JSON string but got `%s`", jsonObj.get("families").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnalysisStringsStatusResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnalysisStringsStatusResponse' and its subtypes + if (!ListMalwareFamiliesOutputBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListMalwareFamiliesOutputBody' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AnalysisStringsStatusResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ListMalwareFamiliesOutputBody.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AnalysisStringsStatusResponse value) throws IOException { + public void write(JsonWriter out, ListMalwareFamiliesOutputBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -235,12 +249,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AnalysisStringsStatusResponse read(JsonReader in) throws IOException { + public ListMalwareFamiliesOutputBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AnalysisStringsStatusResponse instance = thisAdapter.fromJsonTree(jsonObj); + ListMalwareFamiliesOutputBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -267,18 +281,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AnalysisStringsStatusResponse given an JSON string + * Create an instance of ListMalwareFamiliesOutputBody given an JSON string * * @param jsonString JSON string - * @return An instance of AnalysisStringsStatusResponse - * @throws IOException if the JSON string is invalid with respect to AnalysisStringsStatusResponse + * @return An instance of ListMalwareFamiliesOutputBody + * @throws IOException if the JSON string is invalid with respect to ListMalwareFamiliesOutputBody */ - public static AnalysisStringsStatusResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnalysisStringsStatusResponse.class); + public static ListMalwareFamiliesOutputBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListMalwareFamiliesOutputBody.class); } /** - * Convert an instance of AnalysisStringsStatusResponse to an JSON string + * Convert an instance of ListMalwareFamiliesOutputBody to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/MalwareFamily.java b/src/main/java/ai/reveng/model/MalwareFamily.java new file mode 100644 index 00000000..b1f1ae96 --- /dev/null +++ b/src/main/java/ai/reveng/model/MalwareFamily.java @@ -0,0 +1,371 @@ +/* + * 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.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import ai.reveng.invoker.JSON; + +/** + * MalwareFamily + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MalwareFamily { + public static final String SERIALIZED_NAME_BINARY_IDS = "binary_ids"; + @SerializedName(SERIALIZED_NAME_BINARY_IDS) + @javax.annotation.Nullable + private List binaryIds; + + public static final String SERIALIZED_NAME_MATCHED_BINARY_IDS = "matched_binary_ids"; + @SerializedName(SERIALIZED_NAME_MATCHED_BINARY_IDS) + @javax.annotation.Nullable + private List matchedBinaryIds; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public MalwareFamily() { + } + + public MalwareFamily binaryIds(@javax.annotation.Nullable List binaryIds) { + this.binaryIds = binaryIds; + return this; + } + + public MalwareFamily addBinaryIdsItem(Long binaryIdsItem) { + if (this.binaryIds == null) { + this.binaryIds = new ArrayList<>(); + } + this.binaryIds.add(binaryIdsItem); + return this; + } + + /** + * Every binary in the RevEng.AI malware corpus in this family, matched or not + * @return binaryIds + */ + @javax.annotation.Nullable + public List getBinaryIds() { + return binaryIds; + } + + public void setBinaryIds(@javax.annotation.Nullable List binaryIds) { + this.binaryIds = binaryIds; + } + + + public MalwareFamily matchedBinaryIds(@javax.annotation.Nullable List matchedBinaryIds) { + this.matchedBinaryIds = matchedBinaryIds; + return this; + } + + public MalwareFamily addMatchedBinaryIdsItem(Long matchedBinaryIdsItem) { + if (this.matchedBinaryIds == null) { + this.matchedBinaryIds = new ArrayList<>(); + } + this.matchedBinaryIds.add(matchedBinaryIdsItem); + return this; + } + + /** + * Requested binaries in this family + * @return matchedBinaryIds + */ + @javax.annotation.Nullable + public List getMatchedBinaryIds() { + return matchedBinaryIds; + } + + public void setMatchedBinaryIds(@javax.annotation.Nullable List matchedBinaryIds) { + this.matchedBinaryIds = matchedBinaryIds; + } + + + public MalwareFamily name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Family name, lowercase without punctuation + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * 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 MalwareFamily instance itself + */ + public MalwareFamily 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; + } + MalwareFamily malwareFamily = (MalwareFamily) o; + return Objects.equals(this.binaryIds, malwareFamily.binaryIds) && + Objects.equals(this.matchedBinaryIds, malwareFamily.matchedBinaryIds) && + Objects.equals(this.name, malwareFamily.name)&& + Objects.equals(this.additionalProperties, malwareFamily.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(binaryIds, matchedBinaryIds, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MalwareFamily {\n"); + sb.append(" binaryIds: ").append(toIndentedString(binaryIds)).append("\n"); + sb.append(" matchedBinaryIds: ").append(toIndentedString(matchedBinaryIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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("binary_ids", "matched_binary_ids", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("binary_ids", "matched_binary_ids", "name")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MalwareFamily + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MalwareFamily.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 MalwareFamily is not found in the empty JSON string", MalwareFamily.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MalwareFamily.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(); + // ensure the required json array is present + if (jsonObj.get("binary_ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("binary_ids").isJsonArray() && !jsonObj.get("binary_ids").isJsonNull()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("binary_ids").toString())); + } + // ensure the required json array is present + if (jsonObj.get("matched_binary_ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("matched_binary_ids").isJsonArray() && !jsonObj.get("matched_binary_ids").isJsonNull()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `matched_binary_ids` to be an array in the JSON string but got `%s`", jsonObj.get("matched_binary_ids").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MalwareFamily.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MalwareFamily' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MalwareFamily.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MalwareFamily 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 MalwareFamily read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MalwareFamily 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 MalwareFamily given an JSON string + * + * @param jsonString JSON string + * @return An instance of MalwareFamily + * @throws IOException if the JSON string is invalid with respect to MalwareFamily + */ + public static MalwareFamily fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MalwareFamily.class); + } + + /** + * Convert an instance of MalwareFamily to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/ModelInterpretation.java b/src/main/java/ai/reveng/model/ModelInterpretation.java index fcf0fddd..8a9355fa 100644 --- a/src/main/java/ai/reveng/model/ModelInterpretation.java +++ b/src/main/java/ai/reveng/model/ModelInterpretation.java @@ -64,7 +64,7 @@ public ModelInterpretation interpretation(@javax.annotation.Nullable String inte } /** - * Search is applied to string value + * Get interpretation * @return interpretation */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/AnalysisStringsResponse.java b/src/main/java/ai/reveng/model/OperationCostBody.java similarity index 64% rename from src/main/java/ai/reveng/model/AnalysisStringsResponse.java rename to src/main/java/ai/reveng/model/OperationCostBody.java index c7d5db82..cbe4516c 100644 --- a/src/main/java/ai/reveng/model/AnalysisStringsResponse.java +++ b/src/main/java/ai/reveng/model/OperationCostBody.java @@ -13,16 +13,13 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.StringFunctions; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,66 +45,82 @@ import ai.reveng.invoker.JSON; /** - * AnalysisStringsResponse + * OperationCostBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AnalysisStringsResponse { - public static final String SERIALIZED_NAME_STRINGS = "strings"; - @SerializedName(SERIALIZED_NAME_STRINGS) +public class OperationCostBody { + public static final String SERIALIZED_NAME_BASE_CREDITS = "base_credits"; + @SerializedName(SERIALIZED_NAME_BASE_CREDITS) + @javax.annotation.Nonnull + private Double baseCredits; + + public static final String SERIALIZED_NAME_CREDITS_PER_FUNCTION = "credits_per_function"; + @SerializedName(SERIALIZED_NAME_CREDITS_PER_FUNCTION) @javax.annotation.Nonnull - private List strings = new ArrayList<>(); + private Double creditsPerFunction; - public static final String SERIALIZED_NAME_TOTAL_STRINGS = "total_strings"; - @SerializedName(SERIALIZED_NAME_TOTAL_STRINGS) + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) @javax.annotation.Nonnull - private Integer totalStrings; + private String operation; - public AnalysisStringsResponse() { + public OperationCostBody() { } - public AnalysisStringsResponse strings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public OperationCostBody baseCredits(@javax.annotation.Nonnull Double baseCredits) { + this.baseCredits = baseCredits; return this; } - public AnalysisStringsResponse addStringsItem(StringFunctions stringsItem) { - if (this.strings == null) { - this.strings = new ArrayList<>(); - } - this.strings.add(stringsItem); + /** + * Credits the operation is estimated to use regardless of the binary's size + * @return baseCredits + */ + @javax.annotation.Nonnull + public Double getBaseCredits() { + return baseCredits; + } + + public void setBaseCredits(@javax.annotation.Nonnull Double baseCredits) { + this.baseCredits = baseCredits; + } + + + public OperationCostBody creditsPerFunction(@javax.annotation.Nonnull Double creditsPerFunction) { + this.creditsPerFunction = creditsPerFunction; return this; } /** - * The strings associated with the analysis - * @return strings + * Credits the operation is estimated to use per function in the binary + * @return creditsPerFunction */ @javax.annotation.Nonnull - public List getStrings() { - return strings; + public Double getCreditsPerFunction() { + return creditsPerFunction; } - public void setStrings(@javax.annotation.Nonnull List strings) { - this.strings = strings; + public void setCreditsPerFunction(@javax.annotation.Nonnull Double creditsPerFunction) { + this.creditsPerFunction = creditsPerFunction; } - public AnalysisStringsResponse totalStrings(@javax.annotation.Nonnull Integer totalStrings) { - this.totalStrings = totalStrings; + public OperationCostBody operation(@javax.annotation.Nonnull String operation) { + this.operation = operation; return this; } /** - * The total number of strings associated with this analysis - * @return totalStrings + * The operation, as requested when creating an analysis, or binary-analysis for the analysis itself + * @return operation */ @javax.annotation.Nonnull - public Integer getTotalStrings() { - return totalStrings; + public String getOperation() { + return operation; } - public void setTotalStrings(@javax.annotation.Nonnull Integer totalStrings) { - this.totalStrings = totalStrings; + public void setOperation(@javax.annotation.Nonnull String operation) { + this.operation = operation; } /** @@ -123,9 +136,9 @@ public void setTotalStrings(@javax.annotation.Nonnull Integer totalStrings) { * * @param key name of the property * @param value value of the property - * @return the AnalysisStringsResponse instance itself + * @return the OperationCostBody instance itself */ - public AnalysisStringsResponse putAdditionalProperty(String key, Object value) { + public OperationCostBody putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -164,23 +177,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AnalysisStringsResponse analysisStringsResponse = (AnalysisStringsResponse) o; - return Objects.equals(this.strings, analysisStringsResponse.strings) && - Objects.equals(this.totalStrings, analysisStringsResponse.totalStrings)&& - Objects.equals(this.additionalProperties, analysisStringsResponse.additionalProperties); + OperationCostBody operationCostBody = (OperationCostBody) o; + return Objects.equals(this.baseCredits, operationCostBody.baseCredits) && + Objects.equals(this.creditsPerFunction, operationCostBody.creditsPerFunction) && + Objects.equals(this.operation, operationCostBody.operation)&& + Objects.equals(this.additionalProperties, operationCostBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(strings, totalStrings, additionalProperties); + return Objects.hash(baseCredits, creditsPerFunction, operation, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnalysisStringsResponse {\n"); - sb.append(" strings: ").append(toIndentedString(strings)).append("\n"); - sb.append(" totalStrings: ").append(toIndentedString(totalStrings)).append("\n"); + sb.append("class OperationCostBody {\n"); + sb.append(" baseCredits: ").append(toIndentedString(baseCredits)).append("\n"); + sb.append(" creditsPerFunction: ").append(toIndentedString(creditsPerFunction)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -200,41 +215,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("strings", "total_strings")); + openapiFields = new HashSet(Arrays.asList("base_credits", "credits_per_function", "operation")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("strings", "total_strings")); + openapiRequiredFields = new HashSet(Arrays.asList("base_credits", "credits_per_function", "operation")); } /** * 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 AnalysisStringsResponse + * @throws IOException if the JSON Element is invalid with respect to OperationCostBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AnalysisStringsResponse.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 AnalysisStringsResponse is not found in the empty JSON string", AnalysisStringsResponse.openapiRequiredFields.toString())); + if (!OperationCostBody.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 OperationCostBody is not found in the empty JSON string", OperationCostBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnalysisStringsResponse.openapiRequiredFields) { + for (String requiredField : OperationCostBody.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("strings") != null) { - if (!jsonObj.get("strings").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `strings` to be an array in the JSON string but got `%s`", jsonObj.get("strings").toString())); - } - JsonArray jsonArraystrings = jsonObj.getAsJsonArray("strings"); - // validate the required field `strings` (array) - for (int i = 0; i < jsonArraystrings.size(); i++) { - StringFunctions.validateJsonElement(jsonArraystrings.get(i)); - } + if (!jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); } } @@ -242,16 +250,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnalysisStringsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnalysisStringsResponse' and its subtypes + if (!OperationCostBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OperationCostBody' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AnalysisStringsResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OperationCostBody.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AnalysisStringsResponse value) throws IOException { + public void write(JsonWriter out, OperationCostBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -279,12 +287,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AnalysisStringsResponse read(JsonReader in) throws IOException { + public OperationCostBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AnalysisStringsResponse instance = thisAdapter.fromJsonTree(jsonObj); + OperationCostBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -311,18 +319,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AnalysisStringsResponse given an JSON string + * Create an instance of OperationCostBody given an JSON string * * @param jsonString JSON string - * @return An instance of AnalysisStringsResponse - * @throws IOException if the JSON string is invalid with respect to AnalysisStringsResponse + * @return An instance of OperationCostBody + * @throws IOException if the JSON string is invalid with respect to OperationCostBody */ - public static AnalysisStringsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnalysisStringsResponse.class); + public static OperationCostBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OperationCostBody.class); } /** - * Convert an instance of AnalysisStringsResponse to an JSON string + * Convert an instance of OperationCostBody to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/Organisation.java b/src/main/java/ai/reveng/model/Organisation.java index 0324b3b9..048aac74 100644 --- a/src/main/java/ai/reveng/model/Organisation.java +++ b/src/main/java/ai/reveng/model/Organisation.java @@ -98,7 +98,7 @@ public Organisation name(@javax.annotation.Nullable String name) { } /** - * Search is applied to string value + * Get name * @return name */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/OrganisationGroup.java b/src/main/java/ai/reveng/model/OrganisationGroup.java index 1d01dc8d..4105716b 100644 --- a/src/main/java/ai/reveng/model/OrganisationGroup.java +++ b/src/main/java/ai/reveng/model/OrganisationGroup.java @@ -108,7 +108,7 @@ public OrganisationGroup name(@javax.annotation.Nullable String name) { } /** - * Search is applied to string value + * Get name * @return name */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/OrganisationIssuer.java b/src/main/java/ai/reveng/model/OrganisationIssuer.java index 343b170e..a59b5d36 100644 --- a/src/main/java/ai/reveng/model/OrganisationIssuer.java +++ b/src/main/java/ai/reveng/model/OrganisationIssuer.java @@ -156,7 +156,7 @@ public OrganisationIssuer issuerUrl(@javax.annotation.Nullable String issuerUrl) } /** - * Search is applied to string value + * Get issuerUrl * @return issuerUrl */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/StringFunctions.java b/src/main/java/ai/reveng/model/RecordedFeedback.java similarity index 60% rename from src/main/java/ai/reveng/model/StringFunctions.java rename to src/main/java/ai/reveng/model/RecordedFeedback.java index 37c2809a..6a64cf3f 100644 --- a/src/main/java/ai/reveng/model/StringFunctions.java +++ b/src/main/java/ai/reveng/model/RecordedFeedback.java @@ -13,17 +13,15 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.AppApiRestV2FunctionsResponsesFunction; -import ai.reveng.model.StringSource; 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 java.util.HashMap; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -49,90 +47,122 @@ import ai.reveng.invoker.JSON; /** - * This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. + * RecordedFeedback */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StringFunctions { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) +public class RecordedFeedback { + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) @javax.annotation.Nonnull - private String value; + private Map metadata = new HashMap<>(); - public static final String SERIALIZED_NAME_FUNCTIONS = "functions"; - @SerializedName(SERIALIZED_NAME_FUNCTIONS) - @javax.annotation.Nonnull - private List functions = new ArrayList<>(); + /** + * The sentiment the caller recorded, or null when they have not left any + */ + @JsonAdapter(SentimentEnum.Adapter.class) + public enum SentimentEnum { + POSITIVE("POSITIVE"), + + NEUTRAL("NEUTRAL"), + + NEGATIVE("NEGATIVE"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + SentimentEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - @javax.annotation.Nullable - private StringSource source = StringSource.SYSTEM; + public String getValue() { + return value; + } - public StringFunctions() { - } + @Override + public String toString() { + return String.valueOf(value); + } - public StringFunctions value(@javax.annotation.Nonnull String value) { - this.value = value; - return this; - } + public static SentimentEnum fromValue(String value) { + for (SentimentEnum b : SentimentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - /** - * The value of the string literal - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SentimentEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SentimentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SentimentEnum.fromValue(value); + } + } - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SentimentEnum.fromValue(value); + } } + public static final String SERIALIZED_NAME_SENTIMENT = "sentiment"; + @SerializedName(SERIALIZED_NAME_SENTIMENT) + @javax.annotation.Nullable + private SentimentEnum sentiment; + + public RecordedFeedback() { + } - public StringFunctions functions(@javax.annotation.Nonnull List functions) { - this.functions = functions; + public RecordedFeedback metadata(@javax.annotation.Nonnull Map metadata) { + this.metadata = metadata; return this; } - public StringFunctions addFunctionsItem(AppApiRestV2FunctionsResponsesFunction functionsItem) { - if (this.functions == null) { - this.functions = new ArrayList<>(); + public RecordedFeedback putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); } - this.functions.add(functionsItem); + this.metadata.put(key, metadataItem); return this; } /** - * The function ids the string literal was found within - * @return functions + * The context recorded with the feedback, or null when there is none + * @return metadata */ @javax.annotation.Nonnull - public List getFunctions() { - return functions; + public Map getMetadata() { + return metadata; } - public void setFunctions(@javax.annotation.Nonnull List functions) { - this.functions = functions; + public void setMetadata(@javax.annotation.Nonnull Map metadata) { + this.metadata = metadata; } - public StringFunctions source(@javax.annotation.Nullable StringSource source) { - this.source = source; + public RecordedFeedback sentiment(@javax.annotation.Nullable SentimentEnum sentiment) { + this.sentiment = sentiment; return this; } /** - * The source of the string - * @return source + * The sentiment the caller recorded, or null when they have not left any + * @return sentiment */ @javax.annotation.Nullable - public StringSource getSource() { - return source; + public SentimentEnum getSentiment() { + return sentiment; } - public void setSource(@javax.annotation.Nullable StringSource source) { - this.source = source; + public void setSentiment(@javax.annotation.Nullable SentimentEnum sentiment) { + this.sentiment = sentiment; } /** @@ -148,9 +178,9 @@ public void setSource(@javax.annotation.Nullable StringSource source) { * * @param key name of the property * @param value value of the property - * @return the StringFunctions instance itself + * @return the RecordedFeedback instance itself */ - public StringFunctions putAdditionalProperty(String key, Object value) { + public RecordedFeedback putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -189,25 +219,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StringFunctions stringFunctions = (StringFunctions) o; - return Objects.equals(this.value, stringFunctions.value) && - Objects.equals(this.functions, stringFunctions.functions) && - Objects.equals(this.source, stringFunctions.source)&& - Objects.equals(this.additionalProperties, stringFunctions.additionalProperties); + RecordedFeedback recordedFeedback = (RecordedFeedback) o; + return Objects.equals(this.metadata, recordedFeedback.metadata) && + Objects.equals(this.sentiment, recordedFeedback.sentiment)&& + Objects.equals(this.additionalProperties, recordedFeedback.additionalProperties); } @Override public int hashCode() { - return Objects.hash(value, functions, source, additionalProperties); + return Objects.hash(metadata, sentiment, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StringFunctions {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" functions: ").append(toIndentedString(functions)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("class RecordedFeedback {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" sentiment: ").append(toIndentedString(sentiment)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -227,48 +255,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("value", "functions", "source")); + openapiFields = new HashSet(Arrays.asList("metadata", "sentiment")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("value", "functions")); + openapiRequiredFields = new HashSet(Arrays.asList("metadata", "sentiment")); } /** * 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 StringFunctions + * @throws IOException if the JSON Element is invalid with respect to RecordedFeedback */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!StringFunctions.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 StringFunctions is not found in the empty JSON string", StringFunctions.openapiRequiredFields.toString())); + if (!RecordedFeedback.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 RecordedFeedback is not found in the empty JSON string", RecordedFeedback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StringFunctions.openapiRequiredFields) { + for (String requiredField : RecordedFeedback.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("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - if (jsonObj.get("functions") != null) { - if (!jsonObj.get("functions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `functions` to be an array in the JSON string but got `%s`", jsonObj.get("functions").toString())); - } - JsonArray jsonArrayfunctions = jsonObj.getAsJsonArray("functions"); - // validate the required field `functions` (array) - for (int i = 0; i < jsonArrayfunctions.size(); i++) { - AppApiRestV2FunctionsResponsesFunction.validateJsonElement(jsonArrayfunctions.get(i)); - } + if ((jsonObj.get("sentiment") != null && !jsonObj.get("sentiment").isJsonNull()) && !jsonObj.get("sentiment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sentiment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sentiment").toString())); } - // validate the optional field `source` - if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { - StringSource.validateJsonElement(jsonObj.get("source")); + if (jsonObj.get("sentiment") != null && !jsonObj.get("sentiment").isJsonNull()) { + // validate the required field `sentiment` + SentimentEnum.validateJsonElement(jsonObj.get("sentiment")); } } @@ -276,16 +294,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!StringFunctions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StringFunctions' and its subtypes + if (!RecordedFeedback.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecordedFeedback' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StringFunctions.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RecordedFeedback.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, StringFunctions value) throws IOException { + public void write(JsonWriter out, RecordedFeedback value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -313,12 +331,12 @@ else if (entry.getValue() instanceof Character) } @Override - public StringFunctions read(JsonReader in) throws IOException { + public RecordedFeedback read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - StringFunctions instance = thisAdapter.fromJsonTree(jsonObj); + RecordedFeedback instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -345,18 +363,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of StringFunctions given an JSON string + * Create an instance of RecordedFeedback given an JSON string * * @param jsonString JSON string - * @return An instance of StringFunctions - * @throws IOException if the JSON string is invalid with respect to StringFunctions + * @return An instance of RecordedFeedback + * @throws IOException if the JSON string is invalid with respect to RecordedFeedback */ - public static StringFunctions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StringFunctions.class); + public static RecordedFeedback fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecordedFeedback.class); } /** - * Convert an instance of StringFunctions to an JSON string + * Convert an instance of RecordedFeedback to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/RenderedToken.java b/src/main/java/ai/reveng/model/RenderedToken.java index 0ea9495a..568547c5 100644 --- a/src/main/java/ai/reveng/model/RenderedToken.java +++ b/src/main/java/ai/reveng/model/RenderedToken.java @@ -54,6 +54,11 @@ public class RenderedToken { @javax.annotation.Nullable private Long dataTypeId; + public static final String SERIALIZED_NAME_ENUM_VALUE = "enum_value"; + @SerializedName(SERIALIZED_NAME_ENUM_VALUE) + @javax.annotation.Nullable + private String enumValue; + public static final String SERIALIZED_NAME_FUNCTION_ID = "function_id"; @SerializedName(SERIALIZED_NAME_FUNCTION_ID) @javax.annotation.Nullable @@ -175,6 +180,25 @@ public void setDataTypeId(@javax.annotation.Nullable Long dataTypeId) { } + public RenderedToken enumValue(@javax.annotation.Nullable String enumValue) { + this.enumValue = enumValue; + return this; + } + + /** + * Integer value of an enum the decompiler recovered a name for. Absent for an unnamed enum, which already renders as its value. + * @return enumValue + */ + @javax.annotation.Nullable + public String getEnumValue() { + return enumValue; + } + + public void setEnumValue(@javax.annotation.Nullable String enumValue) { + this.enumValue = enumValue; + } + + public RenderedToken functionId(@javax.annotation.Nullable Long functionId) { this.functionId = functionId; return this; @@ -325,6 +349,7 @@ public boolean equals(Object o) { } RenderedToken renderedToken = (RenderedToken) o; return Objects.equals(this.dataTypeId, renderedToken.dataTypeId) && + Objects.equals(this.enumValue, renderedToken.enumValue) && Objects.equals(this.functionId, renderedToken.functionId) && Objects.equals(this.importedFunctionId, renderedToken.importedFunctionId) && Objects.equals(this.kind, renderedToken.kind) && @@ -335,7 +360,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(dataTypeId, functionId, importedFunctionId, kind, vaddr, value, additionalProperties); + return Objects.hash(dataTypeId, enumValue, functionId, importedFunctionId, kind, vaddr, value, additionalProperties); } @Override @@ -343,6 +368,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RenderedToken {\n"); sb.append(" dataTypeId: ").append(toIndentedString(dataTypeId)).append("\n"); + sb.append(" enumValue: ").append(toIndentedString(enumValue)).append("\n"); sb.append(" functionId: ").append(toIndentedString(functionId)).append("\n"); sb.append(" importedFunctionId: ").append(toIndentedString(importedFunctionId)).append("\n"); sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); @@ -367,7 +393,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("data_type_id", "function_id", "imported_function_id", "kind", "vaddr", "value")); + openapiFields = new HashSet(Arrays.asList("data_type_id", "enum_value", "function_id", "imported_function_id", "kind", "vaddr", "value")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("kind", "value")); @@ -393,6 +419,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("enum_value") != null && !jsonObj.get("enum_value").isJsonNull()) && !jsonObj.get("enum_value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `enum_value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enum_value").toString())); + } if (!jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } diff --git a/src/main/java/ai/reveng/model/ResolvedEntity.java b/src/main/java/ai/reveng/model/ResolvedEntity.java index 44f4d03b..72f64314 100644 --- a/src/main/java/ai/reveng/model/ResolvedEntity.java +++ b/src/main/java/ai/reveng/model/ResolvedEntity.java @@ -512,7 +512,7 @@ public ResolvedEntity kind(@javax.annotation.Nullable String kind) { } /** - * Search is applied to string value + * Get kind * @return kind */ @javax.annotation.Nullable @@ -531,7 +531,7 @@ public ResolvedEntity name(@javax.annotation.Nullable String name) { } /** - * Search is applied to string value + * Get name * @return name */ @javax.annotation.Nullable @@ -588,7 +588,7 @@ public ResolvedEntity provenance(@javax.annotation.Nullable String provenance) { } /** - * Search is applied to string value + * Get provenance * @return provenance */ @javax.annotation.Nullable @@ -626,7 +626,7 @@ public ResolvedEntity suggestedName(@javax.annotation.Nullable String suggestedN } /** - * Search is applied to string value + * Get suggestedName * @return suggestedName */ @javax.annotation.Nullable @@ -683,7 +683,7 @@ public ResolvedEntity token(@javax.annotation.Nullable String token) { } /** - * Search is applied to string value + * Get token * @return token */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/FunctionString.java b/src/main/java/ai/reveng/model/SizeBucketBody.java similarity index 69% rename from src/main/java/ai/reveng/model/FunctionString.java rename to src/main/java/ai/reveng/model/SizeBucketBody.java index fadcd761..a57e2a9c 100644 --- a/src/main/java/ai/reveng/model/FunctionString.java +++ b/src/main/java/ai/reveng/model/SizeBucketBody.java @@ -13,7 +13,6 @@ package ai.reveng.model; import java.util.Objects; -import ai.reveng.model.StringSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,82 +45,82 @@ import ai.reveng.invoker.JSON; /** - * FunctionString + * SizeBucketBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FunctionString { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nonnull - private String value; +public class SizeBucketBody { + public static final String SERIALIZED_NAME_BELOW_BYTES = "below_bytes"; + @SerializedName(SERIALIZED_NAME_BELOW_BYTES) + @javax.annotation.Nullable + private Long belowBytes; - public static final String SERIALIZED_NAME_VADDR = "vaddr"; - @SerializedName(SERIALIZED_NAME_VADDR) + public static final String SERIALIZED_NAME_FUNCTIONS = "functions"; + @SerializedName(SERIALIZED_NAME_FUNCTIONS) @javax.annotation.Nonnull - private Integer vaddr; + private Long functions; - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - @javax.annotation.Nullable - private StringSource source = StringSource.SYSTEM; + public static final String SERIALIZED_NAME_UNCERTAIN = "uncertain"; + @SerializedName(SERIALIZED_NAME_UNCERTAIN) + @javax.annotation.Nonnull + private Boolean uncertain; - public FunctionString() { + public SizeBucketBody() { } - public FunctionString value(@javax.annotation.Nonnull String value) { - this.value = value; + public SizeBucketBody belowBytes(@javax.annotation.Nullable Long belowBytes) { + this.belowBytes = belowBytes; return this; } /** - * The value of the string literal - * @return value + * Exclusive upper bound of the bucket, in bytes. Null for the last bucket, which has no upper bound. + * @return belowBytes */ - @javax.annotation.Nonnull - public String getValue() { - return value; + @javax.annotation.Nullable + public Long getBelowBytes() { + return belowBytes; } - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; + public void setBelowBytes(@javax.annotation.Nullable Long belowBytes) { + this.belowBytes = belowBytes; } - public FunctionString vaddr(@javax.annotation.Nonnull Integer vaddr) { - this.vaddr = vaddr; + public SizeBucketBody functions(@javax.annotation.Nonnull Long functions) { + this.functions = functions; return this; } /** - * The vaddr of the string value - * @return vaddr + * Functions a binary this size is estimated to have + * @return functions */ @javax.annotation.Nonnull - public Integer getVaddr() { - return vaddr; + public Long getFunctions() { + return functions; } - public void setVaddr(@javax.annotation.Nonnull Integer vaddr) { - this.vaddr = vaddr; + public void setFunctions(@javax.annotation.Nonnull Long functions) { + this.functions = functions; } - public FunctionString source(@javax.annotation.Nullable StringSource source) { - this.source = source; + public SizeBucketBody uncertain(@javax.annotation.Nonnull Boolean uncertain) { + this.uncertain = uncertain; return this; } /** - * The source of the string - * @return source + * True where too few operations have run on binaries this size for the estimate to be reliable + * @return uncertain */ - @javax.annotation.Nullable - public StringSource getSource() { - return source; + @javax.annotation.Nonnull + public Boolean getUncertain() { + return uncertain; } - public void setSource(@javax.annotation.Nullable StringSource source) { - this.source = source; + public void setUncertain(@javax.annotation.Nonnull Boolean uncertain) { + this.uncertain = uncertain; } /** @@ -137,9 +136,9 @@ public void setSource(@javax.annotation.Nullable StringSource source) { * * @param key name of the property * @param value value of the property - * @return the FunctionString instance itself + * @return the SizeBucketBody instance itself */ - public FunctionString putAdditionalProperty(String key, Object value) { + public SizeBucketBody putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,25 +177,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FunctionString functionString = (FunctionString) o; - return Objects.equals(this.value, functionString.value) && - Objects.equals(this.vaddr, functionString.vaddr) && - Objects.equals(this.source, functionString.source)&& - Objects.equals(this.additionalProperties, functionString.additionalProperties); + SizeBucketBody sizeBucketBody = (SizeBucketBody) o; + return Objects.equals(this.belowBytes, sizeBucketBody.belowBytes) && + Objects.equals(this.functions, sizeBucketBody.functions) && + Objects.equals(this.uncertain, sizeBucketBody.uncertain)&& + Objects.equals(this.additionalProperties, sizeBucketBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(value, vaddr, source, additionalProperties); + return Objects.hash(belowBytes, functions, uncertain, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FunctionString {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" vaddr: ").append(toIndentedString(vaddr)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("class SizeBucketBody {\n"); + sb.append(" belowBytes: ").append(toIndentedString(belowBytes)).append("\n"); + sb.append(" functions: ").append(toIndentedString(functions)).append("\n"); + sb.append(" uncertain: ").append(toIndentedString(uncertain)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -216,55 +215,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("value", "vaddr", "source")); + openapiFields = new HashSet(Arrays.asList("below_bytes", "functions", "uncertain")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("value", "vaddr")); + openapiRequiredFields = new HashSet(Arrays.asList("below_bytes", "functions", "uncertain")); } /** * 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 FunctionString + * @throws IOException if the JSON Element is invalid with respect to SizeBucketBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!FunctionString.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 FunctionString is not found in the empty JSON string", FunctionString.openapiRequiredFields.toString())); + if (!SizeBucketBody.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 SizeBucketBody is not found in the empty JSON string", SizeBucketBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FunctionString.openapiRequiredFields) { + for (String requiredField : SizeBucketBody.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("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - // validate the optional field `source` - if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { - StringSource.validateJsonElement(jsonObj.get("source")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!FunctionString.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FunctionString' and its subtypes + if (!SizeBucketBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SizeBucketBody' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FunctionString.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SizeBucketBody.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, FunctionString value) throws IOException { + public void write(JsonWriter out, SizeBucketBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -292,12 +284,12 @@ else if (entry.getValue() instanceof Character) } @Override - public FunctionString read(JsonReader in) throws IOException { + public SizeBucketBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - FunctionString instance = thisAdapter.fromJsonTree(jsonObj); + SizeBucketBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -324,18 +316,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of FunctionString given an JSON string + * Create an instance of SizeBucketBody given an JSON string * * @param jsonString JSON string - * @return An instance of FunctionString - * @throws IOException if the JSON string is invalid with respect to FunctionString + * @return An instance of SizeBucketBody + * @throws IOException if the JSON string is invalid with respect to SizeBucketBody */ - public static FunctionString fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FunctionString.class); + public static SizeBucketBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SizeBucketBody.class); } /** - * Convert an instance of FunctionString to an JSON string + * Convert an instance of SizeBucketBody to an JSON string * * @return JSON string */ diff --git a/src/main/java/ai/reveng/model/Status.java b/src/main/java/ai/reveng/model/Status.java index b6ece2d1..de17548d 100644 --- a/src/main/java/ai/reveng/model/Status.java +++ b/src/main/java/ai/reveng/model/Status.java @@ -136,6 +136,8 @@ public enum CodeEnum { PRECONDITION_FAILED("PRECONDITION_FAILED"), + REAUTH_REQUIRED("REAUTH_REQUIRED"), + REPORT_RENDER_FAILED("REPORT_RENDER_FAILED"), REQUEST_ENTITY_TOO_LARGE("REQUEST_ENTITY_TOO_LARGE"), diff --git a/src/main/java/ai/reveng/model/StringSource.java b/src/main/java/ai/reveng/model/StringSource.java deleted file mode 100644 index 432b9e4c..00000000 --- a/src/main/java/ai/reveng/model/StringSource.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets StringSource - */ -@JsonAdapter(StringSource.Adapter.class) -public enum StringSource { - - SYSTEM("SYSTEM"), - - USER("USER"), - - AI_AGENT("AI_AGENT"), - - UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); - - private String value; - - StringSource(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StringSource fromValue(String value) { - for (StringSource b : StringSource.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_DEFAULT_OPEN_API; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StringSource enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StringSource read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StringSource.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StringSource.fromValue(value); - } -} - diff --git a/src/main/java/ai/reveng/model/Team.java b/src/main/java/ai/reveng/model/Team.java index 3462a914..c5a28bf3 100644 --- a/src/main/java/ai/reveng/model/Team.java +++ b/src/main/java/ai/reveng/model/Team.java @@ -193,7 +193,7 @@ public Team teamName(@javax.annotation.Nullable String teamName) { } /** - * Search is applied to string value + * Get teamName * @return teamName */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/TeamMember.java b/src/main/java/ai/reveng/model/TeamMember.java index a103cf24..d9c84532 100644 --- a/src/main/java/ai/reveng/model/TeamMember.java +++ b/src/main/java/ai/reveng/model/TeamMember.java @@ -141,7 +141,7 @@ public TeamMember email(@javax.annotation.Nullable String email) { } /** - * Search is applied to string value + * Get email * @return email */ @javax.annotation.Nullable @@ -217,7 +217,7 @@ public TeamMember username(@javax.annotation.Nullable String username) { } /** - * Search is applied to string value + * Get username * @return username */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/ToolCallResultData.java b/src/main/java/ai/reveng/model/ToolCallResultData.java index 5ec4f38b..c3872e52 100644 --- a/src/main/java/ai/reveng/model/ToolCallResultData.java +++ b/src/main/java/ai/reveng/model/ToolCallResultData.java @@ -53,6 +53,16 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ToolCallResultData { + public static final String SERIALIZED_NAME_BINARY_NAME = "binary_name"; + @SerializedName(SERIALIZED_NAME_BINARY_NAME) + @javax.annotation.Nullable + private String binaryName; + + public static final String SERIALIZED_NAME_FUNCTION_NAME = "function_name"; + @SerializedName(SERIALIZED_NAME_FUNCTION_NAME) + @javax.annotation.Nullable + private String functionName; + public static final String SERIALIZED_NAME_IS_ERROR = "is_error"; @SerializedName(SERIALIZED_NAME_IS_ERROR) @javax.annotation.Nullable @@ -81,6 +91,44 @@ public class ToolCallResultData { public ToolCallResultData() { } + public ToolCallResultData binaryName(@javax.annotation.Nullable String binaryName) { + this.binaryName = binaryName; + return this; + } + + /** + * Get binaryName + * @return binaryName + */ + @javax.annotation.Nullable + public String getBinaryName() { + return binaryName; + } + + public void setBinaryName(@javax.annotation.Nullable String binaryName) { + this.binaryName = binaryName; + } + + + public ToolCallResultData functionName(@javax.annotation.Nullable String functionName) { + this.functionName = functionName; + return this; + } + + /** + * Get functionName + * @return functionName + */ + @javax.annotation.Nullable + public String getFunctionName() { + return functionName; + } + + public void setFunctionName(@javax.annotation.Nullable String functionName) { + this.functionName = functionName; + } + + public ToolCallResultData isError(@javax.annotation.Nullable Boolean isError) { this.isError = isError; return this; @@ -238,7 +286,9 @@ public boolean equals(Object o) { return false; } ToolCallResultData toolCallResultData = (ToolCallResultData) o; - return Objects.equals(this.isError, toolCallResultData.isError) && + return Objects.equals(this.binaryName, toolCallResultData.binaryName) && + Objects.equals(this.functionName, toolCallResultData.functionName) && + Objects.equals(this.isError, toolCallResultData.isError) && Objects.equals(this.result, toolCallResultData.result) && Objects.equals(this.toolCallId, toolCallResultData.toolCallId) && Objects.equals(this.toolName, toolCallResultData.toolName) && @@ -252,7 +302,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(isError, result, toolCallId, toolName, updated, additionalProperties); + return Objects.hash(binaryName, functionName, isError, result, toolCallId, toolName, updated, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -266,6 +316,8 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ToolCallResultData {\n"); + sb.append(" binaryName: ").append(toIndentedString(binaryName)).append("\n"); + sb.append(" functionName: ").append(toIndentedString(functionName)).append("\n"); sb.append(" isError: ").append(toIndentedString(isError)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); sb.append(" toolCallId: ").append(toIndentedString(toolCallId)).append("\n"); @@ -290,7 +342,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("is_error", "result", "tool_call_id", "tool_name", "updated")); + openapiFields = new HashSet(Arrays.asList("binary_name", "function_name", "is_error", "result", "tool_call_id", "tool_name", "updated")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -309,6 +361,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("binary_name") != null && !jsonObj.get("binary_name").isJsonNull()) && !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") != null && !jsonObj.get("function_name").isJsonNull()) && !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("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } diff --git a/src/main/java/ai/reveng/model/TriageFunction.java b/src/main/java/ai/reveng/model/TriageFunction.java index c8a7f6f9..586e09a5 100644 --- a/src/main/java/ai/reveng/model/TriageFunction.java +++ b/src/main/java/ai/reveng/model/TriageFunction.java @@ -13,6 +13,7 @@ package ai.reveng.model; import java.util.Objects; +import ai.reveng.model.CapabilityImplementation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +23,7 @@ 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; @@ -61,6 +63,11 @@ public class TriageFunction { @javax.annotation.Nullable private List capabilities; + public static final String SERIALIZED_NAME_CAPABILITY_IMPLEMENTATIONS = "capability_implementations"; + @SerializedName(SERIALIZED_NAME_CAPABILITY_IMPLEMENTATIONS) + @javax.annotation.Nullable + private List capabilityImplementations; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @javax.annotation.Nonnull @@ -125,6 +132,33 @@ public void setCapabilities(@javax.annotation.Nullable List capabilities } + public TriageFunction capabilityImplementations(@javax.annotation.Nullable List capabilityImplementations) { + this.capabilityImplementations = capabilityImplementations; + return this; + } + + public TriageFunction addCapabilityImplementationsItem(CapabilityImplementation capabilityImplementationsItem) { + if (this.capabilityImplementations == null) { + this.capabilityImplementations = new ArrayList<>(); + } + this.capabilityImplementations.add(capabilityImplementationsItem); + return this; + } + + /** + * How the function implements each assigned capability. Absent when the run did not record any. + * @return capabilityImplementations + */ + @javax.annotation.Nullable + public List getCapabilityImplementations() { + return capabilityImplementations; + } + + public void setCapabilityImplementations(@javax.annotation.Nullable List capabilityImplementations) { + this.capabilityImplementations = capabilityImplementations; + } + + public TriageFunction id(@javax.annotation.Nonnull Long id) { this.id = id; return this; @@ -238,15 +272,27 @@ public boolean equals(Object o) { TriageFunction triageFunction = (TriageFunction) o; return Objects.equals(this.address, triageFunction.address) && Objects.equals(this.capabilities, triageFunction.capabilities) && + Objects.equals(this.capabilityImplementations, triageFunction.capabilityImplementations) && Objects.equals(this.id, triageFunction.id) && Objects.equals(this.score, triageFunction.score) && Objects.equals(this.summary, triageFunction.summary)&& Objects.equals(this.additionalProperties, triageFunction.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(address, capabilities, id, score, summary, additionalProperties); + return Objects.hash(address, capabilities, capabilityImplementations, id, score, summary, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -255,6 +301,7 @@ public String toString() { sb.append("class TriageFunction {\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" capabilities: ").append(toIndentedString(capabilities)).append("\n"); + sb.append(" capabilityImplementations: ").append(toIndentedString(capabilityImplementations)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" score: ").append(toIndentedString(score)).append("\n"); sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); @@ -277,7 +324,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("address", "capabilities", "id", "score", "summary")); + openapiFields = new HashSet(Arrays.asList("address", "capabilities", "capability_implementations", "id", "score", "summary")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("address", "capabilities", "id", "score", "summary")); @@ -309,6 +356,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } else if (!jsonObj.get("capabilities").isJsonArray() && !jsonObj.get("capabilities").isJsonNull()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `capabilities` to be an array in the JSON string but got `%s`", jsonObj.get("capabilities").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("capability_implementations") != null && !jsonObj.get("capability_implementations").isJsonNull() && !jsonObj.get("capability_implementations").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `capability_implementations` to be an array in the JSON string but got `%s`", jsonObj.get("capability_implementations").toString())); + } if (!jsonObj.get("summary").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); } diff --git a/src/main/java/ai/reveng/model/UpdateProfileInputBody.java b/src/main/java/ai/reveng/model/UpdateProfileInputBody.java index 6cb6cbd4..f1526681 100644 --- a/src/main/java/ai/reveng/model/UpdateProfileInputBody.java +++ b/src/main/java/ai/reveng/model/UpdateProfileInputBody.java @@ -49,6 +49,65 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateProfileInputBody { + /** + * Agent chat layout: floating over the page, or fixed below it + */ + @JsonAdapter(AgentChatLayoutEnum.Adapter.class) + public enum AgentChatLayoutEnum { + FLOATING("floating"), + + FIXED("fixed"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + AgentChatLayoutEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AgentChatLayoutEnum fromValue(String value) { + for (AgentChatLayoutEnum b : AgentChatLayoutEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AgentChatLayoutEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AgentChatLayoutEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AgentChatLayoutEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AgentChatLayoutEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AGENT_CHAT_LAYOUT = "agent_chat_layout"; + @SerializedName(SERIALIZED_NAME_AGENT_CHAT_LAYOUT) + @javax.annotation.Nullable + private AgentChatLayoutEnum agentChatLayout; + public static final String SERIALIZED_NAME_DEFAULT_TEAM_ID = "default_team_id"; @SerializedName(SERIALIZED_NAME_DEFAULT_TEAM_ID) @javax.annotation.Nullable @@ -87,6 +146,25 @@ public class UpdateProfileInputBody { public UpdateProfileInputBody() { } + public UpdateProfileInputBody agentChatLayout(@javax.annotation.Nullable AgentChatLayoutEnum agentChatLayout) { + this.agentChatLayout = agentChatLayout; + return this; + } + + /** + * Agent chat layout: floating over the page, or fixed below it + * @return agentChatLayout + */ + @javax.annotation.Nullable + public AgentChatLayoutEnum getAgentChatLayout() { + return agentChatLayout; + } + + public void setAgentChatLayout(@javax.annotation.Nullable AgentChatLayoutEnum agentChatLayout) { + this.agentChatLayout = agentChatLayout; + } + + public UpdateProfileInputBody defaultTeamId(@javax.annotation.Nullable Long defaultTeamId) { this.defaultTeamId = defaultTeamId; return this; @@ -275,7 +353,8 @@ public boolean equals(Object o) { return false; } UpdateProfileInputBody updateProfileInputBody = (UpdateProfileInputBody) o; - return Objects.equals(this.defaultTeamId, updateProfileInputBody.defaultTeamId) && + return Objects.equals(this.agentChatLayout, updateProfileInputBody.agentChatLayout) && + Objects.equals(this.defaultTeamId, updateProfileInputBody.defaultTeamId) && Objects.equals(this.firstName, updateProfileInputBody.firstName) && Objects.equals(this.hideAiDecompilationComments, updateProfileInputBody.hideAiDecompilationComments) && Objects.equals(this.hideExampleBinaries, updateProfileInputBody.hideExampleBinaries) && @@ -287,13 +366,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(defaultTeamId, firstName, hideAiDecompilationComments, hideExampleBinaries, lastName, timeZone, username, additionalProperties); + return Objects.hash(agentChatLayout, defaultTeamId, firstName, hideAiDecompilationComments, hideExampleBinaries, lastName, timeZone, username, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateProfileInputBody {\n"); + sb.append(" agentChatLayout: ").append(toIndentedString(agentChatLayout)).append("\n"); sb.append(" defaultTeamId: ").append(toIndentedString(defaultTeamId)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" hideAiDecompilationComments: ").append(toIndentedString(hideAiDecompilationComments)).append("\n"); @@ -320,7 +400,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", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); + openapiFields = new HashSet(Arrays.asList("agent_chat_layout", "default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -339,6 +419,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("agent_chat_layout") != null && !jsonObj.get("agent_chat_layout").isJsonNull()) && !jsonObj.get("agent_chat_layout").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agent_chat_layout` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agent_chat_layout").toString())); + } + // validate the optional field `agent_chat_layout` + if (jsonObj.get("agent_chat_layout") != null && !jsonObj.get("agent_chat_layout").isJsonNull()) { + AgentChatLayoutEnum.validateJsonElement(jsonObj.get("agent_chat_layout")); + } if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); } diff --git a/src/main/java/ai/reveng/model/UserIdentity.java b/src/main/java/ai/reveng/model/UserIdentity.java index 40e1bc92..bd44ad04 100644 --- a/src/main/java/ai/reveng/model/UserIdentity.java +++ b/src/main/java/ai/reveng/model/UserIdentity.java @@ -108,7 +108,7 @@ public UserIdentity issuerUrl(@javax.annotation.Nullable String issuerUrl) { } /** - * Search is applied to string value + * Get issuerUrl * @return issuerUrl */ @javax.annotation.Nullable @@ -127,7 +127,7 @@ public UserIdentity subject(@javax.annotation.Nullable String subject) { } /** - * Search is applied to string value + * Get subject * @return subject */ @javax.annotation.Nullable diff --git a/src/main/java/ai/reveng/model/UserProfile.java b/src/main/java/ai/reveng/model/UserProfile.java index 5b18e6ef..6e3d9015 100644 --- a/src/main/java/ai/reveng/model/UserProfile.java +++ b/src/main/java/ai/reveng/model/UserProfile.java @@ -49,6 +49,65 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UserProfile { + /** + * Gets or Sets agentChatLayout + */ + @JsonAdapter(AgentChatLayoutEnum.Adapter.class) + public enum AgentChatLayoutEnum { + FLOATING("floating"), + + FIXED("fixed"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + AgentChatLayoutEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AgentChatLayoutEnum fromValue(String value) { + for (AgentChatLayoutEnum b : AgentChatLayoutEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AgentChatLayoutEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AgentChatLayoutEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AgentChatLayoutEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AgentChatLayoutEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AGENT_CHAT_LAYOUT = "agent_chat_layout"; + @SerializedName(SERIALIZED_NAME_AGENT_CHAT_LAYOUT) + @javax.annotation.Nonnull + private AgentChatLayoutEnum agentChatLayout; + public static final String SERIALIZED_NAME_DEFAULT_TEAM_ID = "default_team_id"; @SerializedName(SERIALIZED_NAME_DEFAULT_TEAM_ID) @javax.annotation.Nullable @@ -87,6 +146,25 @@ public class UserProfile { public UserProfile() { } + public UserProfile agentChatLayout(@javax.annotation.Nonnull AgentChatLayoutEnum agentChatLayout) { + this.agentChatLayout = agentChatLayout; + return this; + } + + /** + * Get agentChatLayout + * @return agentChatLayout + */ + @javax.annotation.Nonnull + public AgentChatLayoutEnum getAgentChatLayout() { + return agentChatLayout; + } + + public void setAgentChatLayout(@javax.annotation.Nonnull AgentChatLayoutEnum agentChatLayout) { + this.agentChatLayout = agentChatLayout; + } + + public UserProfile defaultTeamId(@javax.annotation.Nullable Long defaultTeamId) { this.defaultTeamId = defaultTeamId; return this; @@ -274,7 +352,8 @@ public boolean equals(Object o) { return false; } UserProfile userProfile = (UserProfile) o; - return Objects.equals(this.defaultTeamId, userProfile.defaultTeamId) && + return Objects.equals(this.agentChatLayout, userProfile.agentChatLayout) && + Objects.equals(this.defaultTeamId, userProfile.defaultTeamId) && Objects.equals(this.firstName, userProfile.firstName) && Objects.equals(this.hideAiDecompilationComments, userProfile.hideAiDecompilationComments) && Objects.equals(this.hideExampleBinaries, userProfile.hideExampleBinaries) && @@ -286,13 +365,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(defaultTeamId, firstName, hideAiDecompilationComments, hideExampleBinaries, lastName, timeZone, username, additionalProperties); + return Objects.hash(agentChatLayout, defaultTeamId, firstName, hideAiDecompilationComments, hideExampleBinaries, lastName, timeZone, username, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserProfile {\n"); + sb.append(" agentChatLayout: ").append(toIndentedString(agentChatLayout)).append("\n"); sb.append(" defaultTeamId: ").append(toIndentedString(defaultTeamId)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" hideAiDecompilationComments: ").append(toIndentedString(hideAiDecompilationComments)).append("\n"); @@ -319,10 +399,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", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); + openapiFields = new HashSet(Arrays.asList("agent_chat_layout", "default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); + openapiRequiredFields = new HashSet(Arrays.asList("agent_chat_layout", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username")); } /** @@ -345,6 +425,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("agent_chat_layout").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agent_chat_layout` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agent_chat_layout").toString())); + } + // validate the required field `agent_chat_layout` + AgentChatLayoutEnum.validateJsonElement(jsonObj.get("agent_chat_layout")); if (!jsonObj.get("first_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); }