diff --git a/.sdk-version b/.sdk-version index 56008fb..cb6924e 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.24.0 +v4.46.0 diff --git a/README.md b/README.md index ed0e560..d51e1ff 100644 --- a/README.md +++ b/README.md @@ -42,26 +42,60 @@ All URIs are relative to *https://api.reveng.ai* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AgentApi* | [**check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get**](docs/AgentApi.md#check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities/status | Check the status of a capabilities analysis workflow +*AgentApi* | [**check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get**](docs/AgentApi.md#check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get) | **GET** /v2/analyses/{analysis_id}/agent/protocols/status | Check the status of a protocols discovery workflow *AgentApi* | [**check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get**](docs/AgentApi.md#check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get) | **GET** /v2/analyses/{analysis_id}/agent/remediation/status | Check the status of a remediation analysis workflow *AgentApi* | [**check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get**](docs/AgentApi.md#check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis/status | Check the status of a report analysis workflow +*AgentApi* | [**check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get**](docs/AgentApi.md#check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get) | **GET** /v2/analyses/{analysis_id}/agent/secrets/status | Check the status of a secrets discovery workflow *AgentApi* | [**check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get**](docs/AgentApi.md#check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get) | **GET** /v2/analyses/{analysis_id}/agent/triage/status | Check the status of a triage analysis workflow *AgentApi* | [**create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post**](docs/AgentApi.md#create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post) | **POST** /v2/analyses/{analysis_id}/agent/capabilities | Queues a capabilities analysis workflow process +*AgentApi* | [**create_protocols_task_v2_analyses_analysis_id_agent_protocols_post**](docs/AgentApi.md#create_protocols_task_v2_analyses_analysis_id_agent_protocols_post) | **POST** /v2/analyses/{analysis_id}/agent/protocols | Queues a protocols discovery workflow process *AgentApi* | [**create_remediation_task_v2_analyses_analysis_id_agent_remediation_post**](docs/AgentApi.md#create_remediation_task_v2_analyses_analysis_id_agent_remediation_post) | **POST** /v2/analyses/{analysis_id}/agent/remediation | Queues a remediation analysis workflow process *AgentApi* | [**create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post**](docs/AgentApi.md#create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post) | **POST** /v2/analyses/{analysis_id}/agent/report-analysis | Queues a combined report analysis workflow process +*AgentApi* | [**create_secrets_task_v2_analyses_analysis_id_agent_secrets_post**](docs/AgentApi.md#create_secrets_task_v2_analyses_analysis_id_agent_secrets_post) | **POST** /v2/analyses/{analysis_id}/agent/secrets | Queues a secrets discovery workflow process *AgentApi* | [**create_triage_task_v2_analyses_analysis_id_agent_triage_post**](docs/AgentApi.md#create_triage_task_v2_analyses_analysis_id_agent_triage_post) | **POST** /v2/analyses/{analysis_id}/agent/triage | Queues a triage analysis workflow process *AgentApi* | [**get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get**](docs/AgentApi.md#get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities | Get Capabilities Result +*AgentApi* | [**get_protocols_result_v2_analyses_analysis_id_agent_protocols_get**](docs/AgentApi.md#get_protocols_result_v2_analyses_analysis_id_agent_protocols_get) | **GET** /v2/analyses/{analysis_id}/agent/protocols | Get Protocols Result *AgentApi* | [**get_remediation_result_v2_analyses_analysis_id_agent_remediation_get**](docs/AgentApi.md#get_remediation_result_v2_analyses_analysis_id_agent_remediation_get) | **GET** /v2/analyses/{analysis_id}/agent/remediation | Get Remediation Result *AgentApi* | [**get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get**](docs/AgentApi.md#get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis | Get Report Analysis Result +*AgentApi* | [**get_secrets_result_v2_analyses_analysis_id_agent_secrets_get**](docs/AgentApi.md#get_secrets_result_v2_analyses_analysis_id_agent_secrets_get) | **GET** /v2/analyses/{analysis_id}/agent/secrets | Get Secrets Result *AgentApi* | [**get_triage_result_v2_analyses_analysis_id_agent_triage_get**](docs/AgentApi.md#get_triage_result_v2_analyses_analysis_id_agent_triage_get) | **GET** /v2/analyses/{analysis_id}/agent/triage | Get Triage Result *AgentApi* | [**v3_cancel_rename_unnamed_functions**](docs/AgentApi.md#v3_cancel_rename_unnamed_functions) | **POST** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions/cancel | Cancel the rename-unnamed-functions agent. *AgentApi* | [**v3_cancel_security_scan_operation**](docs/AgentApi.md#v3_cancel_security_scan_operation) | **POST** /v3/operations/security-scan/{analysis_id}:cancel | Cancel a security-scan operation. +*AgentApi* | [**v3_get_binary_agent_feedback**](docs/AgentApi.md#v3_get_binary_agent_feedback) | **GET** /v3/analyses/{analysis_id}/agents/{agent}/feedback | Get the caller's feedback on an agent's output. +*AgentApi* | [**v3_get_capabilities_operation**](docs/AgentApi.md#v3_get_capabilities_operation) | **GET** /v3/operations/capabilities/{analysis_id} | Get a capabilities operation. +*AgentApi* | [**v3_get_crypto_explain_operation**](docs/AgentApi.md#v3_get_crypto_explain_operation) | **GET** /v3/operations/crypto-explain/{function_id} | Get a crypto-explain operation. *AgentApi* | [**v3_get_crypto_scan_operation**](docs/AgentApi.md#v3_get_crypto_scan_operation) | **GET** /v3/operations/crypto-scan/{analysis_id} | Get a crypto-scan operation. +*AgentApi* | [**v3_get_execution_explain_operation**](docs/AgentApi.md#v3_get_execution_explain_operation) | **GET** /v3/operations/execution-explain/{function_id} | Get an execution-explain operation. +*AgentApi* | [**v3_get_execution_scan_operation**](docs/AgentApi.md#v3_get_execution_scan_operation) | **GET** /v3/operations/execution-scan/{analysis_id} | Get an execution-scan operation. +*AgentApi* | [**v3_get_filesystem_analyse_operation**](docs/AgentApi.md#v3_get_filesystem_analyse_operation) | **GET** /v3/operations/filesystem-analyse/{function_id} | Get a filesystem-analyse operation. +*AgentApi* | [**v3_get_filesystem_scan_operation**](docs/AgentApi.md#v3_get_filesystem_scan_operation) | **GET** /v3/operations/filesystem-scan/{analysis_id} | Get a filesystem-scan operation. +*AgentApi* | [**v3_get_networking_explain_operation**](docs/AgentApi.md#v3_get_networking_explain_operation) | **GET** /v3/operations/networking-explain/{function_id} | Get a networking-explain operation. +*AgentApi* | [**v3_get_networking_scan_operation**](docs/AgentApi.md#v3_get_networking_scan_operation) | **GET** /v3/operations/networking-scan/{analysis_id} | Get a networking-scan operation. +*AgentApi* | [**v3_get_protocols_operation**](docs/AgentApi.md#v3_get_protocols_operation) | **GET** /v3/operations/protocols/{analysis_id} | Get a protocols operation. +*AgentApi* | [**v3_get_remediation_operation**](docs/AgentApi.md#v3_get_remediation_operation) | **GET** /v3/operations/remediation/{analysis_id} | Get a remediation operation. *AgentApi* | [**v3_get_rename_unnamed_functions_result**](docs/AgentApi.md#v3_get_rename_unnamed_functions_result) | **GET** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions | Get rename-unnamed-functions agent result. *AgentApi* | [**v3_get_rename_unnamed_functions_status**](docs/AgentApi.md#v3_get_rename_unnamed_functions_status) | **GET** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions/status | Get rename-unnamed-functions agent status. +*AgentApi* | [**v3_get_report_analysis_operation**](docs/AgentApi.md#v3_get_report_analysis_operation) | **GET** /v3/operations/report-analysis/{analysis_id} | Get a report-analysis operation. +*AgentApi* | [**v3_get_secrets_operation**](docs/AgentApi.md#v3_get_secrets_operation) | **GET** /v3/operations/secrets/{analysis_id} | Get a secrets operation. *AgentApi* | [**v3_get_security_scan_operation**](docs/AgentApi.md#v3_get_security_scan_operation) | **GET** /v3/operations/security-scan/{analysis_id} | Get a security-scan operation. +*AgentApi* | [**v3_get_triage_operation**](docs/AgentApi.md#v3_get_triage_operation) | **GET** /v3/operations/triage/{analysis_id} | Get a triage operation. +*AgentApi* | [**v3_run_capabilities**](docs/AgentApi.md#v3_run_capabilities) | **POST** /v3/analyses/{analysis_id}/capabilities:run | Run the capabilities agent. +*AgentApi* | [**v3_run_crypto_explain**](docs/AgentApi.md#v3_run_crypto_explain) | **POST** /v3/functions/{function_id}/crypto-explain:run | Run the crypto-explain agent. *AgentApi* | [**v3_run_crypto_scan**](docs/AgentApi.md#v3_run_crypto_scan) | **POST** /v3/analyses/{analysis_id}/crypto-scan:run | Run the crypto-scan agent. +*AgentApi* | [**v3_run_execution_explain**](docs/AgentApi.md#v3_run_execution_explain) | **POST** /v3/functions/{function_id}/execution-explain:run | Run the execution-explain agent. +*AgentApi* | [**v3_run_execution_scan**](docs/AgentApi.md#v3_run_execution_scan) | **POST** /v3/analyses/{analysis_id}/execution-scan:run | Run the execution-scan agent. +*AgentApi* | [**v3_run_filesystem_analyse**](docs/AgentApi.md#v3_run_filesystem_analyse) | **POST** /v3/functions/{function_id}/filesystem-analyse:run | Run the filesystem-analyse agent. +*AgentApi* | [**v3_run_filesystem_scan**](docs/AgentApi.md#v3_run_filesystem_scan) | **POST** /v3/analyses/{analysis_id}/filesystem-scan:run | Run the filesystem-scan agent. +*AgentApi* | [**v3_run_networking_explain**](docs/AgentApi.md#v3_run_networking_explain) | **POST** /v3/functions/{function_id}/networking-explain:run | Run the networking-explain agent. +*AgentApi* | [**v3_run_networking_scan**](docs/AgentApi.md#v3_run_networking_scan) | **POST** /v3/analyses/{analysis_id}/networking-scan:run | Run the networking-scan agent. +*AgentApi* | [**v3_run_protocols**](docs/AgentApi.md#v3_run_protocols) | **POST** /v3/analyses/{analysis_id}/protocols:run | Run the protocols agent. +*AgentApi* | [**v3_run_remediation**](docs/AgentApi.md#v3_run_remediation) | **POST** /v3/analyses/{analysis_id}/remediation:run | Run the remediation agent. +*AgentApi* | [**v3_run_report_analysis**](docs/AgentApi.md#v3_run_report_analysis) | **POST** /v3/analyses/{analysis_id}/report-analysis:run | Run the report-analysis agent. +*AgentApi* | [**v3_run_secrets**](docs/AgentApi.md#v3_run_secrets) | **POST** /v3/analyses/{analysis_id}/secrets:run | Run the secrets agent. *AgentApi* | [**v3_run_security_scan**](docs/AgentApi.md#v3_run_security_scan) | **POST** /v3/analyses/{analysis_id}/security-scan:run | Run the security-scan agent. +*AgentApi* | [**v3_run_triage**](docs/AgentApi.md#v3_run_triage) | **POST** /v3/analyses/{analysis_id}/triage:run | Run the triage agent. *AgentApi* | [**v3_trigger_rename_unnamed_functions**](docs/AgentApi.md#v3_trigger_rename_unnamed_functions) | **POST** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions | Run the rename-unnamed-functions agent. +*AgentApi* | [**v3_upsert_binary_agent_feedback**](docs/AgentApi.md#v3_upsert_binary_agent_feedback) | **PUT** /v3/analyses/{analysis_id}/agents/{agent}/feedback | Record feedback on an agent's output. *AnalysesBulkActionsApi* | [**bulk_add_analysis_tags**](docs/AnalysesBulkActionsApi.md#bulk_add_analysis_tags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags *AnalysesBulkActionsApi* | [**bulk_delete_analyses**](docs/AnalysesBulkActionsApi.md#bulk_delete_analyses) | **PATCH** /v2/analyses/delete | Bulk Delete Analyses *AnalysesCommentsApi* | [**create_analysis_comment**](docs/AnalysesCommentsApi.md#create_analysis_comment) | **POST** /v2/analyses/{analysis_id}/comments | Create a comment for this analysis @@ -91,8 +125,10 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**update_analysis**](docs/AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**update_analysis_tags**](docs/AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreApi* | [**upload_file**](docs/AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File +*AnalysesCoreApi* | [**v3_create_analysis**](docs/AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis *AnalysesCoreApi* | [**v3_get_analysis_auto_unstrip_status**](docs/AnalysesCoreApi.md#v3_get_analysis_auto_unstrip_status) | **GET** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. *AnalysesCoreApi* | [**v3_get_analysis_logs**](docs/AnalysesCoreApi.md#v3_get_analysis_logs) | **GET** /v3/analyses/{analysis_id}/logs | Get the Analysis log +*AnalysesCoreApi* | [**v3_get_analysis_operation**](docs/AnalysesCoreApi.md#v3_get_analysis_operation) | **GET** /v3/operations/analyses/{analysis_id} | Get an Analysis-creation operation *AnalysesCoreApi* | [**v3_get_analysis_strings**](docs/AnalysesCoreApi.md#v3_get_analysis_strings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. *AnalysesCoreApi* | [**v3_get_analysis_strings_status**](docs/AnalysesCoreApi.md#v3_get_analysis_strings_status) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. *AnalysesCoreApi* | [**v3_list_analyses**](docs/AnalysesCoreApi.md#v3_list_analyses) | **GET** /v3/analyses | List analyses @@ -116,6 +152,7 @@ Class | Method | HTTP request | Description *BinariesApi* | [**get_binary_externals**](docs/BinariesApi.md#get_binary_externals) | **GET** /v2/binaries/{binary_id}/externals | Gets the external details of a binary *BinariesApi* | [**get_binary_related_status**](docs/BinariesApi.md#get_binary_related_status) | **GET** /v2/binaries/{binary_id}/related/status | Gets the status of the unpack binary task for a binary *BinariesApi* | [**get_related_binaries**](docs/BinariesApi.md#get_related_binaries) | **GET** /v2/binaries/{binary_id}/related | Gets the related binaries of a binary. +*BinariesApi* | [**v3_upload_file**](docs/BinariesApi.md#v3_upload_file) | **POST** /v3/upload | Upload a file. *CollectionsApi* | [**create_collection**](docs/CollectionsApi.md#create_collection) | **POST** /v2/collections | Creates new collection information *CollectionsApi* | [**delete_collection**](docs/CollectionsApi.md#delete_collection) | **DELETE** /v2/collections/{collection_id} | Deletes a collection *CollectionsApi* | [**get_collection**](docs/CollectionsApi.md#get_collection) | **GET** /v2/collections/{collection_id} | Returns a collection @@ -250,6 +287,7 @@ Class | Method | HTTP request | Description - [AnalysisRecord](docs/AnalysisRecord.md) - [AnalysisRecordBody](docs/AnalysisRecordBody.md) - [AnalysisReport](docs/AnalysisReport.md) + - [AnalysisRequirement](docs/AnalysisRequirement.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringFunction](docs/AnalysisStringFunction.md) - [AnalysisStringInput](docs/AnalysisStringInput.md) @@ -262,6 +300,7 @@ Class | Method | HTTP request | Description - [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md) - [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md) - [ApiCall](docs/ApiCall.md) + - [ApiCombinationEvidence](docs/ApiCombinationEvidence.md) - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) @@ -324,10 +363,12 @@ Class | Method | HTTP request | Description - [BaseResponseLogs](docs/BaseResponseLogs.md) - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) - [BaseResponseParams](docs/BaseResponseParams.md) + - [BaseResponseProtocolsAgentResponse](docs/BaseResponseProtocolsAgentResponse.md) - [BaseResponseQueuedWorkflowTaskResponse](docs/BaseResponseQueuedWorkflowTaskResponse.md) - [BaseResponseRecent](docs/BaseResponseRecent.md) - [BaseResponseRemediationAgentResponse](docs/BaseResponseRemediationAgentResponse.md) - [BaseResponseReportAnalysisResponse](docs/BaseResponseReportAnalysisResponse.md) + - [BaseResponseSecretsAgentResponse](docs/BaseResponseSecretsAgentResponse.md) - [BaseResponseStatus](docs/BaseResponseStatus.md) - [BaseResponseStr](docs/BaseResponseStr.md) - [BaseResponseTagSearchResponse](docs/BaseResponseTagSearchResponse.md) @@ -359,6 +400,9 @@ Class | Method | HTTP request | Description - [BulkCreateUserResult](docs/BulkCreateUserResult.md) - [BulkCreateUsersOutputBody](docs/BulkCreateUsersOutputBody.md) - [BulkDeleteAnalysesRequest](docs/BulkDeleteAnalysesRequest.md) + - [BytesConstant](docs/BytesConstant.md) + - [CallChain](docs/CallChain.md) + - [CallChainEvidence](docs/CallChainEvidence.md) - [CallEdge](docs/CallEdge.md) - [CallEdgesOutputBody](docs/CallEdgesOutputBody.md) - [CalleeFunctionInfo](docs/CalleeFunctionInfo.md) @@ -370,6 +414,8 @@ Class | Method | HTTP request | Description - [Capabilities](docs/Capabilities.md) - [CapabilitiesAgentResponse](docs/CapabilitiesAgentResponse.md) - [CapabilitiesOutputBody](docs/CapabilitiesOutputBody.md) + - [CapabilitiesResult](docs/CapabilitiesResult.md) + - [Capability](docs/Capability.md) - [CapabilityEntry](docs/CapabilityEntry.md) - [ChildBinariesResponse](docs/ChildBinariesResponse.md) - [CodeSignatureModel](docs/CodeSignatureModel.md) @@ -391,6 +437,7 @@ Class | Method | HTTP request | Description - [CommentResponse](docs/CommentResponse.md) - [CommentUpdateRequest](docs/CommentUpdateRequest.md) - [CommentsData](docs/CommentsData.md) + - [Config](docs/Config.md) - [ConfigResponse](docs/ConfigResponse.md) - [ConfirmToolInputBody](docs/ConfirmToolInputBody.md) - [Connection](docs/Connection.md) @@ -417,9 +464,12 @@ Class | Method | HTTP request | Description - [CreateGroupInputBody](docs/CreateGroupInputBody.md) - [CreateIdentityInputBody](docs/CreateIdentityInputBody.md) - [CreateIssuerInputBody](docs/CreateIssuerInputBody.md) + - [CreateMetadata](docs/CreateMetadata.md) - [CreateOrganisationInputBody](docs/CreateOrganisationInputBody.md) - [CreatePointerDataType](docs/CreatePointerDataType.md) - [CreatePortalSessionInputBody](docs/CreatePortalSessionInputBody.md) + - [CreateRequest](docs/CreateRequest.md) + - [CreateResult](docs/CreateResult.md) - [CreateStructDataType](docs/CreateStructDataType.md) - [CreateTeamInputBody](docs/CreateTeamInputBody.md) - [CreateTypedefDataType](docs/CreateTypedefDataType.md) @@ -429,6 +479,9 @@ Class | Method | HTTP request | Description - [Created](docs/Created.md) - [CryptoCall](docs/CryptoCall.md) - [CryptoDirectMatch](docs/CryptoDirectMatch.md) + - [CryptoExplainMetadata](docs/CryptoExplainMetadata.md) + - [CryptoExplainResult](docs/CryptoExplainResult.md) + - [CryptoExplainedFunction](docs/CryptoExplainedFunction.md) - [CryptoFinding](docs/CryptoFinding.md) - [CryptoScanMetadata](docs/CryptoScanMetadata.md) - [CryptoScanResult](docs/CryptoScanResult.md) @@ -442,8 +495,11 @@ Class | Method | HTTP request | Description - [DecompFinishedEvent](docs/DecompFinishedEvent.md) - [DecompilationCommentContext](docs/DecompilationCommentContext.md) - [DecompilationData](docs/DecompilationData.md) + - [DecompilerSummary](docs/DecompilerSummary.md) + - [DecompilerSummaryEvidence](docs/DecompilerSummaryEvidence.md) - [DieMatch](docs/DieMatch.md) - [DisassemblyOutputBody](docs/DisassemblyOutputBody.md) + - [Display](docs/Display.md) - [DnsQuery](docs/DnsQuery.md) - [DrakvufFileMetadata](docs/DrakvufFileMetadata.md) - [DynamicExecutionStatus](docs/DynamicExecutionStatus.md) @@ -456,6 +512,7 @@ Class | Method | HTTP request | Description - [ELFSegment](docs/ELFSegment.md) - [ELFSymbol](docs/ELFSymbol.md) - [ElfDynamicEntry](docs/ElfDynamicEntry.md) + - [Endianness](docs/Endianness.md) - [EntrypointModel](docs/EntrypointModel.md) - [EnumDataType](docs/EnumDataType.md) - [EnumDefinition](docs/EnumDefinition.md) @@ -490,17 +547,38 @@ Class | Method | HTTP request | Description - [EventTOOLCONFIRMATIONREQUIRED](docs/EventTOOLCONFIRMATIONREQUIRED.md) - [EventTypesSuggested](docs/EventTypesSuggested.md) - [EventWarning](docs/EventWarning.md) + - [EvidenceEffect](docs/EvidenceEffect.md) + - [EvidenceStrength](docs/EvidenceStrength.md) - [Example](docs/Example.md) + - [ExecutionCall](docs/ExecutionCall.md) + - [ExecutionDirectMatch](docs/ExecutionDirectMatch.md) + - [ExecutionExplainMetadata](docs/ExecutionExplainMetadata.md) + - [ExecutionExplainResult](docs/ExecutionExplainResult.md) + - [ExecutionExplainedFunction](docs/ExecutionExplainedFunction.md) + - [ExecutionFinding](docs/ExecutionFinding.md) + - [ExecutionScanMetadata](docs/ExecutionScanMetadata.md) + - [ExecutionScanResult](docs/ExecutionScanResult.md) - [ExportModel](docs/ExportModel.md) - [ExternalResponse](docs/ExternalResponse.md) - [ExtractedBinary](docs/ExtractedBinary.md) - [ExtractedURL](docs/ExtractedURL.md) - [ExtractionFailure](docs/ExtractionFailure.md) + - [FeedbackOutputBody](docs/FeedbackOutputBody.md) - [FileActivityEntry](docs/FileActivityEntry.md) - [FileFormat](docs/FileFormat.md) - [FileHashes](docs/FileHashes.md) - [FileMetadata](docs/FileMetadata.md) + - [FilesystemAnalyseMetadata](docs/FilesystemAnalyseMetadata.md) + - [FilesystemAnalyseResult](docs/FilesystemAnalyseResult.md) + - [FilesystemCall](docs/FilesystemCall.md) + - [FilesystemDirectMatch](docs/FilesystemDirectMatch.md) + - [FilesystemExplainedFunction](docs/FilesystemExplainedFunction.md) + - [FilesystemFinding](docs/FilesystemFinding.md) + - [FilesystemScanMetadata](docs/FilesystemScanMetadata.md) + - [FilesystemScanResult](docs/FilesystemScanResult.md) - [Filters](docs/Filters.md) + - [Finding](docs/Finding.md) + - [FindingEvidenceInner](docs/FindingEvidenceInner.md) - [FormFile](docs/FormFile.md) - [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md) - [FunctionBlockResponse](docs/FunctionBlockResponse.md) @@ -523,6 +601,8 @@ Class | Method | HTTP request | Description - [FunctionSignatureBody](docs/FunctionSignatureBody.md) - [FunctionSignatureEntry](docs/FunctionSignatureEntry.md) - [FunctionSignatureVersion](docs/FunctionSignatureVersion.md) + - [FunctionSimilarity](docs/FunctionSimilarity.md) + - [FunctionSimilarityEvidence](docs/FunctionSimilarityEvidence.md) - [FunctionSourceType](docs/FunctionSourceType.md) - [FunctionString](docs/FunctionString.md) - [FunctionStringItem](docs/FunctionStringItem.md) @@ -545,6 +625,7 @@ Class | Method | HTTP request | Description - [GetPublicUserResponse](docs/GetPublicUserResponse.md) - [GetSubscriptionOutputBody](docs/GetSubscriptionOutputBody.md) - [GetTokensResponse](docs/GetTokensResponse.md) + - [HardcodedSecretEvidence](docs/HardcodedSecretEvidence.md) - [HistoryActor](docs/HistoryActor.md) - [HistoryEntry](docs/HistoryEntry.md) - [HttpRequest](docs/HttpRequest.md) @@ -552,6 +633,9 @@ Class | Method | HTTP request | Description - [ISA](docs/ISA.md) - [IconModel](docs/IconModel.md) - [ImportModel](docs/ImportModel.md) + - [ImportedApi](docs/ImportedApi.md) + - [ImportedApiCall](docs/ImportedApiCall.md) + - [ImportedApiCallEvidence](docs/ImportedApiCallEvidence.md) - [ImportedFunctionCallerEntry](docs/ImportedFunctionCallerEntry.md) - [ImportedFunctionDetailOutputBody](docs/ImportedFunctionDetailOutputBody.md) - [ImportedFunctionEntry](docs/ImportedFunctionEntry.md) @@ -562,6 +646,7 @@ Class | Method | HTTP request | Description - [InsertAnalysisLogRequest](docs/InsertAnalysisLogRequest.md) - [InviteUserInputBody](docs/InviteUserInputBody.md) - [IssuerAllowedDomain](docs/IssuerAllowedDomain.md) + - [KnownConstantEvidence](docs/KnownConstantEvidence.md) - [LineAttributionsData](docs/LineAttributionsData.md) - [ListAnalysesOutputBody](docs/ListAnalysesOutputBody.md) - [ListAnalysisDataTypesOutputBody](docs/ListAnalysisDataTypesOutputBody.md) @@ -584,7 +669,11 @@ Class | Method | HTTP request | Description - [MatchedFunction](docs/MatchedFunction.md) - [MemdumpEntry](docs/MemdumpEntry.md) - [MessageBody](docs/MessageBody.md) + - [Meta](docs/Meta.md) - [MetaModel](docs/MetaModel.md) + - [Metadata](docs/Metadata.md) + - [ModelInterpretation](docs/ModelInterpretation.md) + - [ModelInterpretationEvidence](docs/ModelInterpretationEvidence.md) - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) - [ModuleLoadEntry](docs/ModuleLoadEntry.md) @@ -593,8 +682,29 @@ Class | Method | HTTP request | Description - [NameSourceType](docs/NameSourceType.md) - [NamesFinishedEvent](docs/NamesFinishedEvent.md) - [NetworkActivity](docs/NetworkActivity.md) + - [NetworkingCall](docs/NetworkingCall.md) + - [NetworkingDirectMatch](docs/NetworkingDirectMatch.md) + - [NetworkingExplainMetadata](docs/NetworkingExplainMetadata.md) + - [NetworkingExplainResult](docs/NetworkingExplainResult.md) + - [NetworkingExplainedFunction](docs/NetworkingExplainedFunction.md) + - [NetworkingFinding](docs/NetworkingFinding.md) + - [NetworkingScanMetadata](docs/NetworkingScanMetadata.md) + - [NetworkingScanResult](docs/NetworkingScanResult.md) - [OIDCCallbackInputBody](docs/OIDCCallbackInputBody.md) + - [OperationCreateMetadataCreateResult](docs/OperationCreateMetadataCreateResult.md) + - [OperationCryptoExplainMetadataCryptoExplainResult](docs/OperationCryptoExplainMetadataCryptoExplainResult.md) - [OperationCryptoScanMetadataCryptoScanResult](docs/OperationCryptoScanMetadataCryptoScanResult.md) + - [OperationExecutionExplainMetadataExecutionExplainResult](docs/OperationExecutionExplainMetadataExecutionExplainResult.md) + - [OperationExecutionScanMetadataExecutionScanResult](docs/OperationExecutionScanMetadataExecutionScanResult.md) + - [OperationFilesystemAnalyseMetadataFilesystemAnalyseResult](docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md) + - [OperationFilesystemScanMetadataFilesystemScanResult](docs/OperationFilesystemScanMetadataFilesystemScanResult.md) + - [OperationMetadataCapabilitiesResult](docs/OperationMetadataCapabilitiesResult.md) + - [OperationMetadataRemediationResult](docs/OperationMetadataRemediationResult.md) + - [OperationMetadataReportResult](docs/OperationMetadataReportResult.md) + - [OperationMetadataThreatReportResult](docs/OperationMetadataThreatReportResult.md) + - [OperationMetadataTriageResult](docs/OperationMetadataTriageResult.md) + - [OperationNetworkingExplainMetadataNetworkingExplainResult](docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md) + - [OperationNetworkingScanMetadataNetworkingScanResult](docs/OperationNetworkingScanMetadataNetworkingScanResult.md) - [OperationSecurityScanMetadataSecurityScanResult](docs/OperationSecurityScanMetadataSecurityScanResult.md) - [OperationWorkflowProgressResultBody](docs/OperationWorkflowProgressResultBody.md) - [Order](docs/Order.md) @@ -629,16 +739,20 @@ Class | Method | HTTP request | Description - [ProductSummary](docs/ProductSummary.md) - [ProgressMessage](docs/ProgressMessage.md) - [ProseEvent](docs/ProseEvent.md) + - [ProtocolsAgentResponse](docs/ProtocolsAgentResponse.md) - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) + - [ReferencedConstant](docs/ReferencedConstant.md) + - [ReferencedConstantEvidence](docs/ReferencedConstantEvidence.md) - [RefreshBody](docs/RefreshBody.md) - [RegenerateOutputBody](docs/RegenerateOutputBody.md) - [RegisterUserInputBody](docs/RegisterUserInputBody.md) - [RegistryOperation](docs/RegistryOperation.md) - [RelativeBinaryResponse](docs/RelativeBinaryResponse.md) - [RemediationAgentResponse](docs/RemediationAgentResponse.md) + - [RemediationResult](docs/RemediationResult.md) - [RemoveCollectionBinariesInputBody](docs/RemoveCollectionBinariesInputBody.md) - [RenameAppliedEvent](docs/RenameAppliedEvent.md) - [RenameInputBody](docs/RenameInputBody.md) @@ -649,16 +763,21 @@ Class | Method | HTTP request | Description - [ReportEvent](docs/ReportEvent.md) - [ReportInfo](docs/ReportInfo.md) - [ReportOptions](docs/ReportOptions.md) + - [ReportReachabilityStatus](docs/ReportReachabilityStatus.md) + - [ReportResult](docs/ReportResult.md) - [ResolvedEntity](docs/ResolvedEntity.md) - [ResultBody](docs/ResultBody.md) - [RevokeBody](docs/RevokeBody.md) + - [RuleKind](docs/RuleKind.md) - [SSOProvider](docs/SSOProvider.md) - [SSOProvidersOutputBody](docs/SSOProvidersOutputBody.md) + - [SandboxConfig](docs/SandboxConfig.md) - [SandboxOptions](docs/SandboxOptions.md) - [SandboxStartMethod](docs/SandboxStartMethod.md) - [SandboxTimeout](docs/SandboxTimeout.md) - [ScheduledTaskEntry](docs/ScheduledTaskEntry.md) - [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md) + - [SecretsAgentResponse](docs/SecretsAgentResponse.md) - [SectionModel](docs/SectionModel.md) - [SecurityFinding](docs/SecurityFinding.md) - [SecurityModel](docs/SecurityModel.md) @@ -711,11 +830,19 @@ Class | Method | HTTP request | Description - [StringSource](docs/StringSource.md) - [StructDataType](docs/StructDataType.md) - [StructDefinition](docs/StructDefinition.md) + - [Subject](docs/Subject.md) + - [SubjectAnyOf](docs/SubjectAnyOf.md) + - [SubjectAnyOf1](docs/SubjectAnyOf1.md) + - [SubjectAnyOf2](docs/SubjectAnyOf2.md) + - [SubjectAnyOf3](docs/SubjectAnyOf3.md) + - [SubmitFeedbackInputBody](docs/SubmitFeedbackInputBody.md) - [SubmitUserFeedbackRequest](docs/SubmitUserFeedbackRequest.md) - [SuggestedHole](docs/SuggestedHole.md) - [SuggestedMemberView](docs/SuggestedMemberView.md) - [SuggestedTypeView](docs/SuggestedTypeView.md) - [SummaryData](docs/SummaryData.md) + - [SuspiciousString](docs/SuspiciousString.md) + - [SuspiciousStringEvidence](docs/SuspiciousStringEvidence.md) - [Symbols](docs/Symbols.md) - [Tag](docs/Tag.md) - [TagItem](docs/TagItem.md) @@ -728,15 +855,25 @@ Class | Method | HTTP request | Description - [TcpCarvedFile](docs/TcpCarvedFile.md) - [Team](docs/Team.md) - [TeamMember](docs/TeamMember.md) + - [Technique](docs/Technique.md) + - [ThreatReportResult](docs/ThreatReportResult.md) - [TimestampModel](docs/TimestampModel.md) - [Token](docs/Token.md) - [TokenInputBody](docs/TokenInputBody.md) - [TokenResponse](docs/TokenResponse.md) - [TokenisedData](docs/TokenisedData.md) + - [TriageFunction](docs/TriageFunction.md) - [TriageFunctionResponse](docs/TriageFunctionResponse.md) - [TriageReportResponse](docs/TriageReportResponse.md) + - [TriageResult](docs/TriageResult.md) - [TriggerCryptoScanInputBody](docs/TriggerCryptoScanInputBody.md) - [TriggerDynamicExecutionInputBody](docs/TriggerDynamicExecutionInputBody.md) + - [TriggerExecutionExplainInputBody](docs/TriggerExecutionExplainInputBody.md) + - [TriggerExecutionScanInputBody](docs/TriggerExecutionScanInputBody.md) + - [TriggerFilesystemAnalyseInputBody](docs/TriggerFilesystemAnalyseInputBody.md) + - [TriggerFilesystemScanInputBody](docs/TriggerFilesystemScanInputBody.md) + - [TriggerNetworkingExplainInputBody](docs/TriggerNetworkingExplainInputBody.md) + - [TriggerNetworkingScanInputBody](docs/TriggerNetworkingScanInputBody.md) - [TriggerRenameUnnamedFunctionsInputBody](docs/TriggerRenameUnnamedFunctionsInputBody.md) - [TriggerSecurityScanInputBody](docs/TriggerSecurityScanInputBody.md) - [Ttp](docs/Ttp.md) @@ -770,6 +907,7 @@ Class | Method | HTTP request | Description - [UpdateUserPasswordInputBody](docs/UpdateUserPasswordInputBody.md) - [UpgradeAnalysisModelOutputBody](docs/UpgradeAnalysisModelOutputBody.md) - [UploadFileType](docs/UploadFileType.md) + - [UploadOutputBody](docs/UploadOutputBody.md) - [UploadResponse](docs/UploadResponse.md) - [UpsertAiDecomplationRatingRequest](docs/UpsertAiDecomplationRatingRequest.md) - [UpsertOverridesData](docs/UpsertOverridesData.md) diff --git a/docs/AgentApi.md b/docs/AgentApi.md index 35d00ae..137bf66 100644 --- a/docs/AgentApi.md +++ b/docs/AgentApi.md @@ -5,26 +5,60 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- [**check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get**](AgentApi.md#check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities/status | Check the status of a capabilities analysis workflow +[**check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get**](AgentApi.md#check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get) | **GET** /v2/analyses/{analysis_id}/agent/protocols/status | Check the status of a protocols discovery workflow [**check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get**](AgentApi.md#check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get) | **GET** /v2/analyses/{analysis_id}/agent/remediation/status | Check the status of a remediation analysis workflow [**check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get**](AgentApi.md#check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis/status | Check the status of a report analysis workflow +[**check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get**](AgentApi.md#check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get) | **GET** /v2/analyses/{analysis_id}/agent/secrets/status | Check the status of a secrets discovery workflow [**check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get**](AgentApi.md#check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get) | **GET** /v2/analyses/{analysis_id}/agent/triage/status | Check the status of a triage analysis workflow [**create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post**](AgentApi.md#create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post) | **POST** /v2/analyses/{analysis_id}/agent/capabilities | Queues a capabilities analysis workflow process +[**create_protocols_task_v2_analyses_analysis_id_agent_protocols_post**](AgentApi.md#create_protocols_task_v2_analyses_analysis_id_agent_protocols_post) | **POST** /v2/analyses/{analysis_id}/agent/protocols | Queues a protocols discovery workflow process [**create_remediation_task_v2_analyses_analysis_id_agent_remediation_post**](AgentApi.md#create_remediation_task_v2_analyses_analysis_id_agent_remediation_post) | **POST** /v2/analyses/{analysis_id}/agent/remediation | Queues a remediation analysis workflow process [**create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post**](AgentApi.md#create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post) | **POST** /v2/analyses/{analysis_id}/agent/report-analysis | Queues a combined report analysis workflow process +[**create_secrets_task_v2_analyses_analysis_id_agent_secrets_post**](AgentApi.md#create_secrets_task_v2_analyses_analysis_id_agent_secrets_post) | **POST** /v2/analyses/{analysis_id}/agent/secrets | Queues a secrets discovery workflow process [**create_triage_task_v2_analyses_analysis_id_agent_triage_post**](AgentApi.md#create_triage_task_v2_analyses_analysis_id_agent_triage_post) | **POST** /v2/analyses/{analysis_id}/agent/triage | Queues a triage analysis workflow process [**get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get**](AgentApi.md#get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities | Get Capabilities Result +[**get_protocols_result_v2_analyses_analysis_id_agent_protocols_get**](AgentApi.md#get_protocols_result_v2_analyses_analysis_id_agent_protocols_get) | **GET** /v2/analyses/{analysis_id}/agent/protocols | Get Protocols Result [**get_remediation_result_v2_analyses_analysis_id_agent_remediation_get**](AgentApi.md#get_remediation_result_v2_analyses_analysis_id_agent_remediation_get) | **GET** /v2/analyses/{analysis_id}/agent/remediation | Get Remediation Result [**get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get**](AgentApi.md#get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis | Get Report Analysis Result +[**get_secrets_result_v2_analyses_analysis_id_agent_secrets_get**](AgentApi.md#get_secrets_result_v2_analyses_analysis_id_agent_secrets_get) | **GET** /v2/analyses/{analysis_id}/agent/secrets | Get Secrets Result [**get_triage_result_v2_analyses_analysis_id_agent_triage_get**](AgentApi.md#get_triage_result_v2_analyses_analysis_id_agent_triage_get) | **GET** /v2/analyses/{analysis_id}/agent/triage | Get Triage Result [**v3_cancel_rename_unnamed_functions**](AgentApi.md#v3_cancel_rename_unnamed_functions) | **POST** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions/cancel | Cancel the rename-unnamed-functions agent. [**v3_cancel_security_scan_operation**](AgentApi.md#v3_cancel_security_scan_operation) | **POST** /v3/operations/security-scan/{analysis_id}:cancel | Cancel a security-scan operation. +[**v3_get_binary_agent_feedback**](AgentApi.md#v3_get_binary_agent_feedback) | **GET** /v3/analyses/{analysis_id}/agents/{agent}/feedback | Get the caller's feedback on an agent's output. +[**v3_get_capabilities_operation**](AgentApi.md#v3_get_capabilities_operation) | **GET** /v3/operations/capabilities/{analysis_id} | Get a capabilities operation. +[**v3_get_crypto_explain_operation**](AgentApi.md#v3_get_crypto_explain_operation) | **GET** /v3/operations/crypto-explain/{function_id} | Get a crypto-explain operation. [**v3_get_crypto_scan_operation**](AgentApi.md#v3_get_crypto_scan_operation) | **GET** /v3/operations/crypto-scan/{analysis_id} | Get a crypto-scan operation. +[**v3_get_execution_explain_operation**](AgentApi.md#v3_get_execution_explain_operation) | **GET** /v3/operations/execution-explain/{function_id} | Get an execution-explain operation. +[**v3_get_execution_scan_operation**](AgentApi.md#v3_get_execution_scan_operation) | **GET** /v3/operations/execution-scan/{analysis_id} | Get an execution-scan operation. +[**v3_get_filesystem_analyse_operation**](AgentApi.md#v3_get_filesystem_analyse_operation) | **GET** /v3/operations/filesystem-analyse/{function_id} | Get a filesystem-analyse operation. +[**v3_get_filesystem_scan_operation**](AgentApi.md#v3_get_filesystem_scan_operation) | **GET** /v3/operations/filesystem-scan/{analysis_id} | Get a filesystem-scan operation. +[**v3_get_networking_explain_operation**](AgentApi.md#v3_get_networking_explain_operation) | **GET** /v3/operations/networking-explain/{function_id} | Get a networking-explain operation. +[**v3_get_networking_scan_operation**](AgentApi.md#v3_get_networking_scan_operation) | **GET** /v3/operations/networking-scan/{analysis_id} | Get a networking-scan operation. +[**v3_get_protocols_operation**](AgentApi.md#v3_get_protocols_operation) | **GET** /v3/operations/protocols/{analysis_id} | Get a protocols operation. +[**v3_get_remediation_operation**](AgentApi.md#v3_get_remediation_operation) | **GET** /v3/operations/remediation/{analysis_id} | Get a remediation operation. [**v3_get_rename_unnamed_functions_result**](AgentApi.md#v3_get_rename_unnamed_functions_result) | **GET** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions | Get rename-unnamed-functions agent result. [**v3_get_rename_unnamed_functions_status**](AgentApi.md#v3_get_rename_unnamed_functions_status) | **GET** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions/status | Get rename-unnamed-functions agent status. +[**v3_get_report_analysis_operation**](AgentApi.md#v3_get_report_analysis_operation) | **GET** /v3/operations/report-analysis/{analysis_id} | Get a report-analysis operation. +[**v3_get_secrets_operation**](AgentApi.md#v3_get_secrets_operation) | **GET** /v3/operations/secrets/{analysis_id} | Get a secrets operation. [**v3_get_security_scan_operation**](AgentApi.md#v3_get_security_scan_operation) | **GET** /v3/operations/security-scan/{analysis_id} | Get a security-scan operation. +[**v3_get_triage_operation**](AgentApi.md#v3_get_triage_operation) | **GET** /v3/operations/triage/{analysis_id} | Get a triage operation. +[**v3_run_capabilities**](AgentApi.md#v3_run_capabilities) | **POST** /v3/analyses/{analysis_id}/capabilities:run | Run the capabilities agent. +[**v3_run_crypto_explain**](AgentApi.md#v3_run_crypto_explain) | **POST** /v3/functions/{function_id}/crypto-explain:run | Run the crypto-explain agent. [**v3_run_crypto_scan**](AgentApi.md#v3_run_crypto_scan) | **POST** /v3/analyses/{analysis_id}/crypto-scan:run | Run the crypto-scan agent. +[**v3_run_execution_explain**](AgentApi.md#v3_run_execution_explain) | **POST** /v3/functions/{function_id}/execution-explain:run | Run the execution-explain agent. +[**v3_run_execution_scan**](AgentApi.md#v3_run_execution_scan) | **POST** /v3/analyses/{analysis_id}/execution-scan:run | Run the execution-scan agent. +[**v3_run_filesystem_analyse**](AgentApi.md#v3_run_filesystem_analyse) | **POST** /v3/functions/{function_id}/filesystem-analyse:run | Run the filesystem-analyse agent. +[**v3_run_filesystem_scan**](AgentApi.md#v3_run_filesystem_scan) | **POST** /v3/analyses/{analysis_id}/filesystem-scan:run | Run the filesystem-scan agent. +[**v3_run_networking_explain**](AgentApi.md#v3_run_networking_explain) | **POST** /v3/functions/{function_id}/networking-explain:run | Run the networking-explain agent. +[**v3_run_networking_scan**](AgentApi.md#v3_run_networking_scan) | **POST** /v3/analyses/{analysis_id}/networking-scan:run | Run the networking-scan agent. +[**v3_run_protocols**](AgentApi.md#v3_run_protocols) | **POST** /v3/analyses/{analysis_id}/protocols:run | Run the protocols agent. +[**v3_run_remediation**](AgentApi.md#v3_run_remediation) | **POST** /v3/analyses/{analysis_id}/remediation:run | Run the remediation agent. +[**v3_run_report_analysis**](AgentApi.md#v3_run_report_analysis) | **POST** /v3/analyses/{analysis_id}/report-analysis:run | Run the report-analysis agent. +[**v3_run_secrets**](AgentApi.md#v3_run_secrets) | **POST** /v3/analyses/{analysis_id}/secrets:run | Run the secrets agent. [**v3_run_security_scan**](AgentApi.md#v3_run_security_scan) | **POST** /v3/analyses/{analysis_id}/security-scan:run | Run the security-scan agent. +[**v3_run_triage**](AgentApi.md#v3_run_triage) | **POST** /v3/analyses/{analysis_id}/triage:run | Run the triage agent. [**v3_trigger_rename_unnamed_functions**](AgentApi.md#v3_trigger_rename_unnamed_functions) | **POST** /v3/analyses/{analysis_id}/agents/rename-unnamed-functions | Run the rename-unnamed-functions agent. +[**v3_upsert_binary_agent_feedback**](AgentApi.md#v3_upsert_binary_agent_feedback) | **PUT** /v3/analyses/{analysis_id}/agents/{agent}/feedback | Record feedback on an agent's output. # **check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get** @@ -82,6 +116,90 @@ with revengai.ApiClient(configuration) as api_client: +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**TaskStatusResponse**](TaskStatusResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get** +> TaskStatusResponse check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get(analysis_id) + +Check the status of a protocols discovery workflow + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.task_status_response import TaskStatusResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Check the status of a protocols discovery workflow + api_response = api_instance.check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get(analysis_id) + print("The response of AgentApi->check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get: %s\n" % e) +``` + + + ### Parameters @@ -250,6 +368,90 @@ with revengai.ApiClient(configuration) as api_client: +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**TaskStatusResponse**](TaskStatusResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get** +> TaskStatusResponse check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get(analysis_id) + +Check the status of a secrets discovery workflow + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.task_status_response import TaskStatusResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Check the status of a secrets discovery workflow + api_response = api_instance.check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get(analysis_id) + print("The response of AgentApi->check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get: %s\n" % e) +``` + + + ### Parameters @@ -418,6 +620,90 @@ with revengai.ApiClient(configuration) as api_client: +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseQueuedWorkflowTaskResponse**](BaseResponseQueuedWorkflowTaskResponse.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 | +|-------------|-------------|------------------| +**202** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_protocols_task_v2_analyses_analysis_id_agent_protocols_post** +> BaseResponseQueuedWorkflowTaskResponse create_protocols_task_v2_analyses_analysis_id_agent_protocols_post(analysis_id) + +Queues a protocols discovery workflow process + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Queues a protocols discovery workflow process + api_response = api_instance.create_protocols_task_v2_analyses_analysis_id_agent_protocols_post(analysis_id) + print("The response of AgentApi->create_protocols_task_v2_analyses_analysis_id_agent_protocols_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->create_protocols_task_v2_analyses_analysis_id_agent_protocols_post: %s\n" % e) +``` + + + ### Parameters @@ -616,10 +902,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_triage_task_v2_analyses_analysis_id_agent_triage_post** -> BaseResponseQueuedWorkflowTaskResponse create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) +# **create_secrets_task_v2_analyses_analysis_id_agent_secrets_post** +> BaseResponseQueuedWorkflowTaskResponse create_secrets_task_v2_analyses_analysis_id_agent_secrets_post(analysis_id) -Queues a triage analysis workflow process +Queues a secrets discovery workflow process ### Example @@ -661,12 +947,12 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | try: - # Queues a triage analysis workflow process - api_response = api_instance.create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) - print("The response of AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post:\n") + # Queues a secrets discovery workflow process + api_response = api_instance.create_secrets_task_v2_analyses_analysis_id_agent_secrets_post(analysis_id) + print("The response of AgentApi->create_secrets_task_v2_analyses_analysis_id_agent_secrets_post:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post: %s\n" % e) + print("Exception when calling AgentApi->create_secrets_task_v2_analyses_analysis_id_agent_secrets_post: %s\n" % e) ``` @@ -700,10 +986,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get** -> BaseResponseCapabilitiesAgentResponse get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) +# **create_triage_task_v2_analyses_analysis_id_agent_triage_post** +> BaseResponseQueuedWorkflowTaskResponse create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) -Get Capabilities Result +Queues a triage analysis workflow process ### Example @@ -712,7 +998,7 @@ Get Capabilities Result ```python import revengai -from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse from revengai.rest import ApiException from pprint import pprint @@ -745,12 +1031,2890 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | try: - # Get Capabilities Result - api_response = api_instance.get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) - print("The response of AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get:\n") + # Queues a triage analysis workflow process + api_response = api_instance.create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) + print("The response of AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get: %s\n" % e) + print("Exception when calling AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseQueuedWorkflowTaskResponse**](BaseResponseQueuedWorkflowTaskResponse.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 | +|-------------|-------------|------------------| +**202** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get** +> BaseResponseCapabilitiesAgentResponse get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) + +Get Capabilities Result + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Capabilities Result + api_response = api_instance.get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) + print("The response of AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseCapabilitiesAgentResponse**](BaseResponseCapabilitiesAgentResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_protocols_result_v2_analyses_analysis_id_agent_protocols_get** +> BaseResponseProtocolsAgentResponse get_protocols_result_v2_analyses_analysis_id_agent_protocols_get(analysis_id) + +Get Protocols Result + +Returns the protocols report, including metadata, findings, and evidence. + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_protocols_agent_response import BaseResponseProtocolsAgentResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Protocols Result + api_response = api_instance.get_protocols_result_v2_analyses_analysis_id_agent_protocols_get(analysis_id) + print("The response of AgentApi->get_protocols_result_v2_analyses_analysis_id_agent_protocols_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_protocols_result_v2_analyses_analysis_id_agent_protocols_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseProtocolsAgentResponse**](BaseResponseProtocolsAgentResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_remediation_result_v2_analyses_analysis_id_agent_remediation_get** +> BaseResponseRemediationAgentResponse get_remediation_result_v2_analyses_analysis_id_agent_remediation_get(analysis_id) + +Get Remediation Result + +Returns: +- A list of generated YARA rules +- A list of generated Snort rules +- A list of generated STIX rules + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_remediation_agent_response import BaseResponseRemediationAgentResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Remediation Result + api_response = api_instance.get_remediation_result_v2_analyses_analysis_id_agent_remediation_get(analysis_id) + print("The response of AgentApi->get_remediation_result_v2_analyses_analysis_id_agent_remediation_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_remediation_result_v2_analyses_analysis_id_agent_remediation_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseRemediationAgentResponse**](BaseResponseRemediationAgentResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get** +> BaseResponseReportAnalysisResponse get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) + +Get Report Analysis Result + +Returns: +- A summary of the analysis +- The software type of the binary +- An attack flow summary +- List of IOCs +- List of MITRE executable techniques +- A YARA rule + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Report Analysis Result + api_response = api_instance.get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) + print("The response of AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseReportAnalysisResponse**](BaseResponseReportAnalysisResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_secrets_result_v2_analyses_analysis_id_agent_secrets_get** +> BaseResponseSecretsAgentResponse get_secrets_result_v2_analyses_analysis_id_agent_secrets_get(analysis_id) + +Get Secrets Result + +Returns the secrets report, including metadata, findings, and evidence. + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_secrets_agent_response import BaseResponseSecretsAgentResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Secrets Result + api_response = api_instance.get_secrets_result_v2_analyses_analysis_id_agent_secrets_get(analysis_id) + print("The response of AgentApi->get_secrets_result_v2_analyses_analysis_id_agent_secrets_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_secrets_result_v2_analyses_analysis_id_agent_secrets_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseSecretsAgentResponse**](BaseResponseSecretsAgentResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_triage_result_v2_analyses_analysis_id_agent_triage_get** +> BaseResponseTriageReportResponse get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) + +Get Triage Result + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Triage Result + api_response = api_instance.get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) + print("The response of AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseTriageReportResponse**](BaseResponseTriageReportResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_cancel_rename_unnamed_functions** +> v3_cancel_rename_unnamed_functions(analysis_id) + +Cancel the rename-unnamed-functions agent. + +Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Cancel the rename-unnamed-functions agent. + api_instance.v3_cancel_rename_unnamed_functions(analysis_id) + except Exception as e: + print("Exception when calling AgentApi->v3_cancel_rename_unnamed_functions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +void (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 | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_cancel_security_scan_operation** +> v3_cancel_security_scan_operation(analysis_id) + +Cancel a security-scan operation. + +Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Cancel a security-scan operation. + api_instance.v3_cancel_security_scan_operation(analysis_id) + except Exception as e: + print("Exception when calling AgentApi->v3_cancel_security_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +void (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 | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_binary_agent_feedback** +> FeedbackOutputBody v3_get_binary_agent_feedback(analysis_id, agent) + +Get the caller's feedback on an agent's output. + +Returns the sentiment the caller recorded for one agent on this analysis, or a null sentiment 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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.feedback_output_body import FeedbackOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + agent = 'agent_example' # str | Which agent's output the feedback is about + + try: + # Get the caller's feedback on an agent's output. + api_response = api_instance.v3_get_binary_agent_feedback(analysis_id, agent) + print("The response of AgentApi->v3_get_binary_agent_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_binary_agent_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **agent** | **str**| Which agent's output the feedback is about | + +### Return type + +[**FeedbackOutputBody**](FeedbackOutputBody.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_capabilities_operation** +> OperationMetadataCapabilitiesResult v3_get_capabilities_operation(analysis_id) + +Get a capabilities operation. + +Polls a capabilities run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a capabilities operation. + api_response = api_instance.v3_get_capabilities_operation(analysis_id) + print("The response of AgentApi->v3_get_capabilities_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_capabilities_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataCapabilitiesResult**](OperationMetadataCapabilitiesResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_crypto_explain_operation** +> OperationCryptoExplainMetadataCryptoExplainResult v3_get_crypto_explain_operation(function_id) + +Get a crypto-explain operation. + +Returns the current state of the crypto-explain run for this function. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + + try: + # Get a crypto-explain operation. + api_response = api_instance.v3_get_crypto_explain_operation(function_id) + print("The response of AgentApi->v3_get_crypto_explain_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_crypto_explain_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**OperationCryptoExplainMetadataCryptoExplainResult**](OperationCryptoExplainMetadataCryptoExplainResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_crypto_scan_operation** +> OperationCryptoScanMetadataCryptoScanResult v3_get_crypto_scan_operation(analysis_id) + +Get a crypto-scan operation. + +Returns the current state of the crypto-scan run for this analysis. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a crypto-scan operation. + api_response = api_instance.v3_get_crypto_scan_operation(analysis_id) + print("The response of AgentApi->v3_get_crypto_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_crypto_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationCryptoScanMetadataCryptoScanResult**](OperationCryptoScanMetadataCryptoScanResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_execution_explain_operation** +> OperationExecutionExplainMetadataExecutionExplainResult v3_get_execution_explain_operation(function_id) + +Get an execution-explain operation. + +Returns the current state of the execution-explain run for this function. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + + try: + # Get an execution-explain operation. + api_response = api_instance.v3_get_execution_explain_operation(function_id) + print("The response of AgentApi->v3_get_execution_explain_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_execution_explain_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**OperationExecutionExplainMetadataExecutionExplainResult**](OperationExecutionExplainMetadataExecutionExplainResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_execution_scan_operation** +> OperationExecutionScanMetadataExecutionScanResult v3_get_execution_scan_operation(analysis_id) + +Get an execution-scan operation. + +Returns the current state of the execution-scan run for this analysis. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get an execution-scan operation. + api_response = api_instance.v3_get_execution_scan_operation(analysis_id) + print("The response of AgentApi->v3_get_execution_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_execution_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationExecutionScanMetadataExecutionScanResult**](OperationExecutionScanMetadataExecutionScanResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_filesystem_analyse_operation** +> OperationFilesystemAnalyseMetadataFilesystemAnalyseResult v3_get_filesystem_analyse_operation(function_id) + +Get a filesystem-analyse operation. + +Returns the current state of the filesystem-analyse run for this function. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + + try: + # Get a filesystem-analyse operation. + api_response = api_instance.v3_get_filesystem_analyse_operation(function_id) + print("The response of AgentApi->v3_get_filesystem_analyse_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_filesystem_analyse_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**OperationFilesystemAnalyseMetadataFilesystemAnalyseResult**](OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_filesystem_scan_operation** +> OperationFilesystemScanMetadataFilesystemScanResult v3_get_filesystem_scan_operation(analysis_id) + +Get a filesystem-scan operation. + +Returns the current state of the filesystem-scan run for this analysis. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a filesystem-scan operation. + api_response = api_instance.v3_get_filesystem_scan_operation(analysis_id) + print("The response of AgentApi->v3_get_filesystem_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_filesystem_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationFilesystemScanMetadataFilesystemScanResult**](OperationFilesystemScanMetadataFilesystemScanResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_networking_explain_operation** +> OperationNetworkingExplainMetadataNetworkingExplainResult v3_get_networking_explain_operation(function_id) + +Get a networking-explain operation. + +Returns the current state of the networking-explain run for this function. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + + try: + # Get a networking-explain operation. + api_response = api_instance.v3_get_networking_explain_operation(function_id) + print("The response of AgentApi->v3_get_networking_explain_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_networking_explain_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**OperationNetworkingExplainMetadataNetworkingExplainResult**](OperationNetworkingExplainMetadataNetworkingExplainResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_networking_scan_operation** +> OperationNetworkingScanMetadataNetworkingScanResult v3_get_networking_scan_operation(analysis_id) + +Get a networking-scan operation. + +Returns the current state of the networking-scan run for this analysis. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a networking-scan operation. + api_response = api_instance.v3_get_networking_scan_operation(analysis_id) + print("The response of AgentApi->v3_get_networking_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_networking_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationNetworkingScanMetadataNetworkingScanResult**](OperationNetworkingScanMetadataNetworkingScanResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_protocols_operation** +> OperationMetadataReportResult v3_get_protocols_operation(analysis_id) + +Get a protocols operation. + +Polls a protocols run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a protocols operation. + api_response = api_instance.v3_get_protocols_operation(analysis_id) + print("The response of AgentApi->v3_get_protocols_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_protocols_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataReportResult**](OperationMetadataReportResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_remediation_operation** +> OperationMetadataRemediationResult v3_get_remediation_operation(analysis_id) + +Get a remediation operation. + +Polls a remediation run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a remediation operation. + api_response = api_instance.v3_get_remediation_operation(analysis_id) + print("The response of AgentApi->v3_get_remediation_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_remediation_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataRemediationResult**](OperationMetadataRemediationResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_rename_unnamed_functions_result** +> RenameUnnamedFunctionsResult v3_get_rename_unnamed_functions_result(analysis_id) + +Get rename-unnamed-functions agent result. + +Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.rename_unnamed_functions_result import RenameUnnamedFunctionsResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get rename-unnamed-functions agent result. + api_response = api_instance.v3_get_rename_unnamed_functions_result(analysis_id) + print("The response of AgentApi->v3_get_rename_unnamed_functions_result:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_rename_unnamed_functions_result: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**RenameUnnamedFunctionsResult**](RenameUnnamedFunctionsResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_rename_unnamed_functions_status** +> StatusBody v3_get_rename_unnamed_functions_status(analysis_id) + +Get rename-unnamed-functions agent status. + +Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.status_body import StatusBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get rename-unnamed-functions agent status. + api_response = api_instance.v3_get_rename_unnamed_functions_status(analysis_id) + print("The response of AgentApi->v3_get_rename_unnamed_functions_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_rename_unnamed_functions_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**StatusBody**](StatusBody.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_report_analysis_operation** +> OperationMetadataThreatReportResult v3_get_report_analysis_operation(analysis_id) + +Get a report-analysis operation. + +Polls a report-analysis run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a report-analysis operation. + api_response = api_instance.v3_get_report_analysis_operation(analysis_id) + print("The response of AgentApi->v3_get_report_analysis_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_report_analysis_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataThreatReportResult**](OperationMetadataThreatReportResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_secrets_operation** +> OperationMetadataReportResult v3_get_secrets_operation(analysis_id) + +Get a secrets operation. + +Polls a secrets run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a secrets operation. + api_response = api_instance.v3_get_secrets_operation(analysis_id) + print("The response of AgentApi->v3_get_secrets_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_secrets_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataReportResult**](OperationMetadataReportResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_security_scan_operation** +> OperationSecurityScanMetadataSecurityScanResult v3_get_security_scan_operation(analysis_id) + +Get a security-scan operation. + +Returns the current state of the security-scan run for this analysis. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a security-scan operation. + api_response = api_instance.v3_get_security_scan_operation(analysis_id) + print("The response of AgentApi->v3_get_security_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_security_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationSecurityScanMetadataSecurityScanResult**](OperationSecurityScanMetadataSecurityScanResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_triage_operation** +> OperationMetadataTriageResult v3_get_triage_operation(analysis_id) + +Get a triage operation. + +Polls a triage run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. + +**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 + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get a triage operation. + api_response = api_instance.v3_get_triage_operation(analysis_id) + print("The response of AgentApi->v3_get_triage_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_triage_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataTriageResult**](OperationMetadataTriageResult.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 | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_capabilities** +> OperationMetadataCapabilitiesResult v3_run_capabilities(analysis_id) + +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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Run the capabilities agent. + api_response = api_instance.v3_run_capabilities(analysis_id) + print("The response of AgentApi->v3_run_capabilities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_capabilities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationMetadataCapabilitiesResult**](OperationMetadataCapabilitiesResult.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 | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_crypto_explain** +> OperationCryptoExplainMetadataCryptoExplainResult v3_run_crypto_explain(function_id) + +Run the crypto-explain agent. + +Starts an agent that explains the cryptography the function implements, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. + +**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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + + try: + # Run the crypto-explain agent. + api_response = api_instance.v3_run_crypto_explain(function_id) + print("The response of AgentApi->v3_run_crypto_explain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_crypto_explain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**OperationCryptoExplainMetadataCryptoExplainResult**](OperationCryptoExplainMetadataCryptoExplainResult.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 | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_crypto_scan** +> OperationCryptoScanMetadataCryptoScanResult v3_run_crypto_scan(analysis_id, trigger_crypto_scan_input_body) + +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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.models.trigger_crypto_scan_input_body import TriggerCryptoScanInputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + trigger_crypto_scan_input_body = revengai.TriggerCryptoScanInputBody() # TriggerCryptoScanInputBody | + + try: + # Run the crypto-scan agent. + api_response = api_instance.v3_run_crypto_scan(analysis_id, trigger_crypto_scan_input_body) + print("The response of AgentApi->v3_run_crypto_scan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_crypto_scan: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **trigger_crypto_scan_input_body** | [**TriggerCryptoScanInputBody**](TriggerCryptoScanInputBody.md)| | + +### Return type + +[**OperationCryptoScanMetadataCryptoScanResult**](OperationCryptoScanMetadataCryptoScanResult.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 | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_execution_explain** +> OperationExecutionExplainMetadataExecutionExplainResult v3_run_execution_explain(function_id, trigger_execution_explain_input_body) + +Run the execution-explain agent. + +Starts an agent that explains the code execution the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. + +**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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult +from revengai.models.trigger_execution_explain_input_body import TriggerExecutionExplainInputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + function_id = 56 # int | Function ID + trigger_execution_explain_input_body = revengai.TriggerExecutionExplainInputBody() # TriggerExecutionExplainInputBody | + + try: + # Run the execution-explain agent. + api_response = api_instance.v3_run_execution_explain(function_id, trigger_execution_explain_input_body) + print("The response of AgentApi->v3_run_execution_explain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_execution_explain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **trigger_execution_explain_input_body** | [**TriggerExecutionExplainInputBody**](TriggerExecutionExplainInputBody.md)| | + +### Return type + +[**OperationExecutionExplainMetadataExecutionExplainResult**](OperationExecutionExplainMetadataExecutionExplainResult.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 | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_execution_scan** +> OperationExecutionScanMetadataExecutionScanResult v3_run_execution_scan(analysis_id, trigger_execution_scan_input_body) + +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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult +from revengai.models.trigger_execution_scan_input_body import TriggerExecutionScanInputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AgentApi(api_client) + analysis_id = 56 # int | Analysis ID + trigger_execution_scan_input_body = revengai.TriggerExecutionScanInputBody() # TriggerExecutionScanInputBody | + + try: + # Run the execution-scan agent. + api_response = api_instance.v3_run_execution_scan(analysis_id, trigger_execution_scan_input_body) + print("The response of AgentApi->v3_run_execution_scan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_execution_scan: %s\n" % e) ``` @@ -760,11 +3924,12 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | + **analysis_id** | **int**| Analysis ID | + **trigger_execution_scan_input_body** | [**TriggerExecutionScanInputBody**](TriggerExecutionScanInputBody.md)| | ### Return type -[**BaseResponseCapabilitiesAgentResponse**](BaseResponseCapabilitiesAgentResponse.md) +[**OperationExecutionScanMetadataExecutionScanResult**](OperationExecutionScanMetadataExecutionScanResult.md) ### Authorization @@ -772,27 +3937,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_remediation_result_v2_analyses_analysis_id_agent_remediation_get** -> BaseResponseRemediationAgentResponse get_remediation_result_v2_analyses_analysis_id_agent_remediation_get(analysis_id) +# **v3_run_filesystem_analyse** +> OperationFilesystemAnalyseMetadataFilesystemAnalyseResult v3_run_filesystem_analyse(function_id, trigger_filesystem_analyse_input_body) -Get Remediation Result +Run the filesystem-analyse agent. -Returns: -- A list of generated YARA rules -- A list of generated Snort rules -- A list of generated STIX rules +Starts an agent that explains the filesystem/system access the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. + +**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 ### Example @@ -801,7 +3973,8 @@ Returns: ```python import revengai -from revengai.models.base_response_remediation_agent_response import BaseResponseRemediationAgentResponse +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult +from revengai.models.trigger_filesystem_analyse_input_body import TriggerFilesystemAnalyseInputBody from revengai.rest import ApiException from pprint import pprint @@ -831,15 +4004,16 @@ configuration = revengai.Configuration( with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) - analysis_id = 56 # int | + function_id = 56 # int | Function ID + trigger_filesystem_analyse_input_body = revengai.TriggerFilesystemAnalyseInputBody() # TriggerFilesystemAnalyseInputBody | try: - # Get Remediation Result - api_response = api_instance.get_remediation_result_v2_analyses_analysis_id_agent_remediation_get(analysis_id) - print("The response of AgentApi->get_remediation_result_v2_analyses_analysis_id_agent_remediation_get:\n") + # Run the filesystem-analyse agent. + api_response = api_instance.v3_run_filesystem_analyse(function_id, trigger_filesystem_analyse_input_body) + print("The response of AgentApi->v3_run_filesystem_analyse:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->get_remediation_result_v2_analyses_analysis_id_agent_remediation_get: %s\n" % e) + print("Exception when calling AgentApi->v3_run_filesystem_analyse: %s\n" % e) ``` @@ -849,11 +4023,12 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | + **function_id** | **int**| Function ID | + **trigger_filesystem_analyse_input_body** | [**TriggerFilesystemAnalyseInputBody**](TriggerFilesystemAnalyseInputBody.md)| | ### Return type -[**BaseResponseRemediationAgentResponse**](BaseResponseRemediationAgentResponse.md) +[**OperationFilesystemAnalyseMetadataFilesystemAnalyseResult**](OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md) ### Authorization @@ -861,30 +4036,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | +**200** | OK | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get** -> BaseResponseReportAnalysisResponse get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) +# **v3_run_filesystem_scan** +> OperationFilesystemScanMetadataFilesystemScanResult v3_run_filesystem_scan(analysis_id, trigger_filesystem_scan_input_body) -Get Report Analysis Result +Run the filesystem-scan agent. -Returns: -- A summary of the analysis -- The software type of the binary -- An attack flow summary -- List of IOCs -- List of MITRE executable techniques -- A YARA rule +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 ### Example @@ -893,7 +4072,8 @@ Returns: ```python import revengai -from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult +from revengai.models.trigger_filesystem_scan_input_body import TriggerFilesystemScanInputBody from revengai.rest import ApiException from pprint import pprint @@ -923,15 +4103,16 @@ configuration = revengai.Configuration( with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) - analysis_id = 56 # int | + analysis_id = 56 # int | Analysis ID + trigger_filesystem_scan_input_body = revengai.TriggerFilesystemScanInputBody() # TriggerFilesystemScanInputBody | try: - # Get Report Analysis Result - api_response = api_instance.get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) - print("The response of AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get:\n") + # Run the filesystem-scan agent. + api_response = api_instance.v3_run_filesystem_scan(analysis_id, trigger_filesystem_scan_input_body) + print("The response of AgentApi->v3_run_filesystem_scan:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get: %s\n" % e) + print("Exception when calling AgentApi->v3_run_filesystem_scan: %s\n" % e) ``` @@ -941,11 +4122,12 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | + **analysis_id** | **int**| Analysis ID | + **trigger_filesystem_scan_input_body** | [**TriggerFilesystemScanInputBody**](TriggerFilesystemScanInputBody.md)| | ### Return type -[**BaseResponseReportAnalysisResponse**](BaseResponseReportAnalysisResponse.md) +[**OperationFilesystemScanMetadataFilesystemScanResult**](OperationFilesystemScanMetadataFilesystemScanResult.md) ### Authorization @@ -953,22 +4135,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_triage_result_v2_analyses_analysis_id_agent_triage_get** -> BaseResponseTriageReportResponse get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) +# **v3_run_networking_explain** +> OperationNetworkingExplainMetadataNetworkingExplainResult v3_run_networking_explain(function_id, trigger_networking_explain_input_body) -Get Triage Result +Run the networking-explain agent. + +Starts an agent that explains the network communication a function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. + +**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 ### Example @@ -977,7 +4171,8 @@ Get Triage Result ```python import revengai -from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult +from revengai.models.trigger_networking_explain_input_body import TriggerNetworkingExplainInputBody from revengai.rest import ApiException from pprint import pprint @@ -1007,15 +4202,16 @@ configuration = revengai.Configuration( with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) - analysis_id = 56 # int | + function_id = 56 # int | Function ID + trigger_networking_explain_input_body = revengai.TriggerNetworkingExplainInputBody() # TriggerNetworkingExplainInputBody | try: - # Get Triage Result - api_response = api_instance.get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) - print("The response of AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get:\n") + # Run the networking-explain agent. + api_response = api_instance.v3_run_networking_explain(function_id, trigger_networking_explain_input_body) + print("The response of AgentApi->v3_run_networking_explain:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get: %s\n" % e) + print("Exception when calling AgentApi->v3_run_networking_explain: %s\n" % e) ``` @@ -1025,11 +4221,12 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | + **function_id** | **int**| Function ID | + **trigger_networking_explain_input_body** | [**TriggerNetworkingExplainInputBody**](TriggerNetworkingExplainInputBody.md)| | ### Return type -[**BaseResponseTriageReportResponse**](BaseResponseTriageReportResponse.md) +[**OperationNetworkingExplainMetadataNetworkingExplainResult**](OperationNetworkingExplainMetadataNetworkingExplainResult.md) ### Authorization @@ -1037,29 +4234,34 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | +**200** | OK | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_cancel_rename_unnamed_functions** -> v3_cancel_rename_unnamed_functions(analysis_id) +# **v3_run_networking_scan** +> OperationNetworkingScanMetadataNetworkingScanResult v3_run_networking_scan(analysis_id, trigger_networking_scan_input_body) -Cancel the rename-unnamed-functions agent. +Run the networking-scan agent. -Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. +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 -- `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run +- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict ### Example @@ -1068,6 +4270,8 @@ Requests cancellation of the currently running rename-unnamed-functions run for ```python import revengai +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult +from revengai.models.trigger_networking_scan_input_body import TriggerNetworkingScanInputBody from revengai.rest import ApiException from pprint import pprint @@ -1098,12 +4302,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) analysis_id = 56 # int | Analysis ID + trigger_networking_scan_input_body = revengai.TriggerNetworkingScanInputBody() # TriggerNetworkingScanInputBody | try: - # Cancel the rename-unnamed-functions agent. - api_instance.v3_cancel_rename_unnamed_functions(analysis_id) + # Run the networking-scan agent. + api_response = api_instance.v3_run_networking_scan(analysis_id, trigger_networking_scan_input_body) + print("The response of AgentApi->v3_run_networking_scan:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_cancel_rename_unnamed_functions: %s\n" % e) + print("Exception when calling AgentApi->v3_run_networking_scan: %s\n" % e) ``` @@ -1114,10 +4321,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **trigger_networking_scan_input_body** | [**TriggerNetworkingScanInputBody**](TriggerNetworkingScanInputBody.md)| | ### Return type -void (empty response body) +[**OperationNetworkingScanMetadataNetworkingScanResult**](OperationNetworkingScanMetadataNetworkingScanResult.md) ### Authorization @@ -1125,32 +4333,34 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | No Content | - | +**200** | OK | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_cancel_security_scan_operation** -> v3_cancel_security_scan_operation(analysis_id) +# **v3_run_protocols** +> OperationMetadataReportResult v3_run_protocols(analysis_id) -Cancel a security-scan operation. +Run the protocols agent. -Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. +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 -- `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run +- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict +- `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits ### Example @@ -1159,6 +4369,7 @@ Requests cancellation of the currently running security-scan run for the analysi ```python import revengai +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult from revengai.rest import ApiException from pprint import pprint @@ -1191,10 +4402,12 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | Analysis ID try: - # Cancel a security-scan operation. - api_instance.v3_cancel_security_scan_operation(analysis_id) + # Run the protocols agent. + api_response = api_instance.v3_run_protocols(analysis_id) + print("The response of AgentApi->v3_run_protocols:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_cancel_security_scan_operation: %s\n" % e) + print("Exception when calling AgentApi->v3_run_protocols: %s\n" % e) ``` @@ -1208,7 +4421,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**OperationMetadataReportResult**](OperationMetadataReportResult.md) ### Authorization @@ -1223,24 +4436,28 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | No Content | - | +**200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_crypto_scan_operation** -> OperationCryptoScanMetadataCryptoScanResult v3_get_crypto_scan_operation(analysis_id) +# **v3_run_remediation** +> OperationMetadataRemediationResult v3_run_remediation(analysis_id) -Get a crypto-scan operation. +Run the remediation agent. -Returns the current state of the crypto-scan run for this analysis. +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 ### Example @@ -1249,7 +4466,7 @@ Returns the current state of the crypto-scan run for this analysis. ```python import revengai -from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult from revengai.rest import ApiException from pprint import pprint @@ -1282,12 +4499,12 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | Analysis ID try: - # Get a crypto-scan operation. - api_response = api_instance.v3_get_crypto_scan_operation(analysis_id) - print("The response of AgentApi->v3_get_crypto_scan_operation:\n") + # Run the remediation agent. + api_response = api_instance.v3_run_remediation(analysis_id) + print("The response of AgentApi->v3_run_remediation:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_get_crypto_scan_operation: %s\n" % e) + print("Exception when calling AgentApi->v3_run_remediation: %s\n" % e) ``` @@ -1301,7 +4518,7 @@ Name | Type | Description | Notes ### Return type -[**OperationCryptoScanMetadataCryptoScanResult**](OperationCryptoScanMetadataCryptoScanResult.md) +[**OperationMetadataRemediationResult**](OperationMetadataRemediationResult.md) ### Authorization @@ -1317,24 +4534,27 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_rename_unnamed_functions_result** -> RenameUnnamedFunctionsResult v3_get_rename_unnamed_functions_result(analysis_id) +# **v3_run_report_analysis** +> OperationMetadataThreatReportResult v3_run_report_analysis(analysis_id) -Get rename-unnamed-functions agent result. +Run the report-analysis agent. -Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. +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` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready +- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict +- `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits ### Example @@ -1343,7 +4563,7 @@ Returns the summary of the most recent completed rename-unnamed-functions run. R ```python import revengai -from revengai.models.rename_unnamed_functions_result import RenameUnnamedFunctionsResult +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult from revengai.rest import ApiException from pprint import pprint @@ -1376,12 +4596,12 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | Analysis ID try: - # Get rename-unnamed-functions agent result. - api_response = api_instance.v3_get_rename_unnamed_functions_result(analysis_id) - print("The response of AgentApi->v3_get_rename_unnamed_functions_result:\n") + # Run the report-analysis agent. + api_response = api_instance.v3_run_report_analysis(analysis_id) + print("The response of AgentApi->v3_run_report_analysis:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_get_rename_unnamed_functions_result: %s\n" % e) + print("Exception when calling AgentApi->v3_run_report_analysis: %s\n" % e) ``` @@ -1395,7 +4615,7 @@ Name | Type | Description | Notes ### Return type -[**RenameUnnamedFunctionsResult**](RenameUnnamedFunctionsResult.md) +[**OperationMetadataThreatReportResult**](OperationMetadataThreatReportResult.md) ### Authorization @@ -1411,6 +4631,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | **409** | Conflict | - | @@ -1419,16 +4640,18 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_rename_unnamed_functions_status** -> StatusBody v3_get_rename_unnamed_functions_status(analysis_id) +# **v3_run_secrets** +> OperationMetadataReportResult v3_run_secrets(analysis_id) -Get rename-unnamed-functions agent status. +Run the secrets agent. -Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. +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 ### Example @@ -1437,7 +4660,7 @@ Returns the status of the most recent rename-unnamed-functions run for the analy ```python import revengai -from revengai.models.status_body import StatusBody +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult from revengai.rest import ApiException from pprint import pprint @@ -1470,12 +4693,12 @@ with revengai.ApiClient(configuration) as api_client: analysis_id = 56 # int | Analysis ID try: - # Get rename-unnamed-functions agent status. - api_response = api_instance.v3_get_rename_unnamed_functions_status(analysis_id) - print("The response of AgentApi->v3_get_rename_unnamed_functions_status:\n") + # Run the secrets agent. + api_response = api_instance.v3_run_secrets(analysis_id) + print("The response of AgentApi->v3_run_secrets:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_get_rename_unnamed_functions_status: %s\n" % e) + print("Exception when calling AgentApi->v3_run_secrets: %s\n" % e) ``` @@ -1489,7 +4712,7 @@ Name | Type | Description | Notes ### Return type -[**StatusBody**](StatusBody.md) +[**OperationMetadataReportResult**](OperationMetadataReportResult.md) ### Authorization @@ -1505,23 +4728,27 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_security_scan_operation** -> OperationSecurityScanMetadataSecurityScanResult v3_get_security_scan_operation(analysis_id) +# **v3_run_security_scan** +> OperationSecurityScanMetadataSecurityScanResult v3_run_security_scan(analysis_id, trigger_security_scan_input_body) -Get a security-scan operation. +Run the security-scan agent. -Returns the current state of the security-scan run for this analysis. +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 ### Example @@ -1531,6 +4758,7 @@ Returns the current state of the security-scan run for this analysis. ```python import revengai from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult +from revengai.models.trigger_security_scan_input_body import TriggerSecurityScanInputBody from revengai.rest import ApiException from pprint import pprint @@ -1561,14 +4789,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) analysis_id = 56 # int | Analysis ID + trigger_security_scan_input_body = revengai.TriggerSecurityScanInputBody() # TriggerSecurityScanInputBody | try: - # Get a security-scan operation. - api_response = api_instance.v3_get_security_scan_operation(analysis_id) - print("The response of AgentApi->v3_get_security_scan_operation:\n") + # Run the security-scan agent. + api_response = api_instance.v3_run_security_scan(analysis_id, trigger_security_scan_input_body) + print("The response of AgentApi->v3_run_security_scan:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_get_security_scan_operation: %s\n" % e) + print("Exception when calling AgentApi->v3_run_security_scan: %s\n" % e) ``` @@ -1579,6 +4808,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **trigger_security_scan_input_body** | [**TriggerSecurityScanInputBody**](TriggerSecurityScanInputBody.md)| | ### Return type @@ -1590,7 +4820,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -1598,24 +4828,27 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_run_crypto_scan** -> OperationCryptoScanMetadataCryptoScanResult v3_run_crypto_scan(analysis_id, trigger_crypto_scan_input_body) +# **v3_run_triage** +> OperationMetadataTriageResult v3_run_triage(analysis_id) -Run the crypto-scan agent. +Run the triage 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. +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 ### Example @@ -1624,8 +4857,7 @@ Starts an agent that name-matches the analysis' functions and their callees agai ```python import revengai -from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult -from revengai.models.trigger_crypto_scan_input_body import TriggerCryptoScanInputBody +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult from revengai.rest import ApiException from pprint import pprint @@ -1656,15 +4888,14 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) analysis_id = 56 # int | Analysis ID - trigger_crypto_scan_input_body = revengai.TriggerCryptoScanInputBody() # TriggerCryptoScanInputBody | try: - # Run the crypto-scan agent. - api_response = api_instance.v3_run_crypto_scan(analysis_id, trigger_crypto_scan_input_body) - print("The response of AgentApi->v3_run_crypto_scan:\n") + # Run the triage agent. + api_response = api_instance.v3_run_triage(analysis_id) + print("The response of AgentApi->v3_run_triage:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_run_crypto_scan: %s\n" % e) + print("Exception when calling AgentApi->v3_run_triage: %s\n" % e) ``` @@ -1675,11 +4906,10 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **trigger_crypto_scan_input_body** | [**TriggerCryptoScanInputBody**](TriggerCryptoScanInputBody.md)| | ### Return type -[**OperationCryptoScanMetadataCryptoScanResult**](OperationCryptoScanMetadataCryptoScanResult.md) +[**OperationMetadataTriageResult**](OperationMetadataTriageResult.md) ### Authorization @@ -1687,7 +4917,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -1695,6 +4925,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | **409** | Conflict | - | @@ -1703,17 +4934,18 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_run_security_scan** -> OperationSecurityScanMetadataSecurityScanResult v3_run_security_scan(analysis_id, trigger_security_scan_input_body) +# **v3_trigger_rename_unnamed_functions** +> StatusBody v3_trigger_rename_unnamed_functions(analysis_id, trigger_rename_unnamed_functions_input_body) -Run the security-scan agent. +Run the rename-unnamed-functions 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. +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 ### Example @@ -1722,8 +4954,8 @@ Starts an agent that decompiles the analysis' functions and runs a security scan ```python import revengai -from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult -from revengai.models.trigger_security_scan_input_body import TriggerSecurityScanInputBody +from revengai.models.status_body import StatusBody +from revengai.models.trigger_rename_unnamed_functions_input_body import TriggerRenameUnnamedFunctionsInputBody from revengai.rest import ApiException from pprint import pprint @@ -1754,15 +4986,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) analysis_id = 56 # int | Analysis ID - trigger_security_scan_input_body = revengai.TriggerSecurityScanInputBody() # TriggerSecurityScanInputBody | + trigger_rename_unnamed_functions_input_body = revengai.TriggerRenameUnnamedFunctionsInputBody() # TriggerRenameUnnamedFunctionsInputBody | try: - # Run the security-scan agent. - api_response = api_instance.v3_run_security_scan(analysis_id, trigger_security_scan_input_body) - print("The response of AgentApi->v3_run_security_scan:\n") + # Run the rename-unnamed-functions agent. + api_response = api_instance.v3_trigger_rename_unnamed_functions(analysis_id, trigger_rename_unnamed_functions_input_body) + print("The response of AgentApi->v3_trigger_rename_unnamed_functions:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentApi->v3_run_security_scan: %s\n" % e) + print("Exception when calling AgentApi->v3_trigger_rename_unnamed_functions: %s\n" % e) ``` @@ -1773,11 +5005,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **trigger_security_scan_input_body** | [**TriggerSecurityScanInputBody**](TriggerSecurityScanInputBody.md)| | + **trigger_rename_unnamed_functions_input_body** | [**TriggerRenameUnnamedFunctionsInputBody**](TriggerRenameUnnamedFunctionsInputBody.md)| | ### Return type -[**OperationSecurityScanMetadataSecurityScanResult**](OperationSecurityScanMetadataSecurityScanResult.md) +[**StatusBody**](StatusBody.md) ### Authorization @@ -1792,7 +5024,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | +**202** | Accepted | - | +**402** | Payment Required | - | **403** | Forbidden | - | **404** | Not Found | - | **409** | Conflict | - | @@ -1801,17 +5034,16 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_trigger_rename_unnamed_functions** -> StatusBody v3_trigger_rename_unnamed_functions(analysis_id, trigger_rename_unnamed_functions_input_body) +# **v3_upsert_binary_agent_feedback** +> v3_upsert_binary_agent_feedback(analysis_id, agent, submit_feedback_input_body) -Run the rename-unnamed-functions agent. +Record feedback on an agent's output. -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. +Records how useful the caller found one agent's output for this analysis. Replaces any sentiment they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict ### Example @@ -1820,8 +5052,7 @@ Starts an agent that renames the analysis' unnamed functions from their AI decom ```python import revengai -from revengai.models.status_body import StatusBody -from revengai.models.trigger_rename_unnamed_functions_input_body import TriggerRenameUnnamedFunctionsInputBody +from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody from revengai.rest import ApiException from pprint import pprint @@ -1852,15 +5083,14 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AgentApi(api_client) analysis_id = 56 # int | Analysis ID - trigger_rename_unnamed_functions_input_body = revengai.TriggerRenameUnnamedFunctionsInputBody() # TriggerRenameUnnamedFunctionsInputBody | + agent = 'agent_example' # str | Which agent's output the feedback is about + submit_feedback_input_body = revengai.SubmitFeedbackInputBody() # SubmitFeedbackInputBody | try: - # Run the rename-unnamed-functions agent. - api_response = api_instance.v3_trigger_rename_unnamed_functions(analysis_id, trigger_rename_unnamed_functions_input_body) - print("The response of AgentApi->v3_trigger_rename_unnamed_functions:\n") - pprint(api_response) + # Record feedback on an agent's output. + api_instance.v3_upsert_binary_agent_feedback(analysis_id, agent, submit_feedback_input_body) except Exception as e: - print("Exception when calling AgentApi->v3_trigger_rename_unnamed_functions: %s\n" % e) + print("Exception when calling AgentApi->v3_upsert_binary_agent_feedback: %s\n" % e) ``` @@ -1871,11 +5101,12 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **trigger_rename_unnamed_functions_input_body** | [**TriggerRenameUnnamedFunctionsInputBody**](TriggerRenameUnnamedFunctionsInputBody.md)| | + **agent** | **str**| Which agent's output the feedback is about | + **submit_feedback_input_body** | [**SubmitFeedbackInputBody**](SubmitFeedbackInputBody.md)| | ### Return type -[**StatusBody**](StatusBody.md) +void (empty response body) ### Authorization @@ -1890,10 +5121,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**202** | Accepted | - | +**204** | No Content | - | **403** | Forbidden | - | **404** | Not Found | - | -**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 5e64ec9..119d4a4 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -27,8 +27,10 @@ Method | HTTP request | Description [**update_analysis**](AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis [**update_analysis_tags**](AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags [**upload_file**](AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File +[**v3_create_analysis**](AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis [**v3_get_analysis_auto_unstrip_status**](AnalysesCoreApi.md#v3_get_analysis_auto_unstrip_status) | **GET** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. [**v3_get_analysis_logs**](AnalysesCoreApi.md#v3_get_analysis_logs) | **GET** /v3/analyses/{analysis_id}/logs | Get the Analysis log +[**v3_get_analysis_operation**](AnalysesCoreApi.md#v3_get_analysis_operation) | **GET** /v3/operations/analyses/{analysis_id} | Get an Analysis-creation operation [**v3_get_analysis_strings**](AnalysesCoreApi.md#v3_get_analysis_strings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. [**v3_get_analysis_strings_status**](AnalysesCoreApi.md#v3_get_analysis_strings_status) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. [**v3_list_analyses**](AnalysesCoreApi.md#v3_list_analyses) | **GET** /v3/analyses | List analyses @@ -37,7 +39,7 @@ Method | HTTP request | Description # **add_user_string_to_analysis** -> Dict[str, object] add_user_string_to_analysis(analysis_id, add_user_string_input_body) +> object add_user_string_to_analysis(analysis_id, add_user_string_input_body) Add a user-provided string to an analysis. @@ -108,7 +110,7 @@ Name | Type | Description | Notes ### Return type -**Dict[str, object]** +**object** ### Authorization @@ -2140,6 +2142,110 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_create_analysis** +> OperationCreateMetadataCreateResult v3_create_analysis(create_request, x_rev_eng_application=x_rev_eng_application) + +Create an analysis + +Queues a new Analysis for an uploaded Binary and returns the created Operation. + +**Error codes:** +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits +- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.create_request import CreateRequest +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + create_request = revengai.CreateRequest() # CreateRequest | + x_rev_eng_application = 'x_rev_eng_application_example' # str | Identifies the calling RevEng application. Recorded on the Analysis log. (optional) + + try: + # Create an analysis + api_response = api_instance.v3_create_analysis(create_request, x_rev_eng_application=x_rev_eng_application) + print("The response of AnalysesCoreApi->v3_create_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->v3_create_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_request** | [**CreateRequest**](CreateRequest.md)| | + **x_rev_eng_application** | **str**| Identifies the calling RevEng application. Recorded on the Analysis log. | [optional] + +### Return type + +[**OperationCreateMetadataCreateResult**](OperationCreateMetadataCreateResult.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** | Created | - | +**400** | Bad Request | - | +**402** | Payment Required | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**413** | Request Entity Too Large | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_get_analysis_auto_unstrip_status** > AutoUnstripStatusOutputBody v3_get_analysis_auto_unstrip_status(analysis_id) @@ -2326,6 +2432,99 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_get_analysis_operation** +> OperationCreateMetadataCreateResult v3_get_analysis_operation(analysis_id) + +Get an Analysis-creation operation + +Polls the status of an Analysis-creation operation. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get an Analysis-creation operation + api_response = api_instance.v3_get_analysis_operation(analysis_id) + print("The response of AnalysesCoreApi->v3_get_analysis_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->v3_get_analysis_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**OperationCreateMetadataCreateResult**](OperationCreateMetadataCreateResult.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_get_analysis_strings** > ListAnalysisStringsOutputBody v3_get_analysis_strings(analysis_id, page=page, page_size=page_size, search=search, search_operator=search_operator, function_search=function_search, order_by=order_by, sort_order=sort_order) @@ -2527,7 +2726,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **v3_list_analyses** -> ListAnalysesOutputBody v3_list_analyses(search_term=search_term, analysis_scope=analysis_scope, status=status, model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, page_size=page_size, next_page_token=next_page_token, order_by=order_by, order=order) +> ListAnalysesOutputBody v3_list_analyses(search_term=search_term, analysis_scope=analysis_scope, status=status, model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, platform=platform, architecture=architecture, page_size=page_size, next_page_token=next_page_token, order_by=order_by, order=order) List analyses @@ -2574,11 +2773,13 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) search_term = 'search_term_example' # str | (optional) - analysis_scope = ["PRIVATE"] # List[str] | Leave empty for no filter (optional) (default to ["PRIVATE"]) + analysis_scope = ['analysis_scope_example'] # List[str] | Leave empty to search your own, your team's and all public analyses (optional) status = ['status_example'] # List[str] | (optional) model_name = ['model_name_example'] # List[Optional[str]] | (optional) usernames = ['usernames_example'] # List[Optional[str]] | (optional) sha256_hash = 'sha256_hash_example' # str | (optional) + platform = ['platform_example'] # List[str] | Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter (optional) + architecture = ['architecture_example'] # List[str] | Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter (optional) page_size = 20 # int | (optional) (default to 20) next_page_token = 'next_page_token_example' # str | Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). (optional) order_by = created # str | (optional) (default to created) @@ -2586,7 +2787,7 @@ with revengai.ApiClient(configuration) as api_client: try: # List analyses - api_response = api_instance.v3_list_analyses(search_term=search_term, analysis_scope=analysis_scope, status=status, model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, page_size=page_size, next_page_token=next_page_token, order_by=order_by, order=order) + api_response = api_instance.v3_list_analyses(search_term=search_term, analysis_scope=analysis_scope, status=status, model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, platform=platform, architecture=architecture, page_size=page_size, next_page_token=next_page_token, order_by=order_by, order=order) print("The response of AnalysesCoreApi->v3_list_analyses:\n") pprint(api_response) except Exception as e: @@ -2601,11 +2802,13 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **search_term** | **str**| | [optional] - **analysis_scope** | [**List[str]**](str.md)| Leave empty for no filter | [optional] [default to ["PRIVATE"]] + **analysis_scope** | [**List[str]**](str.md)| Leave empty to search your own, your team's and all public analyses | [optional] **status** | [**List[str]**](str.md)| | [optional] **model_name** | [**List[Optional[str]]**](str.md)| | [optional] **usernames** | [**List[Optional[str]]**](str.md)| | [optional] **sha256_hash** | **str**| | [optional] + **platform** | [**List[str]**](str.md)| Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter | [optional] + **architecture** | [**List[str]**](str.md)| Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter | [optional] **page_size** | **int**| | [optional] [default to 20] **next_page_token** | **str**| Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). | [optional] **order_by** | **str**| | [optional] [default to created] diff --git a/docs/AnalysisRequirement.md b/docs/AnalysisRequirement.md new file mode 100644 index 0000000..ab638ec --- /dev/null +++ b/docs/AnalysisRequirement.md @@ -0,0 +1,31 @@ +# AnalysisRequirement + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | **List[str]** | CreateAnalysis field paths that must be provided or enabled to satisfy this requirement. | +**reason** | **str** | Why this requirement unblocks analysis. | +**values** | **Dict[str, str]** | Field paths that must carry a specific value, keyed the same way as fields. | [optional] + +## Example + +```python +from revengai.models.analysis_requirement import AnalysisRequirement + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisRequirement from a JSON string +analysis_requirement_instance = AnalysisRequirement.from_json(json) +# print the JSON string representation of the object +print(AnalysisRequirement.to_json()) + +# convert the object into a dict +analysis_requirement_dict = analysis_requirement_instance.to_dict() +# create an instance of AnalysisRequirement from a dict +analysis_requirement_from_dict = AnalysisRequirement.from_dict(analysis_requirement_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiCombinationEvidence.md b/docs/ApiCombinationEvidence.md new file mode 100644 index 0000000..628f9af --- /dev/null +++ b/docs/ApiCombinationEvidence.md @@ -0,0 +1,34 @@ +# ApiCombinationEvidence + +A known combination of APIs without a demonstrated semantic flow. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'api_combination'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'indirect'] +**apis** | [**List[ImportedApi]**](ImportedApi.md) | | + +## Example + +```python +from revengai.models.api_combination_evidence import ApiCombinationEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiCombinationEvidence from a JSON string +api_combination_evidence_instance = ApiCombinationEvidence.from_json(json) +# print the JSON string representation of the object +print(ApiCombinationEvidence.to_json()) + +# convert the object into a dict +api_combination_evidence_dict = api_combination_evidence_instance.to_dict() +# create an instance of ApiCombinationEvidence from a dict +api_combination_evidence_from_dict = ApiCombinationEvidence.from_dict(api_combination_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AutoRunAgents.md b/docs/AutoRunAgents.md index 42df771..3ce9eb6 100644 --- a/docs/AutoRunAgents.md +++ b/docs/AutoRunAgents.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**triage** | **bool** | | [optional] [default to False] +**triage** | **bool** | | [optional] ## Example diff --git a/docs/BaseResponseProtocolsAgentResponse.md b/docs/BaseResponseProtocolsAgentResponse.md new file mode 100644 index 0000000..8388c11 --- /dev/null +++ b/docs/BaseResponseProtocolsAgentResponse.md @@ -0,0 +1,33 @@ +# BaseResponseProtocolsAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ProtocolsAgentResponse**](ProtocolsAgentResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_protocols_agent_response import BaseResponseProtocolsAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseProtocolsAgentResponse from a JSON string +base_response_protocols_agent_response_instance = BaseResponseProtocolsAgentResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseProtocolsAgentResponse.to_json()) + +# convert the object into a dict +base_response_protocols_agent_response_dict = base_response_protocols_agent_response_instance.to_dict() +# create an instance of BaseResponseProtocolsAgentResponse from a dict +base_response_protocols_agent_response_from_dict = BaseResponseProtocolsAgentResponse.from_dict(base_response_protocols_agent_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseResponseSecretsAgentResponse.md b/docs/BaseResponseSecretsAgentResponse.md new file mode 100644 index 0000000..05e9782 --- /dev/null +++ b/docs/BaseResponseSecretsAgentResponse.md @@ -0,0 +1,33 @@ +# BaseResponseSecretsAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**SecretsAgentResponse**](SecretsAgentResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_secrets_agent_response import BaseResponseSecretsAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseSecretsAgentResponse from a JSON string +base_response_secrets_agent_response_instance = BaseResponseSecretsAgentResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseSecretsAgentResponse.to_json()) + +# convert the object into a dict +base_response_secrets_agent_response_dict = base_response_secrets_agent_response_instance.to_dict() +# create an instance of BaseResponseSecretsAgentResponse from a dict +base_response_secrets_agent_response_from_dict = BaseResponseSecretsAgentResponse.from_dict(base_response_secrets_agent_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BinariesApi.md b/docs/BinariesApi.md index 6db989c..427220f 100644 --- a/docs/BinariesApi.md +++ b/docs/BinariesApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description [**get_binary_externals**](BinariesApi.md#get_binary_externals) | **GET** /v2/binaries/{binary_id}/externals | Gets the external details of a binary [**get_binary_related_status**](BinariesApi.md#get_binary_related_status) | **GET** /v2/binaries/{binary_id}/related/status | Gets the status of the unpack binary task for a binary [**get_related_binaries**](BinariesApi.md#get_related_binaries) | **GET** /v2/binaries/{binary_id}/related | Gets the related binaries of a binary. +[**v3_upload_file**](BinariesApi.md#v3_upload_file) | **POST** /v3/upload | Upload a file. # **download_zipped_binary** @@ -874,3 +875,100 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_upload_file** +> UploadOutputBody v3_upload_file(file, upload_file_type, force_overwrite=force_overwrite) + +Upload a file. + +Uploads a binary, debug symbol, packed sample, or firmware image, keyed by its SHA-256 hash. A BINARY upload from a non-system caller also detects the file's architecture and OS so POST /v3/analyses knows whether it can run static analysis. + +**Error codes:** +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +- `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.upload_output_body import UploadOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.BinariesApi(api_client) + file = None # bytearray | The file's raw bytes. + upload_file_type = 'upload_file_type_example' # str | The kind of file being uploaded. + force_overwrite = True # bool | Re-upload and overwrite even if a file with this hash already exists. (optional) + + try: + # Upload a file. + api_response = api_instance.v3_upload_file(file, upload_file_type, force_overwrite=force_overwrite) + print("The response of BinariesApi->v3_upload_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->v3_upload_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **bytearray**| The file's raw bytes. | + **upload_file_type** | **str**| The kind of file being uploaded. | + **force_overwrite** | **bool**| Re-upload and overwrite even if a file with this hash already exists. | [optional] + +### Return type + +[**UploadOutputBody**](UploadOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**413** | Request Entity Too Large | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BinaryConfig.md b/docs/BinaryConfig.md index 0a90a8b..0659bb1 100644 --- a/docs/BinaryConfig.md +++ b/docs/BinaryConfig.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isa** | [**ISA**](ISA.md) | | [optional] -**platform** | [**Platform**](Platform.md) | | [optional] -**file_format** | [**FileFormat**](FileFormat.md) | | [optional] +**file_format** | **str** | | [optional] +**isa** | **str** | | [optional] +**platform** | **str** | | [optional] ## Example diff --git a/docs/BinaryDetailsResponse.md b/docs/BinaryDetailsResponse.md index 3f27967..3b89f93 100644 --- a/docs/BinaryDetailsResponse.md +++ b/docs/BinaryDetailsResponse.md @@ -15,8 +15,8 @@ Name | Type | Description | Notes **md5** | **str** | | **machine** | **str** | | **os** | **str** | OS target of the binary | -**sha1** | **str** | SHA1 hash of the binary | -**sha256** | **str** | SHA256 hash of the binary | +**sha1** | **str** | | +**sha256** | **str** | | **ssdeep** | **str** | | **static** | **bool** | | **stripped** | **bool** | | diff --git a/docs/BytesConstant.md b/docs/BytesConstant.md new file mode 100644 index 0000000..a871c6c --- /dev/null +++ b/docs/BytesConstant.md @@ -0,0 +1,32 @@ +# BytesConstant + +One exact, contiguous sequence of binary bytes. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **str** | | [optional] [default to 'bytes'] +**value** | **str** | Hexadecimal byte pairs representing one exact, contiguous binary value. | +**display** | [**Display**](Display.md) | | [optional] + +## Example + +```python +from revengai.models.bytes_constant import BytesConstant + +# TODO update the JSON string below +json = "{}" +# create an instance of BytesConstant from a JSON string +bytes_constant_instance = BytesConstant.from_json(json) +# print the JSON string representation of the object +print(BytesConstant.to_json()) + +# convert the object into a dict +bytes_constant_dict = bytes_constant_instance.to_dict() +# create an instance of BytesConstant from a dict +bytes_constant_from_dict = BytesConstant.from_dict(bytes_constant_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CallChain.md b/docs/CallChain.md new file mode 100644 index 0000000..9ccc639 --- /dev/null +++ b/docs/CallChain.md @@ -0,0 +1,29 @@ +# CallChain + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **List[int]** | | + +## Example + +```python +from revengai.models.call_chain import CallChain + +# TODO update the JSON string below +json = "{}" +# create an instance of CallChain from a JSON string +call_chain_instance = CallChain.from_json(json) +# print the JSON string representation of the object +print(CallChain.to_json()) + +# convert the object into a dict +call_chain_dict = call_chain_instance.to_dict() +# create an instance of CallChain from a dict +call_chain_from_dict = CallChain.from_dict(call_chain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CallChainEvidence.md b/docs/CallChainEvidence.md new file mode 100644 index 0000000..07d118f --- /dev/null +++ b/docs/CallChainEvidence.md @@ -0,0 +1,34 @@ +# CallChainEvidence + +A concrete sequence of calls connecting program locations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'call_chain'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'direct'] +**call_chain** | **List[int]** | | + +## Example + +```python +from revengai.models.call_chain_evidence import CallChainEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of CallChainEvidence from a JSON string +call_chain_evidence_instance = CallChainEvidence.from_json(json) +# print the JSON string representation of the object +print(CallChainEvidence.to_json()) + +# convert the object into a dict +call_chain_evidence_dict = call_chain_evidence_instance.to_dict() +# create an instance of CallChainEvidence from a dict +call_chain_evidence_from_dict = CallChainEvidence.from_dict(call_chain_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CapabilitiesResult.md b/docs/CapabilitiesResult.md new file mode 100644 index 0000000..0970b4c --- /dev/null +++ b/docs/CapabilitiesResult.md @@ -0,0 +1,29 @@ +# CapabilitiesResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capabilities** | [**List[Capability]**](Capability.md) | Capabilities found. A capability whose address no longer resolves within the analysis is omitted. | + +## Example + +```python +from revengai.models.capabilities_result import CapabilitiesResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CapabilitiesResult from a JSON string +capabilities_result_instance = CapabilitiesResult.from_json(json) +# print the JSON string representation of the object +print(CapabilitiesResult.to_json()) + +# convert the object into a dict +capabilities_result_dict = capabilities_result_instance.to_dict() +# create an instance of CapabilitiesResult from a dict +capabilities_result_from_dict = CapabilitiesResult.from_dict(capabilities_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Capability.md b/docs/Capability.md new file mode 100644 index 0000000..937ea51 --- /dev/null +++ b/docs/Capability.md @@ -0,0 +1,34 @@ +# Capability + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capability** | **str** | The capability itself | +**description** | **str** | What the function does to exhibit the capability | +**function_id** | **int** | ID of the function | +**function_name** | **str** | Name of the function | +**function_vaddr** | **str** | Virtual address of the function, hex-encoded | +**type** | **str** | Capability category | + +## Example + +```python +from revengai.models.capability import Capability + +# TODO update the JSON string below +json = "{}" +# create an instance of Capability from a JSON string +capability_instance = Capability.from_json(json) +# print the JSON string representation of the object +print(Capability.to_json()) + +# convert the object into a dict +capability_dict = capability_instance.to_dict() +# create an instance of Capability from a dict +capability_from_dict = Capability.from_dict(capability_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Config.md b/docs/Config.md new file mode 100644 index 0000000..2e5c4c4 --- /dev/null +++ b/docs/Config.md @@ -0,0 +1,32 @@ +# Config + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**generate_capabilities** | **bool** | | [optional] +**no_cache** | **bool** | | [optional] +**sandbox_config** | [**SandboxConfig**](SandboxConfig.md) | | [optional] +**scrape_third_party_config** | [**ScrapeThirdPartyConfig**](ScrapeThirdPartyConfig.md) | | [optional] + +## Example + +```python +from revengai.models.config import Config + +# TODO update the JSON string below +json = "{}" +# create an instance of Config from a JSON string +config_instance = Config.from_json(json) +# print the JSON string representation of the object +print(Config.to_json()) + +# convert the object into a dict +config_dict = config_instance.to_dict() +# create an instance of Config from a dict +config_from_dict = Config.from_dict(config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMetadata.md b/docs/CreateMetadata.md new file mode 100644 index 0000000..c2eea6c --- /dev/null +++ b/docs/CreateMetadata.md @@ -0,0 +1,31 @@ +# CreateMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis ID | +**binary_id** | **int** | Binary ID | +**status** | **str** | Analysis status | + +## Example + +```python +from revengai.models.create_metadata import CreateMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateMetadata from a JSON string +create_metadata_instance = CreateMetadata.from_json(json) +# print the JSON string representation of the object +print(CreateMetadata.to_json()) + +# convert the object into a dict +create_metadata_dict = create_metadata_instance.to_dict() +# create an instance of CreateMetadata from a dict +create_metadata_from_dict = CreateMetadata.from_dict(create_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequest.md b/docs/CreateRequest.md new file mode 100644 index 0000000..1df151a --- /dev/null +++ b/docs/CreateRequest.md @@ -0,0 +1,37 @@ +# CreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_config** | [**Config**](Config.md) | | [optional] +**analysis_scope** | **str** | | [optional] [default to 'PRIVATE'] +**auto_run_agents** | [**AutoRunAgents**](AutoRunAgents.md) | | [optional] +**binary_config** | [**BinaryConfig**](BinaryConfig.md) | | [optional] +**debug_hash** | **str** | | [optional] +**filename** | **str** | | +**sha_256_hash** | **str** | | +**symbols** | [**Symbols**](Symbols.md) | | [optional] +**tags** | **List[str]** | | [optional] + +## Example + +```python +from revengai.models.create_request import CreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequest from a JSON string +create_request_instance = CreateRequest.from_json(json) +# print the JSON string representation of the object +print(CreateRequest.to_json()) + +# convert the object into a dict +create_request_dict = create_request_instance.to_dict() +# create an instance of CreateRequest from a dict +create_request_from_dict = CreateRequest.from_dict(create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateResult.md b/docs/CreateResult.md new file mode 100644 index 0000000..3ed1b68 --- /dev/null +++ b/docs/CreateResult.md @@ -0,0 +1,30 @@ +# CreateResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis ID | +**binary_id** | **int** | Binary ID | + +## Example + +```python +from revengai.models.create_result import CreateResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateResult from a JSON string +create_result_instance = CreateResult.from_json(json) +# print the JSON string representation of the object +print(CreateResult.to_json()) + +# convert the object into a dict +create_result_dict = create_result_instance.to_dict() +# create an instance of CreateResult from a dict +create_result_from_dict = CreateResult.from_dict(create_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CryptoExplainMetadata.md b/docs/CryptoExplainMetadata.md new file mode 100644 index 0000000..4e41867 --- /dev/null +++ b/docs/CryptoExplainMetadata.md @@ -0,0 +1,30 @@ +# CryptoExplainMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this function. | + +## Example + +```python +from revengai.models.crypto_explain_metadata import CryptoExplainMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of CryptoExplainMetadata from a JSON string +crypto_explain_metadata_instance = CryptoExplainMetadata.from_json(json) +# print the JSON string representation of the object +print(CryptoExplainMetadata.to_json()) + +# convert the object into a dict +crypto_explain_metadata_dict = crypto_explain_metadata_instance.to_dict() +# create an instance of CryptoExplainMetadata from a dict +crypto_explain_metadata_from_dict = CryptoExplainMetadata.from_dict(crypto_explain_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CryptoExplainResult.md b/docs/CryptoExplainResult.md new file mode 100644 index 0000000..6f41a31 --- /dev/null +++ b/docs/CryptoExplainResult.md @@ -0,0 +1,34 @@ +# CryptoExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancelled** | **bool** | Whether the run was cancelled | +**error** | **str** | Why no explanation could be produced. Empty when the run succeeded. | [optional] +**function_id** | **int** | ID of the explained function | +**function_name** | **str** | Name of the explained function | [optional] +**functions_involved** | [**List[CryptoExplainedFunction]**](CryptoExplainedFunction.md) | Other functions involved in the cryptographic operation | [optional] +**summary** | **str** | Explanation of the cryptography the function performs | [optional] + +## Example + +```python +from revengai.models.crypto_explain_result import CryptoExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CryptoExplainResult from a JSON string +crypto_explain_result_instance = CryptoExplainResult.from_json(json) +# print the JSON string representation of the object +print(CryptoExplainResult.to_json()) + +# convert the object into a dict +crypto_explain_result_dict = crypto_explain_result_instance.to_dict() +# create an instance of CryptoExplainResult from a dict +crypto_explain_result_from_dict = CryptoExplainResult.from_dict(crypto_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CryptoExplainedFunction.md b/docs/CryptoExplainedFunction.md new file mode 100644 index 0000000..05d4b70 --- /dev/null +++ b/docs/CryptoExplainedFunction.md @@ -0,0 +1,31 @@ +# CryptoExplainedFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Role this function plays in the cryptographic operation | +**function_id** | **int** | ID of the function | +**function_name** | **str** | Name of the function | + +## Example + +```python +from revengai.models.crypto_explained_function import CryptoExplainedFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of CryptoExplainedFunction from a JSON string +crypto_explained_function_instance = CryptoExplainedFunction.from_json(json) +# print the JSON string representation of the object +print(CryptoExplainedFunction.to_json()) + +# convert the object into a dict +crypto_explained_function_dict = crypto_explained_function_instance.to_dict() +# create an instance of CryptoExplainedFunction from a dict +crypto_explained_function_from_dict = CryptoExplainedFunction.from_dict(crypto_explained_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DecompilerSummary.md b/docs/DecompilerSummary.md new file mode 100644 index 0000000..7be1184 --- /dev/null +++ b/docs/DecompilerSummary.md @@ -0,0 +1,31 @@ +# DecompilerSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | [**Subject**](Subject.md) | | +**summary** | **str** | | +**reachability** | [**CallChain**](CallChain.md) | | [optional] + +## Example + +```python +from revengai.models.decompiler_summary import DecompilerSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of DecompilerSummary from a JSON string +decompiler_summary_instance = DecompilerSummary.from_json(json) +# print the JSON string representation of the object +print(DecompilerSummary.to_json()) + +# convert the object into a dict +decompiler_summary_dict = decompiler_summary_instance.to_dict() +# create an instance of DecompilerSummary from a dict +decompiler_summary_from_dict = DecompilerSummary.from_dict(decompiler_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DecompilerSummaryEvidence.md b/docs/DecompilerSummaryEvidence.md new file mode 100644 index 0000000..b9df794 --- /dev/null +++ b/docs/DecompilerSummaryEvidence.md @@ -0,0 +1,34 @@ +# DecompilerSummaryEvidence + +Semantic summaries derived from decompiler output. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'decompiler_summary'] +**kind** | **str** | | [optional] [default to 'model_interpretation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'indirect'] +**summaries** | [**List[DecompilerSummary]**](DecompilerSummary.md) | | + +## Example + +```python +from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of DecompilerSummaryEvidence from a JSON string +decompiler_summary_evidence_instance = DecompilerSummaryEvidence.from_json(json) +# print the JSON string representation of the object +print(DecompilerSummaryEvidence.to_json()) + +# convert the object into a dict +decompiler_summary_evidence_dict = decompiler_summary_evidence_instance.to_dict() +# create an instance of DecompilerSummaryEvidence from a dict +decompiler_summary_evidence_from_dict = DecompilerSummaryEvidence.from_dict(decompiler_summary_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Display.md b/docs/Display.md new file mode 100644 index 0000000..f3140e4 --- /dev/null +++ b/docs/Display.md @@ -0,0 +1,28 @@ +# Display + + +## Enum + +* `HEX` (value: `'hex'`) + +* `UINT8` (value: `'uint8'`) + +* `UINT16` (value: `'uint16'`) + +* `UINT32` (value: `'uint32'`) + +* `UINT64` (value: `'uint64'`) + +* `INT8` (value: `'int8'`) + +* `INT16` (value: `'int16'`) + +* `INT32` (value: `'int32'`) + +* `INT64` (value: `'int64'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ELFModel.md b/docs/ELFModel.md index d899a07..09f4051 100644 --- a/docs/ELFModel.md +++ b/docs/ELFModel.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **imports** | [**ELFImportModel**](ELFImportModel.md) | | **exported_functions** | **List[str]** | | **dynamic_entries** | [**List[ElfDynamicEntry]**](ElfDynamicEntry.md) | | -**notes** | **List[Dict[str, object]]** | | +**notes** | **List[Optional[Dict[str, object]]]** | | **debug_info** | **Dict[str, object]** | | **version_info** | **Dict[str, object]** | | diff --git a/docs/Endianness.md b/docs/Endianness.md new file mode 100644 index 0000000..8abda30 --- /dev/null +++ b/docs/Endianness.md @@ -0,0 +1,16 @@ +# Endianness + + +## Enum + +* `UNSPECIFIED` (value: `'unspecified'`) + +* `LITTLE` (value: `'little'`) + +* `BIG` (value: `'big'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EvidenceEffect.md b/docs/EvidenceEffect.md new file mode 100644 index 0000000..2d959f2 --- /dev/null +++ b/docs/EvidenceEffect.md @@ -0,0 +1,14 @@ +# EvidenceEffect + + +## Enum + +* `SUPPORTS` (value: `'supports'`) + +* `REFUTES` (value: `'refutes'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EvidenceStrength.md b/docs/EvidenceStrength.md new file mode 100644 index 0000000..d528385 --- /dev/null +++ b/docs/EvidenceStrength.md @@ -0,0 +1,14 @@ +# EvidenceStrength + + +## Enum + +* `DIRECT` (value: `'direct'`) + +* `INDIRECT` (value: `'indirect'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionCall.md b/docs/ExecutionCall.md new file mode 100644 index 0000000..dfe575b --- /dev/null +++ b/docs/ExecutionCall.md @@ -0,0 +1,33 @@ +# ExecutionCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callee_name** | **str** | Name of the called function | +**category** | **str** | Execution category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Execution source the match belongs to | + +## Example + +```python +from revengai.models.execution_call import ExecutionCall + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionCall from a JSON string +execution_call_instance = ExecutionCall.from_json(json) +# print the JSON string representation of the object +print(ExecutionCall.to_json()) + +# convert the object into a dict +execution_call_dict = execution_call_instance.to_dict() +# create an instance of ExecutionCall from a dict +execution_call_from_dict = ExecutionCall.from_dict(execution_call_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionDirectMatch.md b/docs/ExecutionDirectMatch.md new file mode 100644 index 0000000..6e27592 --- /dev/null +++ b/docs/ExecutionDirectMatch.md @@ -0,0 +1,32 @@ +# ExecutionDirectMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Execution category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Execution source the match belongs to | + +## Example + +```python +from revengai.models.execution_direct_match import ExecutionDirectMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionDirectMatch from a JSON string +execution_direct_match_instance = ExecutionDirectMatch.from_json(json) +# print the JSON string representation of the object +print(ExecutionDirectMatch.to_json()) + +# convert the object into a dict +execution_direct_match_dict = execution_direct_match_instance.to_dict() +# create an instance of ExecutionDirectMatch from a dict +execution_direct_match_from_dict = ExecutionDirectMatch.from_dict(execution_direct_match_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionExplainMetadata.md b/docs/ExecutionExplainMetadata.md new file mode 100644 index 0000000..705450e --- /dev/null +++ b/docs/ExecutionExplainMetadata.md @@ -0,0 +1,30 @@ +# ExecutionExplainMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this function. | + +## Example + +```python +from revengai.models.execution_explain_metadata import ExecutionExplainMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionExplainMetadata from a JSON string +execution_explain_metadata_instance = ExecutionExplainMetadata.from_json(json) +# print the JSON string representation of the object +print(ExecutionExplainMetadata.to_json()) + +# convert the object into a dict +execution_explain_metadata_dict = execution_explain_metadata_instance.to_dict() +# create an instance of ExecutionExplainMetadata from a dict +execution_explain_metadata_from_dict = ExecutionExplainMetadata.from_dict(execution_explain_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionExplainResult.md b/docs/ExecutionExplainResult.md new file mode 100644 index 0000000..cd06ceb --- /dev/null +++ b/docs/ExecutionExplainResult.md @@ -0,0 +1,38 @@ +# ExecutionExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancelled** | **bool** | Whether the run was cancelled | +**code_origin** | **str** | Where the executed code originates from | [optional] +**executed_targets** | **List[str]** | Concrete targets that end up executed -- process names, module paths, or shellcode buffers | [optional] +**function_id** | **int** | ID of the explained function | +**function_name** | **str** | Name of the explained function | [optional] +**functions_involved** | [**List[ExecutionExplainedFunction]**](ExecutionExplainedFunction.md) | Other functions involved in the code execution | [optional] +**purpose** | **str** | Purpose of the code execution | [optional] +**summary** | **str** | Explanation of the code execution the function performs | [optional] +**trigger** | **str** | What triggers the execution | [optional] +**what_executes** | **str** | What code ends up executing | [optional] + +## Example + +```python +from revengai.models.execution_explain_result import ExecutionExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionExplainResult from a JSON string +execution_explain_result_instance = ExecutionExplainResult.from_json(json) +# print the JSON string representation of the object +print(ExecutionExplainResult.to_json()) + +# convert the object into a dict +execution_explain_result_dict = execution_explain_result_instance.to_dict() +# create an instance of ExecutionExplainResult from a dict +execution_explain_result_from_dict = ExecutionExplainResult.from_dict(execution_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionExplainedFunction.md b/docs/ExecutionExplainedFunction.md new file mode 100644 index 0000000..c35dc93 --- /dev/null +++ b/docs/ExecutionExplainedFunction.md @@ -0,0 +1,31 @@ +# ExecutionExplainedFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Role this function plays in the code execution | +**function_id** | **int** | ID of the function | +**function_name** | **str** | Name of the function | + +## Example + +```python +from revengai.models.execution_explained_function import ExecutionExplainedFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionExplainedFunction from a JSON string +execution_explained_function_instance = ExecutionExplainedFunction.from_json(json) +# print the JSON string representation of the object +print(ExecutionExplainedFunction.to_json()) + +# convert the object into a dict +execution_explained_function_dict = execution_explained_function_instance.to_dict() +# create an instance of ExecutionExplainedFunction from a dict +execution_explained_function_from_dict = ExecutionExplainedFunction.from_dict(execution_explained_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionFinding.md b/docs/ExecutionFinding.md new file mode 100644 index 0000000..4e2f3a6 --- /dev/null +++ b/docs/ExecutionFinding.md @@ -0,0 +1,39 @@ +# ExecutionFinding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | Function's virtual address, hex-encoded | +**categories** | **List[str]** | Distinct execution categories evidenced by this function | +**confidence** | **str** | High when a direct name match was found, medium when the function only calls into execution APIs | +**direct_matches** | [**List[ExecutionDirectMatch]**](ExecutionDirectMatch.md) | Matches against the function's own name | [optional] +**evidence_count** | **int** | Total number of direct matches and execution calls | +**executes** | **bool** | Whether this function evidences executing code rather than only supporting it | +**execution_calls** | [**List[ExecutionCall]**](ExecutionCall.md) | Matches against names this function calls | [optional] +**function_id** | **int** | ID of the function the finding was reported in | +**function_name** | **str** | Name of the function the finding was reported in | +**function_size** | **int** | Size of the function in bytes | +**sources** | **List[str]** | Distinct execution sources evidenced by this function | + +## Example + +```python +from revengai.models.execution_finding import ExecutionFinding + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionFinding from a JSON string +execution_finding_instance = ExecutionFinding.from_json(json) +# print the JSON string representation of the object +print(ExecutionFinding.to_json()) + +# convert the object into a dict +execution_finding_dict = execution_finding_instance.to_dict() +# create an instance of ExecutionFinding from a dict +execution_finding_from_dict = ExecutionFinding.from_dict(execution_finding_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionScanMetadata.md b/docs/ExecutionScanMetadata.md new file mode 100644 index 0000000..cc96d61 --- /dev/null +++ b/docs/ExecutionScanMetadata.md @@ -0,0 +1,30 @@ +# ExecutionScanMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this analysis. | + +## Example + +```python +from revengai.models.execution_scan_metadata import ExecutionScanMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionScanMetadata from a JSON string +execution_scan_metadata_instance = ExecutionScanMetadata.from_json(json) +# print the JSON string representation of the object +print(ExecutionScanMetadata.to_json()) + +# convert the object into a dict +execution_scan_metadata_dict = execution_scan_metadata_instance.to_dict() +# create an instance of ExecutionScanMetadata from a dict +execution_scan_metadata_from_dict = ExecutionScanMetadata.from_dict(execution_scan_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecutionScanResult.md b/docs/ExecutionScanResult.md new file mode 100644 index 0000000..af98bb5 --- /dev/null +++ b/docs/ExecutionScanResult.md @@ -0,0 +1,31 @@ +# ExecutionScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis the run was performed against | +**findings** | [**List[ExecutionFinding]**](ExecutionFinding.md) | Functions with execution-related evidence, sorted by whether they execute code, then confidence, then evidence count | [optional] +**total_functions** | **int** | Functions the run considered | + +## Example + +```python +from revengai.models.execution_scan_result import ExecutionScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecutionScanResult from a JSON string +execution_scan_result_instance = ExecutionScanResult.from_json(json) +# print the JSON string representation of the object +print(ExecutionScanResult.to_json()) + +# convert the object into a dict +execution_scan_result_dict = execution_scan_result_instance.to_dict() +# create an instance of ExecutionScanResult from a dict +execution_scan_result_from_dict = ExecutionScanResult.from_dict(execution_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FeedbackOutputBody.md b/docs/FeedbackOutputBody.md new file mode 100644 index 0000000..f2e536f --- /dev/null +++ b/docs/FeedbackOutputBody.md @@ -0,0 +1,29 @@ +# FeedbackOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sentiment** | **str** | The sentiment the caller recorded, or null when they have not left any | + +## Example + +```python +from revengai.models.feedback_output_body import FeedbackOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackOutputBody from a JSON string +feedback_output_body_instance = FeedbackOutputBody.from_json(json) +# print the JSON string representation of the object +print(FeedbackOutputBody.to_json()) + +# convert the object into a dict +feedback_output_body_dict = feedback_output_body_instance.to_dict() +# create an instance of FeedbackOutputBody from a dict +feedback_output_body_from_dict = FeedbackOutputBody.from_dict(feedback_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemAnalyseMetadata.md b/docs/FilesystemAnalyseMetadata.md new file mode 100644 index 0000000..76730d1 --- /dev/null +++ b/docs/FilesystemAnalyseMetadata.md @@ -0,0 +1,30 @@ +# FilesystemAnalyseMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this function. | + +## Example + +```python +from revengai.models.filesystem_analyse_metadata import FilesystemAnalyseMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemAnalyseMetadata from a JSON string +filesystem_analyse_metadata_instance = FilesystemAnalyseMetadata.from_json(json) +# print the JSON string representation of the object +print(FilesystemAnalyseMetadata.to_json()) + +# convert the object into a dict +filesystem_analyse_metadata_dict = filesystem_analyse_metadata_instance.to_dict() +# create an instance of FilesystemAnalyseMetadata from a dict +filesystem_analyse_metadata_from_dict = FilesystemAnalyseMetadata.from_dict(filesystem_analyse_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemAnalyseResult.md b/docs/FilesystemAnalyseResult.md new file mode 100644 index 0000000..60001df --- /dev/null +++ b/docs/FilesystemAnalyseResult.md @@ -0,0 +1,37 @@ +# FilesystemAnalyseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancelled** | **bool** | Whether the run was cancelled | +**data_description** | **str** | Description of the data read or written | [optional] +**data_destination** | **str** | Where the data ends up | [optional] +**data_origin** | **str** | Where the data originates from | [optional] +**function_id** | **int** | ID of the explained function | +**function_name** | **str** | Name of the explained function | [optional] +**functions_involved** | [**List[FilesystemExplainedFunction]**](FilesystemExplainedFunction.md) | Other functions involved in the filesystem access | [optional] +**summary** | **str** | Explanation of the filesystem access the function performs | [optional] +**targets** | **List[str]** | Concrete filesystem targets identified -- paths, registry keys, or environment variables | [optional] + +## Example + +```python +from revengai.models.filesystem_analyse_result import FilesystemAnalyseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemAnalyseResult from a JSON string +filesystem_analyse_result_instance = FilesystemAnalyseResult.from_json(json) +# print the JSON string representation of the object +print(FilesystemAnalyseResult.to_json()) + +# convert the object into a dict +filesystem_analyse_result_dict = filesystem_analyse_result_instance.to_dict() +# create an instance of FilesystemAnalyseResult from a dict +filesystem_analyse_result_from_dict = FilesystemAnalyseResult.from_dict(filesystem_analyse_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemCall.md b/docs/FilesystemCall.md new file mode 100644 index 0000000..d1c3233 --- /dev/null +++ b/docs/FilesystemCall.md @@ -0,0 +1,33 @@ +# FilesystemCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callee_name** | **str** | Name of the called function | +**category** | **str** | Filesystem category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Filesystem source the match belongs to | + +## Example + +```python +from revengai.models.filesystem_call import FilesystemCall + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemCall from a JSON string +filesystem_call_instance = FilesystemCall.from_json(json) +# print the JSON string representation of the object +print(FilesystemCall.to_json()) + +# convert the object into a dict +filesystem_call_dict = filesystem_call_instance.to_dict() +# create an instance of FilesystemCall from a dict +filesystem_call_from_dict = FilesystemCall.from_dict(filesystem_call_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemDirectMatch.md b/docs/FilesystemDirectMatch.md new file mode 100644 index 0000000..d4af13a --- /dev/null +++ b/docs/FilesystemDirectMatch.md @@ -0,0 +1,32 @@ +# FilesystemDirectMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Filesystem category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Filesystem source the match belongs to | + +## Example + +```python +from revengai.models.filesystem_direct_match import FilesystemDirectMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemDirectMatch from a JSON string +filesystem_direct_match_instance = FilesystemDirectMatch.from_json(json) +# print the JSON string representation of the object +print(FilesystemDirectMatch.to_json()) + +# convert the object into a dict +filesystem_direct_match_dict = filesystem_direct_match_instance.to_dict() +# create an instance of FilesystemDirectMatch from a dict +filesystem_direct_match_from_dict = FilesystemDirectMatch.from_dict(filesystem_direct_match_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemExplainedFunction.md b/docs/FilesystemExplainedFunction.md new file mode 100644 index 0000000..d8b58a7 --- /dev/null +++ b/docs/FilesystemExplainedFunction.md @@ -0,0 +1,31 @@ +# FilesystemExplainedFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Role this function plays in the filesystem access | +**function_id** | **int** | ID of the function | +**function_name** | **str** | Name of the function | + +## Example + +```python +from revengai.models.filesystem_explained_function import FilesystemExplainedFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemExplainedFunction from a JSON string +filesystem_explained_function_instance = FilesystemExplainedFunction.from_json(json) +# print the JSON string representation of the object +print(FilesystemExplainedFunction.to_json()) + +# convert the object into a dict +filesystem_explained_function_dict = filesystem_explained_function_instance.to_dict() +# create an instance of FilesystemExplainedFunction from a dict +filesystem_explained_function_from_dict = FilesystemExplainedFunction.from_dict(filesystem_explained_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemFinding.md b/docs/FilesystemFinding.md new file mode 100644 index 0000000..0d83263 --- /dev/null +++ b/docs/FilesystemFinding.md @@ -0,0 +1,39 @@ +# FilesystemFinding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | Function's virtual address, hex-encoded | +**categories** | **List[str]** | Distinct filesystem categories evidenced by this function | +**confidence** | **str** | High when a direct name match was found, medium when the function only calls into filesystem APIs | +**direct_matches** | [**List[FilesystemDirectMatch]**](FilesystemDirectMatch.md) | Matches against the function's own name | [optional] +**evidence_count** | **int** | Total number of direct matches and filesystem calls | +**filesystem_calls** | [**List[FilesystemCall]**](FilesystemCall.md) | Matches against names this function calls | [optional] +**function_id** | **int** | ID of the function the finding was reported in | +**function_name** | **str** | Name of the function the finding was reported in | +**function_size** | **int** | Size of the function in bytes | +**modifies** | **bool** | Whether this function evidences modifying the filesystem rather than only observing it | +**sources** | **List[str]** | Distinct filesystem sources evidenced by this function | + +## Example + +```python +from revengai.models.filesystem_finding import FilesystemFinding + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemFinding from a JSON string +filesystem_finding_instance = FilesystemFinding.from_json(json) +# print the JSON string representation of the object +print(FilesystemFinding.to_json()) + +# convert the object into a dict +filesystem_finding_dict = filesystem_finding_instance.to_dict() +# create an instance of FilesystemFinding from a dict +filesystem_finding_from_dict = FilesystemFinding.from_dict(filesystem_finding_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemScanMetadata.md b/docs/FilesystemScanMetadata.md new file mode 100644 index 0000000..a6e45a3 --- /dev/null +++ b/docs/FilesystemScanMetadata.md @@ -0,0 +1,30 @@ +# FilesystemScanMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this analysis. | + +## Example + +```python +from revengai.models.filesystem_scan_metadata import FilesystemScanMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemScanMetadata from a JSON string +filesystem_scan_metadata_instance = FilesystemScanMetadata.from_json(json) +# print the JSON string representation of the object +print(FilesystemScanMetadata.to_json()) + +# convert the object into a dict +filesystem_scan_metadata_dict = filesystem_scan_metadata_instance.to_dict() +# create an instance of FilesystemScanMetadata from a dict +filesystem_scan_metadata_from_dict = FilesystemScanMetadata.from_dict(filesystem_scan_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilesystemScanResult.md b/docs/FilesystemScanResult.md new file mode 100644 index 0000000..9394cda --- /dev/null +++ b/docs/FilesystemScanResult.md @@ -0,0 +1,31 @@ +# FilesystemScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis the run was performed against | +**findings** | [**List[FilesystemFinding]**](FilesystemFinding.md) | Functions with filesystem-related evidence, sorted by whether they modify the filesystem, then confidence, then evidence count | [optional] +**total_functions** | **int** | Functions the run considered | + +## Example + +```python +from revengai.models.filesystem_scan_result import FilesystemScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of FilesystemScanResult from a JSON string +filesystem_scan_result_instance = FilesystemScanResult.from_json(json) +# print the JSON string representation of the object +print(FilesystemScanResult.to_json()) + +# convert the object into a dict +filesystem_scan_result_dict = filesystem_scan_result_instance.to_dict() +# create an instance of FilesystemScanResult from a dict +filesystem_scan_result_from_dict = FilesystemScanResult.from_dict(filesystem_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Finding.md b/docs/Finding.md new file mode 100644 index 0000000..924b421 --- /dev/null +++ b/docs/Finding.md @@ -0,0 +1,31 @@ +# Finding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**property_id** | **str** | | [optional] [default to ''] +**reachability** | [**ReportReachabilityStatus**](ReportReachabilityStatus.md) | | [optional] +**evidence** | [**List[FindingEvidenceInner]**](FindingEvidenceInner.md) | | [optional] + +## Example + +```python +from revengai.models.finding import Finding + +# TODO update the JSON string below +json = "{}" +# create an instance of Finding from a JSON string +finding_instance = Finding.from_json(json) +# print the JSON string representation of the object +print(Finding.to_json()) + +# convert the object into a dict +finding_dict = finding_instance.to_dict() +# create an instance of Finding from a dict +finding_from_dict = Finding.from_dict(finding_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FindingEvidenceInner.md b/docs/FindingEvidenceInner.md new file mode 100644 index 0000000..eb1500e --- /dev/null +++ b/docs/FindingEvidenceInner.md @@ -0,0 +1,48 @@ +# FindingEvidenceInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'hardcoded_secret'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | **str** | | [default to 'supports'] +**strength** | [**EvidenceStrength**](EvidenceStrength.md) | | +**call_chain** | **List[int]** | | +**constants** | [**List[ReferencedConstant]**](ReferencedConstant.md) | | +**calls** | [**List[ImportedApiCall]**](ImportedApiCall.md) | | +**strings** | [**List[SuspiciousString]**](SuspiciousString.md) | | +**similarities** | [**List[FunctionSimilarity]**](FunctionSimilarity.md) | | +**apis** | [**List[ImportedApi]**](ImportedApi.md) | | +**summaries** | [**List[DecompilerSummary]**](DecompilerSummary.md) | | +**interpretations** | [**List[ModelInterpretation]**](ModelInterpretation.md) | | +**values** | [**List[BytesConstant]**](BytesConstant.md) | | +**rule_id** | **str** | | +**description** | **str** | | +**secret_kind** | [**RuleKind**](RuleKind.md) | | +**secret** | **str** | | +**entropy** | **float** | | +**size** | **int** | | +**references** | **List[int]** | | + +## Example + +```python +from revengai.models.finding_evidence_inner import FindingEvidenceInner + +# TODO update the JSON string below +json = "{}" +# create an instance of FindingEvidenceInner from a JSON string +finding_evidence_inner_instance = FindingEvidenceInner.from_json(json) +# print the JSON string representation of the object +print(FindingEvidenceInner.to_json()) + +# convert the object into a dict +finding_evidence_inner_dict = finding_evidence_inner_instance.to_dict() +# create an instance of FindingEvidenceInner from a dict +finding_evidence_inner_from_dict = FindingEvidenceInner.from_dict(finding_evidence_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionBoundary.md b/docs/FunctionBoundary.md index d94f0b2..6f65db8 100644 --- a/docs/FunctionBoundary.md +++ b/docs/FunctionBoundary.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mangled_name** | **str** | | -**start_address** | **int** | | **end_address** | **int** | | **include_in_analysis** | **bool** | | [optional] +**mangled_name** | **str** | | +**start_address** | **int** | | ## Example diff --git a/docs/FunctionSimilarity.md b/docs/FunctionSimilarity.md new file mode 100644 index 0000000..94a3793 --- /dev/null +++ b/docs/FunctionSimilarity.md @@ -0,0 +1,31 @@ +# FunctionSimilarity + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**similarity** | **float** | | +**subject** | [**Subject**](Subject.md) | | + +## Example + +```python +from revengai.models.function_similarity import FunctionSimilarity + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionSimilarity from a JSON string +function_similarity_instance = FunctionSimilarity.from_json(json) +# print the JSON string representation of the object +print(FunctionSimilarity.to_json()) + +# convert the object into a dict +function_similarity_dict = function_similarity_instance.to_dict() +# create an instance of FunctionSimilarity from a dict +function_similarity_from_dict = FunctionSimilarity.from_dict(function_similarity_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionSimilarityEvidence.md b/docs/FunctionSimilarityEvidence.md new file mode 100644 index 0000000..eea0b97 --- /dev/null +++ b/docs/FunctionSimilarityEvidence.md @@ -0,0 +1,34 @@ +# FunctionSimilarityEvidence + +Function-similarity results suggestive of a capability. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'function_similarity'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'indirect'] +**similarities** | [**List[FunctionSimilarity]**](FunctionSimilarity.md) | | + +## Example + +```python +from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionSimilarityEvidence from a JSON string +function_similarity_evidence_instance = FunctionSimilarityEvidence.from_json(json) +# print the JSON string representation of the object +print(FunctionSimilarityEvidence.to_json()) + +# convert the object into a dict +function_similarity_evidence_dict = function_similarity_evidence_instance.to_dict() +# create an instance of FunctionSimilarityEvidence from a dict +function_similarity_evidence_from_dict = FunctionSimilarityEvidence.from_dict(function_similarity_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 1588f2e..46552eb 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -31,7 +31,7 @@ Method | HTTP request | Description # **add_function_callee** -> Dict[str, object] add_function_callee(function_id, add_callee_input_body) +> object add_function_callee(function_id, add_callee_input_body) Add a callee to a function @@ -103,7 +103,7 @@ Name | Type | Description | Notes ### Return type -**Dict[str, object]** +**object** ### Authorization @@ -128,7 +128,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **add_user_string_to_function** -> Dict[str, object] add_user_string_to_function(function_id, add_user_string_to_function_input_body) +> object add_user_string_to_function(function_id, add_user_string_to_function_input_body) Add a user-provided string to a function. @@ -199,7 +199,7 @@ Name | Type | Description | Notes ### Return type -**Dict[str, object]** +**object** ### Authorization diff --git a/docs/FunctionsRenamingHistoryApi.md b/docs/FunctionsRenamingHistoryApi.md index 2702d65..ede4150 100644 --- a/docs/FunctionsRenamingHistoryApi.md +++ b/docs/FunctionsRenamingHistoryApi.md @@ -650,7 +650,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **revert_function_name_0** -> Dict[str, object] revert_function_name_0(function_id, history_id) +> object revert_function_name_0(function_id, history_id) Revert function name @@ -720,7 +720,7 @@ Name | Type | Description | Notes ### Return type -**Dict[str, object]** +**object** ### Authorization diff --git a/docs/HardcodedSecretEvidence.md b/docs/HardcodedSecretEvidence.md new file mode 100644 index 0000000..5e69c03 --- /dev/null +++ b/docs/HardcodedSecretEvidence.md @@ -0,0 +1,40 @@ +# HardcodedSecretEvidence + +A hard-coded secret identified in the binary's data. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'hardcoded_secret'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | **str** | | [optional] [default to 'supports'] +**strength** | [**EvidenceStrength**](EvidenceStrength.md) | | +**rule_id** | **str** | | +**description** | **str** | | +**secret_kind** | [**RuleKind**](RuleKind.md) | | +**secret** | **str** | | +**entropy** | **float** | | +**size** | **int** | | +**references** | **List[int]** | | + +## Example + +```python +from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of HardcodedSecretEvidence from a JSON string +hardcoded_secret_evidence_instance = HardcodedSecretEvidence.from_json(json) +# print the JSON string representation of the object +print(HardcodedSecretEvidence.to_json()) + +# convert the object into a dict +hardcoded_secret_evidence_dict = hardcoded_secret_evidence_instance.to_dict() +# create an instance of HardcodedSecretEvidence from a dict +hardcoded_secret_evidence_from_dict = HardcodedSecretEvidence.from_dict(hardcoded_secret_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IOC.md b/docs/IOC.md index 3c2822c..9f07571 100644 --- a/docs/IOC.md +++ b/docs/IOC.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | Type of the IOC | -**value** | **str** | Value of the IOC | -**description** | **str** | Description of the IOC | -**source** | **str** | | [optional] -**function_id** | **int** | | [optional] -**function_name** | **str** | | [optional] +**description** | **str** | What the indicator means | +**function_id** | **int** | ID of the function it was found in. Null when the source does not resolve to one. | +**function_name** | **str** | Name of the function it was found in. Null when the source does not resolve to one. | +**source** | **str** | Where in the binary it was found, usually a hex address. Null when the agent did not report one. | +**type** | **str** | Indicator type | +**value** | **str** | The indicator itself | ## Example diff --git a/docs/ImportedApi.md b/docs/ImportedApi.md new file mode 100644 index 0000000..6171e77 --- /dev/null +++ b/docs/ImportedApi.md @@ -0,0 +1,30 @@ +# ImportedApi + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**module** | **str** | | [optional] +**api** | **str** | | + +## Example + +```python +from revengai.models.imported_api import ImportedApi + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportedApi from a JSON string +imported_api_instance = ImportedApi.from_json(json) +# print the JSON string representation of the object +print(ImportedApi.to_json()) + +# convert the object into a dict +imported_api_dict = imported_api_instance.to_dict() +# create an instance of ImportedApi from a dict +imported_api_from_dict = ImportedApi.from_dict(imported_api_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportedApiCall.md b/docs/ImportedApiCall.md new file mode 100644 index 0000000..b613dfa --- /dev/null +++ b/docs/ImportedApiCall.md @@ -0,0 +1,31 @@ +# ImportedApiCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**imported_api** | [**ImportedApi**](ImportedApi.md) | | +**subject** | [**Subject**](Subject.md) | | +**reachability** | [**CallChain**](CallChain.md) | | [optional] + +## Example + +```python +from revengai.models.imported_api_call import ImportedApiCall + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportedApiCall from a JSON string +imported_api_call_instance = ImportedApiCall.from_json(json) +# print the JSON string representation of the object +print(ImportedApiCall.to_json()) + +# convert the object into a dict +imported_api_call_dict = imported_api_call_instance.to_dict() +# create an instance of ImportedApiCall from a dict +imported_api_call_from_dict = ImportedApiCall.from_dict(imported_api_call_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportedApiCallEvidence.md b/docs/ImportedApiCallEvidence.md new file mode 100644 index 0000000..c461b21 --- /dev/null +++ b/docs/ImportedApiCallEvidence.md @@ -0,0 +1,34 @@ +# ImportedApiCallEvidence + +Imported API calls observed in the program. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'imported_api_call'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'direct'] +**calls** | [**List[ImportedApiCall]**](ImportedApiCall.md) | | + +## Example + +```python +from revengai.models.imported_api_call_evidence import ImportedApiCallEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportedApiCallEvidence from a JSON string +imported_api_call_evidence_instance = ImportedApiCallEvidence.from_json(json) +# print the JSON string representation of the object +print(ImportedApiCallEvidence.to_json()) + +# convert the object into a dict +imported_api_call_evidence_dict = imported_api_call_evidence_instance.to_dict() +# create an instance of ImportedApiCallEvidence from a dict +imported_api_call_evidence_from_dict = ImportedApiCallEvidence.from_dict(imported_api_call_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KnownConstantEvidence.md b/docs/KnownConstantEvidence.md new file mode 100644 index 0000000..5e1a19d --- /dev/null +++ b/docs/KnownConstantEvidence.md @@ -0,0 +1,34 @@ +# KnownConstantEvidence + +A known constant whose semantic use has not been demonstrated. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'known_constant'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'indirect'] +**values** | [**List[BytesConstant]**](BytesConstant.md) | | + +## Example + +```python +from revengai.models.known_constant_evidence import KnownConstantEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of KnownConstantEvidence from a JSON string +known_constant_evidence_instance = KnownConstantEvidence.from_json(json) +# print the JSON string representation of the object +print(KnownConstantEvidence.to_json()) + +# convert the object into a dict +known_constant_evidence_dict = known_constant_evidence_instance.to_dict() +# create an instance of KnownConstantEvidence from a dict +known_constant_evidence_from_dict = KnownConstantEvidence.from_dict(known_constant_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Meta.md b/docs/Meta.md new file mode 100644 index 0000000..20a63c8 --- /dev/null +++ b/docs/Meta.md @@ -0,0 +1,29 @@ +# Meta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endianness** | [**Endianness**](Endianness.md) | | [optional] + +## Example + +```python +from revengai.models.meta import Meta + +# TODO update the JSON string below +json = "{}" +# create an instance of Meta from a JSON string +meta_instance = Meta.from_json(json) +# print the JSON string representation of the object +print(Meta.to_json()) + +# convert the object into a dict +meta_dict = meta_instance.to_dict() +# create an instance of Meta from a dict +meta_from_dict = Meta.from_dict(meta_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Metadata.md b/docs/Metadata.md new file mode 100644 index 0000000..b5e6db0 --- /dev/null +++ b/docs/Metadata.md @@ -0,0 +1,30 @@ +# Metadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first, empty until the run logs anything. Each entry is a [timestamp, message] pair. | +**status** | **str** | Run status. UNINITIALISED means this agent has never been triggered for the analysis, so it is safe to start one. | + +## Example + +```python +from revengai.models.metadata import Metadata + +# TODO update the JSON string below +json = "{}" +# create an instance of Metadata from a JSON string +metadata_instance = Metadata.from_json(json) +# print the JSON string representation of the object +print(Metadata.to_json()) + +# convert the object into a dict +metadata_dict = metadata_instance.to_dict() +# create an instance of Metadata from a dict +metadata_from_dict = Metadata.from_dict(metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelInterpretation.md b/docs/ModelInterpretation.md new file mode 100644 index 0000000..1eb79e8 --- /dev/null +++ b/docs/ModelInterpretation.md @@ -0,0 +1,29 @@ +# ModelInterpretation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interpretation** | **str** | | [optional] + +## Example + +```python +from revengai.models.model_interpretation import ModelInterpretation + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelInterpretation from a JSON string +model_interpretation_instance = ModelInterpretation.from_json(json) +# print the JSON string representation of the object +print(ModelInterpretation.to_json()) + +# convert the object into a dict +model_interpretation_dict = model_interpretation_instance.to_dict() +# create an instance of ModelInterpretation from a dict +model_interpretation_from_dict = ModelInterpretation.from_dict(model_interpretation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelInterpretationEvidence.md b/docs/ModelInterpretationEvidence.md new file mode 100644 index 0000000..ec4b6d4 --- /dev/null +++ b/docs/ModelInterpretationEvidence.md @@ -0,0 +1,34 @@ +# ModelInterpretationEvidence + +LLM interpretations of observations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'model_interpretation'] +**kind** | **str** | | [optional] [default to 'model_interpretation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | [**EvidenceStrength**](EvidenceStrength.md) | | [optional] +**interpretations** | [**List[ModelInterpretation]**](ModelInterpretation.md) | | + +## Example + +```python +from revengai.models.model_interpretation_evidence import ModelInterpretationEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelInterpretationEvidence from a JSON string +model_interpretation_evidence_instance = ModelInterpretationEvidence.from_json(json) +# print the JSON string representation of the object +print(ModelInterpretationEvidence.to_json()) + +# convert the object into a dict +model_interpretation_evidence_dict = model_interpretation_evidence_instance.to_dict() +# create an instance of ModelInterpretationEvidence from a dict +model_interpretation_evidence_from_dict = ModelInterpretationEvidence.from_dict(model_interpretation_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingCall.md b/docs/NetworkingCall.md new file mode 100644 index 0000000..196e8d1 --- /dev/null +++ b/docs/NetworkingCall.md @@ -0,0 +1,33 @@ +# NetworkingCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callee_name** | **str** | Name of the called function | +**category** | **str** | Networking category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Networking source the match belongs to | + +## Example + +```python +from revengai.models.networking_call import NetworkingCall + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingCall from a JSON string +networking_call_instance = NetworkingCall.from_json(json) +# print the JSON string representation of the object +print(NetworkingCall.to_json()) + +# convert the object into a dict +networking_call_dict = networking_call_instance.to_dict() +# create an instance of NetworkingCall from a dict +networking_call_from_dict = NetworkingCall.from_dict(networking_call_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingDirectMatch.md b/docs/NetworkingDirectMatch.md new file mode 100644 index 0000000..3a9c6e1 --- /dev/null +++ b/docs/NetworkingDirectMatch.md @@ -0,0 +1,32 @@ +# NetworkingDirectMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Networking category of the match | +**how** | **str** | Detection tier that produced the match | +**matched_name** | **str** | Name or token that matched | +**source** | **str** | Networking source the match belongs to | + +## Example + +```python +from revengai.models.networking_direct_match import NetworkingDirectMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingDirectMatch from a JSON string +networking_direct_match_instance = NetworkingDirectMatch.from_json(json) +# print the JSON string representation of the object +print(NetworkingDirectMatch.to_json()) + +# convert the object into a dict +networking_direct_match_dict = networking_direct_match_instance.to_dict() +# create an instance of NetworkingDirectMatch from a dict +networking_direct_match_from_dict = NetworkingDirectMatch.from_dict(networking_direct_match_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingExplainMetadata.md b/docs/NetworkingExplainMetadata.md new file mode 100644 index 0000000..cae9754 --- /dev/null +++ b/docs/NetworkingExplainMetadata.md @@ -0,0 +1,30 @@ +# NetworkingExplainMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this function. | + +## Example + +```python +from revengai.models.networking_explain_metadata import NetworkingExplainMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingExplainMetadata from a JSON string +networking_explain_metadata_instance = NetworkingExplainMetadata.from_json(json) +# print the JSON string representation of the object +print(NetworkingExplainMetadata.to_json()) + +# convert the object into a dict +networking_explain_metadata_dict = networking_explain_metadata_instance.to_dict() +# create an instance of NetworkingExplainMetadata from a dict +networking_explain_metadata_from_dict = NetworkingExplainMetadata.from_dict(networking_explain_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingExplainResult.md b/docs/NetworkingExplainResult.md new file mode 100644 index 0000000..605b0ab --- /dev/null +++ b/docs/NetworkingExplainResult.md @@ -0,0 +1,39 @@ +# NetworkingExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancelled** | **bool** | Whether the run was cancelled | +**data_received** | **str** | Description of the data received | [optional] +**data_sent** | **str** | Description of the data sent | [optional] +**data_usage** | **str** | How the sent or received data is used | [optional] +**endpoints** | **List[str]** | Concrete remote endpoints identified -- IPs, hostnames, or URLs | [optional] +**function_id** | **int** | ID of the explained function | +**function_name** | **str** | Name of the explained function | [optional] +**functions_involved** | [**List[NetworkingExplainedFunction]**](NetworkingExplainedFunction.md) | Other functions involved in the network communication | [optional] +**protocol** | **str** | Protocol used for the communication | [optional] +**purpose** | **str** | Purpose of the network communication | [optional] +**summary** | **str** | Explanation of the network communication the function performs | [optional] + +## Example + +```python +from revengai.models.networking_explain_result import NetworkingExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingExplainResult from a JSON string +networking_explain_result_instance = NetworkingExplainResult.from_json(json) +# print the JSON string representation of the object +print(NetworkingExplainResult.to_json()) + +# convert the object into a dict +networking_explain_result_dict = networking_explain_result_instance.to_dict() +# create an instance of NetworkingExplainResult from a dict +networking_explain_result_from_dict = NetworkingExplainResult.from_dict(networking_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingExplainedFunction.md b/docs/NetworkingExplainedFunction.md new file mode 100644 index 0000000..9507c06 --- /dev/null +++ b/docs/NetworkingExplainedFunction.md @@ -0,0 +1,31 @@ +# NetworkingExplainedFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Role this function plays in the network communication | +**function_id** | **int** | ID of the function | +**function_name** | **str** | Name of the function | + +## Example + +```python +from revengai.models.networking_explained_function import NetworkingExplainedFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingExplainedFunction from a JSON string +networking_explained_function_instance = NetworkingExplainedFunction.from_json(json) +# print the JSON string representation of the object +print(NetworkingExplainedFunction.to_json()) + +# convert the object into a dict +networking_explained_function_dict = networking_explained_function_instance.to_dict() +# create an instance of NetworkingExplainedFunction from a dict +networking_explained_function_from_dict = NetworkingExplainedFunction.from_dict(networking_explained_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingFinding.md b/docs/NetworkingFinding.md new file mode 100644 index 0000000..c5d35bb --- /dev/null +++ b/docs/NetworkingFinding.md @@ -0,0 +1,39 @@ +# NetworkingFinding + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | Function's virtual address, hex-encoded | +**categories** | **List[str]** | Distinct networking categories evidenced by this function | +**confidence** | **str** | High when a direct name match was found, medium when the function only calls into networking APIs | +**direct_matches** | [**List[NetworkingDirectMatch]**](NetworkingDirectMatch.md) | Matches against the function's own name | [optional] +**evidence_count** | **int** | Total number of direct matches and network calls | +**function_id** | **int** | ID of the function the finding was reported in | +**function_name** | **str** | Name of the function the finding was reported in | +**function_size** | **int** | Size of the function in bytes | +**network_calls** | [**List[NetworkingCall]**](NetworkingCall.md) | Matches against names this function calls | [optional] +**remote** | **bool** | Whether this function evidences remote communication rather than only supporting it | +**sources** | **List[str]** | Distinct networking sources evidenced by this function | + +## Example + +```python +from revengai.models.networking_finding import NetworkingFinding + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingFinding from a JSON string +networking_finding_instance = NetworkingFinding.from_json(json) +# print the JSON string representation of the object +print(NetworkingFinding.to_json()) + +# convert the object into a dict +networking_finding_dict = networking_finding_instance.to_dict() +# create an instance of NetworkingFinding from a dict +networking_finding_from_dict = NetworkingFinding.from_dict(networking_finding_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingScanMetadata.md b/docs/NetworkingScanMetadata.md new file mode 100644 index 0000000..f109ce1 --- /dev/null +++ b/docs/NetworkingScanMetadata.md @@ -0,0 +1,30 @@ +# NetworkingScanMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**log_history** | **List[List[object]]** | Progress messages the run recorded, oldest first. | [optional] +**status** | **str** | Run status. UNINITIALISED means the agent has never been triggered for this analysis. | + +## Example + +```python +from revengai.models.networking_scan_metadata import NetworkingScanMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingScanMetadata from a JSON string +networking_scan_metadata_instance = NetworkingScanMetadata.from_json(json) +# print the JSON string representation of the object +print(NetworkingScanMetadata.to_json()) + +# convert the object into a dict +networking_scan_metadata_dict = networking_scan_metadata_instance.to_dict() +# create an instance of NetworkingScanMetadata from a dict +networking_scan_metadata_from_dict = NetworkingScanMetadata.from_dict(networking_scan_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkingScanResult.md b/docs/NetworkingScanResult.md new file mode 100644 index 0000000..ddbc35a --- /dev/null +++ b/docs/NetworkingScanResult.md @@ -0,0 +1,31 @@ +# NetworkingScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis the run was performed against | +**findings** | [**List[NetworkingFinding]**](NetworkingFinding.md) | Functions with networking-related evidence, sorted by remoteness then confidence then evidence count | [optional] +**total_functions** | **int** | Functions the run considered | + +## Example + +```python +from revengai.models.networking_scan_result import NetworkingScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkingScanResult from a JSON string +networking_scan_result_instance = NetworkingScanResult.from_json(json) +# print the JSON string representation of the object +print(NetworkingScanResult.to_json()) + +# convert the object into a dict +networking_scan_result_dict = networking_scan_result_instance.to_dict() +# create an instance of NetworkingScanResult from a dict +networking_scan_result_from_dict = NetworkingScanResult.from_dict(networking_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationCreateMetadataCreateResult.md b/docs/OperationCreateMetadataCreateResult.md new file mode 100644 index 0000000..b7e22cb --- /dev/null +++ b/docs/OperationCreateMetadataCreateResult.md @@ -0,0 +1,33 @@ +# OperationCreateMetadataCreateResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**CreateMetadata**](CreateMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**CreateResult**](CreateResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationCreateMetadataCreateResult from a JSON string +operation_create_metadata_create_result_instance = OperationCreateMetadataCreateResult.from_json(json) +# print the JSON string representation of the object +print(OperationCreateMetadataCreateResult.to_json()) + +# convert the object into a dict +operation_create_metadata_create_result_dict = operation_create_metadata_create_result_instance.to_dict() +# create an instance of OperationCreateMetadataCreateResult from a dict +operation_create_metadata_create_result_from_dict = OperationCreateMetadataCreateResult.from_dict(operation_create_metadata_create_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationCryptoExplainMetadataCryptoExplainResult.md b/docs/OperationCryptoExplainMetadataCryptoExplainResult.md new file mode 100644 index 0000000..c1accd8 --- /dev/null +++ b/docs/OperationCryptoExplainMetadataCryptoExplainResult.md @@ -0,0 +1,33 @@ +# OperationCryptoExplainMetadataCryptoExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**CryptoExplainMetadata**](CryptoExplainMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**CryptoExplainResult**](CryptoExplainResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationCryptoExplainMetadataCryptoExplainResult from a JSON string +operation_crypto_explain_metadata_crypto_explain_result_instance = OperationCryptoExplainMetadataCryptoExplainResult.from_json(json) +# print the JSON string representation of the object +print(OperationCryptoExplainMetadataCryptoExplainResult.to_json()) + +# convert the object into a dict +operation_crypto_explain_metadata_crypto_explain_result_dict = operation_crypto_explain_metadata_crypto_explain_result_instance.to_dict() +# create an instance of OperationCryptoExplainMetadataCryptoExplainResult from a dict +operation_crypto_explain_metadata_crypto_explain_result_from_dict = OperationCryptoExplainMetadataCryptoExplainResult.from_dict(operation_crypto_explain_metadata_crypto_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationExecutionExplainMetadataExecutionExplainResult.md b/docs/OperationExecutionExplainMetadataExecutionExplainResult.md new file mode 100644 index 0000000..d78c7d2 --- /dev/null +++ b/docs/OperationExecutionExplainMetadataExecutionExplainResult.md @@ -0,0 +1,33 @@ +# OperationExecutionExplainMetadataExecutionExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**ExecutionExplainMetadata**](ExecutionExplainMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**ExecutionExplainResult**](ExecutionExplainResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationExecutionExplainMetadataExecutionExplainResult from a JSON string +operation_execution_explain_metadata_execution_explain_result_instance = OperationExecutionExplainMetadataExecutionExplainResult.from_json(json) +# print the JSON string representation of the object +print(OperationExecutionExplainMetadataExecutionExplainResult.to_json()) + +# convert the object into a dict +operation_execution_explain_metadata_execution_explain_result_dict = operation_execution_explain_metadata_execution_explain_result_instance.to_dict() +# create an instance of OperationExecutionExplainMetadataExecutionExplainResult from a dict +operation_execution_explain_metadata_execution_explain_result_from_dict = OperationExecutionExplainMetadataExecutionExplainResult.from_dict(operation_execution_explain_metadata_execution_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationExecutionScanMetadataExecutionScanResult.md b/docs/OperationExecutionScanMetadataExecutionScanResult.md new file mode 100644 index 0000000..86d1ec6 --- /dev/null +++ b/docs/OperationExecutionScanMetadataExecutionScanResult.md @@ -0,0 +1,33 @@ +# OperationExecutionScanMetadataExecutionScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**ExecutionScanMetadata**](ExecutionScanMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**ExecutionScanResult**](ExecutionScanResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationExecutionScanMetadataExecutionScanResult from a JSON string +operation_execution_scan_metadata_execution_scan_result_instance = OperationExecutionScanMetadataExecutionScanResult.from_json(json) +# print the JSON string representation of the object +print(OperationExecutionScanMetadataExecutionScanResult.to_json()) + +# convert the object into a dict +operation_execution_scan_metadata_execution_scan_result_dict = operation_execution_scan_metadata_execution_scan_result_instance.to_dict() +# create an instance of OperationExecutionScanMetadataExecutionScanResult from a dict +operation_execution_scan_metadata_execution_scan_result_from_dict = OperationExecutionScanMetadataExecutionScanResult.from_dict(operation_execution_scan_metadata_execution_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md b/docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md new file mode 100644 index 0000000..6a743b6 --- /dev/null +++ b/docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md @@ -0,0 +1,33 @@ +# OperationFilesystemAnalyseMetadataFilesystemAnalyseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**FilesystemAnalyseMetadata**](FilesystemAnalyseMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**FilesystemAnalyseResult**](FilesystemAnalyseResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationFilesystemAnalyseMetadataFilesystemAnalyseResult from a JSON string +operation_filesystem_analyse_metadata_filesystem_analyse_result_instance = OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.from_json(json) +# print the JSON string representation of the object +print(OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.to_json()) + +# convert the object into a dict +operation_filesystem_analyse_metadata_filesystem_analyse_result_dict = operation_filesystem_analyse_metadata_filesystem_analyse_result_instance.to_dict() +# create an instance of OperationFilesystemAnalyseMetadataFilesystemAnalyseResult from a dict +operation_filesystem_analyse_metadata_filesystem_analyse_result_from_dict = OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.from_dict(operation_filesystem_analyse_metadata_filesystem_analyse_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationFilesystemScanMetadataFilesystemScanResult.md b/docs/OperationFilesystemScanMetadataFilesystemScanResult.md new file mode 100644 index 0000000..f886db4 --- /dev/null +++ b/docs/OperationFilesystemScanMetadataFilesystemScanResult.md @@ -0,0 +1,33 @@ +# OperationFilesystemScanMetadataFilesystemScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**FilesystemScanMetadata**](FilesystemScanMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**FilesystemScanResult**](FilesystemScanResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationFilesystemScanMetadataFilesystemScanResult from a JSON string +operation_filesystem_scan_metadata_filesystem_scan_result_instance = OperationFilesystemScanMetadataFilesystemScanResult.from_json(json) +# print the JSON string representation of the object +print(OperationFilesystemScanMetadataFilesystemScanResult.to_json()) + +# convert the object into a dict +operation_filesystem_scan_metadata_filesystem_scan_result_dict = operation_filesystem_scan_metadata_filesystem_scan_result_instance.to_dict() +# create an instance of OperationFilesystemScanMetadataFilesystemScanResult from a dict +operation_filesystem_scan_metadata_filesystem_scan_result_from_dict = OperationFilesystemScanMetadataFilesystemScanResult.from_dict(operation_filesystem_scan_metadata_filesystem_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationMetadataCapabilitiesResult.md b/docs/OperationMetadataCapabilitiesResult.md new file mode 100644 index 0000000..06e9e1f --- /dev/null +++ b/docs/OperationMetadataCapabilitiesResult.md @@ -0,0 +1,33 @@ +# OperationMetadataCapabilitiesResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**Metadata**](Metadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**CapabilitiesResult**](CapabilitiesResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationMetadataCapabilitiesResult from a JSON string +operation_metadata_capabilities_result_instance = OperationMetadataCapabilitiesResult.from_json(json) +# print the JSON string representation of the object +print(OperationMetadataCapabilitiesResult.to_json()) + +# convert the object into a dict +operation_metadata_capabilities_result_dict = operation_metadata_capabilities_result_instance.to_dict() +# create an instance of OperationMetadataCapabilitiesResult from a dict +operation_metadata_capabilities_result_from_dict = OperationMetadataCapabilitiesResult.from_dict(operation_metadata_capabilities_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationMetadataRemediationResult.md b/docs/OperationMetadataRemediationResult.md new file mode 100644 index 0000000..ccd4d1f --- /dev/null +++ b/docs/OperationMetadataRemediationResult.md @@ -0,0 +1,33 @@ +# OperationMetadataRemediationResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**Metadata**](Metadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**RemediationResult**](RemediationResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationMetadataRemediationResult from a JSON string +operation_metadata_remediation_result_instance = OperationMetadataRemediationResult.from_json(json) +# print the JSON string representation of the object +print(OperationMetadataRemediationResult.to_json()) + +# convert the object into a dict +operation_metadata_remediation_result_dict = operation_metadata_remediation_result_instance.to_dict() +# create an instance of OperationMetadataRemediationResult from a dict +operation_metadata_remediation_result_from_dict = OperationMetadataRemediationResult.from_dict(operation_metadata_remediation_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationMetadataReportResult.md b/docs/OperationMetadataReportResult.md new file mode 100644 index 0000000..df6b378 --- /dev/null +++ b/docs/OperationMetadataReportResult.md @@ -0,0 +1,33 @@ +# OperationMetadataReportResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**Metadata**](Metadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**ReportResult**](ReportResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationMetadataReportResult from a JSON string +operation_metadata_report_result_instance = OperationMetadataReportResult.from_json(json) +# print the JSON string representation of the object +print(OperationMetadataReportResult.to_json()) + +# convert the object into a dict +operation_metadata_report_result_dict = operation_metadata_report_result_instance.to_dict() +# create an instance of OperationMetadataReportResult from a dict +operation_metadata_report_result_from_dict = OperationMetadataReportResult.from_dict(operation_metadata_report_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationMetadataThreatReportResult.md b/docs/OperationMetadataThreatReportResult.md new file mode 100644 index 0000000..a28fd73 --- /dev/null +++ b/docs/OperationMetadataThreatReportResult.md @@ -0,0 +1,33 @@ +# OperationMetadataThreatReportResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**Metadata**](Metadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**ThreatReportResult**](ThreatReportResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationMetadataThreatReportResult from a JSON string +operation_metadata_threat_report_result_instance = OperationMetadataThreatReportResult.from_json(json) +# print the JSON string representation of the object +print(OperationMetadataThreatReportResult.to_json()) + +# convert the object into a dict +operation_metadata_threat_report_result_dict = operation_metadata_threat_report_result_instance.to_dict() +# create an instance of OperationMetadataThreatReportResult from a dict +operation_metadata_threat_report_result_from_dict = OperationMetadataThreatReportResult.from_dict(operation_metadata_threat_report_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationMetadataTriageResult.md b/docs/OperationMetadataTriageResult.md new file mode 100644 index 0000000..c9dba61 --- /dev/null +++ b/docs/OperationMetadataTriageResult.md @@ -0,0 +1,33 @@ +# OperationMetadataTriageResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**Metadata**](Metadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**TriageResult**](TriageResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationMetadataTriageResult from a JSON string +operation_metadata_triage_result_instance = OperationMetadataTriageResult.from_json(json) +# print the JSON string representation of the object +print(OperationMetadataTriageResult.to_json()) + +# convert the object into a dict +operation_metadata_triage_result_dict = operation_metadata_triage_result_instance.to_dict() +# create an instance of OperationMetadataTriageResult from a dict +operation_metadata_triage_result_from_dict = OperationMetadataTriageResult.from_dict(operation_metadata_triage_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md b/docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md new file mode 100644 index 0000000..5ded01b --- /dev/null +++ b/docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md @@ -0,0 +1,33 @@ +# OperationNetworkingExplainMetadataNetworkingExplainResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**NetworkingExplainMetadata**](NetworkingExplainMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**NetworkingExplainResult**](NetworkingExplainResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationNetworkingExplainMetadataNetworkingExplainResult from a JSON string +operation_networking_explain_metadata_networking_explain_result_instance = OperationNetworkingExplainMetadataNetworkingExplainResult.from_json(json) +# print the JSON string representation of the object +print(OperationNetworkingExplainMetadataNetworkingExplainResult.to_json()) + +# convert the object into a dict +operation_networking_explain_metadata_networking_explain_result_dict = operation_networking_explain_metadata_networking_explain_result_instance.to_dict() +# create an instance of OperationNetworkingExplainMetadataNetworkingExplainResult from a dict +operation_networking_explain_metadata_networking_explain_result_from_dict = OperationNetworkingExplainMetadataNetworkingExplainResult.from_dict(operation_networking_explain_metadata_networking_explain_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationNetworkingScanMetadataNetworkingScanResult.md b/docs/OperationNetworkingScanMetadataNetworkingScanResult.md new file mode 100644 index 0000000..312dd84 --- /dev/null +++ b/docs/OperationNetworkingScanMetadataNetworkingScanResult.md @@ -0,0 +1,33 @@ +# OperationNetworkingScanMetadataNetworkingScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**NetworkingScanMetadata**](NetworkingScanMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**NetworkingScanResult**](NetworkingScanResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationNetworkingScanMetadataNetworkingScanResult from a JSON string +operation_networking_scan_metadata_networking_scan_result_instance = OperationNetworkingScanMetadataNetworkingScanResult.from_json(json) +# print the JSON string representation of the object +print(OperationNetworkingScanMetadataNetworkingScanResult.to_json()) + +# convert the object into a dict +operation_networking_scan_metadata_networking_scan_result_dict = operation_networking_scan_metadata_networking_scan_result_instance.to_dict() +# create an instance of OperationNetworkingScanMetadataNetworkingScanResult from a dict +operation_networking_scan_metadata_networking_scan_result_from_dict = OperationNetworkingScanMetadataNetworkingScanResult.from_dict(operation_networking_scan_metadata_networking_scan_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProtocolsAgentResponse.md b/docs/ProtocolsAgentResponse.md new file mode 100644 index 0000000..4f3d579 --- /dev/null +++ b/docs/ProtocolsAgentResponse.md @@ -0,0 +1,31 @@ +# ProtocolsAgentResponse + +Full protocols report, including metadata, findings, and evidence. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**Meta**](Meta.md) | | [optional] +**findings** | [**List[Finding]**](Finding.md) | | [optional] + +## Example + +```python +from revengai.models.protocols_agent_response import ProtocolsAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ProtocolsAgentResponse from a JSON string +protocols_agent_response_instance = ProtocolsAgentResponse.from_json(json) +# print the JSON string representation of the object +print(ProtocolsAgentResponse.to_json()) + +# convert the object into a dict +protocols_agent_response_dict = protocols_agent_response_instance.to_dict() +# create an instance of ProtocolsAgentResponse from a dict +protocols_agent_response_from_dict = ProtocolsAgentResponse.from_dict(protocols_agent_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReferencedConstant.md b/docs/ReferencedConstant.md new file mode 100644 index 0000000..c13f044 --- /dev/null +++ b/docs/ReferencedConstant.md @@ -0,0 +1,31 @@ +# ReferencedConstant + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | [**Subject**](Subject.md) | | +**value** | [**BytesConstant**](BytesConstant.md) | | +**display** | [**Display**](Display.md) | | [optional] + +## Example + +```python +from revengai.models.referenced_constant import ReferencedConstant + +# TODO update the JSON string below +json = "{}" +# create an instance of ReferencedConstant from a JSON string +referenced_constant_instance = ReferencedConstant.from_json(json) +# print the JSON string representation of the object +print(ReferencedConstant.to_json()) + +# convert the object into a dict +referenced_constant_dict = referenced_constant_instance.to_dict() +# create an instance of ReferencedConstant from a dict +referenced_constant_from_dict = ReferencedConstant.from_dict(referenced_constant_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReferencedConstantEvidence.md b/docs/ReferencedConstantEvidence.md new file mode 100644 index 0000000..091675d --- /dev/null +++ b/docs/ReferencedConstantEvidence.md @@ -0,0 +1,34 @@ +# ReferencedConstantEvidence + +Constants and the instructions that reference them. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'referenced_constant'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'direct'] +**constants** | [**List[ReferencedConstant]**](ReferencedConstant.md) | | + +## Example + +```python +from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of ReferencedConstantEvidence from a JSON string +referenced_constant_evidence_instance = ReferencedConstantEvidence.from_json(json) +# print the JSON string representation of the object +print(ReferencedConstantEvidence.to_json()) + +# convert the object into a dict +referenced_constant_evidence_dict = referenced_constant_evidence_instance.to_dict() +# create an instance of ReferencedConstantEvidence from a dict +referenced_constant_evidence_from_dict = ReferencedConstantEvidence.from_dict(referenced_constant_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediationResult.md b/docs/RemediationResult.md new file mode 100644 index 0000000..1ae5802 --- /dev/null +++ b/docs/RemediationResult.md @@ -0,0 +1,31 @@ +# RemediationResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snort_rules** | **List[str]** | Generated Snort rules | +**stix_rules** | **List[str]** | Generated STIX rules | +**yara_rules** | **List[str]** | Generated YARA rules | + +## Example + +```python +from revengai.models.remediation_result import RemediationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediationResult from a JSON string +remediation_result_instance = RemediationResult.from_json(json) +# print the JSON string representation of the object +print(RemediationResult.to_json()) + +# convert the object into a dict +remediation_result_dict = remediation_result_instance.to_dict() +# create an instance of RemediationResult from a dict +remediation_result_from_dict = RemediationResult.from_dict(remediation_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReportReachabilityStatus.md b/docs/ReportReachabilityStatus.md new file mode 100644 index 0000000..b0df3a2 --- /dev/null +++ b/docs/ReportReachabilityStatus.md @@ -0,0 +1,16 @@ +# ReportReachabilityStatus + + +## Enum + +* `UNDETERMINED` (value: `'undetermined'`) + +* `REACHABLE` (value: `'reachable'`) + +* `UNREACHABLE` (value: `'unreachable'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReportResult.md b/docs/ReportResult.md new file mode 100644 index 0000000..926fd9c --- /dev/null +++ b/docs/ReportResult.md @@ -0,0 +1,30 @@ +# ReportResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**findings** | **object** | | +**meta** | **object** | | + +## Example + +```python +from revengai.models.report_result import ReportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportResult from a JSON string +report_result_instance = ReportResult.from_json(json) +# print the JSON string representation of the object +print(ReportResult.to_json()) + +# convert the object into a dict +report_result_dict = report_result_instance.to_dict() +# create an instance of ReportResult from a dict +report_result_from_dict = ReportResult.from_dict(report_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RuleKind.md b/docs/RuleKind.md new file mode 100644 index 0000000..7fe67d7 --- /dev/null +++ b/docs/RuleKind.md @@ -0,0 +1,28 @@ +# RuleKind + + +## Enum + +* `CREDENTIALS` (value: `'credentials'`) + +* `API_MINUS_CREDENTIALS` (value: `'api-credentials'`) + +* `OAUTH_MINUS_CREDENTIALS` (value: `'oauth-credentials'`) + +* `ENCRYPTION_MINUS_KEY` (value: `'encryption-key'`) + +* `JWT_MINUS_TOKEN` (value: `'jwt-token'`) + +* `WEBHOOK_MINUS_URL` (value: `'webhook-url'`) + +* `PRIVATE_MINUS_KEY` (value: `'private-key'`) + +* `SIGNED_MINUS_URL` (value: `'signed-url'`) + +* `GENERIC` (value: `'generic'`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SandboxConfig.md b/docs/SandboxConfig.md new file mode 100644 index 0000000..1c5fc2e --- /dev/null +++ b/docs/SandboxConfig.md @@ -0,0 +1,35 @@ +# SandboxConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_entry_path** | **str** | | [optional] +**archive_password** | **str** | | [optional] +**archive_sha_256_hash** | **str** | | [optional] +**command_line_args** | **str** | | [optional] +**enabled** | **bool** | | [optional] +**start_method** | **str** | | [optional] +**timeout** | **int** | | [optional] [default to 120] + +## Example + +```python +from revengai.models.sandbox_config import SandboxConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of SandboxConfig from a JSON string +sandbox_config_instance = SandboxConfig.from_json(json) +# print the JSON string representation of the object +print(SandboxConfig.to_json()) + +# convert the object into a dict +sandbox_config_dict = sandbox_config_instance.to_dict() +# create an instance of SandboxConfig from a dict +sandbox_config_from_dict = SandboxConfig.from_dict(sandbox_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScrapeThirdPartyConfig.md b/docs/ScrapeThirdPartyConfig.md index e207517..07c0309 100644 --- a/docs/ScrapeThirdPartyConfig.md +++ b/docs/ScrapeThirdPartyConfig.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] [default to False] +**enabled** | **bool** | | [optional] ## Example diff --git a/docs/SecretsAgentResponse.md b/docs/SecretsAgentResponse.md new file mode 100644 index 0000000..9f7c9c1 --- /dev/null +++ b/docs/SecretsAgentResponse.md @@ -0,0 +1,31 @@ +# SecretsAgentResponse + +Full secrets report, including metadata, findings, and evidence. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**Meta**](Meta.md) | | [optional] +**findings** | [**List[Finding]**](Finding.md) | | [optional] + +## Example + +```python +from revengai.models.secrets_agent_response import SecretsAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SecretsAgentResponse from a JSON string +secrets_agent_response_instance = SecretsAgentResponse.from_json(json) +# print the JSON string representation of the object +print(SecretsAgentResponse.to_json()) + +# convert the object into a dict +secrets_agent_response_dict = secrets_agent_response_instance.to_dict() +# create an instance of SecretsAgentResponse from a dict +secrets_agent_response_from_dict = SecretsAgentResponse.from_dict(secrets_agent_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SegmentInfo.md b/docs/SegmentInfo.md index 325defc..4f25d49 100644 --- a/docs/SegmentInfo.md +++ b/docs/SegmentInfo.md @@ -1,6 +1,6 @@ # SegmentInfo -Represents the information about a segment. Attributes: name: The name of the segment. r: Determines if the segment has read permission. w: Determines if the segment has write permission. x: Determines if the segment has execute permission. start: The start address of the segment. end: The end address of the segment (inclusive). kind: Coarse classification of the segment: \"code\", \"data\", or \"other\". +Represents the information about a segment. This is the per-xref view, carried on :class:`XRef.segment`. The binary-wide ``AnalysisModel.segments`` list is written by a different producer with a different shape -- see :class:`MemorySegment`. Attributes: name: The name of the segment. r: Determines if the segment has read permission. w: Determines if the segment has write permission. x: Determines if the segment has execute permission. start: The start address of the segment. end: The end address of the segment (inclusive). kind: Coarse classification of the segment: \"code\", \"data\", or \"other\". ## Properties diff --git a/docs/Status.md b/docs/Status.md index 240426c..e4ac932 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **detail** | **str** | Additional context where helpful (quota numbers, validation specifics, etc.). | [optional] **doc_url** | **str** | Link to documentation explaining this error and resolution steps. | **message** | **str** | Brief description of the failure. | +**retryable** | **bool** | Whether retrying the operation might succeed. | ## Example diff --git a/docs/Subject.md b/docs/Subject.md new file mode 100644 index 0000000..6942765 --- /dev/null +++ b/docs/Subject.md @@ -0,0 +1,33 @@ +# Subject + +Exactly one typed program entity described by an observation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function** | **int** | Function entry address. | +**call_site** | **int** | | +**instruction** | **int** | | +**data** | **int** | | + +## Example + +```python +from revengai.models.subject import Subject + +# TODO update the JSON string below +json = "{}" +# create an instance of Subject from a JSON string +subject_instance = Subject.from_json(json) +# print the JSON string representation of the object +print(Subject.to_json()) + +# convert the object into a dict +subject_dict = subject_instance.to_dict() +# create an instance of Subject from a dict +subject_from_dict = Subject.from_dict(subject_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubjectAnyOf.md b/docs/SubjectAnyOf.md new file mode 100644 index 0000000..f9cde54 --- /dev/null +++ b/docs/SubjectAnyOf.md @@ -0,0 +1,29 @@ +# SubjectAnyOf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function** | **int** | Function entry address. | + +## Example + +```python +from revengai.models.subject_any_of import SubjectAnyOf + +# TODO update the JSON string below +json = "{}" +# create an instance of SubjectAnyOf from a JSON string +subject_any_of_instance = SubjectAnyOf.from_json(json) +# print the JSON string representation of the object +print(SubjectAnyOf.to_json()) + +# convert the object into a dict +subject_any_of_dict = subject_any_of_instance.to_dict() +# create an instance of SubjectAnyOf from a dict +subject_any_of_from_dict = SubjectAnyOf.from_dict(subject_any_of_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubjectAnyOf1.md b/docs/SubjectAnyOf1.md new file mode 100644 index 0000000..f041c9b --- /dev/null +++ b/docs/SubjectAnyOf1.md @@ -0,0 +1,29 @@ +# SubjectAnyOf1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**call_site** | **int** | | + +## Example + +```python +from revengai.models.subject_any_of1 import SubjectAnyOf1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SubjectAnyOf1 from a JSON string +subject_any_of1_instance = SubjectAnyOf1.from_json(json) +# print the JSON string representation of the object +print(SubjectAnyOf1.to_json()) + +# convert the object into a dict +subject_any_of1_dict = subject_any_of1_instance.to_dict() +# create an instance of SubjectAnyOf1 from a dict +subject_any_of1_from_dict = SubjectAnyOf1.from_dict(subject_any_of1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubjectAnyOf2.md b/docs/SubjectAnyOf2.md new file mode 100644 index 0000000..a1f842c --- /dev/null +++ b/docs/SubjectAnyOf2.md @@ -0,0 +1,29 @@ +# SubjectAnyOf2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instruction** | **int** | | + +## Example + +```python +from revengai.models.subject_any_of2 import SubjectAnyOf2 + +# TODO update the JSON string below +json = "{}" +# create an instance of SubjectAnyOf2 from a JSON string +subject_any_of2_instance = SubjectAnyOf2.from_json(json) +# print the JSON string representation of the object +print(SubjectAnyOf2.to_json()) + +# convert the object into a dict +subject_any_of2_dict = subject_any_of2_instance.to_dict() +# create an instance of SubjectAnyOf2 from a dict +subject_any_of2_from_dict = SubjectAnyOf2.from_dict(subject_any_of2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubjectAnyOf3.md b/docs/SubjectAnyOf3.md new file mode 100644 index 0000000..b81fa52 --- /dev/null +++ b/docs/SubjectAnyOf3.md @@ -0,0 +1,29 @@ +# SubjectAnyOf3 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **int** | | + +## Example + +```python +from revengai.models.subject_any_of3 import SubjectAnyOf3 + +# TODO update the JSON string below +json = "{}" +# create an instance of SubjectAnyOf3 from a JSON string +subject_any_of3_instance = SubjectAnyOf3.from_json(json) +# print the JSON string representation of the object +print(SubjectAnyOf3.to_json()) + +# convert the object into a dict +subject_any_of3_dict = subject_any_of3_instance.to_dict() +# create an instance of SubjectAnyOf3 from a dict +subject_any_of3_from_dict = SubjectAnyOf3.from_dict(subject_any_of3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubmitFeedbackInputBody.md b/docs/SubmitFeedbackInputBody.md new file mode 100644 index 0000000..850d9c6 --- /dev/null +++ b/docs/SubmitFeedbackInputBody.md @@ -0,0 +1,29 @@ +# SubmitFeedbackInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sentiment** | **str** | How useful the caller found this agent's output | + +## Example + +```python +from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SubmitFeedbackInputBody from a JSON string +submit_feedback_input_body_instance = SubmitFeedbackInputBody.from_json(json) +# print the JSON string representation of the object +print(SubmitFeedbackInputBody.to_json()) + +# convert the object into a dict +submit_feedback_input_body_dict = submit_feedback_input_body_instance.to_dict() +# create an instance of SubmitFeedbackInputBody from a dict +submit_feedback_input_body_from_dict = SubmitFeedbackInputBody.from_dict(submit_feedback_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuspiciousString.md b/docs/SuspiciousString.md new file mode 100644 index 0000000..98c0ebb --- /dev/null +++ b/docs/SuspiciousString.md @@ -0,0 +1,30 @@ +# SuspiciousString + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | +**subject** | [**Subject**](Subject.md) | | [optional] + +## Example + +```python +from revengai.models.suspicious_string import SuspiciousString + +# TODO update the JSON string below +json = "{}" +# create an instance of SuspiciousString from a JSON string +suspicious_string_instance = SuspiciousString.from_json(json) +# print the JSON string representation of the object +print(SuspiciousString.to_json()) + +# convert the object into a dict +suspicious_string_dict = suspicious_string_instance.to_dict() +# create an instance of SuspiciousString from a dict +suspicious_string_from_dict = SuspiciousString.from_dict(suspicious_string_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SuspiciousStringEvidence.md b/docs/SuspiciousStringEvidence.md new file mode 100644 index 0000000..0efa38d --- /dev/null +++ b/docs/SuspiciousStringEvidence.md @@ -0,0 +1,34 @@ +# SuspiciousStringEvidence + +Suspicious strings without demonstrated semantic use. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evidence_kind** | **str** | | [optional] [default to 'suspicious_string'] +**kind** | **str** | | [optional] [default to 'deterministic_derivation'] +**effect** | [**EvidenceEffect**](EvidenceEffect.md) | | +**strength** | **str** | | [optional] [default to 'indirect'] +**strings** | [**List[SuspiciousString]**](SuspiciousString.md) | | + +## Example + +```python +from revengai.models.suspicious_string_evidence import SuspiciousStringEvidence + +# TODO update the JSON string below +json = "{}" +# create an instance of SuspiciousStringEvidence from a JSON string +suspicious_string_evidence_instance = SuspiciousStringEvidence.from_json(json) +# print the JSON string representation of the object +print(SuspiciousStringEvidence.to_json()) + +# convert the object into a dict +suspicious_string_evidence_dict = suspicious_string_evidence_instance.to_dict() +# create an instance of SuspiciousStringEvidence from a dict +suspicious_string_evidence_from_dict = SuspiciousStringEvidence.from_dict(suspicious_string_evidence_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Symbols.md b/docs/Symbols.md index dbdf418..7886688 100644 --- a/docs/Symbols.md +++ b/docs/Symbols.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**base_address** | **int** | The starting address of the execution | -**function_boundaries** | [**List[FunctionBoundary]**](FunctionBoundary.md) | List of user defined function boundaries | [optional] [default to []] +**base_address** | **int** | | +**function_boundaries** | [**List[FunctionBoundary]**](FunctionBoundary.md) | | [optional] ## Example diff --git a/docs/Technique.md b/docs/Technique.md new file mode 100644 index 0000000..dff93a3 --- /dev/null +++ b/docs/Technique.md @@ -0,0 +1,38 @@ +# Technique + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | How the technique appears in this binary | +**end_addr** | **str** | End address of the containing function, hex-encoded | +**function_addr** | **str** | Address of the containing function, hex-encoded | +**function_id** | **int** | ID of the containing function | +**function_name** | **str** | Name of the containing function | +**start_addr** | **str** | Start address of the containing function, hex-encoded | +**technique_description** | **str** | Full ATT&CK description of the technique | +**technique_id** | **str** | MITRE ATT&CK technique ID | +**technique_name** | **str** | MITRE ATT&CK technique name | +**technique_url** | **str** | Link to the technique in the ATT&CK catalogue | + +## Example + +```python +from revengai.models.technique import Technique + +# TODO update the JSON string below +json = "{}" +# create an instance of Technique from a JSON string +technique_instance = Technique.from_json(json) +# print the JSON string representation of the object +print(Technique.to_json()) + +# convert the object into a dict +technique_dict = technique_instance.to_dict() +# create an instance of Technique from a dict +technique_from_dict = Technique.from_dict(technique_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreatReportResult.md b/docs/ThreatReportResult.md new file mode 100644 index 0000000..df86dfc --- /dev/null +++ b/docs/ThreatReportResult.md @@ -0,0 +1,36 @@ +# ThreatReportResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**iocs** | [**List[IOC]**](IOC.md) | Indicators of compromise found. An indicator whose source does not resolve to a function is still listed, without function details. | +**attack_flow_summary** | **str** | Markdown summary of the attack flow | +**executable_techniques** | [**List[Technique]**](Technique.md) | MITRE ATT&CK techniques found. A technique is listed only when both its function and its ATT&CK catalogue entry resolve. | +**number_of_analysed_functions** | **int** | Functions the agent analysed | +**software_type** | **str** | Classification of the binary | +**summary** | **str** | Summary of the analysis findings | +**total_number_of_functions** | **int** | Functions identified in the binary | +**yara_rule** | **str** | YARA rule generated for the binary | + +## Example + +```python +from revengai.models.threat_report_result import ThreatReportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreatReportResult from a JSON string +threat_report_result_instance = ThreatReportResult.from_json(json) +# print the JSON string representation of the object +print(ThreatReportResult.to_json()) + +# convert the object into a dict +threat_report_result_dict = threat_report_result_instance.to_dict() +# create an instance of ThreatReportResult from a dict +threat_report_result_from_dict = ThreatReportResult.from_dict(threat_report_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriageFunction.md b/docs/TriageFunction.md new file mode 100644 index 0000000..f03cd4e --- /dev/null +++ b/docs/TriageFunction.md @@ -0,0 +1,33 @@ +# TriageFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **int** | Virtual address of the function | +**capabilities** | **List[str]** | Capability categories the function exhibits | +**id** | **int** | ID of the function | +**score** | **float** | Maliciousness score for the function, 0 to 1 | +**summary** | **str** | What the function does | + +## Example + +```python +from revengai.models.triage_function import TriageFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of TriageFunction from a JSON string +triage_function_instance = TriageFunction.from_json(json) +# print the JSON string representation of the object +print(TriageFunction.to_json()) + +# convert the object into a dict +triage_function_dict = triage_function_instance.to_dict() +# create an instance of TriageFunction from a dict +triage_function_from_dict = TriageFunction.from_dict(triage_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriageResult.md b/docs/TriageResult.md new file mode 100644 index 0000000..1f2d92e --- /dev/null +++ b/docs/TriageResult.md @@ -0,0 +1,31 @@ +# TriageResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**functions** | [**List[TriageFunction]**](TriageFunction.md) | Per-function assessments. A function whose address no longer resolves within the analysis is omitted. | +**software_score** | **float** | Maliciousness score for the binary, 0 to 1 | +**summary** | **str** | Summary of the triage assessment | + +## Example + +```python +from revengai.models.triage_result import TriageResult + +# TODO update the JSON string below +json = "{}" +# create an instance of TriageResult from a JSON string +triage_result_instance = TriageResult.from_json(json) +# print the JSON string representation of the object +print(TriageResult.to_json()) + +# convert the object into a dict +triage_result_dict = triage_result_instance.to_dict() +# create an instance of TriageResult from a dict +triage_result_from_dict = TriageResult.from_dict(triage_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerExecutionExplainInputBody.md b/docs/TriggerExecutionExplainInputBody.md new file mode 100644 index 0000000..c270b75 --- /dev/null +++ b/docs/TriggerExecutionExplainInputBody.md @@ -0,0 +1,29 @@ +# TriggerExecutionExplainInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Execution category to focus the explanation on. | + +## Example + +```python +from revengai.models.trigger_execution_explain_input_body import TriggerExecutionExplainInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerExecutionExplainInputBody from a JSON string +trigger_execution_explain_input_body_instance = TriggerExecutionExplainInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerExecutionExplainInputBody.to_json()) + +# convert the object into a dict +trigger_execution_explain_input_body_dict = trigger_execution_explain_input_body_instance.to_dict() +# create an instance of TriggerExecutionExplainInputBody from a dict +trigger_execution_explain_input_body_from_dict = TriggerExecutionExplainInputBody.from_dict(trigger_execution_explain_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerExecutionScanInputBody.md b/docs/TriggerExecutionScanInputBody.md new file mode 100644 index 0000000..ddf5d63 --- /dev/null +++ b/docs/TriggerExecutionScanInputBody.md @@ -0,0 +1,31 @@ +# TriggerExecutionScanInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **List[str]** | Restrict findings to these categories. Omit to scan the default executes-code set. | [optional] +**direct_only** | **bool** | Only report functions whose own name matches a known execution API; skips the calls-into-execution pass, avoiding a bulk call-graph fetch. | [optional] +**sources** | **List[str]** | Restrict findings to these sources. Omit to scan every source. | [optional] + +## Example + +```python +from revengai.models.trigger_execution_scan_input_body import TriggerExecutionScanInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerExecutionScanInputBody from a JSON string +trigger_execution_scan_input_body_instance = TriggerExecutionScanInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerExecutionScanInputBody.to_json()) + +# convert the object into a dict +trigger_execution_scan_input_body_dict = trigger_execution_scan_input_body_instance.to_dict() +# create an instance of TriggerExecutionScanInputBody from a dict +trigger_execution_scan_input_body_from_dict = TriggerExecutionScanInputBody.from_dict(trigger_execution_scan_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerFilesystemAnalyseInputBody.md b/docs/TriggerFilesystemAnalyseInputBody.md new file mode 100644 index 0000000..7f2fdcd --- /dev/null +++ b/docs/TriggerFilesystemAnalyseInputBody.md @@ -0,0 +1,29 @@ +# TriggerFilesystemAnalyseInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Filesystem category to focus the explanation on. | + +## Example + +```python +from revengai.models.trigger_filesystem_analyse_input_body import TriggerFilesystemAnalyseInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerFilesystemAnalyseInputBody from a JSON string +trigger_filesystem_analyse_input_body_instance = TriggerFilesystemAnalyseInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerFilesystemAnalyseInputBody.to_json()) + +# convert the object into a dict +trigger_filesystem_analyse_input_body_dict = trigger_filesystem_analyse_input_body_instance.to_dict() +# create an instance of TriggerFilesystemAnalyseInputBody from a dict +trigger_filesystem_analyse_input_body_from_dict = TriggerFilesystemAnalyseInputBody.from_dict(trigger_filesystem_analyse_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerFilesystemScanInputBody.md b/docs/TriggerFilesystemScanInputBody.md new file mode 100644 index 0000000..8a3b1ba --- /dev/null +++ b/docs/TriggerFilesystemScanInputBody.md @@ -0,0 +1,31 @@ +# TriggerFilesystemScanInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **List[str]** | Restrict findings to these categories. Omit to scan the default filesystem-modifying set. | [optional] +**direct_only** | **bool** | Only report functions whose own name matches a known filesystem API; skips the calls-into-filesystem pass, avoiding a bulk call-graph fetch. | [optional] +**sources** | **List[str]** | Restrict findings to these sources. Omit to scan every source. | [optional] + +## Example + +```python +from revengai.models.trigger_filesystem_scan_input_body import TriggerFilesystemScanInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerFilesystemScanInputBody from a JSON string +trigger_filesystem_scan_input_body_instance = TriggerFilesystemScanInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerFilesystemScanInputBody.to_json()) + +# convert the object into a dict +trigger_filesystem_scan_input_body_dict = trigger_filesystem_scan_input_body_instance.to_dict() +# create an instance of TriggerFilesystemScanInputBody from a dict +trigger_filesystem_scan_input_body_from_dict = TriggerFilesystemScanInputBody.from_dict(trigger_filesystem_scan_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerNetworkingExplainInputBody.md b/docs/TriggerNetworkingExplainInputBody.md new file mode 100644 index 0000000..f578775 --- /dev/null +++ b/docs/TriggerNetworkingExplainInputBody.md @@ -0,0 +1,29 @@ +# TriggerNetworkingExplainInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | **str** | Networking category to focus the explanation on. | + +## Example + +```python +from revengai.models.trigger_networking_explain_input_body import TriggerNetworkingExplainInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerNetworkingExplainInputBody from a JSON string +trigger_networking_explain_input_body_instance = TriggerNetworkingExplainInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerNetworkingExplainInputBody.to_json()) + +# convert the object into a dict +trigger_networking_explain_input_body_dict = trigger_networking_explain_input_body_instance.to_dict() +# create an instance of TriggerNetworkingExplainInputBody from a dict +trigger_networking_explain_input_body_from_dict = TriggerNetworkingExplainInputBody.from_dict(trigger_networking_explain_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerNetworkingScanInputBody.md b/docs/TriggerNetworkingScanInputBody.md new file mode 100644 index 0000000..090b285 --- /dev/null +++ b/docs/TriggerNetworkingScanInputBody.md @@ -0,0 +1,31 @@ +# TriggerNetworkingScanInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **List[str]** | Restrict findings to these categories. Omit to scan the default remote-communication set. | [optional] +**direct_only** | **bool** | Only report functions whose own name matches a known networking API; skips the calls-into-networking pass, avoiding a bulk call-graph fetch. | [optional] +**sources** | **List[str]** | Restrict findings to these sources. Omit to scan every source. | [optional] + +## Example + +```python +from revengai.models.trigger_networking_scan_input_body import TriggerNetworkingScanInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerNetworkingScanInputBody from a JSON string +trigger_networking_scan_input_body_instance = TriggerNetworkingScanInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerNetworkingScanInputBody.to_json()) + +# convert the object into a dict +trigger_networking_scan_input_body_dict = trigger_networking_scan_input_body_instance.to_dict() +# create an instance of TriggerNetworkingScanInputBody from a dict +trigger_networking_scan_input_body_from_dict = TriggerNetworkingScanInputBody.from_dict(trigger_networking_scan_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadOutputBody.md b/docs/UploadOutputBody.md new file mode 100644 index 0000000..c2af1ff --- /dev/null +++ b/docs/UploadOutputBody.md @@ -0,0 +1,36 @@ +# UploadOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_requirements** | [**List[AnalysisRequirement]**](AnalysisRequirement.md) | Ways to unblock POST /v3/analyses for this file if it cannot be statically analysed as-is; empty if no requirement applies. | +**can_extract** | **bool** | Whether the firmware/extraction flow can accept this file. | +**can_sandbox** | **bool** | Whether the file can be extracted and run in the Windows sandbox. | +**file_type** | **str** | The kind of file that was uploaded. | +**filename** | **str** | The filename as given by the caller. | +**is_archive** | **bool** | Whether the detected format is a container/compression archive. | +**mime** | **str** | The MIME type detected from the file's contents, independent of upload_file_type. | +**sha_256_hash** | **str** | SHA-256 hash of the uploaded file; the storage key for every subsequent reference to it. | + +## Example + +```python +from revengai.models.upload_output_body import UploadOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UploadOutputBody from a JSON string +upload_output_body_instance = UploadOutputBody.from_json(json) +# print the JSON string representation of the object +print(UploadOutputBody.to_json()) + +# convert the object into a dict +upload_output_body_dict = upload_output_body_instance.to_dict() +# create an instance of UploadOutputBody from a dict +upload_output_body_from_dict = UploadOutputBody.from_dict(upload_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadResponse.md b/docs/UploadResponse.md index 5cabc83..365754d 100644 --- a/docs/UploadResponse.md +++ b/docs/UploadResponse.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **is_archive** | **bool** | | **can_sandbox** | **bool** | | **can_extract** | **bool** | | +**analysis_requirements** | [**List[AnalysisRequirement]**](AnalysisRequirement.md) | | [optional] [default to []] ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index 74893d4..439faea 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v4.24.0" +__version__ = "v4.46.0" # Define package exports __all__ = [ @@ -78,6 +78,7 @@ "AnalysisRecord", "AnalysisRecordBody", "AnalysisReport", + "AnalysisRequirement", "AnalysisScope", "AnalysisStringFunction", "AnalysisStringInput", @@ -90,6 +91,7 @@ "AnalysisUpdateTagsRequest", "AnalysisUpdateTagsResponse", "ApiCall", + "ApiCombinationEvidence", "AppApiRestV2AgentSchemaCapability", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", @@ -152,10 +154,12 @@ "BaseResponseLogs", "BaseResponseModelsResponse", "BaseResponseParams", + "BaseResponseProtocolsAgentResponse", "BaseResponseQueuedWorkflowTaskResponse", "BaseResponseRecent", "BaseResponseRemediationAgentResponse", "BaseResponseReportAnalysisResponse", + "BaseResponseSecretsAgentResponse", "BaseResponseStatus", "BaseResponseStr", "BaseResponseTagSearchResponse", @@ -187,6 +191,9 @@ "BulkCreateUserResult", "BulkCreateUsersOutputBody", "BulkDeleteAnalysesRequest", + "BytesConstant", + "CallChain", + "CallChainEvidence", "CallEdge", "CallEdgesOutputBody", "CalleeFunctionInfo", @@ -198,6 +205,8 @@ "Capabilities", "CapabilitiesAgentResponse", "CapabilitiesOutputBody", + "CapabilitiesResult", + "Capability", "CapabilityEntry", "ChildBinariesResponse", "CodeSignatureModel", @@ -219,6 +228,7 @@ "CommentResponse", "CommentUpdateRequest", "CommentsData", + "Config", "ConfigResponse", "ConfirmToolInputBody", "Connection", @@ -245,9 +255,12 @@ "CreateGroupInputBody", "CreateIdentityInputBody", "CreateIssuerInputBody", + "CreateMetadata", "CreateOrganisationInputBody", "CreatePointerDataType", "CreatePortalSessionInputBody", + "CreateRequest", + "CreateResult", "CreateStructDataType", "CreateTeamInputBody", "CreateTypedefDataType", @@ -257,6 +270,9 @@ "Created", "CryptoCall", "CryptoDirectMatch", + "CryptoExplainMetadata", + "CryptoExplainResult", + "CryptoExplainedFunction", "CryptoFinding", "CryptoScanMetadata", "CryptoScanResult", @@ -270,8 +286,11 @@ "DecompFinishedEvent", "DecompilationCommentContext", "DecompilationData", + "DecompilerSummary", + "DecompilerSummaryEvidence", "DieMatch", "DisassemblyOutputBody", + "Display", "DnsQuery", "DrakvufFileMetadata", "DynamicExecutionStatus", @@ -284,6 +303,7 @@ "ELFSegment", "ELFSymbol", "ElfDynamicEntry", + "Endianness", "EntrypointModel", "EnumDataType", "EnumDefinition", @@ -318,17 +338,38 @@ "EventTOOLCONFIRMATIONREQUIRED", "EventTypesSuggested", "EventWarning", + "EvidenceEffect", + "EvidenceStrength", "Example", + "ExecutionCall", + "ExecutionDirectMatch", + "ExecutionExplainMetadata", + "ExecutionExplainResult", + "ExecutionExplainedFunction", + "ExecutionFinding", + "ExecutionScanMetadata", + "ExecutionScanResult", "ExportModel", "ExternalResponse", "ExtractedBinary", "ExtractedURL", "ExtractionFailure", + "FeedbackOutputBody", "FileActivityEntry", "FileFormat", "FileHashes", "FileMetadata", + "FilesystemAnalyseMetadata", + "FilesystemAnalyseResult", + "FilesystemCall", + "FilesystemDirectMatch", + "FilesystemExplainedFunction", + "FilesystemFinding", + "FilesystemScanMetadata", + "FilesystemScanResult", "Filters", + "Finding", + "FindingEvidenceInner", "FormFile", "FunctionBlockDestinationResponse", "FunctionBlockResponse", @@ -351,6 +392,8 @@ "FunctionSignatureBody", "FunctionSignatureEntry", "FunctionSignatureVersion", + "FunctionSimilarity", + "FunctionSimilarityEvidence", "FunctionSourceType", "FunctionString", "FunctionStringItem", @@ -373,6 +416,7 @@ "GetPublicUserResponse", "GetSubscriptionOutputBody", "GetTokensResponse", + "HardcodedSecretEvidence", "HistoryActor", "HistoryEntry", "HttpRequest", @@ -380,6 +424,9 @@ "ISA", "IconModel", "ImportModel", + "ImportedApi", + "ImportedApiCall", + "ImportedApiCallEvidence", "ImportedFunctionCallerEntry", "ImportedFunctionDetailOutputBody", "ImportedFunctionEntry", @@ -390,6 +437,7 @@ "InsertAnalysisLogRequest", "InviteUserInputBody", "IssuerAllowedDomain", + "KnownConstantEvidence", "LineAttributionsData", "ListAnalysesOutputBody", "ListAnalysisDataTypesOutputBody", @@ -412,7 +460,11 @@ "MatchedFunction", "MemdumpEntry", "MessageBody", + "Meta", "MetaModel", + "Metadata", + "ModelInterpretation", + "ModelInterpretationEvidence", "ModelName", "ModelsResponse", "ModuleLoadEntry", @@ -421,8 +473,29 @@ "NameSourceType", "NamesFinishedEvent", "NetworkActivity", + "NetworkingCall", + "NetworkingDirectMatch", + "NetworkingExplainMetadata", + "NetworkingExplainResult", + "NetworkingExplainedFunction", + "NetworkingFinding", + "NetworkingScanMetadata", + "NetworkingScanResult", "OIDCCallbackInputBody", + "OperationCreateMetadataCreateResult", + "OperationCryptoExplainMetadataCryptoExplainResult", "OperationCryptoScanMetadataCryptoScanResult", + "OperationExecutionExplainMetadataExecutionExplainResult", + "OperationExecutionScanMetadataExecutionScanResult", + "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + "OperationFilesystemScanMetadataFilesystemScanResult", + "OperationMetadataCapabilitiesResult", + "OperationMetadataRemediationResult", + "OperationMetadataReportResult", + "OperationMetadataThreatReportResult", + "OperationMetadataTriageResult", + "OperationNetworkingExplainMetadataNetworkingExplainResult", + "OperationNetworkingScanMetadataNetworkingScanResult", "OperationSecurityScanMetadataSecurityScanResult", "OperationWorkflowProgressResultBody", "Order", @@ -457,16 +530,20 @@ "ProductSummary", "ProgressMessage", "ProseEvent", + "ProtocolsAgentResponse", "PutAnalysisStringsRequest", "QueuedWorkflowTaskResponse", "ReAnalysisForm", "Recent", + "ReferencedConstant", + "ReferencedConstantEvidence", "RefreshBody", "RegenerateOutputBody", "RegisterUserInputBody", "RegistryOperation", "RelativeBinaryResponse", "RemediationAgentResponse", + "RemediationResult", "RemoveCollectionBinariesInputBody", "RenameAppliedEvent", "RenameInputBody", @@ -477,16 +554,21 @@ "ReportEvent", "ReportInfo", "ReportOptions", + "ReportReachabilityStatus", + "ReportResult", "ResolvedEntity", "ResultBody", "RevokeBody", + "RuleKind", "SSOProvider", "SSOProvidersOutputBody", + "SandboxConfig", "SandboxOptions", "SandboxStartMethod", "SandboxTimeout", "ScheduledTaskEntry", "ScrapeThirdPartyConfig", + "SecretsAgentResponse", "SectionModel", "SecurityFinding", "SecurityModel", @@ -539,11 +621,19 @@ "StringSource", "StructDataType", "StructDefinition", + "Subject", + "SubjectAnyOf", + "SubjectAnyOf1", + "SubjectAnyOf2", + "SubjectAnyOf3", + "SubmitFeedbackInputBody", "SubmitUserFeedbackRequest", "SuggestedHole", "SuggestedMemberView", "SuggestedTypeView", "SummaryData", + "SuspiciousString", + "SuspiciousStringEvidence", "Symbols", "Tag", "TagItem", @@ -556,15 +646,25 @@ "TcpCarvedFile", "Team", "TeamMember", + "Technique", + "ThreatReportResult", "TimestampModel", "Token", "TokenInputBody", "TokenResponse", "TokenisedData", + "TriageFunction", "TriageFunctionResponse", "TriageReportResponse", + "TriageResult", "TriggerCryptoScanInputBody", "TriggerDynamicExecutionInputBody", + "TriggerExecutionExplainInputBody", + "TriggerExecutionScanInputBody", + "TriggerFilesystemAnalyseInputBody", + "TriggerFilesystemScanInputBody", + "TriggerNetworkingExplainInputBody", + "TriggerNetworkingScanInputBody", "TriggerRenameUnnamedFunctionsInputBody", "TriggerSecurityScanInputBody", "Ttp", @@ -598,6 +698,7 @@ "UpdateUserPasswordInputBody", "UpgradeAnalysisModelOutputBody", "UploadFileType", + "UploadOutputBody", "UploadResponse", "UpsertAiDecomplationRatingRequest", "UpsertOverridesData", @@ -681,6 +782,7 @@ from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord from revengai.models.analysis_record_body import AnalysisRecordBody as AnalysisRecordBody from revengai.models.analysis_report import AnalysisReport as AnalysisReport +from revengai.models.analysis_requirement import AnalysisRequirement as AnalysisRequirement from revengai.models.analysis_scope import AnalysisScope as AnalysisScope from revengai.models.analysis_string_function import AnalysisStringFunction as AnalysisStringFunction from revengai.models.analysis_string_input import AnalysisStringInput as AnalysisStringInput @@ -693,6 +795,7 @@ from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse from revengai.models.api_call import ApiCall as ApiCall +from revengai.models.api_combination_evidence import ApiCombinationEvidence as ApiCombinationEvidence from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability as AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy @@ -755,10 +858,12 @@ from revengai.models.base_response_logs import BaseResponseLogs as BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams +from revengai.models.base_response_protocols_agent_response import BaseResponseProtocolsAgentResponse as BaseResponseProtocolsAgentResponse from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse as BaseResponseQueuedWorkflowTaskResponse from revengai.models.base_response_recent import BaseResponseRecent as BaseResponseRecent from revengai.models.base_response_remediation_agent_response import BaseResponseRemediationAgentResponse as BaseResponseRemediationAgentResponse from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse as BaseResponseReportAnalysisResponse +from revengai.models.base_response_secrets_agent_response import BaseResponseSecretsAgentResponse as BaseResponseSecretsAgentResponse from revengai.models.base_response_status import BaseResponseStatus as BaseResponseStatus from revengai.models.base_response_str import BaseResponseStr as BaseResponseStr from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse as BaseResponseTagSearchResponse @@ -790,6 +895,9 @@ from revengai.models.bulk_create_user_result import BulkCreateUserResult as BulkCreateUserResult from revengai.models.bulk_create_users_output_body import BulkCreateUsersOutputBody as BulkCreateUsersOutputBody from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest as BulkDeleteAnalysesRequest +from revengai.models.bytes_constant import BytesConstant as BytesConstant +from revengai.models.call_chain import CallChain as CallChain +from revengai.models.call_chain_evidence import CallChainEvidence as CallChainEvidence from revengai.models.call_edge import CallEdge as CallEdge from revengai.models.call_edges_output_body import CallEdgesOutputBody as CallEdgesOutputBody from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo @@ -801,6 +909,8 @@ from revengai.models.capabilities import Capabilities as Capabilities from revengai.models.capabilities_agent_response import CapabilitiesAgentResponse as CapabilitiesAgentResponse from revengai.models.capabilities_output_body import CapabilitiesOutputBody as CapabilitiesOutputBody +from revengai.models.capabilities_result import CapabilitiesResult as CapabilitiesResult +from revengai.models.capability import Capability as Capability from revengai.models.capability_entry import CapabilityEntry as CapabilityEntry from revengai.models.child_binaries_response import ChildBinariesResponse as ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel as CodeSignatureModel @@ -822,6 +932,7 @@ from revengai.models.comment_response import CommentResponse as CommentResponse from revengai.models.comment_update_request import CommentUpdateRequest as CommentUpdateRequest from revengai.models.comments_data import CommentsData as CommentsData +from revengai.models.config import Config as Config from revengai.models.config_response import ConfigResponse as ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody as ConfirmToolInputBody from revengai.models.connection import Connection as Connection @@ -848,9 +959,12 @@ from revengai.models.create_group_input_body import CreateGroupInputBody as CreateGroupInputBody from revengai.models.create_identity_input_body import CreateIdentityInputBody as CreateIdentityInputBody from revengai.models.create_issuer_input_body import CreateIssuerInputBody as CreateIssuerInputBody +from revengai.models.create_metadata import CreateMetadata as CreateMetadata from revengai.models.create_organisation_input_body import CreateOrganisationInputBody as CreateOrganisationInputBody from revengai.models.create_pointer_data_type import CreatePointerDataType as CreatePointerDataType from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody as CreatePortalSessionInputBody +from revengai.models.create_request import CreateRequest as CreateRequest +from revengai.models.create_result import CreateResult as CreateResult from revengai.models.create_struct_data_type import CreateStructDataType as CreateStructDataType from revengai.models.create_team_input_body import CreateTeamInputBody as CreateTeamInputBody from revengai.models.create_typedef_data_type import CreateTypedefDataType as CreateTypedefDataType @@ -860,6 +974,9 @@ from revengai.models.created import Created as Created from revengai.models.crypto_call import CryptoCall as CryptoCall from revengai.models.crypto_direct_match import CryptoDirectMatch as CryptoDirectMatch +from revengai.models.crypto_explain_metadata import CryptoExplainMetadata as CryptoExplainMetadata +from revengai.models.crypto_explain_result import CryptoExplainResult as CryptoExplainResult +from revengai.models.crypto_explained_function import CryptoExplainedFunction as CryptoExplainedFunction from revengai.models.crypto_finding import CryptoFinding as CryptoFinding from revengai.models.crypto_scan_metadata import CryptoScanMetadata as CryptoScanMetadata from revengai.models.crypto_scan_result import CryptoScanResult as CryptoScanResult @@ -873,8 +990,11 @@ from revengai.models.decomp_finished_event import DecompFinishedEvent as DecompFinishedEvent from revengai.models.decompilation_comment_context import DecompilationCommentContext as DecompilationCommentContext from revengai.models.decompilation_data import DecompilationData as DecompilationData +from revengai.models.decompiler_summary import DecompilerSummary as DecompilerSummary +from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence as DecompilerSummaryEvidence from revengai.models.die_match import DieMatch as DieMatch from revengai.models.disassembly_output_body import DisassemblyOutputBody as DisassemblyOutputBody +from revengai.models.display import Display as Display from revengai.models.dns_query import DnsQuery as DnsQuery from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata as DrakvufFileMetadata from revengai.models.dynamic_execution_status import DynamicExecutionStatus as DynamicExecutionStatus @@ -887,6 +1007,7 @@ from revengai.models.elf_segment import ELFSegment as ELFSegment from revengai.models.elf_symbol import ELFSymbol as ELFSymbol from revengai.models.elf_dynamic_entry import ElfDynamicEntry as ElfDynamicEntry +from revengai.models.endianness import Endianness as Endianness from revengai.models.entrypoint_model import EntrypointModel as EntrypointModel from revengai.models.enum_data_type import EnumDataType as EnumDataType from revengai.models.enum_definition import EnumDefinition as EnumDefinition @@ -921,17 +1042,38 @@ from revengai.models.event_toolconfirmationrequired import EventTOOLCONFIRMATIONREQUIRED as EventTOOLCONFIRMATIONREQUIRED from revengai.models.event_types_suggested import EventTypesSuggested as EventTypesSuggested from revengai.models.event_warning import EventWarning as EventWarning +from revengai.models.evidence_effect import EvidenceEffect as EvidenceEffect +from revengai.models.evidence_strength import EvidenceStrength as EvidenceStrength from revengai.models.example import Example as Example +from revengai.models.execution_call import ExecutionCall as ExecutionCall +from revengai.models.execution_direct_match import ExecutionDirectMatch as ExecutionDirectMatch +from revengai.models.execution_explain_metadata import ExecutionExplainMetadata as ExecutionExplainMetadata +from revengai.models.execution_explain_result import ExecutionExplainResult as ExecutionExplainResult +from revengai.models.execution_explained_function import ExecutionExplainedFunction as ExecutionExplainedFunction +from revengai.models.execution_finding import ExecutionFinding as ExecutionFinding +from revengai.models.execution_scan_metadata import ExecutionScanMetadata as ExecutionScanMetadata +from revengai.models.execution_scan_result import ExecutionScanResult as ExecutionScanResult from revengai.models.export_model import ExportModel as ExportModel from revengai.models.external_response import ExternalResponse as ExternalResponse from revengai.models.extracted_binary import ExtractedBinary as ExtractedBinary from revengai.models.extracted_url import ExtractedURL as ExtractedURL from revengai.models.extraction_failure import ExtractionFailure as ExtractionFailure +from revengai.models.feedback_output_body import FeedbackOutputBody as FeedbackOutputBody from revengai.models.file_activity_entry import FileActivityEntry as FileActivityEntry from revengai.models.file_format import FileFormat as FileFormat from revengai.models.file_hashes import FileHashes as FileHashes from revengai.models.file_metadata import FileMetadata as FileMetadata +from revengai.models.filesystem_analyse_metadata import FilesystemAnalyseMetadata as FilesystemAnalyseMetadata +from revengai.models.filesystem_analyse_result import FilesystemAnalyseResult as FilesystemAnalyseResult +from revengai.models.filesystem_call import FilesystemCall as FilesystemCall +from revengai.models.filesystem_direct_match import FilesystemDirectMatch as FilesystemDirectMatch +from revengai.models.filesystem_explained_function import FilesystemExplainedFunction as FilesystemExplainedFunction +from revengai.models.filesystem_finding import FilesystemFinding as FilesystemFinding +from revengai.models.filesystem_scan_metadata import FilesystemScanMetadata as FilesystemScanMetadata +from revengai.models.filesystem_scan_result import FilesystemScanResult as FilesystemScanResult from revengai.models.filters import Filters as Filters +from revengai.models.finding import Finding as Finding +from revengai.models.finding_evidence_inner import FindingEvidenceInner as FindingEvidenceInner from revengai.models.form_file import FormFile as FormFile from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse @@ -954,6 +1096,8 @@ from revengai.models.function_signature_body import FunctionSignatureBody as FunctionSignatureBody from revengai.models.function_signature_entry import FunctionSignatureEntry as FunctionSignatureEntry from revengai.models.function_signature_version import FunctionSignatureVersion as FunctionSignatureVersion +from revengai.models.function_similarity import FunctionSimilarity as FunctionSimilarity +from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence as FunctionSimilarityEvidence from revengai.models.function_source_type import FunctionSourceType as FunctionSourceType from revengai.models.function_string import FunctionString as FunctionString from revengai.models.function_string_item import FunctionStringItem as FunctionStringItem @@ -976,6 +1120,7 @@ from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody as GetSubscriptionOutputBody from revengai.models.get_tokens_response import GetTokensResponse as GetTokensResponse +from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence as HardcodedSecretEvidence from revengai.models.history_actor import HistoryActor as HistoryActor from revengai.models.history_entry import HistoryEntry as HistoryEntry from revengai.models.http_request import HttpRequest as HttpRequest @@ -983,6 +1128,9 @@ from revengai.models.isa import ISA as ISA from revengai.models.icon_model import IconModel as IconModel from revengai.models.import_model import ImportModel as ImportModel +from revengai.models.imported_api import ImportedApi as ImportedApi +from revengai.models.imported_api_call import ImportedApiCall as ImportedApiCall +from revengai.models.imported_api_call_evidence import ImportedApiCallEvidence as ImportedApiCallEvidence from revengai.models.imported_function_caller_entry import ImportedFunctionCallerEntry as ImportedFunctionCallerEntry from revengai.models.imported_function_detail_output_body import ImportedFunctionDetailOutputBody as ImportedFunctionDetailOutputBody from revengai.models.imported_function_entry import ImportedFunctionEntry as ImportedFunctionEntry @@ -993,6 +1141,7 @@ from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest as InsertAnalysisLogRequest from revengai.models.invite_user_input_body import InviteUserInputBody as InviteUserInputBody from revengai.models.issuer_allowed_domain import IssuerAllowedDomain as IssuerAllowedDomain +from revengai.models.known_constant_evidence import KnownConstantEvidence as KnownConstantEvidence from revengai.models.line_attributions_data import LineAttributionsData as LineAttributionsData from revengai.models.list_analyses_output_body import ListAnalysesOutputBody as ListAnalysesOutputBody from revengai.models.list_analysis_data_types_output_body import ListAnalysisDataTypesOutputBody as ListAnalysisDataTypesOutputBody @@ -1015,7 +1164,11 @@ from revengai.models.matched_function import MatchedFunction as MatchedFunction from revengai.models.memdump_entry import MemdumpEntry as MemdumpEntry from revengai.models.message_body import MessageBody as MessageBody +from revengai.models.meta import Meta as Meta from revengai.models.meta_model import MetaModel as MetaModel +from revengai.models.metadata import Metadata as Metadata +from revengai.models.model_interpretation import ModelInterpretation as ModelInterpretation +from revengai.models.model_interpretation_evidence import ModelInterpretationEvidence as ModelInterpretationEvidence from revengai.models.model_name import ModelName as ModelName from revengai.models.models_response import ModelsResponse as ModelsResponse from revengai.models.module_load_entry import ModuleLoadEntry as ModuleLoadEntry @@ -1024,8 +1177,29 @@ from revengai.models.name_source_type import NameSourceType as NameSourceType from revengai.models.names_finished_event import NamesFinishedEvent as NamesFinishedEvent from revengai.models.network_activity import NetworkActivity as NetworkActivity +from revengai.models.networking_call import NetworkingCall as NetworkingCall +from revengai.models.networking_direct_match import NetworkingDirectMatch as NetworkingDirectMatch +from revengai.models.networking_explain_metadata import NetworkingExplainMetadata as NetworkingExplainMetadata +from revengai.models.networking_explain_result import NetworkingExplainResult as NetworkingExplainResult +from revengai.models.networking_explained_function import NetworkingExplainedFunction as NetworkingExplainedFunction +from revengai.models.networking_finding import NetworkingFinding as NetworkingFinding +from revengai.models.networking_scan_metadata import NetworkingScanMetadata as NetworkingScanMetadata +from revengai.models.networking_scan_result import NetworkingScanResult as NetworkingScanResult from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody as OIDCCallbackInputBody +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult as OperationCreateMetadataCreateResult +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult as OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult as OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult as OperationExecutionExplainMetadataExecutionExplainResult +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult as OperationExecutionScanMetadataExecutionScanResult +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult as OperationFilesystemAnalyseMetadataFilesystemAnalyseResult +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult as OperationFilesystemScanMetadataFilesystemScanResult +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult as OperationMetadataCapabilitiesResult +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult as OperationMetadataRemediationResult +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult as OperationMetadataReportResult +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult as OperationMetadataThreatReportResult +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult as OperationMetadataTriageResult +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult as OperationNetworkingExplainMetadataNetworkingExplainResult +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult as OperationNetworkingScanMetadataNetworkingScanResult from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult as OperationSecurityScanMetadataSecurityScanResult from revengai.models.operation_workflow_progress_result_body import OperationWorkflowProgressResultBody as OperationWorkflowProgressResultBody from revengai.models.order import Order as Order @@ -1060,16 +1234,20 @@ from revengai.models.product_summary import ProductSummary as ProductSummary from revengai.models.progress_message import ProgressMessage as ProgressMessage from revengai.models.prose_event import ProseEvent as ProseEvent +from revengai.models.protocols_agent_response import ProtocolsAgentResponse as ProtocolsAgentResponse from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse as QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent +from revengai.models.referenced_constant import ReferencedConstant as ReferencedConstant +from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence as ReferencedConstantEvidence from revengai.models.refresh_body import RefreshBody as RefreshBody from revengai.models.regenerate_output_body import RegenerateOutputBody as RegenerateOutputBody from revengai.models.register_user_input_body import RegisterUserInputBody as RegisterUserInputBody from revengai.models.registry_operation import RegistryOperation as RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse from revengai.models.remediation_agent_response import RemediationAgentResponse as RemediationAgentResponse +from revengai.models.remediation_result import RemediationResult as RemediationResult from revengai.models.remove_collection_binaries_input_body import RemoveCollectionBinariesInputBody as RemoveCollectionBinariesInputBody from revengai.models.rename_applied_event import RenameAppliedEvent as RenameAppliedEvent from revengai.models.rename_input_body import RenameInputBody as RenameInputBody @@ -1080,16 +1258,21 @@ from revengai.models.report_event import ReportEvent as ReportEvent from revengai.models.report_info import ReportInfo as ReportInfo from revengai.models.report_options import ReportOptions as ReportOptions +from revengai.models.report_reachability_status import ReportReachabilityStatus as ReportReachabilityStatus +from revengai.models.report_result import ReportResult as ReportResult from revengai.models.resolved_entity import ResolvedEntity as ResolvedEntity from revengai.models.result_body import ResultBody as ResultBody from revengai.models.revoke_body import RevokeBody as RevokeBody +from revengai.models.rule_kind import RuleKind as RuleKind from revengai.models.sso_provider import SSOProvider as SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody as SSOProvidersOutputBody +from revengai.models.sandbox_config import SandboxConfig as SandboxConfig from revengai.models.sandbox_options import SandboxOptions as SandboxOptions from revengai.models.sandbox_start_method import SandboxStartMethod as SandboxStartMethod from revengai.models.sandbox_timeout import SandboxTimeout as SandboxTimeout from revengai.models.scheduled_task_entry import ScheduledTaskEntry as ScheduledTaskEntry from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig as ScrapeThirdPartyConfig +from revengai.models.secrets_agent_response import SecretsAgentResponse as SecretsAgentResponse from revengai.models.section_model import SectionModel as SectionModel from revengai.models.security_finding import SecurityFinding as SecurityFinding from revengai.models.security_model import SecurityModel as SecurityModel @@ -1142,11 +1325,19 @@ from revengai.models.string_source import StringSource as StringSource from revengai.models.struct_data_type import StructDataType as StructDataType from revengai.models.struct_definition import StructDefinition as StructDefinition +from revengai.models.subject import Subject as Subject +from revengai.models.subject_any_of import SubjectAnyOf as SubjectAnyOf +from revengai.models.subject_any_of1 import SubjectAnyOf1 as SubjectAnyOf1 +from revengai.models.subject_any_of2 import SubjectAnyOf2 as SubjectAnyOf2 +from revengai.models.subject_any_of3 import SubjectAnyOf3 as SubjectAnyOf3 +from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody as SubmitFeedbackInputBody from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest as SubmitUserFeedbackRequest from revengai.models.suggested_hole import SuggestedHole as SuggestedHole from revengai.models.suggested_member_view import SuggestedMemberView as SuggestedMemberView from revengai.models.suggested_type_view import SuggestedTypeView as SuggestedTypeView from revengai.models.summary_data import SummaryData as SummaryData +from revengai.models.suspicious_string import SuspiciousString as SuspiciousString +from revengai.models.suspicious_string_evidence import SuspiciousStringEvidence as SuspiciousStringEvidence from revengai.models.symbols import Symbols as Symbols from revengai.models.tag import Tag as Tag from revengai.models.tag_item import TagItem as TagItem @@ -1159,15 +1350,25 @@ from revengai.models.tcp_carved_file import TcpCarvedFile as TcpCarvedFile from revengai.models.team import Team as Team from revengai.models.team_member import TeamMember as TeamMember +from revengai.models.technique import Technique as Technique +from revengai.models.threat_report_result import ThreatReportResult as ThreatReportResult from revengai.models.timestamp_model import TimestampModel as TimestampModel from revengai.models.token import Token as Token from revengai.models.token_input_body import TokenInputBody as TokenInputBody from revengai.models.token_response import TokenResponse as TokenResponse from revengai.models.tokenised_data import TokenisedData as TokenisedData +from revengai.models.triage_function import TriageFunction as TriageFunction from revengai.models.triage_function_response import TriageFunctionResponse as TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse as TriageReportResponse +from revengai.models.triage_result import TriageResult as TriageResult from revengai.models.trigger_crypto_scan_input_body import TriggerCryptoScanInputBody as TriggerCryptoScanInputBody from revengai.models.trigger_dynamic_execution_input_body import TriggerDynamicExecutionInputBody as TriggerDynamicExecutionInputBody +from revengai.models.trigger_execution_explain_input_body import TriggerExecutionExplainInputBody as TriggerExecutionExplainInputBody +from revengai.models.trigger_execution_scan_input_body import TriggerExecutionScanInputBody as TriggerExecutionScanInputBody +from revengai.models.trigger_filesystem_analyse_input_body import TriggerFilesystemAnalyseInputBody as TriggerFilesystemAnalyseInputBody +from revengai.models.trigger_filesystem_scan_input_body import TriggerFilesystemScanInputBody as TriggerFilesystemScanInputBody +from revengai.models.trigger_networking_explain_input_body import TriggerNetworkingExplainInputBody as TriggerNetworkingExplainInputBody +from revengai.models.trigger_networking_scan_input_body import TriggerNetworkingScanInputBody as TriggerNetworkingScanInputBody from revengai.models.trigger_rename_unnamed_functions_input_body import TriggerRenameUnnamedFunctionsInputBody as TriggerRenameUnnamedFunctionsInputBody from revengai.models.trigger_security_scan_input_body import TriggerSecurityScanInputBody as TriggerSecurityScanInputBody from revengai.models.ttp import Ttp as Ttp @@ -1201,6 +1402,7 @@ from revengai.models.update_user_password_input_body import UpdateUserPasswordInputBody as UpdateUserPasswordInputBody from revengai.models.upgrade_analysis_model_output_body import UpgradeAnalysisModelOutputBody as UpgradeAnalysisModelOutputBody from revengai.models.upload_file_type import UploadFileType as UploadFileType +from revengai.models.upload_output_body import UploadOutputBody as UploadOutputBody from revengai.models.upload_response import UploadResponse as UploadResponse from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest as UpsertAiDecomplationRatingRequest from revengai.models.upsert_overrides_data import UpsertOverridesData as UpsertOverridesData diff --git a/revengai/api/agent_api.py b/revengai/api/agent_api.py index 2cb0a58..04adaea 100644 --- a/revengai/api/agent_api.py +++ b/revengai/api/agent_api.py @@ -15,20 +15,42 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictInt +from pydantic import Field, StrictInt, StrictStr, field_validator from typing_extensions import Annotated from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse +from revengai.models.base_response_protocols_agent_response import BaseResponseProtocolsAgentResponse from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse from revengai.models.base_response_remediation_agent_response import BaseResponseRemediationAgentResponse from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +from revengai.models.base_response_secrets_agent_response import BaseResponseSecretsAgentResponse from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse +from revengai.models.feedback_output_body import FeedbackOutputBody +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse from revengai.models.rename_unnamed_functions_result import RenameUnnamedFunctionsResult from revengai.models.status_body import StatusBody +from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody from revengai.models.task_status_response import TaskStatusResponse from revengai.models.trigger_crypto_scan_input_body import TriggerCryptoScanInputBody +from revengai.models.trigger_execution_explain_input_body import TriggerExecutionExplainInputBody +from revengai.models.trigger_execution_scan_input_body import TriggerExecutionScanInputBody +from revengai.models.trigger_filesystem_analyse_input_body import TriggerFilesystemAnalyseInputBody +from revengai.models.trigger_filesystem_scan_input_body import TriggerFilesystemScanInputBody +from revengai.models.trigger_networking_explain_input_body import TriggerNetworkingExplainInputBody +from revengai.models.trigger_networking_scan_input_body import TriggerNetworkingScanInputBody from revengai.models.trigger_rename_unnamed_functions_input_body import TriggerRenameUnnamedFunctionsInputBody from revengai.models.trigger_security_scan_input_body import TriggerSecurityScanInputBody @@ -67,7 +89,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TaskStatusResponse: - """Check the status of a capabilities analysis workflow + """(Deprecated) Check the status of a capabilities analysis workflow :param analysis_id: (required) @@ -93,6 +115,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities/status is deprecated.", DeprecationWarning) _param = self._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_serialize( analysis_id=analysis_id, @@ -134,7 +157,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TaskStatusResponse]: - """Check the status of a capabilities analysis workflow + """(Deprecated) Check the status of a capabilities analysis workflow :param analysis_id: (required) @@ -160,6 +183,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities/status is deprecated.", DeprecationWarning) _param = self._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_serialize( analysis_id=analysis_id, @@ -201,7 +225,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check the status of a capabilities analysis workflow + """(Deprecated) Check the status of a capabilities analysis workflow :param analysis_id: (required) @@ -227,6 +251,7 @@ def check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_st :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities/status is deprecated.", DeprecationWarning) _param = self._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_serialize( analysis_id=analysis_id, @@ -313,7 +338,7 @@ def _check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_s @validate_call - def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get( + def check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -329,7 +354,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TaskStatusResponse: - """Check the status of a remediation analysis workflow + """(Deprecated) Check the status of a protocols discovery workflow :param analysis_id: (required) @@ -355,8 +380,9 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols/status is deprecated.", DeprecationWarning) - _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( + _param = self._check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -380,7 +406,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat @validate_call - def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_with_http_info( + def check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -396,7 +422,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TaskStatusResponse]: - """Check the status of a remediation analysis workflow + """(Deprecated) Check the status of a protocols discovery workflow :param analysis_id: (required) @@ -422,8 +448,9 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols/status is deprecated.", DeprecationWarning) - _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( + _param = self._check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -447,7 +474,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat @validate_call - def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_without_preload_content( + def check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -463,7 +490,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check the status of a remediation analysis workflow + """(Deprecated) Check the status of a protocols discovery workflow :param analysis_id: (required) @@ -489,8 +516,9 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols/status is deprecated.", DeprecationWarning) - _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( + _param = self._check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -509,7 +537,7 @@ def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_stat return response_data.response - def _check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( + def _check_protocols_task_status_v2_analyses_analysis_id_agent_protocols_status_get_serialize( self, analysis_id, _request_auth, @@ -558,7 +586,7 @@ def _check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_sta return self.api_client.param_serialize( method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/remediation/status', + resource_path='/v2/analyses/{analysis_id}/agent/protocols/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -575,7 +603,7 @@ def _check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_sta @validate_call - def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get( + def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -591,7 +619,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TaskStatusResponse: - """Check the status of a report analysis workflow + """(Deprecated) Check the status of a remediation analysis workflow :param analysis_id: (required) @@ -617,8 +645,9 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation/status is deprecated.", DeprecationWarning) - _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( + _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -642,7 +671,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy @validate_call - def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_with_http_info( + def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -658,7 +687,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TaskStatusResponse]: - """Check the status of a report analysis workflow + """(Deprecated) Check the status of a remediation analysis workflow :param analysis_id: (required) @@ -684,8 +713,9 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation/status is deprecated.", DeprecationWarning) - _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( + _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -709,7 +739,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy @validate_call - def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_without_preload_content( + def check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -725,7 +755,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check the status of a report analysis workflow + """(Deprecated) Check the status of a remediation analysis workflow :param analysis_id: (required) @@ -751,8 +781,9 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation/status is deprecated.", DeprecationWarning) - _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( + _param = self._check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -771,7 +802,7 @@ def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analy return response_data.response - def _check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( + def _check_remediation_task_status_v2_analyses_analysis_id_agent_remediation_status_get_serialize( self, analysis_id, _request_auth, @@ -820,7 +851,7 @@ def _check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_anal return self.api_client.param_serialize( method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/report-analysis/status', + resource_path='/v2/analyses/{analysis_id}/agent/remediation/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -837,7 +868,7 @@ def _check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_anal @validate_call - def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( + def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -853,7 +884,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TaskStatusResponse: - """Check the status of a triage analysis workflow + """(Deprecated) Check the status of a report analysis workflow :param analysis_id: (required) @@ -879,8 +910,9 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis/status is deprecated.", DeprecationWarning) - _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( + _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -904,7 +936,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( @validate_call - def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_with_http_info( + def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -920,7 +952,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TaskStatusResponse]: - """Check the status of a triage analysis workflow + """(Deprecated) Check the status of a report analysis workflow :param analysis_id: (required) @@ -946,8 +978,9 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis/status is deprecated.", DeprecationWarning) - _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( + _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -971,7 +1004,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit @validate_call - def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_without_preload_content( + def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -987,7 +1020,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check the status of a triage analysis workflow + """(Deprecated) Check the status of a report analysis workflow :param analysis_id: (required) @@ -1013,8 +1046,9 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis/status is deprecated.", DeprecationWarning) - _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( + _param = self._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1033,7 +1067,7 @@ def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_wit return response_data.response - def _check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( + def _check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_serialize( self, analysis_id, _request_auth, @@ -1082,7 +1116,7 @@ def _check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_se return self.api_client.param_serialize( method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/triage/status', + resource_path='/v2/analyses/{analysis_id}/agent/report-analysis/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1099,7 +1133,7 @@ def _check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_se @validate_call - def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( + def check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1114,8 +1148,8 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseQueuedWorkflowTaskResponse: - """Queues a capabilities analysis workflow process + ) -> TaskStatusResponse: + """(Deprecated) Check the status of a secrets discovery workflow :param analysis_id: (required) @@ -1141,8 +1175,9 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets/status is deprecated.", DeprecationWarning) - _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( + _param = self._check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1151,7 +1186,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1166,7 +1201,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( @validate_call - def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_with_http_info( + def check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1181,8 +1216,8 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: - """Queues a capabilities analysis workflow process + ) -> ApiResponse[TaskStatusResponse]: + """(Deprecated) Check the status of a secrets discovery workflow :param analysis_id: (required) @@ -1208,8 +1243,9 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets/status is deprecated.", DeprecationWarning) - _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( + _param = self._check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1218,7 +1254,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1233,7 +1269,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit @validate_call - def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_without_preload_content( + def check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1249,7 +1285,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queues a capabilities analysis workflow process + """(Deprecated) Check the status of a secrets discovery workflow :param analysis_id: (required) @@ -1275,8 +1311,9 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets/status is deprecated.", DeprecationWarning) - _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( + _param = self._check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1285,7 +1322,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1295,7 +1332,7 @@ def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_wit return response_data.response - def _create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( + def _check_secrets_task_status_v2_analyses_analysis_id_agent_secrets_status_get_serialize( self, analysis_id, _request_auth, @@ -1343,8 +1380,8 @@ def _create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_se ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/analyses/{analysis_id}/agent/capabilities', + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/secrets/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1361,7 +1398,7 @@ def _create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_se @validate_call - def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( + def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1376,8 +1413,8 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseQueuedWorkflowTaskResponse: - """Queues a remediation analysis workflow process + ) -> TaskStatusResponse: + """(Deprecated) Check the status of a triage analysis workflow :param analysis_id: (required) @@ -1403,8 +1440,9 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage/status is deprecated.", DeprecationWarning) - _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( + _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1413,7 +1451,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1428,7 +1466,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( @validate_call - def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_http_info( + def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1443,8 +1481,8 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_ _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: - """Queues a remediation analysis workflow process + ) -> ApiResponse[TaskStatusResponse]: + """(Deprecated) Check the status of a triage analysis workflow :param analysis_id: (required) @@ -1470,8 +1508,9 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_ :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage/status is deprecated.", DeprecationWarning) - _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( + _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1480,7 +1519,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_ ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1495,7 +1534,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_ @validate_call - def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_without_preload_content( + def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1511,7 +1550,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_witho _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queues a remediation analysis workflow process + """(Deprecated) Check the status of a triage analysis workflow :param analysis_id: (required) @@ -1537,8 +1576,9 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_witho :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage/status is deprecated.", DeprecationWarning) - _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( + _param = self._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1547,7 +1587,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_witho ) _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseQueuedWorkflowTaskResponse", + '200': "TaskStatusResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1557,7 +1597,7 @@ def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_witho return response_data.response - def _create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( + def _check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_serialize( self, analysis_id, _request_auth, @@ -1605,8 +1645,8 @@ def _create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_seri ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/analyses/{analysis_id}/agent/remediation', + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/triage/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1623,7 +1663,7 @@ def _create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_seri @validate_call - def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post( + def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1638,8 +1678,8 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> QueuedWorkflowTaskResponse: - """Queues a combined report analysis workflow process + ) -> BaseResponseQueuedWorkflowTaskResponse: + """(Deprecated) Queues a capabilities analysis workflow process :param analysis_id: (required) @@ -1665,8 +1705,9 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) - _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( + _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1675,9 +1716,8 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po ) _response_types_map: Dict[str, Optional[str]] = { - '202': "QueuedWorkflowTaskResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", - '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -1691,7 +1731,7 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po @validate_call - def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_with_http_info( + def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1706,8 +1746,8 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[QueuedWorkflowTaskResponse]: - """Queues a combined report analysis workflow process + ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: + """(Deprecated) Queues a capabilities analysis workflow process :param analysis_id: (required) @@ -1733,8 +1773,9 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) - _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( + _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1743,9 +1784,8 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po ) _response_types_map: Dict[str, Optional[str]] = { - '202': "QueuedWorkflowTaskResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", - '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -1759,7 +1799,7 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po @validate_call - def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_without_preload_content( + def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1775,7 +1815,7 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queues a combined report analysis workflow process + """(Deprecated) Queues a capabilities analysis workflow process :param analysis_id: (required) @@ -1801,8 +1841,9 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) - _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( + _param = self._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1811,9 +1852,8 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po ) _response_types_map: Dict[str, Optional[str]] = { - '202': "QueuedWorkflowTaskResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", - '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -1822,7 +1862,7 @@ def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_po return response_data.response - def _create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( + def _create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_serialize( self, analysis_id, _request_auth, @@ -1871,7 +1911,7 @@ def _create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_p return self.api_client.param_serialize( method='POST', - resource_path='/v2/analyses/{analysis_id}/agent/report-analysis', + resource_path='/v2/analyses/{analysis_id}/agent/capabilities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1888,7 +1928,7 @@ def _create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_p @validate_call - def create_triage_task_v2_analyses_analysis_id_agent_triage_post( + def create_protocols_task_v2_analyses_analysis_id_agent_protocols_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1904,7 +1944,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseQueuedWorkflowTaskResponse: - """Queues a triage analysis workflow process + """(Deprecated) Queues a protocols discovery workflow process :param analysis_id: (required) @@ -1930,8 +1970,9 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) - _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( + _param = self._create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1955,7 +1996,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post( @validate_call - def create_triage_task_v2_analyses_analysis_id_agent_triage_post_with_http_info( + def create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -1971,7 +2012,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: - """Queues a triage analysis workflow process + """(Deprecated) Queues a protocols discovery workflow process :param analysis_id: (required) @@ -1997,8 +2038,9 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) - _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( + _param = self._create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2022,7 +2064,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_with_http_info( @validate_call - def create_triage_task_v2_analyses_analysis_id_agent_triage_post_without_preload_content( + def create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2038,7 +2080,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_without_preload _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queues a triage analysis workflow process + """(Deprecated) Queues a protocols discovery workflow process :param analysis_id: (required) @@ -2064,8 +2106,9 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_without_preload :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) - _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( + _param = self._create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2084,7 +2127,7 @@ def create_triage_task_v2_analyses_analysis_id_agent_triage_post_without_preload return response_data.response - def _create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( + def _create_protocols_task_v2_analyses_analysis_id_agent_protocols_post_serialize( self, analysis_id, _request_auth, @@ -2133,7 +2176,7 @@ def _create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/analyses/{analysis_id}/agent/triage', + resource_path='/v2/analyses/{analysis_id}/agent/protocols', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2150,7 +2193,7 @@ def _create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( @validate_call - def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( + def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2165,8 +2208,8 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseCapabilitiesAgentResponse: - """Get Capabilities Result + ) -> BaseResponseQueuedWorkflowTaskResponse: + """(Deprecated) Queues a remediation analysis workflow process :param analysis_id: (required) @@ -2192,8 +2235,9 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) - _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2202,7 +2246,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCapabilitiesAgentResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2217,7 +2261,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( @validate_call - def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_http_info( + def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2232,8 +2276,8 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_ _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseCapabilitiesAgentResponse]: - """Get Capabilities Result + ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: + """(Deprecated) Queues a remediation analysis workflow process :param analysis_id: (required) @@ -2259,8 +2303,9 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_ :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) - _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2269,7 +2314,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_ ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCapabilitiesAgentResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2284,7 +2329,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_ @validate_call - def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_without_preload_content( + def create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2300,7 +2345,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_witho _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Capabilities Result + """(Deprecated) Queues a remediation analysis workflow process :param analysis_id: (required) @@ -2326,8 +2371,9 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_witho :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) - _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + _param = self._create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2336,7 +2382,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_witho ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCapabilitiesAgentResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2346,7 +2392,7 @@ def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_witho return response_data.response - def _get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + def _create_remediation_task_v2_analyses_analysis_id_agent_remediation_post_serialize( self, analysis_id, _request_auth, @@ -2394,8 +2440,8 @@ def _get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_seri ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/capabilities', + method='POST', + resource_path='/v2/analyses/{analysis_id}/agent/remediation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2412,7 +2458,7 @@ def _get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_seri @validate_call - def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( + def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2427,10 +2473,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseRemediationAgentResponse: - """Get Remediation Result + ) -> QueuedWorkflowTaskResponse: + """(Deprecated) Queues a combined report analysis workflow process - Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules :param analysis_id: (required) :type analysis_id: int @@ -2455,8 +2500,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) - _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2465,8 +2511,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseRemediationAgentResponse", + '202': "QueuedWorkflowTaskResponse", '422': "BaseResponse", + '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -2480,7 +2527,7 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( @validate_call - def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_http_info( + def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2495,10 +2542,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_ht _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseRemediationAgentResponse]: - """Get Remediation Result + ) -> ApiResponse[QueuedWorkflowTaskResponse]: + """(Deprecated) Queues a combined report analysis workflow process - Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules :param analysis_id: (required) :type analysis_id: int @@ -2523,8 +2569,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_ht :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) - _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2533,8 +2580,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_ht ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseRemediationAgentResponse", + '202': "QueuedWorkflowTaskResponse", '422': "BaseResponse", + '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -2548,7 +2596,7 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_ht @validate_call - def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without_preload_content( + def create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2564,9 +2612,8 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Remediation Result + """(Deprecated) Queues a combined report analysis workflow process - Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules :param analysis_id: (required) :type analysis_id: int @@ -2591,8 +2638,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) - _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + _param = self._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2601,8 +2649,9 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseRemediationAgentResponse", + '202': "QueuedWorkflowTaskResponse", '422': "BaseResponse", + '409': "ErrorModel", } response_data = self.api_client.call_api( *_param, @@ -2611,7 +2660,7 @@ def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without return response_data.response - def _get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + def _create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_serialize( self, analysis_id, _request_auth, @@ -2659,8 +2708,8 @@ def _get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serial ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/remediation', + method='POST', + resource_path='/v2/analyses/{analysis_id}/agent/report-analysis', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2677,7 +2726,7 @@ def _get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serial @validate_call - def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get( + def create_secrets_task_v2_analyses_analysis_id_agent_secrets_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2692,10 +2741,9 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseReportAnalysisResponse: - """Get Report Analysis Result + ) -> BaseResponseQueuedWorkflowTaskResponse: + """(Deprecated) Queues a secrets discovery workflow process - Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int @@ -2720,8 +2768,9 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) - _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + _param = self._create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2730,7 +2779,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseReportAnalysisResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2745,7 +2794,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get @validate_call - def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_with_http_info( + def create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2760,10 +2809,9 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseReportAnalysisResponse]: - """Get Report Analysis Result + ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: + """(Deprecated) Queues a secrets discovery workflow process - Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int @@ -2788,8 +2836,9 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) - _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + _param = self._create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2798,7 +2847,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseReportAnalysisResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2813,7 +2862,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get @validate_call - def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_without_preload_content( + def create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2829,9 +2878,8 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Report Analysis Result + """(Deprecated) Queues a secrets discovery workflow process - Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int @@ -2856,8 +2904,9 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) - _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + _param = self._create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2866,7 +2915,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseReportAnalysisResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2876,7 +2925,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get return response_data.response - def _get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + def _create_secrets_task_v2_analyses_analysis_id_agent_secrets_post_serialize( self, analysis_id, _request_auth, @@ -2924,8 +2973,8 @@ def _get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_ge ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/analyses/{analysis_id}/agent/report-analysis', + method='POST', + resource_path='/v2/analyses/{analysis_id}/agent/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2942,7 +2991,7 @@ def _get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_ge @validate_call - def get_triage_result_v2_analyses_analysis_id_agent_triage_get( + def create_triage_task_v2_analyses_analysis_id_agent_triage_post( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -2957,8 +3006,8 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseTriageReportResponse: - """Get Triage Result + ) -> BaseResponseQueuedWorkflowTaskResponse: + """(Deprecated) Queues a triage analysis workflow process :param analysis_id: (required) @@ -2984,8 +3033,9 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) - _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2994,7 +3044,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseTriageReportResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -3009,7 +3059,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get( @validate_call - def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( + def create_triage_task_v2_analyses_analysis_id_agent_triage_post_with_http_info( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -3024,8 +3074,8 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseTriageReportResponse]: - """Get Triage Result + ) -> ApiResponse[BaseResponseQueuedWorkflowTaskResponse]: + """(Deprecated) Queues a triage analysis workflow process :param analysis_id: (required) @@ -3051,8 +3101,9 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) - _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3061,7 +3112,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseTriageReportResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -3076,7 +3127,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( @validate_call - def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_content( + def create_triage_task_v2_analyses_analysis_id_agent_triage_post_without_preload_content( self, analysis_id: StrictInt, _request_timeout: Union[ @@ -3092,7 +3143,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_c _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Triage Result + """(Deprecated) Queues a triage analysis workflow process :param analysis_id: (required) @@ -3118,8 +3169,9 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_c :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) - _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + _param = self._create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3128,7 +3180,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_c ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseTriageReportResponse", + '202': "BaseResponseQueuedWorkflowTaskResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -3138,7 +3190,7 @@ def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_c return response_data.response - def _get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + def _create_triage_task_v2_analyses_analysis_id_agent_triage_post_serialize( self, analysis_id, _request_auth, @@ -3186,7 +3238,7 @@ def _get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( ] return self.api_client.param_serialize( - method='GET', + method='POST', resource_path='/v2/analyses/{analysis_id}/agent/triage', path_params=_path_params, query_params=_query_params, @@ -3204,9 +3256,9 @@ def _get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( @validate_call - def v3_cancel_rename_unnamed_functions( + def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + analysis_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3219,12 +3271,11 @@ def v3_cancel_rename_unnamed_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Cancel the rename-unnamed-functions agent. + ) -> BaseResponseCapabilitiesAgentResponse: + """(Deprecated) Get Capabilities Result - Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run - :param analysis_id: Analysis ID (required) + :param analysis_id: (required) :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3247,8 +3298,9 @@ def v3_cancel_rename_unnamed_functions( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) - _param = self._v3_cancel_rename_unnamed_functions_serialize( + _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3257,11 +3309,8 @@ def v3_cancel_rename_unnamed_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseCapabilitiesAgentResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -3275,9 +3324,9459 @@ def v3_cancel_rename_unnamed_functions( @validate_call - def v3_cancel_rename_unnamed_functions_with_http_info( + def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseCapabilitiesAgentResponse]: + """(Deprecated) Get Capabilities Result + + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) + + _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCapabilitiesAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Capabilities Result + + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/capabilities is deprecated.", DeprecationWarning) + + _param = self._get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCapabilitiesAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/capabilities', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_protocols_result_v2_analyses_analysis_id_agent_protocols_get( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseProtocolsAgentResponse: + """(Deprecated) Get Protocols Result + + Returns the protocols report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) + + _param = self._get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProtocolsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseProtocolsAgentResponse]: + """(Deprecated) Get Protocols Result + + Returns the protocols report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) + + _param = self._get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProtocolsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Protocols Result + + Returns the protocols report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/protocols is deprecated.", DeprecationWarning) + + _param = self._get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProtocolsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_protocols_result_v2_analyses_analysis_id_agent_protocols_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/protocols', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseRemediationAgentResponse: + """(Deprecated) Get Remediation Result + + Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) + + _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRemediationAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseRemediationAgentResponse]: + """(Deprecated) Get Remediation Result + + Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) + + _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRemediationAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Remediation Result + + Returns: - A list of generated YARA rules - A list of generated Snort rules - A list of generated STIX rules + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/remediation is deprecated.", DeprecationWarning) + + _param = self._get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRemediationAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_remediation_result_v2_analyses_analysis_id_agent_remediation_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/remediation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseReportAnalysisResponse: + """(Deprecated) Get Report Analysis Result + + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) + + _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseReportAnalysisResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseReportAnalysisResponse]: + """(Deprecated) Get Report Analysis Result + + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) + + _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseReportAnalysisResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Report Analysis Result + + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/report-analysis is deprecated.", DeprecationWarning) + + _param = self._get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseReportAnalysisResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/report-analysis', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_secrets_result_v2_analyses_analysis_id_agent_secrets_get( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseSecretsAgentResponse: + """(Deprecated) Get Secrets Result + + Returns the secrets report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) + + _param = self._get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecretsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseSecretsAgentResponse]: + """(Deprecated) Get Secrets Result + + Returns the secrets report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) + + _param = self._get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecretsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Secrets Result + + Returns the secrets report, including metadata, findings, and evidence. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/secrets is deprecated.", DeprecationWarning) + + _param = self._get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecretsAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_secrets_result_v2_analyses_analysis_id_agent_secrets_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/secrets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_triage_result_v2_analyses_analysis_id_agent_triage_get( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseTriageReportResponse: + """(Deprecated) Get Triage Result + + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) + + _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTriageReportResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_triage_result_v2_analyses_analysis_id_agent_triage_get_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseTriageReportResponse]: + """(Deprecated) Get Triage Result + + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) + + _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTriageReportResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_triage_result_v2_analyses_analysis_id_agent_triage_get_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Triage Result + + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/agent/triage is deprecated.", DeprecationWarning) + + _param = self._get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTriageReportResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_triage_result_v2_analyses_analysis_id_agent_triage_get_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/agent/triage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_cancel_rename_unnamed_functions( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Cancel the rename-unnamed-functions agent. + + Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_rename_unnamed_functions_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_cancel_rename_unnamed_functions_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Cancel the rename-unnamed-functions agent. + + Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_rename_unnamed_functions_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_cancel_rename_unnamed_functions_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel the rename-unnamed-functions agent. + + Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_rename_unnamed_functions_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_cancel_rename_unnamed_functions_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_cancel_security_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Cancel a security-scan operation. + + Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_cancel_security_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Cancel a security-scan operation. + + Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_cancel_security_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel a security-scan operation. + + Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_cancel_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_cancel_security_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='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/v3/operations/security-scan/{analysis_id}:cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_binary_agent_feedback( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FeedbackOutputBody: + """Get the caller's feedback on an agent's output. + + Returns the sentiment the caller recorded for one agent on this analysis, or a null sentiment 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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_binary_agent_feedback_serialize( + analysis_id=analysis_id, + agent=agent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FeedbackOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_binary_agent_feedback_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FeedbackOutputBody]: + """Get the caller's feedback on an agent's output. + + Returns the sentiment the caller recorded for one agent on this analysis, or a null sentiment 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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_binary_agent_feedback_serialize( + analysis_id=analysis_id, + agent=agent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FeedbackOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_binary_agent_feedback_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the caller's feedback on an agent's output. + + Returns the sentiment the caller recorded for one agent on this analysis, or a null sentiment 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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_binary_agent_feedback_serialize( + analysis_id=analysis_id, + agent=agent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FeedbackOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_binary_agent_feedback_serialize( + self, + analysis_id, + agent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + if agent is not None: + _path_params['agent'] = agent + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/agents/{agent}/feedback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_capabilities_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataCapabilitiesResult: + """Get a capabilities operation. + + Polls a capabilities run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_capabilities_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_capabilities_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataCapabilitiesResult]: + """Get a capabilities operation. + + Polls a capabilities run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_capabilities_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_capabilities_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a capabilities operation. + + Polls a capabilities run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_capabilities_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_capabilities_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/capabilities/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_crypto_explain_operation( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationCryptoExplainMetadataCryptoExplainResult: + """Get a crypto-explain operation. + + Returns the current state of the crypto-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_crypto_explain_operation_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationCryptoExplainMetadataCryptoExplainResult]: + """Get a crypto-explain operation. + + Returns the current state of the crypto-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_crypto_explain_operation_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a crypto-explain operation. + + Returns the current state of the crypto-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_crypto_explain_operation_serialize( + self, + function_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/crypto-explain/{function_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_crypto_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationCryptoScanMetadataCryptoScanResult: + """Get a crypto-scan operation. + + Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_crypto_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationCryptoScanMetadataCryptoScanResult]: + """Get a crypto-scan operation. + + Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_crypto_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a crypto-scan operation. + + Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_crypto_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_crypto_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/crypto-scan/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_execution_explain_operation( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationExecutionExplainMetadataExecutionExplainResult: + """Get an execution-explain operation. + + Returns the current state of the execution-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_execution_explain_operation_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationExecutionExplainMetadataExecutionExplainResult]: + """Get an execution-explain operation. + + Returns the current state of the execution-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_execution_explain_operation_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an execution-explain operation. + + Returns the current state of the execution-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_execution_explain_operation_serialize( + self, + function_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/execution-explain/{function_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_execution_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationExecutionScanMetadataExecutionScanResult: + """Get an execution-scan operation. + + Returns the current state of the execution-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_execution_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationExecutionScanMetadataExecutionScanResult]: + """Get an execution-scan operation. + + Returns the current state of the execution-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_execution_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an execution-scan operation. + + Returns the current state of the execution-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_execution_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_execution_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/execution-scan/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_filesystem_analyse_operation( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationFilesystemAnalyseMetadataFilesystemAnalyseResult: + """Get a filesystem-analyse operation. + + Returns the current state of the filesystem-analyse run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_analyse_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_filesystem_analyse_operation_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationFilesystemAnalyseMetadataFilesystemAnalyseResult]: + """Get a filesystem-analyse operation. + + Returns the current state of the filesystem-analyse run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_analyse_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_filesystem_analyse_operation_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a filesystem-analyse operation. + + Returns the current state of the filesystem-analyse run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_analyse_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_filesystem_analyse_operation_serialize( + self, + function_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/filesystem-analyse/{function_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_filesystem_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationFilesystemScanMetadataFilesystemScanResult: + """Get a filesystem-scan operation. + + Returns the current state of the filesystem-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_filesystem_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationFilesystemScanMetadataFilesystemScanResult]: + """Get a filesystem-scan operation. + + Returns the current state of the filesystem-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_filesystem_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a filesystem-scan operation. + + Returns the current state of the filesystem-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_filesystem_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_filesystem_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/filesystem-scan/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_networking_explain_operation( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationNetworkingExplainMetadataNetworkingExplainResult: + """Get a networking-explain operation. + + Returns the current state of the networking-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_networking_explain_operation_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationNetworkingExplainMetadataNetworkingExplainResult]: + """Get a networking-explain operation. + + Returns the current state of the networking-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_networking_explain_operation_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a networking-explain operation. + + Returns the current state of the networking-explain run for this function. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_explain_operation_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_networking_explain_operation_serialize( + self, + function_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/networking-explain/{function_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_networking_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationNetworkingScanMetadataNetworkingScanResult: + """Get a networking-scan operation. + + Returns the current state of the networking-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingScanMetadataNetworkingScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_networking_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationNetworkingScanMetadataNetworkingScanResult]: + """Get a networking-scan operation. + + Returns the current state of the networking-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingScanMetadataNetworkingScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_networking_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a networking-scan operation. + + Returns the current state of the networking-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_networking_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingScanMetadataNetworkingScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_networking_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/networking-scan/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_protocols_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataReportResult: + """Get a protocols operation. + + Polls a protocols run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_protocols_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_protocols_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataReportResult]: + """Get a protocols operation. + + Polls a protocols run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_protocols_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_protocols_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a protocols operation. + + Polls a protocols run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_protocols_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_protocols_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/protocols/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_remediation_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataRemediationResult: + """Get a remediation operation. + + Polls a remediation run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_remediation_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataRemediationResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_remediation_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataRemediationResult]: + """Get a remediation operation. + + Polls a remediation run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_remediation_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataRemediationResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_remediation_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a remediation operation. + + Polls a remediation run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_remediation_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataRemediationResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_remediation_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/remediation/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_rename_unnamed_functions_result( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RenameUnnamedFunctionsResult: + """Get rename-unnamed-functions agent result. + + Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_result_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RenameUnnamedFunctionsResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_rename_unnamed_functions_result_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RenameUnnamedFunctionsResult]: + """Get rename-unnamed-functions agent result. + + Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_result_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RenameUnnamedFunctionsResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_rename_unnamed_functions_result_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get rename-unnamed-functions agent result. + + Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_result_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RenameUnnamedFunctionsResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_rename_unnamed_functions_result_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_rename_unnamed_functions_status( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StatusBody: + """Get rename-unnamed-functions agent status. + + Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StatusBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_rename_unnamed_functions_status_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StatusBody]: + """Get rename-unnamed-functions agent status. + + Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StatusBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_rename_unnamed_functions_status_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get rename-unnamed-functions agent status. + + Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_rename_unnamed_functions_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StatusBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_rename_unnamed_functions_status_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_report_analysis_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataThreatReportResult: + """Get a report-analysis operation. + + Polls a report-analysis run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_report_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataThreatReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_report_analysis_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataThreatReportResult]: + """Get a report-analysis operation. + + Polls a report-analysis run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_report_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataThreatReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_report_analysis_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a report-analysis operation. + + Polls a report-analysis run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_report_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataThreatReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_report_analysis_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/report-analysis/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_secrets_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataReportResult: + """Get a secrets operation. + + Polls a secrets run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_secrets_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_secrets_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataReportResult]: + """Get a secrets operation. + + Polls a secrets run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_secrets_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_secrets_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a secrets operation. + + Polls a secrets run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response.report` is set once the run has completed and carries the findings document as the agent produced it. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_secrets_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataReportResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_secrets_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/secrets/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_security_scan_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationSecurityScanMetadataSecurityScanResult: + """Get a security-scan operation. + + Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationSecurityScanMetadataSecurityScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_security_scan_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationSecurityScanMetadataSecurityScanResult]: + """Get a security-scan operation. + + Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationSecurityScanMetadataSecurityScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_security_scan_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a security-scan operation. + + Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_security_scan_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationSecurityScanMetadataSecurityScanResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_security_scan_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='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/v3/operations/security-scan/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_triage_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataTriageResult: + """Get a triage operation. + + Polls a triage run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_triage_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataTriageResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_triage_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataTriageResult]: + """Get a triage operation. + + Polls a triage run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_triage_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataTriageResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_triage_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a triage operation. + + Polls a triage run. `metadata.status` tracks the run and `metadata.log_history` carries its progress messages; `response` is set once the run has completed. **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 analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_triage_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataTriageResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_triage_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/triage/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_capabilities( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationMetadataCapabilitiesResult: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_capabilities_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_capabilities_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationMetadataCapabilitiesResult]: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_capabilities_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_capabilities_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_capabilities_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationMetadataCapabilitiesResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_capabilities_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/analyses/{analysis_id}/capabilities:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_crypto_explain( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationCryptoExplainMetadataCryptoExplainResult: + """Run the crypto-explain agent. + + Starts an agent that explains the cryptography the function implements, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_explain_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_crypto_explain_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationCryptoExplainMetadataCryptoExplainResult]: + """Run the crypto-explain agent. + + Starts an agent that explains the cryptography the function implements, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_explain_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_crypto_explain_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run the crypto-explain agent. + + Starts an agent that explains the cryptography the function implements, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_explain_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoExplainMetadataCryptoExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_crypto_explain_serialize( + self, + function_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/functions/{function_id}/crypto-explain:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_crypto_scan( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationCryptoScanMetadataCryptoScanResult: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_crypto_scan_input_body: (required) + :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_scan_serialize( + analysis_id=analysis_id, + trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_crypto_scan_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationCryptoScanMetadataCryptoScanResult]: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_crypto_scan_input_body: (required) + :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_scan_serialize( + analysis_id=analysis_id, + trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_crypto_scan_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_crypto_scan_input_body: (required) + :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_crypto_scan_serialize( + analysis_id=analysis_id, + trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCryptoScanMetadataCryptoScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_crypto_scan_serialize( + self, + analysis_id, + trigger_crypto_scan_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_crypto_scan_input_body is not None: + _body_params = trigger_crypto_scan_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/analyses/{analysis_id}/crypto-scan:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_execution_explain( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_execution_explain_input_body: TriggerExecutionExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationExecutionExplainMetadataExecutionExplainResult: + """Run the execution-explain agent. + + Starts an agent that explains the code execution the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_execution_explain_input_body: (required) + :type trigger_execution_explain_input_body: TriggerExecutionExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_explain_serialize( + function_id=function_id, + trigger_execution_explain_input_body=trigger_execution_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_execution_explain_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_execution_explain_input_body: TriggerExecutionExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationExecutionExplainMetadataExecutionExplainResult]: + """Run the execution-explain agent. + + Starts an agent that explains the code execution the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_execution_explain_input_body: (required) + :type trigger_execution_explain_input_body: TriggerExecutionExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_explain_serialize( + function_id=function_id, + trigger_execution_explain_input_body=trigger_execution_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_execution_explain_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_execution_explain_input_body: TriggerExecutionExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run the execution-explain agent. + + Starts an agent that explains the code execution the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_execution_explain_input_body: (required) + :type trigger_execution_explain_input_body: TriggerExecutionExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_explain_serialize( + function_id=function_id, + trigger_execution_explain_input_body=trigger_execution_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionExplainMetadataExecutionExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_execution_explain_serialize( + self, + function_id, + trigger_execution_explain_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_execution_explain_input_body is not None: + _body_params = trigger_execution_explain_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/functions/{function_id}/execution-explain:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_execution_scan( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_execution_scan_input_body: TriggerExecutionScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationExecutionScanMetadataExecutionScanResult: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_execution_scan_input_body: (required) + :type trigger_execution_scan_input_body: TriggerExecutionScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_scan_serialize( + analysis_id=analysis_id, + trigger_execution_scan_input_body=trigger_execution_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_execution_scan_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_execution_scan_input_body: TriggerExecutionScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationExecutionScanMetadataExecutionScanResult]: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_execution_scan_input_body: (required) + :type trigger_execution_scan_input_body: TriggerExecutionScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_scan_serialize( + analysis_id=analysis_id, + trigger_execution_scan_input_body=trigger_execution_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_execution_scan_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_execution_scan_input_body: TriggerExecutionScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_execution_scan_input_body: (required) + :type trigger_execution_scan_input_body: TriggerExecutionScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_execution_scan_serialize( + analysis_id=analysis_id, + trigger_execution_scan_input_body=trigger_execution_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationExecutionScanMetadataExecutionScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_execution_scan_serialize( + self, + analysis_id, + trigger_execution_scan_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_execution_scan_input_body is not None: + _body_params = trigger_execution_scan_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/analyses/{analysis_id}/execution-scan:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_filesystem_analyse( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationFilesystemAnalyseMetadataFilesystemAnalyseResult: + """Run the filesystem-analyse agent. + + Starts an agent that explains the filesystem/system access the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_filesystem_analyse_input_body: (required) + :type trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_analyse_serialize( + function_id=function_id, + trigger_filesystem_analyse_input_body=trigger_filesystem_analyse_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_filesystem_analyse_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationFilesystemAnalyseMetadataFilesystemAnalyseResult]: + """Run the filesystem-analyse agent. + + Starts an agent that explains the filesystem/system access the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_filesystem_analyse_input_body: (required) + :type trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_analyse_serialize( + function_id=function_id, + trigger_filesystem_analyse_input_body=trigger_filesystem_analyse_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_filesystem_analyse_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run the filesystem-analyse agent. + + Starts an agent that explains the filesystem/system access the function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_filesystem_analyse_input_body: (required) + :type trigger_filesystem_analyse_input_body: TriggerFilesystemAnalyseInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_analyse_serialize( + function_id=function_id, + trigger_filesystem_analyse_input_body=trigger_filesystem_analyse_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_filesystem_analyse_serialize( + self, + function_id, + trigger_filesystem_analyse_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_filesystem_analyse_input_body is not None: + _body_params = trigger_filesystem_analyse_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/functions/{function_id}/filesystem-analyse:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_filesystem_scan( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationFilesystemScanMetadataFilesystemScanResult: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_filesystem_scan_input_body: (required) + :type trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_scan_serialize( + analysis_id=analysis_id, + trigger_filesystem_scan_input_body=trigger_filesystem_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_filesystem_scan_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationFilesystemScanMetadataFilesystemScanResult]: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_filesystem_scan_input_body: (required) + :type trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_scan_serialize( + analysis_id=analysis_id, + trigger_filesystem_scan_input_body=trigger_filesystem_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_filesystem_scan_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_filesystem_scan_input_body: (required) + :type trigger_filesystem_scan_input_body: TriggerFilesystemScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_filesystem_scan_serialize( + analysis_id=analysis_id, + trigger_filesystem_scan_input_body=trigger_filesystem_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationFilesystemScanMetadataFilesystemScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_filesystem_scan_serialize( + self, + analysis_id, + trigger_filesystem_scan_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_filesystem_scan_input_body is not None: + _body_params = trigger_filesystem_scan_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/analyses/{analysis_id}/filesystem-scan:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_networking_explain( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationNetworkingExplainMetadataNetworkingExplainResult: + """Run the networking-explain agent. + + Starts an agent that explains the network communication a function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_networking_explain_input_body: (required) + :type trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_networking_explain_serialize( + function_id=function_id, + trigger_networking_explain_input_body=trigger_networking_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_networking_explain_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationNetworkingExplainMetadataNetworkingExplainResult]: + """Run the networking-explain agent. + + Starts an agent that explains the network communication a function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_networking_explain_input_body: (required) + :type trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_networking_explain_serialize( + function_id=function_id, + trigger_networking_explain_input_body=trigger_networking_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_networking_explain_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run the networking-explain agent. + + Starts an agent that explains the network communication a function performs, and returns the operation to poll for its outcome. Requires credits. Returns 409 while a run is already in progress for this function. **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 + + :param function_id: Function ID (required) + :type function_id: int + :param trigger_networking_explain_input_body: (required) + :type trigger_networking_explain_input_body: TriggerNetworkingExplainInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_networking_explain_serialize( + function_id=function_id, + trigger_networking_explain_input_body=trigger_networking_explain_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingExplainMetadataNetworkingExplainResult", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_networking_explain_serialize( + self, + function_id, + trigger_networking_explain_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_networking_explain_input_body is not None: + _body_params = trigger_networking_explain_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/functions/{function_id}/networking-explain:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_networking_scan( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_networking_scan_input_body: TriggerNetworkingScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3290,13 +12789,15 @@ def v3_cancel_rename_unnamed_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Cancel the rename-unnamed-functions agent. + ) -> OperationNetworkingScanMetadataNetworkingScanResult: + """Run the networking-scan agent. - Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int + :param trigger_networking_scan_input_body: (required) + :type trigger_networking_scan_input_body: TriggerNetworkingScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3319,8 +12820,9 @@ def v3_cancel_rename_unnamed_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_cancel_rename_unnamed_functions_serialize( + _param = self._v3_run_networking_scan_serialize( analysis_id=analysis_id, + trigger_networking_scan_input_body=trigger_networking_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3328,9 +12830,86 @@ def v3_cancel_rename_unnamed_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "OperationNetworkingScanMetadataNetworkingScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_networking_scan_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_networking_scan_input_body: TriggerNetworkingScanInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationNetworkingScanMetadataNetworkingScanResult]: + """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 + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param trigger_networking_scan_input_body: (required) + :type trigger_networking_scan_input_body: TriggerNetworkingScanInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_networking_scan_serialize( + analysis_id=analysis_id, + trigger_networking_scan_input_body=trigger_networking_scan_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationNetworkingScanMetadataNetworkingScanResult", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3346,9 +12925,10 @@ def v3_cancel_rename_unnamed_functions_with_http_info( @validate_call - def v3_cancel_rename_unnamed_functions_without_preload_content( + def v3_run_networking_scan_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_networking_scan_input_body: TriggerNetworkingScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3362,12 +12942,14 @@ def v3_cancel_rename_unnamed_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Cancel the rename-unnamed-functions agent. + """Run the networking-scan agent. - Requests cancellation of the currently running rename-unnamed-functions run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int + :param trigger_networking_scan_input_body: (required) + :type trigger_networking_scan_input_body: TriggerNetworkingScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3390,8 +12972,9 @@ def v3_cancel_rename_unnamed_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_cancel_rename_unnamed_functions_serialize( + _param = self._v3_run_networking_scan_serialize( analysis_id=analysis_id, + trigger_networking_scan_input_body=trigger_networking_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3399,9 +12982,10 @@ def v3_cancel_rename_unnamed_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "OperationNetworkingScanMetadataNetworkingScanResult", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3412,9 +12996,10 @@ def v3_cancel_rename_unnamed_functions_without_preload_content( return response_data.response - def _v3_cancel_rename_unnamed_functions_serialize( + def _v3_run_networking_scan_serialize( self, analysis_id, + trigger_networking_scan_input_body, _request_auth, _content_type, _headers, @@ -3442,6 +13027,8 @@ def _v3_cancel_rename_unnamed_functions_serialize( # process the header parameters # process the form parameters # process the body parameter + if trigger_networking_scan_input_body is not None: + _body_params = trigger_networking_scan_input_body # set the HTTP header `Accept` @@ -3452,6 +13039,19 @@ def _v3_cancel_rename_unnamed_functions_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -3461,7 +13061,7 @@ def _v3_cancel_rename_unnamed_functions_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions/cancel', + resource_path='/v3/analyses/{analysis_id}/networking-scan:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3478,7 +13078,7 @@ def _v3_cancel_rename_unnamed_functions_serialize( @validate_call - def v3_cancel_security_scan_operation( + def v3_run_protocols( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3493,10 +13093,10 @@ def v3_cancel_security_scan_operation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Cancel a security-scan operation. + ) -> OperationMetadataReportResult: + """Run the protocols agent. - Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3522,7 +13122,7 @@ def v3_cancel_security_scan_operation( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_cancel_security_scan_operation_serialize( + _param = self._v3_run_protocols_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3531,9 +13131,11 @@ def v3_cancel_security_scan_operation( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3549,7 +13151,7 @@ def v3_cancel_security_scan_operation( @validate_call - def v3_cancel_security_scan_operation_with_http_info( + def v3_run_protocols_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3564,10 +13166,10 @@ def v3_cancel_security_scan_operation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Cancel a security-scan operation. + ) -> ApiResponse[OperationMetadataReportResult]: + """Run the protocols agent. - Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3593,7 +13195,7 @@ def v3_cancel_security_scan_operation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_cancel_security_scan_operation_serialize( + _param = self._v3_run_protocols_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3602,9 +13204,11 @@ def v3_cancel_security_scan_operation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3620,7 +13224,7 @@ def v3_cancel_security_scan_operation_with_http_info( @validate_call - def v3_cancel_security_scan_operation_without_preload_content( + def v3_run_protocols_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3636,9 +13240,9 @@ def v3_cancel_security_scan_operation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Cancel a security-scan operation. + """Run the protocols agent. - Requests cancellation of the currently running security-scan run for the analysis. Returns 404 if no run is in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NO_ACTIVE_RUN`](/errors/NO_ACTIVE_RUN) — No Active Run + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3664,7 +13268,7 @@ def v3_cancel_security_scan_operation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_cancel_security_scan_operation_serialize( + _param = self._v3_run_protocols_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3673,9 +13277,11 @@ def v3_cancel_security_scan_operation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3686,7 +13292,7 @@ def v3_cancel_security_scan_operation_without_preload_content( return response_data.response - def _v3_cancel_security_scan_operation_serialize( + def _v3_run_protocols_serialize( self, analysis_id, _request_auth, @@ -3735,7 +13341,7 @@ def _v3_cancel_security_scan_operation_serialize( return self.api_client.param_serialize( method='POST', - resource_path='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/v3/operations/security-scan/{analysis_id}:cancel', + resource_path='/v3/analyses/{analysis_id}/protocols:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3752,7 +13358,7 @@ def _v3_cancel_security_scan_operation_serialize( @validate_call - def v3_get_crypto_scan_operation( + def v3_run_remediation( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3767,10 +13373,10 @@ def v3_get_crypto_scan_operation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationCryptoScanMetadataCryptoScanResult: - """Get a crypto-scan operation. + ) -> OperationMetadataRemediationResult: + """Run the remediation agent. - Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3796,7 +13402,7 @@ def v3_get_crypto_scan_operation( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_crypto_scan_operation_serialize( + _param = self._v3_run_remediation_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3805,9 +13411,11 @@ def v3_get_crypto_scan_operation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataRemediationResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3823,7 +13431,7 @@ def v3_get_crypto_scan_operation( @validate_call - def v3_get_crypto_scan_operation_with_http_info( + def v3_run_remediation_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3838,10 +13446,10 @@ def v3_get_crypto_scan_operation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationCryptoScanMetadataCryptoScanResult]: - """Get a crypto-scan operation. + ) -> ApiResponse[OperationMetadataRemediationResult]: + """Run the remediation agent. - Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3867,7 +13475,7 @@ def v3_get_crypto_scan_operation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_crypto_scan_operation_serialize( + _param = self._v3_run_remediation_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3876,9 +13484,11 @@ def v3_get_crypto_scan_operation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataRemediationResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3894,7 +13504,7 @@ def v3_get_crypto_scan_operation_with_http_info( @validate_call - def v3_get_crypto_scan_operation_without_preload_content( + def v3_run_remediation_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -3910,9 +13520,9 @@ def v3_get_crypto_scan_operation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a crypto-scan operation. + """Run the remediation agent. - Returns the current state of the crypto-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3938,7 +13548,7 @@ def v3_get_crypto_scan_operation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_crypto_scan_operation_serialize( + _param = self._v3_run_remediation_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3947,9 +13557,11 @@ def v3_get_crypto_scan_operation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataRemediationResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3960,7 +13572,7 @@ def v3_get_crypto_scan_operation_without_preload_content( return response_data.response - def _v3_get_crypto_scan_operation_serialize( + def _v3_run_remediation_serialize( self, analysis_id, _request_auth, @@ -4008,8 +13620,8 @@ def _v3_get_crypto_scan_operation_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/operations/crypto-scan/{analysis_id}', + method='POST', + resource_path='/v3/analyses/{analysis_id}/remediation:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4026,7 +13638,7 @@ def _v3_get_crypto_scan_operation_serialize( @validate_call - def v3_get_rename_unnamed_functions_result( + def v3_run_report_analysis( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4041,10 +13653,10 @@ def v3_get_rename_unnamed_functions_result( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RenameUnnamedFunctionsResult: - """Get rename-unnamed-functions agent result. + ) -> OperationMetadataThreatReportResult: + """Run the report-analysis agent. - Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4070,7 +13682,7 @@ def v3_get_rename_unnamed_functions_result( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_result_serialize( + _param = self._v3_run_report_analysis_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4079,7 +13691,8 @@ def v3_get_rename_unnamed_functions_result( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RenameUnnamedFunctionsResult", + '200': "OperationMetadataThreatReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -4098,7 +13711,7 @@ def v3_get_rename_unnamed_functions_result( @validate_call - def v3_get_rename_unnamed_functions_result_with_http_info( + def v3_run_report_analysis_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4113,10 +13726,10 @@ def v3_get_rename_unnamed_functions_result_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RenameUnnamedFunctionsResult]: - """Get rename-unnamed-functions agent result. + ) -> ApiResponse[OperationMetadataThreatReportResult]: + """Run the report-analysis agent. - Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4142,7 +13755,7 @@ def v3_get_rename_unnamed_functions_result_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_result_serialize( + _param = self._v3_run_report_analysis_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4151,7 +13764,8 @@ def v3_get_rename_unnamed_functions_result_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RenameUnnamedFunctionsResult", + '200': "OperationMetadataThreatReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -4170,7 +13784,7 @@ def v3_get_rename_unnamed_functions_result_with_http_info( @validate_call - def v3_get_rename_unnamed_functions_result_without_preload_content( + def v3_run_report_analysis_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4186,9 +13800,9 @@ def v3_get_rename_unnamed_functions_result_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get rename-unnamed-functions agent result. + """Run the report-analysis agent. - Returns the summary of the most recent completed rename-unnamed-functions run. Returns 409 while a run is still in progress and 404 when the agent has never produced a result for this analysis. **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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4214,7 +13828,7 @@ def v3_get_rename_unnamed_functions_result_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_result_serialize( + _param = self._v3_run_report_analysis_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4223,7 +13837,8 @@ def v3_get_rename_unnamed_functions_result_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RenameUnnamedFunctionsResult", + '200': "OperationMetadataThreatReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -4237,7 +13852,7 @@ def v3_get_rename_unnamed_functions_result_without_preload_content( return response_data.response - def _v3_get_rename_unnamed_functions_result_serialize( + def _v3_run_report_analysis_serialize( self, analysis_id, _request_auth, @@ -4285,8 +13900,8 @@ def _v3_get_rename_unnamed_functions_result_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions', + method='POST', + resource_path='/v3/analyses/{analysis_id}/report-analysis:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4303,7 +13918,7 @@ def _v3_get_rename_unnamed_functions_result_serialize( @validate_call - def v3_get_rename_unnamed_functions_status( + def v3_run_secrets( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4318,10 +13933,10 @@ def v3_get_rename_unnamed_functions_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> StatusBody: - """Get rename-unnamed-functions agent status. + ) -> OperationMetadataReportResult: + """Run the secrets agent. - Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4347,7 +13962,7 @@ def v3_get_rename_unnamed_functions_status( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_status_serialize( + _param = self._v3_run_secrets_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4356,9 +13971,11 @@ def v3_get_rename_unnamed_functions_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusBody", + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4374,7 +13991,7 @@ def v3_get_rename_unnamed_functions_status( @validate_call - def v3_get_rename_unnamed_functions_status_with_http_info( + def v3_run_secrets_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4389,10 +14006,10 @@ def v3_get_rename_unnamed_functions_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[StatusBody]: - """Get rename-unnamed-functions agent status. + ) -> ApiResponse[OperationMetadataReportResult]: + """Run the secrets agent. - Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4418,7 +14035,7 @@ def v3_get_rename_unnamed_functions_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_status_serialize( + _param = self._v3_run_secrets_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4427,9 +14044,11 @@ def v3_get_rename_unnamed_functions_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusBody", + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4445,7 +14064,7 @@ def v3_get_rename_unnamed_functions_status_with_http_info( @validate_call - def v3_get_rename_unnamed_functions_status_without_preload_content( + def v3_run_secrets_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -4461,9 +14080,9 @@ def v3_get_rename_unnamed_functions_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get rename-unnamed-functions agent status. + """Run the secrets agent. - Returns the status of the most recent rename-unnamed-functions run for the analysis. `UNINITIALISED` means the agent has never been triggered, so it is safe to start one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -4489,7 +14108,7 @@ def v3_get_rename_unnamed_functions_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_rename_unnamed_functions_status_serialize( + _param = self._v3_run_secrets_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4498,9 +14117,11 @@ def v3_get_rename_unnamed_functions_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusBody", + '200': "OperationMetadataReportResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4511,7 +14132,7 @@ def v3_get_rename_unnamed_functions_status_without_preload_content( return response_data.response - def _v3_get_rename_unnamed_functions_status_serialize( + def _v3_run_secrets_serialize( self, analysis_id, _request_auth, @@ -4559,8 +14180,8 @@ def _v3_get_rename_unnamed_functions_status_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions/status', + method='POST', + resource_path='/v3/analyses/{analysis_id}/secrets:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4577,9 +14198,10 @@ def _v3_get_rename_unnamed_functions_status_serialize( @validate_call - def v3_get_security_scan_operation( + def v3_run_security_scan( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_security_scan_input_body: TriggerSecurityScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4593,12 +14215,14 @@ def v3_get_security_scan_operation( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OperationSecurityScanMetadataSecurityScanResult: - """Get a security-scan operation. + """Run the security-scan agent. - Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int + :param trigger_security_scan_input_body: (required) + :type trigger_security_scan_input_body: TriggerSecurityScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4621,8 +14245,9 @@ def v3_get_security_scan_operation( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_security_scan_operation_serialize( + _param = self._v3_run_security_scan_serialize( analysis_id=analysis_id, + trigger_security_scan_input_body=trigger_security_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4631,8 +14256,10 @@ def v3_get_security_scan_operation( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationSecurityScanMetadataSecurityScanResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4648,9 +14275,10 @@ def v3_get_security_scan_operation( @validate_call - def v3_get_security_scan_operation_with_http_info( + def v3_run_security_scan_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_security_scan_input_body: TriggerSecurityScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4664,12 +14292,14 @@ def v3_get_security_scan_operation_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OperationSecurityScanMetadataSecurityScanResult]: - """Get a security-scan operation. + """Run the security-scan agent. - Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int + :param trigger_security_scan_input_body: (required) + :type trigger_security_scan_input_body: TriggerSecurityScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4692,8 +14322,9 @@ def v3_get_security_scan_operation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_security_scan_operation_serialize( + _param = self._v3_run_security_scan_serialize( analysis_id=analysis_id, + trigger_security_scan_input_body=trigger_security_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4702,8 +14333,10 @@ def v3_get_security_scan_operation_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationSecurityScanMetadataSecurityScanResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4719,9 +14352,10 @@ def v3_get_security_scan_operation_with_http_info( @validate_call - def v3_get_security_scan_operation_without_preload_content( + def v3_run_security_scan_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + trigger_security_scan_input_body: TriggerSecurityScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4735,12 +14369,14 @@ def v3_get_security_scan_operation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a security-scan operation. + """Run the security-scan agent. - Returns the current state of the security-scan run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int + :param trigger_security_scan_input_body: (required) + :type trigger_security_scan_input_body: TriggerSecurityScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4763,8 +14399,9 @@ def v3_get_security_scan_operation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_security_scan_operation_serialize( + _param = self._v3_run_security_scan_serialize( analysis_id=analysis_id, + trigger_security_scan_input_body=trigger_security_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4773,8 +14410,10 @@ def v3_get_security_scan_operation_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationSecurityScanMetadataSecurityScanResult", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4785,9 +14424,10 @@ def v3_get_security_scan_operation_without_preload_content( return response_data.response - def _v3_get_security_scan_operation_serialize( + def _v3_run_security_scan_serialize( self, analysis_id, + trigger_security_scan_input_body, _request_auth, _content_type, _headers, @@ -4815,6 +14455,8 @@ def _v3_get_security_scan_operation_serialize( # process the header parameters # process the form parameters # process the body parameter + if trigger_security_scan_input_body is not None: + _body_params = trigger_security_scan_input_body # set the HTTP header `Accept` @@ -4825,6 +14467,19 @@ def _v3_get_security_scan_operation_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -4833,8 +14488,8 @@ def _v3_get_security_scan_operation_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='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/v3/operations/security-scan/{analysis_id}', + method='POST', + resource_path='/v3/analyses/{analysis_id}/security-scan:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4851,10 +14506,9 @@ def _v3_get_security_scan_operation_serialize( @validate_call - def v3_run_crypto_scan( + def v3_run_triage( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4867,15 +14521,13 @@ def v3_run_crypto_scan( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationCryptoScanMetadataCryptoScanResult: - """Run the crypto-scan agent. + ) -> OperationMetadataTriageResult: + """Run the triage 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_crypto_scan_input_body: (required) - :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4898,9 +14550,8 @@ def v3_run_crypto_scan( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_crypto_scan_serialize( + _param = self._v3_run_triage_serialize( analysis_id=analysis_id, - trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4908,7 +14559,8 @@ def v3_run_crypto_scan( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataTriageResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -4927,10 +14579,9 @@ def v3_run_crypto_scan( @validate_call - def v3_run_crypto_scan_with_http_info( + def v3_run_triage_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4943,15 +14594,13 @@ def v3_run_crypto_scan_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationCryptoScanMetadataCryptoScanResult]: - """Run the crypto-scan agent. + ) -> ApiResponse[OperationMetadataTriageResult]: + """Run the triage 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_crypto_scan_input_body: (required) - :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4974,9 +14623,8 @@ def v3_run_crypto_scan_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_crypto_scan_serialize( + _param = self._v3_run_triage_serialize( analysis_id=analysis_id, - trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4984,7 +14632,8 @@ def v3_run_crypto_scan_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataTriageResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -5003,10 +14652,9 @@ def v3_run_crypto_scan_with_http_info( @validate_call - def v3_run_crypto_scan_without_preload_content( + def v3_run_triage_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_crypto_scan_input_body: TriggerCryptoScanInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5020,14 +14668,12 @@ def v3_run_crypto_scan_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Run the crypto-scan agent. + """Run the triage 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_crypto_scan_input_body: (required) - :type trigger_crypto_scan_input_body: TriggerCryptoScanInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5050,9 +14696,8 @@ def v3_run_crypto_scan_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_crypto_scan_serialize( + _param = self._v3_run_triage_serialize( analysis_id=analysis_id, - trigger_crypto_scan_input_body=trigger_crypto_scan_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5060,7 +14705,8 @@ def v3_run_crypto_scan_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationCryptoScanMetadataCryptoScanResult", + '200': "OperationMetadataTriageResult", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -5074,10 +14720,9 @@ def v3_run_crypto_scan_without_preload_content( return response_data.response - def _v3_run_crypto_scan_serialize( + def _v3_run_triage_serialize( self, analysis_id, - trigger_crypto_scan_input_body, _request_auth, _content_type, _headers, @@ -5105,8 +14750,6 @@ def _v3_run_crypto_scan_serialize( # process the header parameters # process the form parameters # process the body parameter - if trigger_crypto_scan_input_body is not None: - _body_params = trigger_crypto_scan_input_body # set the HTTP header `Accept` @@ -5117,19 +14760,6 @@ def _v3_run_crypto_scan_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -5139,7 +14769,7 @@ def _v3_run_crypto_scan_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses/{analysis_id}/crypto-scan:run', + resource_path='/v3/analyses/{analysis_id}/triage:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5156,10 +14786,10 @@ def _v3_run_crypto_scan_serialize( @validate_call - def v3_run_security_scan( + def v3_trigger_rename_unnamed_functions( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_security_scan_input_body: TriggerSecurityScanInputBody, + trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5172,15 +14802,15 @@ def v3_run_security_scan( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationSecurityScanMetadataSecurityScanResult: - """Run the security-scan agent. + ) -> StatusBody: + """Run the rename-unnamed-functions 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_security_scan_input_body: (required) - :type trigger_security_scan_input_body: TriggerSecurityScanInputBody + :param trigger_rename_unnamed_functions_input_body: (required) + :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5203,9 +14833,9 @@ def v3_run_security_scan( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_security_scan_serialize( + _param = self._v3_trigger_rename_unnamed_functions_serialize( analysis_id=analysis_id, - trigger_security_scan_input_body=trigger_security_scan_input_body, + trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5213,7 +14843,8 @@ def v3_run_security_scan( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationSecurityScanMetadataSecurityScanResult", + '202': "StatusBody", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -5232,10 +14863,10 @@ def v3_run_security_scan( @validate_call - def v3_run_security_scan_with_http_info( + def v3_trigger_rename_unnamed_functions_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_security_scan_input_body: TriggerSecurityScanInputBody, + trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5248,15 +14879,15 @@ def v3_run_security_scan_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationSecurityScanMetadataSecurityScanResult]: - """Run the security-scan agent. + ) -> ApiResponse[StatusBody]: + """Run the rename-unnamed-functions 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_security_scan_input_body: (required) - :type trigger_security_scan_input_body: TriggerSecurityScanInputBody + :param trigger_rename_unnamed_functions_input_body: (required) + :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5279,9 +14910,9 @@ def v3_run_security_scan_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_security_scan_serialize( + _param = self._v3_trigger_rename_unnamed_functions_serialize( analysis_id=analysis_id, - trigger_security_scan_input_body=trigger_security_scan_input_body, + trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5289,7 +14920,8 @@ def v3_run_security_scan_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationSecurityScanMetadataSecurityScanResult", + '202': "StatusBody", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -5308,10 +14940,10 @@ def v3_run_security_scan_with_http_info( @validate_call - def v3_run_security_scan_without_preload_content( + def v3_trigger_rename_unnamed_functions_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_security_scan_input_body: TriggerSecurityScanInputBody, + trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5325,14 +14957,14 @@ def v3_run_security_scan_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Run the security-scan agent. + """Run the rename-unnamed-functions 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 + 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 :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_security_scan_input_body: (required) - :type trigger_security_scan_input_body: TriggerSecurityScanInputBody + :param trigger_rename_unnamed_functions_input_body: (required) + :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5355,9 +14987,9 @@ def v3_run_security_scan_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_security_scan_serialize( + _param = self._v3_trigger_rename_unnamed_functions_serialize( analysis_id=analysis_id, - trigger_security_scan_input_body=trigger_security_scan_input_body, + trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5365,7 +14997,8 @@ def v3_run_security_scan_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationSecurityScanMetadataSecurityScanResult", + '202': "StatusBody", + '402': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -5379,10 +15012,10 @@ def v3_run_security_scan_without_preload_content( return response_data.response - def _v3_run_security_scan_serialize( + def _v3_trigger_rename_unnamed_functions_serialize( self, analysis_id, - trigger_security_scan_input_body, + trigger_rename_unnamed_functions_input_body, _request_auth, _content_type, _headers, @@ -5410,8 +15043,8 @@ def _v3_run_security_scan_serialize( # process the header parameters # process the form parameters # process the body parameter - if trigger_security_scan_input_body is not None: - _body_params = trigger_security_scan_input_body + if trigger_rename_unnamed_functions_input_body is not None: + _body_params = trigger_rename_unnamed_functions_input_body # set the HTTP header `Accept` @@ -5444,7 +15077,7 @@ def _v3_run_security_scan_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses/{analysis_id}/security-scan:run', + resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5461,10 +15094,11 @@ def _v3_run_security_scan_serialize( @validate_call - def v3_trigger_rename_unnamed_functions( + def v3_upsert_binary_agent_feedback( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + submit_feedback_input_body: SubmitFeedbackInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5477,15 +15111,17 @@ def v3_trigger_rename_unnamed_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> StatusBody: - """Run the rename-unnamed-functions agent. + ) -> None: + """Record feedback on an agent's output. - 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 + Records how useful the caller found one agent's output for this analysis. Replaces any sentiment they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_rename_unnamed_functions_input_body: (required) - :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param submit_feedback_input_body: (required) + :type submit_feedback_input_body: SubmitFeedbackInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5508,9 +15144,10 @@ def v3_trigger_rename_unnamed_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_trigger_rename_unnamed_functions_serialize( + _param = self._v3_upsert_binary_agent_feedback_serialize( analysis_id=analysis_id, - trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, + agent=agent, + submit_feedback_input_body=submit_feedback_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5518,10 +15155,9 @@ def v3_trigger_rename_unnamed_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StatusBody", + '204': None, '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -5537,10 +15173,11 @@ def v3_trigger_rename_unnamed_functions( @validate_call - def v3_trigger_rename_unnamed_functions_with_http_info( + def v3_upsert_binary_agent_feedback_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + submit_feedback_input_body: SubmitFeedbackInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5553,15 +15190,17 @@ def v3_trigger_rename_unnamed_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[StatusBody]: - """Run the rename-unnamed-functions agent. + ) -> ApiResponse[None]: + """Record feedback on an agent's output. - 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 + Records how useful the caller found one agent's output for this analysis. Replaces any sentiment they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_rename_unnamed_functions_input_body: (required) - :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param submit_feedback_input_body: (required) + :type submit_feedback_input_body: SubmitFeedbackInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5584,9 +15223,10 @@ def v3_trigger_rename_unnamed_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_trigger_rename_unnamed_functions_serialize( + _param = self._v3_upsert_binary_agent_feedback_serialize( analysis_id=analysis_id, - trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, + agent=agent, + submit_feedback_input_body=submit_feedback_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5594,10 +15234,9 @@ def v3_trigger_rename_unnamed_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StatusBody", + '204': None, '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -5613,10 +15252,11 @@ def v3_trigger_rename_unnamed_functions_with_http_info( @validate_call - def v3_trigger_rename_unnamed_functions_without_preload_content( + def v3_upsert_binary_agent_feedback_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody, + agent: Annotated[StrictStr, Field(description="Which agent's output the feedback is about")], + submit_feedback_input_body: SubmitFeedbackInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5630,14 +15270,16 @@ def v3_trigger_rename_unnamed_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Run the rename-unnamed-functions agent. + """Record feedback on an agent's output. - 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 + Records how useful the caller found one agent's output for this analysis. Replaces any sentiment they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param trigger_rename_unnamed_functions_input_body: (required) - :type trigger_rename_unnamed_functions_input_body: TriggerRenameUnnamedFunctionsInputBody + :param agent: Which agent's output the feedback is about (required) + :type agent: str + :param submit_feedback_input_body: (required) + :type submit_feedback_input_body: SubmitFeedbackInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5660,9 +15302,10 @@ def v3_trigger_rename_unnamed_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_trigger_rename_unnamed_functions_serialize( + _param = self._v3_upsert_binary_agent_feedback_serialize( analysis_id=analysis_id, - trigger_rename_unnamed_functions_input_body=trigger_rename_unnamed_functions_input_body, + agent=agent, + submit_feedback_input_body=submit_feedback_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5670,10 +15313,9 @@ def v3_trigger_rename_unnamed_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StatusBody", + '204': None, '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -5684,10 +15326,11 @@ def v3_trigger_rename_unnamed_functions_without_preload_content( return response_data.response - def _v3_trigger_rename_unnamed_functions_serialize( + def _v3_upsert_binary_agent_feedback_serialize( self, analysis_id, - trigger_rename_unnamed_functions_input_body, + agent, + submit_feedback_input_body, _request_auth, _content_type, _headers, @@ -5711,12 +15354,14 @@ def _v3_trigger_rename_unnamed_functions_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if agent is not None: + _path_params['agent'] = agent # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if trigger_rename_unnamed_functions_input_body is not None: - _body_params = trigger_rename_unnamed_functions_input_body + if submit_feedback_input_body is not None: + _body_params = submit_feedback_input_body # set the HTTP header `Accept` @@ -5748,8 +15393,8 @@ def _v3_trigger_rename_unnamed_functions_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/analyses/{analysis_id}/agents/rename-unnamed-functions', + method='PUT', + resource_path='/v3/analyses/{analysis_id}/agents/{agent}/feedback', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index ac05696..67be52b 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -39,6 +39,7 @@ from revengai.models.base_response_recent import BaseResponseRecent from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_upload_response import BaseResponseUploadResponse +from revengai.models.create_request import CreateRequest from revengai.models.dynamic_execution_status import DynamicExecutionStatus from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse from revengai.models.get_analysis_logs_output_body import GetAnalysisLogsOutputBody @@ -50,6 +51,7 @@ from revengai.models.list_analysis_strings_output_body import ListAnalysisStringsOutputBody from revengai.models.list_example_analyses_output_body import ListExampleAnalysesOutputBody from revengai.models.model_name import ModelName +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult from revengai.models.order import Order from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.re_analysis_form import ReAnalysisForm @@ -95,7 +97,7 @@ def add_user_string_to_analysis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, object]: + ) -> object: """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 @@ -136,7 +138,7 @@ def add_user_string_to_analysis( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -170,7 +172,7 @@ def add_user_string_to_analysis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, object]]: + ) -> ApiResponse[object]: """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 @@ -211,7 +213,7 @@ def add_user_string_to_analysis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -286,7 +288,7 @@ def add_user_string_to_analysis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -398,7 +400,7 @@ def create_analysis( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisCreateResponse: - """Create Analysis + """(Deprecated) Create Analysis Begins an analysis @@ -427,6 +429,7 @@ def create_analysis( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses is deprecated.", DeprecationWarning) _param = self._create_analysis_serialize( analysis_create_request=analysis_create_request, @@ -472,7 +475,7 @@ def create_analysis_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisCreateResponse]: - """Create Analysis + """(Deprecated) Create Analysis Begins an analysis @@ -501,6 +504,7 @@ def create_analysis_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses is deprecated.", DeprecationWarning) _param = self._create_analysis_serialize( analysis_create_request=analysis_create_request, @@ -546,7 +550,7 @@ def create_analysis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Analysis + """(Deprecated) Create Analysis Begins an analysis @@ -575,6 +579,7 @@ def create_analysis_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analyses is deprecated.", DeprecationWarning) _param = self._create_analysis_serialize( analysis_create_request=analysis_create_request, @@ -2924,7 +2929,7 @@ def get_analysis_params( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseParams: - """Gets analysis param information + """(Deprecated) Gets analysis param information Gets the params that the analysis was run with @@ -2951,6 +2956,7 @@ def get_analysis_params( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/params is deprecated.", DeprecationWarning) _param = self._get_analysis_params_serialize( analysis_id=analysis_id, @@ -2992,7 +2998,7 @@ def get_analysis_params_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseParams]: - """Gets analysis param information + """(Deprecated) Gets analysis param information Gets the params that the analysis was run with @@ -3019,6 +3025,7 @@ def get_analysis_params_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/params is deprecated.", DeprecationWarning) _param = self._get_analysis_params_serialize( analysis_id=analysis_id, @@ -3060,7 +3067,7 @@ def get_analysis_params_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets analysis param information + """(Deprecated) Gets analysis param information Gets the params that the analysis was run with @@ -3087,6 +3094,7 @@ def get_analysis_params_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/params is deprecated.", DeprecationWarning) _param = self._get_analysis_params_serialize( analysis_id=analysis_id, @@ -3189,7 +3197,7 @@ def get_analysis_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseStatus: - """Gets the status of an analysis + """(Deprecated) Gets the status of an analysis Given an analysis ID gets the current status of the analysis @@ -3216,6 +3224,7 @@ def get_analysis_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/status is deprecated.", DeprecationWarning) _param = self._get_analysis_status_serialize( analysis_id=analysis_id, @@ -3257,7 +3266,7 @@ def get_analysis_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseStatus]: - """Gets the status of an analysis + """(Deprecated) Gets the status of an analysis Given an analysis ID gets the current status of the analysis @@ -3284,6 +3293,7 @@ def get_analysis_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/status is deprecated.", DeprecationWarning) _param = self._get_analysis_status_serialize( analysis_id=analysis_id, @@ -3325,7 +3335,7 @@ def get_analysis_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets the status of an analysis + """(Deprecated) Gets the status of an analysis Given an analysis ID gets the current status of the analysis @@ -3352,6 +3362,7 @@ def get_analysis_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/status is deprecated.", DeprecationWarning) _param = self._get_analysis_status_serialize( analysis_id=analysis_id, @@ -4302,7 +4313,7 @@ def list_analyses( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseRecent: - """Gets the most recent analyses + """(Deprecated) Gets the most recent analyses Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit @@ -4349,6 +4360,7 @@ def list_analyses( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/list is deprecated.", DeprecationWarning) _param = self._list_analyses_serialize( search_term=search_term, @@ -4410,7 +4422,7 @@ def list_analyses_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseRecent]: - """Gets the most recent analyses + """(Deprecated) Gets the most recent analyses Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit @@ -4457,6 +4469,7 @@ def list_analyses_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/list is deprecated.", DeprecationWarning) _param = self._list_analyses_serialize( search_term=search_term, @@ -4518,7 +4531,7 @@ def list_analyses_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets the most recent analyses + """(Deprecated) Gets the most recent analyses Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit @@ -4565,6 +4578,7 @@ def list_analyses_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/list is deprecated.", DeprecationWarning) _param = self._list_analyses_serialize( search_term=search_term, @@ -4999,7 +5013,7 @@ def put_analysis_strings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponse: - """Add strings to the analysis + """(Deprecated) Add strings to the analysis Add strings to the analysis. Rejects if any string already exists at the given vaddr. @@ -5028,6 +5042,7 @@ def put_analysis_strings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) _param = self._put_analysis_strings_serialize( analysis_id=analysis_id, @@ -5071,7 +5086,7 @@ def put_analysis_strings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponse]: - """Add strings to the analysis + """(Deprecated) Add strings to the analysis Add strings to the analysis. Rejects if any string already exists at the given vaddr. @@ -5100,6 +5115,7 @@ def put_analysis_strings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) _param = self._put_analysis_strings_serialize( analysis_id=analysis_id, @@ -5143,7 +5159,7 @@ def put_analysis_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Add strings to the analysis + """(Deprecated) Add strings to the analysis Add strings to the analysis. Rejects if any string already exists at the given vaddr. @@ -5172,6 +5188,7 @@ def put_analysis_strings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) _param = self._put_analysis_strings_serialize( analysis_id=analysis_id, @@ -6499,7 +6516,7 @@ def upload_file( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseUploadResponse: - """Upload File + """(Deprecated) Upload File :param upload_file_type: (required) @@ -6531,6 +6548,7 @@ def upload_file( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) _param = self._upload_file_serialize( upload_file_type=upload_file_type, @@ -6578,7 +6596,7 @@ def upload_file_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseUploadResponse]: - """Upload File + """(Deprecated) Upload File :param upload_file_type: (required) @@ -6610,6 +6628,7 @@ def upload_file_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) _param = self._upload_file_serialize( upload_file_type=upload_file_type, @@ -6657,7 +6676,7 @@ def upload_file_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Upload File + """(Deprecated) Upload File :param upload_file_type: (required) @@ -6689,6 +6708,7 @@ def upload_file_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) _param = self._upload_file_serialize( upload_file_type=upload_file_type, @@ -6802,9 +6822,10 @@ def _upload_file_serialize( @validate_call - def v3_get_analysis_auto_unstrip_status( + def v3_create_analysis( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6817,13 +6838,15 @@ def v3_get_analysis_auto_unstrip_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AutoUnstripStatusOutputBody: - """Get the auto-unstrip status for an analysis. + ) -> OperationCreateMetadataCreateResult: + """Create an analysis - Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6846,8 +6869,9 @@ def v3_get_analysis_auto_unstrip_status( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_auto_unstrip_status_serialize( - analysis_id=analysis_id, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6855,9 +6879,13 @@ def v3_get_analysis_auto_unstrip_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AutoUnstripStatusOutputBody", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", + '413': "APIError", '422': "APIError", '500': "APIError", } @@ -6873,9 +6901,10 @@ def v3_get_analysis_auto_unstrip_status( @validate_call - def v3_get_analysis_auto_unstrip_status_with_http_info( + def v3_create_analysis_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6888,13 +6917,15 @@ def v3_get_analysis_auto_unstrip_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AutoUnstripStatusOutputBody]: - """Get the auto-unstrip status for an analysis. + ) -> ApiResponse[OperationCreateMetadataCreateResult]: + """Create an analysis - Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6917,8 +6948,9 @@ def v3_get_analysis_auto_unstrip_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_auto_unstrip_status_serialize( - analysis_id=analysis_id, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6926,9 +6958,13 @@ def v3_get_analysis_auto_unstrip_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AutoUnstripStatusOutputBody", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", + '413': "APIError", '422': "APIError", '500': "APIError", } @@ -6944,9 +6980,10 @@ def v3_get_analysis_auto_unstrip_status_with_http_info( @validate_call - def v3_get_analysis_auto_unstrip_status_without_preload_content( + def v3_create_analysis_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6960,12 +6997,14 @@ def v3_get_analysis_auto_unstrip_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the auto-unstrip status for an analysis. + """Create an analysis - Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6988,8 +7027,9 @@ def v3_get_analysis_auto_unstrip_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_auto_unstrip_status_serialize( - analysis_id=analysis_id, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6997,9 +7037,13 @@ def v3_get_analysis_auto_unstrip_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AutoUnstripStatusOutputBody", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", + '413': "APIError", '422': "APIError", '500': "APIError", } @@ -7010,9 +7054,10 @@ def v3_get_analysis_auto_unstrip_status_without_preload_content( return response_data.response - def _v3_get_analysis_auto_unstrip_status_serialize( + def _v3_create_analysis_serialize( self, - analysis_id, + create_request, + x_rev_eng_application, _request_auth, _content_type, _headers, @@ -7034,12 +7079,14 @@ def _v3_get_analysis_auto_unstrip_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters + if x_rev_eng_application is not None: + _header_params['X-RevEng-Application'] = x_rev_eng_application # process the form parameters # process the body parameter + if create_request is not None: + _body_params = create_request # set the HTTP header `Accept` @@ -7050,6 +7097,19 @@ def _v3_get_analysis_auto_unstrip_status_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -7058,8 +7118,8 @@ def _v3_get_analysis_auto_unstrip_status_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/analyses/{analysis_id}/auto-unstrip/status', + method='POST', + resource_path='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/v3/analyses', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7076,7 +7136,7 @@ def _v3_get_analysis_auto_unstrip_status_serialize( @validate_call - def v3_get_analysis_logs( + def v3_get_analysis_auto_unstrip_status( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -7091,10 +7151,10 @@ def v3_get_analysis_logs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAnalysisLogsOutputBody: - """Get the Analysis log + ) -> AutoUnstripStatusOutputBody: + """Get the auto-unstrip status for an analysis. - Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -7120,7 +7180,7 @@ def v3_get_analysis_logs( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_logs_serialize( + _param = self._v3_get_analysis_auto_unstrip_status_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7129,7 +7189,7 @@ def v3_get_analysis_logs( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAnalysisLogsOutputBody", + '200': "AutoUnstripStatusOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7147,7 +7207,7 @@ def v3_get_analysis_logs( @validate_call - def v3_get_analysis_logs_with_http_info( + def v3_get_analysis_auto_unstrip_status_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -7162,10 +7222,10 @@ def v3_get_analysis_logs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAnalysisLogsOutputBody]: - """Get the Analysis log + ) -> ApiResponse[AutoUnstripStatusOutputBody]: + """Get the auto-unstrip status for an analysis. - Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -7191,7 +7251,7 @@ def v3_get_analysis_logs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_logs_serialize( + _param = self._v3_get_analysis_auto_unstrip_status_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7200,7 +7260,7 @@ def v3_get_analysis_logs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAnalysisLogsOutputBody", + '200': "AutoUnstripStatusOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7218,7 +7278,7 @@ def v3_get_analysis_logs_with_http_info( @validate_call - def v3_get_analysis_logs_without_preload_content( + def v3_get_analysis_auto_unstrip_status_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ @@ -7234,9 +7294,9 @@ def v3_get_analysis_logs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the Analysis log + """Get the auto-unstrip status for an analysis. - Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the status of the auto-unstrip task for the binary backing the analysis. One of `UNINITIALISED`, `PENDING`, `RUNNING`, `COMPLETED`, `FAILED`. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -7262,7 +7322,7 @@ def v3_get_analysis_logs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_logs_serialize( + _param = self._v3_get_analysis_auto_unstrip_status_serialize( analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7271,7 +7331,7 @@ def v3_get_analysis_logs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAnalysisLogsOutputBody", + '200': "AutoUnstripStatusOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7284,7 +7344,7 @@ def v3_get_analysis_logs_without_preload_content( return response_data.response - def _v3_get_analysis_logs_serialize( + def _v3_get_analysis_auto_unstrip_status_serialize( self, analysis_id, _request_auth, @@ -7333,7 +7393,7 @@ def _v3_get_analysis_logs_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/logs', + resource_path='/v3/analyses/{analysis_id}/auto-unstrip/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7350,16 +7410,9 @@ def _v3_get_analysis_logs_serialize( @validate_call - def v3_get_analysis_strings( + def v3_get_analysis_logs( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, - search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, - function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7372,27 +7425,13 @@ def v3_get_analysis_strings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListAnalysisStringsOutputBody: - """List strings for an analysis. + ) -> GetAnalysisLogsOutputBody: + """Get the Analysis log - Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str - :param search_operator: How the search term matches string values. - :type search_operator: str - :param function_search: Filter by function name (case-insensitive substring match). - :type function_search: str - :param order_by: Field to order results by. - :type order_by: str - :param sort_order: Sort direction. - :type sort_order: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7415,15 +7454,8 @@ def v3_get_analysis_strings( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_strings_serialize( + _param = self._v3_get_analysis_logs_serialize( analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - search_operator=search_operator, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7431,7 +7463,7 @@ def v3_get_analysis_strings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisStringsOutputBody", + '200': "GetAnalysisLogsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7449,16 +7481,9 @@ def v3_get_analysis_strings( @validate_call - def v3_get_analysis_strings_with_http_info( + def v3_get_analysis_logs_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, - search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, - function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7471,27 +7496,13 @@ def v3_get_analysis_strings_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListAnalysisStringsOutputBody]: - """List strings for an analysis. + ) -> ApiResponse[GetAnalysisLogsOutputBody]: + """Get the Analysis log - Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str - :param search_operator: How the search term matches string values. - :type search_operator: str - :param function_search: Filter by function name (case-insensitive substring match). - :type function_search: str - :param order_by: Field to order results by. - :type order_by: str - :param sort_order: Sort direction. - :type sort_order: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7514,15 +7525,8 @@ def v3_get_analysis_strings_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_strings_serialize( + _param = self._v3_get_analysis_logs_serialize( analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - search_operator=search_operator, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7530,7 +7534,7 @@ def v3_get_analysis_strings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisStringsOutputBody", + '200': "GetAnalysisLogsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7548,16 +7552,9 @@ def v3_get_analysis_strings_with_http_info( @validate_call - def v3_get_analysis_strings_without_preload_content( + def v3_get_analysis_logs_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, - search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, - function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7571,26 +7568,12 @@ def v3_get_analysis_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List strings for an analysis. + """Get the Analysis log - Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns every log line recorded for the Analysis, oldest first, merged from every source that has written one. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str - :param search_operator: How the search term matches string values. - :type search_operator: str - :param function_search: Filter by function name (case-insensitive substring match). - :type function_search: str - :param order_by: Field to order results by. - :type order_by: str - :param sort_order: Sort direction. - :type sort_order: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7613,15 +7596,8 @@ def v3_get_analysis_strings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_strings_serialize( + _param = self._v3_get_analysis_logs_serialize( analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - search_operator=search_operator, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7629,7 +7605,7 @@ def v3_get_analysis_strings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisStringsOutputBody", + '200': "GetAnalysisLogsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7642,16 +7618,9 @@ def v3_get_analysis_strings_without_preload_content( return response_data.response - def _v3_get_analysis_strings_serialize( + def _v3_get_analysis_logs_serialize( self, analysis_id, - page, - page_size, - search, - search_operator, - function_search, - order_by, - sort_order, _request_auth, _content_type, _headers, @@ -7676,30 +7645,669 @@ def _v3_get_analysis_strings_serialize( if analysis_id is not None: _path_params['analysis_id'] = analysis_id # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - - if search is not None: - - _query_params.append(('search', search)) - - if search_operator is not None: - - _query_params.append(('search_operator', search_operator)) - - if function_search is not None: - - _query_params.append(('function_search', function_search)) - - if order_by is not None: - - _query_params.append(('order_by', order_by)) - + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/logs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_analysis_operation( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationCreateMetadataCreateResult: + """Get an Analysis-creation operation + + Polls the status of an Analysis-creation operation. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCreateMetadataCreateResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_analysis_operation_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationCreateMetadataCreateResult]: + """Get an Analysis-creation operation + + Polls the status of an Analysis-creation operation. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCreateMetadataCreateResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_analysis_operation_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an Analysis-creation operation + + Polls the status of an Analysis-creation operation. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_operation_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationCreateMetadataCreateResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_analysis_operation_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/analyses/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_analysis_strings( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, + search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, + function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListAnalysisStringsOutputBody: + """List strings for an analysis. + + Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str + :param search_operator: How the search term matches string values. + :type search_operator: str + :param function_search: Filter by function name (case-insensitive substring match). + :type function_search: str + :param order_by: Field to order results by. + :type order_by: str + :param sort_order: Sort direction. + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + search_operator=search_operator, + function_search=function_search, + order_by=order_by, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAnalysisStringsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_analysis_strings_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, + search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, + function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListAnalysisStringsOutputBody]: + """List strings for an analysis. + + Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str + :param search_operator: How the search term matches string values. + :type search_operator: str + :param function_search: Filter by function name (case-insensitive substring match). + :type function_search: str + :param order_by: Field to order results by. + :type order_by: str + :param sort_order: Sort direction. + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + search_operator=search_operator, + function_search=function_search, + order_by=order_by, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAnalysisStringsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_analysis_strings_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, + search_operator: Annotated[Optional[StrictStr], Field(description="How the search term matches string values.")] = None, + function_search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by function name (case-insensitive substring match).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Field to order results by.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List strings for an analysis. + + Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str + :param search_operator: How the search term matches string values. + :type search_operator: str + :param function_search: Filter by function name (case-insensitive substring match). + :type function_search: str + :param order_by: Field to order results by. + :type order_by: str + :param sort_order: Sort direction. + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + search_operator=search_operator, + function_search=function_search, + order_by=order_by, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAnalysisStringsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_analysis_strings_serialize( + self, + analysis_id, + page, + page_size, + search, + search_operator, + function_search, + order_by, + sort_order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if search is not None: + + _query_params.append(('search', search)) + + if search_operator is not None: + + _query_params.append(('search_operator', search_operator)) + + if function_search is not None: + + _query_params.append(('function_search', function_search)) + + if order_by is not None: + + _query_params.append(('order_by', order_by)) + if sort_order is not None: _query_params.append(('sort_order', sort_order)) @@ -8020,11 +8628,13 @@ def _v3_get_analysis_strings_status_serialize( def v3_list_analyses( self, search_term: Optional[StrictStr] = None, - analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty for no filter")] = None, + analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty to search your own, your team's and all public analyses")] = None, status: Optional[List[StrictStr]] = None, model_name: Optional[List[Optional[StrictStr]]] = None, usernames: Optional[List[Optional[StrictStr]]] = None, sha256_hash: Optional[StrictStr] = None, + platform: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter")] = None, + architecture: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter")] = None, page_size: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, next_page_token: Annotated[Optional[StrictStr], Field(description="Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination).")] = None, order_by: Optional[StrictStr] = None, @@ -8048,7 +8658,7 @@ def v3_list_analyses( :param search_term: :type search_term: str - :param analysis_scope: Leave empty for no filter + :param analysis_scope: Leave empty to search your own, your team's and all public analyses :type analysis_scope: List[str] :param status: :type status: List[str] @@ -8058,6 +8668,10 @@ def v3_list_analyses( :type usernames: List[Optional[str]] :param sha256_hash: :type sha256_hash: str + :param platform: Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter + :type platform: List[str] + :param architecture: Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter + :type architecture: List[str] :param page_size: :type page_size: int :param next_page_token: Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). @@ -8095,6 +8709,8 @@ def v3_list_analyses( model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, + platform=platform, + architecture=architecture, page_size=page_size, next_page_token=next_page_token, order_by=order_by, @@ -8126,11 +8742,13 @@ def v3_list_analyses( def v3_list_analyses_with_http_info( self, search_term: Optional[StrictStr] = None, - analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty for no filter")] = None, + analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty to search your own, your team's and all public analyses")] = None, status: Optional[List[StrictStr]] = None, model_name: Optional[List[Optional[StrictStr]]] = None, usernames: Optional[List[Optional[StrictStr]]] = None, sha256_hash: Optional[StrictStr] = None, + platform: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter")] = None, + architecture: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter")] = None, page_size: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, next_page_token: Annotated[Optional[StrictStr], Field(description="Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination).")] = None, order_by: Optional[StrictStr] = None, @@ -8154,7 +8772,7 @@ def v3_list_analyses_with_http_info( :param search_term: :type search_term: str - :param analysis_scope: Leave empty for no filter + :param analysis_scope: Leave empty to search your own, your team's and all public analyses :type analysis_scope: List[str] :param status: :type status: List[str] @@ -8164,6 +8782,10 @@ def v3_list_analyses_with_http_info( :type usernames: List[Optional[str]] :param sha256_hash: :type sha256_hash: str + :param platform: Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter + :type platform: List[str] + :param architecture: Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter + :type architecture: List[str] :param page_size: :type page_size: int :param next_page_token: Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). @@ -8201,6 +8823,8 @@ def v3_list_analyses_with_http_info( model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, + platform=platform, + architecture=architecture, page_size=page_size, next_page_token=next_page_token, order_by=order_by, @@ -8232,11 +8856,13 @@ def v3_list_analyses_with_http_info( def v3_list_analyses_without_preload_content( self, search_term: Optional[StrictStr] = None, - analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty for no filter")] = None, + analysis_scope: Annotated[Optional[List[StrictStr]], Field(description="Leave empty to search your own, your team's and all public analyses")] = None, status: Optional[List[StrictStr]] = None, model_name: Optional[List[Optional[StrictStr]]] = None, usernames: Optional[List[Optional[StrictStr]]] = None, sha256_hash: Optional[StrictStr] = None, + platform: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter")] = None, + architecture: Annotated[Optional[List[StrictStr]], Field(description="Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter")] = None, page_size: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, next_page_token: Annotated[Optional[StrictStr], Field(description="Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination).")] = None, order_by: Optional[StrictStr] = None, @@ -8260,7 +8886,7 @@ def v3_list_analyses_without_preload_content( :param search_term: :type search_term: str - :param analysis_scope: Leave empty for no filter + :param analysis_scope: Leave empty to search your own, your team's and all public analyses :type analysis_scope: List[str] :param status: :type status: List[str] @@ -8270,6 +8896,10 @@ def v3_list_analyses_without_preload_content( :type usernames: List[Optional[str]] :param sha256_hash: :type sha256_hash: str + :param platform: Restrict to binaries running on one of these operating-system platforms. Matches the uploader's override when they set one, the detected platform otherwise; a binary with neither is never matched. Leave empty for no filter + :type platform: List[str] + :param architecture: Restrict to binaries built for one of these instruction-set architectures. Resolved the same way as platform. Leave empty for no filter + :type architecture: List[str] :param page_size: :type page_size: int :param next_page_token: Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). @@ -8307,6 +8937,8 @@ def v3_list_analyses_without_preload_content( model_name=model_name, usernames=usernames, sha256_hash=sha256_hash, + platform=platform, + architecture=architecture, page_size=page_size, next_page_token=next_page_token, order_by=order_by, @@ -8338,6 +8970,8 @@ def _v3_list_analyses_serialize( model_name, usernames, sha256_hash, + platform, + architecture, page_size, next_page_token, order_by, @@ -8355,6 +8989,8 @@ def _v3_list_analyses_serialize( 'status': 'multi', 'model_name': 'csv', 'usernames': 'csv', + 'platform': 'csv', + 'architecture': 'csv', } _path_params: Dict[str, str] = {} @@ -8392,6 +9028,14 @@ def _v3_list_analyses_serialize( _query_params.append(('sha256_hash', sha256_hash)) + if platform is not None: + + _query_params.append(('platform', platform)) + + if architecture is not None: + + _query_params.append(('architecture', architecture)) + if page_size is not None: _query_params.append(('page_size', page_size)) diff --git a/revengai/api/binaries_api.py b/revengai/api/binaries_api.py index 9bbee44..cb1b26d 100644 --- a/revengai/api/binaries_api.py +++ b/revengai/api/binaries_api.py @@ -15,8 +15,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBytes, StrictInt, StrictStr -from typing import Tuple, Union +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Optional, Tuple, Union from typing_extensions import Annotated from revengai.models.base_response_additional_details_status_response import BaseResponseAdditionalDetailsStatusResponse from revengai.models.base_response_binaries_related_status_response import BaseResponseBinariesRelatedStatusResponse @@ -27,6 +27,7 @@ from revengai.models.base_response_list_die_match import BaseResponseListDieMatch from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody +from revengai.models.upload_output_body import UploadOutputBody from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -2698,3 +2699,320 @@ def _get_related_binaries_serialize( ) + + + @validate_call + def v3_upload_file( + self, + file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file's raw bytes.")], + upload_file_type: Annotated[StrictStr, Field(description="The kind of file being uploaded.")], + force_overwrite: Annotated[Optional[StrictBool], Field(description="Re-upload and overwrite even if a file with this hash already exists.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UploadOutputBody: + """Upload a file. + + Uploads a binary, debug symbol, packed sample, or firmware image, keyed by its SHA-256 hash. A BINARY upload from a non-system caller also detects the file's architecture and OS so POST /v3/analyses knows whether it can run static analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + + :param file: The file's raw bytes. (required) + :type file: bytearray + :param upload_file_type: The kind of file being uploaded. (required) + :type upload_file_type: str + :param force_overwrite: Re-upload and overwrite even if a file with this hash already exists. + :type force_overwrite: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upload_file_serialize( + file=file, + upload_file_type=upload_file_type, + force_overwrite=force_overwrite, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UploadOutputBody", + '400': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upload_file_with_http_info( + self, + file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file's raw bytes.")], + upload_file_type: Annotated[StrictStr, Field(description="The kind of file being uploaded.")], + force_overwrite: Annotated[Optional[StrictBool], Field(description="Re-upload and overwrite even if a file with this hash already exists.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UploadOutputBody]: + """Upload a file. + + Uploads a binary, debug symbol, packed sample, or firmware image, keyed by its SHA-256 hash. A BINARY upload from a non-system caller also detects the file's architecture and OS so POST /v3/analyses knows whether it can run static analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + + :param file: The file's raw bytes. (required) + :type file: bytearray + :param upload_file_type: The kind of file being uploaded. (required) + :type upload_file_type: str + :param force_overwrite: Re-upload and overwrite even if a file with this hash already exists. + :type force_overwrite: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upload_file_serialize( + file=file, + upload_file_type=upload_file_type, + force_overwrite=force_overwrite, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UploadOutputBody", + '400': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upload_file_without_preload_content( + self, + file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file's raw bytes.")], + upload_file_type: Annotated[StrictStr, Field(description="The kind of file being uploaded.")], + force_overwrite: Annotated[Optional[StrictBool], Field(description="Re-upload and overwrite even if a file with this hash already exists.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload a file. + + Uploads a binary, debug symbol, packed sample, or firmware image, keyed by its SHA-256 hash. A BINARY upload from a non-system caller also detects the file's architecture and OS so POST /v3/analyses knows whether it can run static analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + + :param file: The file's raw bytes. (required) + :type file: bytearray + :param upload_file_type: The kind of file being uploaded. (required) + :type upload_file_type: str + :param force_overwrite: Re-upload and overwrite even if a file with this hash already exists. + :type force_overwrite: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upload_file_serialize( + file=file, + upload_file_type=upload_file_type, + force_overwrite=force_overwrite, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UploadOutputBody", + '400': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upload_file_serialize( + self, + file, + upload_file_type, + force_overwrite, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if file is not None: + _files['file'] = file + if force_overwrite is not None: + _form_params.append(('force_overwrite', force_overwrite)) + if upload_file_type is not None: + _form_params.append(('upload_file_type', upload_file_type)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='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/v3/upload', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/functions_core_api.py b/revengai/api/functions_core_api.py index ef75b8b..4901972 100644 --- a/revengai/api/functions_core_api.py +++ b/revengai/api/functions_core_api.py @@ -79,7 +79,7 @@ def add_function_callee( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, object]: + ) -> object: """Add a callee to a function Records an outgoing call edge from the given function to a callee. **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 @@ -120,7 +120,7 @@ def add_function_callee( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '400': "APIError", '403': "APIError", '404': "APIError", @@ -155,7 +155,7 @@ def add_function_callee_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, object]]: + ) -> ApiResponse[object]: """Add a callee to a function Records an outgoing call edge from the given function to a callee. **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 @@ -196,7 +196,7 @@ def add_function_callee_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '400': "APIError", '403': "APIError", '404': "APIError", @@ -272,7 +272,7 @@ def add_function_callee_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '400': "APIError", '403': "APIError", '404': "APIError", @@ -384,7 +384,7 @@ def add_user_string_to_function( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, object]: + ) -> object: """Add a user-provided string to a function. Attaches a user-provided string to a function 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 @@ -425,7 +425,7 @@ def add_user_string_to_function( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -459,7 +459,7 @@ def add_user_string_to_function_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, object]]: + ) -> ApiResponse[object]: """Add a user-provided string to a function. Attaches a user-provided string to a function 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 @@ -500,7 +500,7 @@ def add_user_string_to_function_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -575,7 +575,7 @@ def add_user_string_to_function_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Dict[str, object]", + '201': "object", '403': "APIError", '404': "APIError", '422': "APIError", diff --git a/revengai/api/functions_renaming_history_api.py b/revengai/api/functions_renaming_history_api.py index 7967165..b437521 100644 --- a/revengai/api/functions_renaming_history_api.py +++ b/revengai/api/functions_renaming_history_api.py @@ -2054,7 +2054,7 @@ def revert_function_name_0( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, object]: + ) -> object: """Revert function name Reverts a function's name to a previous value from its history. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -2095,7 +2095,7 @@ def revert_function_name_0( ) _response_types_map: Dict[str, Optional[str]] = { - '204': "Dict[str, object]", + '204': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2129,7 +2129,7 @@ def revert_function_name_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, object]]: + ) -> ApiResponse[object]: """Revert function name Reverts a function's name to a previous value from its history. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -2170,7 +2170,7 @@ def revert_function_name_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': "Dict[str, object]", + '204': "object", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2245,7 +2245,7 @@ def revert_function_name_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': "Dict[str, object]", + '204': "object", '403': "APIError", '404': "APIError", '422': "APIError", diff --git a/revengai/api_client.py b/revengai/api_client.py index 06ab425..0016861 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v4.24.0/python' + self.user_agent = 'OpenAPI-Generator/v4.46.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 868492e..9cef552 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v4.24.0\n"\ - "SDK Package Version: v4.24.0".\ + "Version of the API: v4.46.0\n"\ + "SDK Package Version: v4.46.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index a5bb40f..d39d8dc 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -44,6 +44,7 @@ from revengai.models.analysis_record import AnalysisRecord from revengai.models.analysis_record_body import AnalysisRecordBody from revengai.models.analysis_report import AnalysisReport +from revengai.models.analysis_requirement import AnalysisRequirement from revengai.models.analysis_scope import AnalysisScope from revengai.models.analysis_string_function import AnalysisStringFunction from revengai.models.analysis_string_input import AnalysisStringInput @@ -56,6 +57,7 @@ from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse from revengai.models.api_call import ApiCall +from revengai.models.api_combination_evidence import ApiCombinationEvidence from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy @@ -118,10 +120,12 @@ from revengai.models.base_response_logs import BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse from revengai.models.base_response_params import BaseResponseParams +from revengai.models.base_response_protocols_agent_response import BaseResponseProtocolsAgentResponse from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse from revengai.models.base_response_recent import BaseResponseRecent from revengai.models.base_response_remediation_agent_response import BaseResponseRemediationAgentResponse from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +from revengai.models.base_response_secrets_agent_response import BaseResponseSecretsAgentResponse from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_str import BaseResponseStr from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse @@ -153,6 +157,9 @@ from revengai.models.bulk_create_user_result import BulkCreateUserResult from revengai.models.bulk_create_users_output_body import BulkCreateUsersOutputBody from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest +from revengai.models.bytes_constant import BytesConstant +from revengai.models.call_chain import CallChain +from revengai.models.call_chain_evidence import CallChainEvidence from revengai.models.call_edge import CallEdge from revengai.models.call_edges_output_body import CallEdgesOutputBody from revengai.models.callee_function_info import CalleeFunctionInfo @@ -164,6 +171,8 @@ from revengai.models.capabilities import Capabilities from revengai.models.capabilities_agent_response import CapabilitiesAgentResponse from revengai.models.capabilities_output_body import CapabilitiesOutputBody +from revengai.models.capabilities_result import CapabilitiesResult +from revengai.models.capability import Capability from revengai.models.capability_entry import CapabilityEntry from revengai.models.child_binaries_response import ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel @@ -185,6 +194,7 @@ from revengai.models.comment_response import CommentResponse from revengai.models.comment_update_request import CommentUpdateRequest from revengai.models.comments_data import CommentsData +from revengai.models.config import Config from revengai.models.config_response import ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody from revengai.models.connection import Connection @@ -211,9 +221,12 @@ from revengai.models.create_group_input_body import CreateGroupInputBody from revengai.models.create_identity_input_body import CreateIdentityInputBody from revengai.models.create_issuer_input_body import CreateIssuerInputBody +from revengai.models.create_metadata import CreateMetadata from revengai.models.create_organisation_input_body import CreateOrganisationInputBody from revengai.models.create_pointer_data_type import CreatePointerDataType from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody +from revengai.models.create_request import CreateRequest +from revengai.models.create_result import CreateResult from revengai.models.create_struct_data_type import CreateStructDataType from revengai.models.create_team_input_body import CreateTeamInputBody from revengai.models.create_typedef_data_type import CreateTypedefDataType @@ -223,6 +236,9 @@ from revengai.models.created import Created from revengai.models.crypto_call import CryptoCall from revengai.models.crypto_direct_match import CryptoDirectMatch +from revengai.models.crypto_explain_metadata import CryptoExplainMetadata +from revengai.models.crypto_explain_result import CryptoExplainResult +from revengai.models.crypto_explained_function import CryptoExplainedFunction from revengai.models.crypto_finding import CryptoFinding from revengai.models.crypto_scan_metadata import CryptoScanMetadata from revengai.models.crypto_scan_result import CryptoScanResult @@ -236,8 +252,11 @@ from revengai.models.decomp_finished_event import DecompFinishedEvent from revengai.models.decompilation_comment_context import DecompilationCommentContext from revengai.models.decompilation_data import DecompilationData +from revengai.models.decompiler_summary import DecompilerSummary +from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence from revengai.models.die_match import DieMatch from revengai.models.disassembly_output_body import DisassemblyOutputBody +from revengai.models.display import Display from revengai.models.dns_query import DnsQuery from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata from revengai.models.dynamic_execution_status import DynamicExecutionStatus @@ -250,6 +269,7 @@ from revengai.models.elf_segment import ELFSegment from revengai.models.elf_symbol import ELFSymbol from revengai.models.elf_dynamic_entry import ElfDynamicEntry +from revengai.models.endianness import Endianness from revengai.models.entrypoint_model import EntrypointModel from revengai.models.enum_data_type import EnumDataType from revengai.models.enum_definition import EnumDefinition @@ -284,17 +304,38 @@ from revengai.models.event_toolconfirmationrequired import EventTOOLCONFIRMATIONREQUIRED from revengai.models.event_types_suggested import EventTypesSuggested from revengai.models.event_warning import EventWarning +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.evidence_strength import EvidenceStrength from revengai.models.example import Example +from revengai.models.execution_call import ExecutionCall +from revengai.models.execution_direct_match import ExecutionDirectMatch +from revengai.models.execution_explain_metadata import ExecutionExplainMetadata +from revengai.models.execution_explain_result import ExecutionExplainResult +from revengai.models.execution_explained_function import ExecutionExplainedFunction +from revengai.models.execution_finding import ExecutionFinding +from revengai.models.execution_scan_metadata import ExecutionScanMetadata +from revengai.models.execution_scan_result import ExecutionScanResult from revengai.models.export_model import ExportModel from revengai.models.external_response import ExternalResponse from revengai.models.extracted_binary import ExtractedBinary from revengai.models.extracted_url import ExtractedURL from revengai.models.extraction_failure import ExtractionFailure +from revengai.models.feedback_output_body import FeedbackOutputBody from revengai.models.file_activity_entry import FileActivityEntry from revengai.models.file_format import FileFormat from revengai.models.file_hashes import FileHashes from revengai.models.file_metadata import FileMetadata +from revengai.models.filesystem_analyse_metadata import FilesystemAnalyseMetadata +from revengai.models.filesystem_analyse_result import FilesystemAnalyseResult +from revengai.models.filesystem_call import FilesystemCall +from revengai.models.filesystem_direct_match import FilesystemDirectMatch +from revengai.models.filesystem_explained_function import FilesystemExplainedFunction +from revengai.models.filesystem_finding import FilesystemFinding +from revengai.models.filesystem_scan_metadata import FilesystemScanMetadata +from revengai.models.filesystem_scan_result import FilesystemScanResult from revengai.models.filters import Filters +from revengai.models.finding import Finding +from revengai.models.finding_evidence_inner import FindingEvidenceInner from revengai.models.form_file import FormFile from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse from revengai.models.function_block_response import FunctionBlockResponse @@ -317,6 +358,8 @@ from revengai.models.function_signature_body import FunctionSignatureBody from revengai.models.function_signature_entry import FunctionSignatureEntry from revengai.models.function_signature_version import FunctionSignatureVersion +from revengai.models.function_similarity import FunctionSimilarity +from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence from revengai.models.function_source_type import FunctionSourceType from revengai.models.function_string import FunctionString from revengai.models.function_string_item import FunctionStringItem @@ -339,6 +382,7 @@ from revengai.models.get_public_user_response import GetPublicUserResponse from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody from revengai.models.get_tokens_response import GetTokensResponse +from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence from revengai.models.history_actor import HistoryActor from revengai.models.history_entry import HistoryEntry from revengai.models.http_request import HttpRequest @@ -346,6 +390,9 @@ from revengai.models.isa import ISA from revengai.models.icon_model import IconModel from revengai.models.import_model import ImportModel +from revengai.models.imported_api import ImportedApi +from revengai.models.imported_api_call import ImportedApiCall +from revengai.models.imported_api_call_evidence import ImportedApiCallEvidence from revengai.models.imported_function_caller_entry import ImportedFunctionCallerEntry from revengai.models.imported_function_detail_output_body import ImportedFunctionDetailOutputBody from revengai.models.imported_function_entry import ImportedFunctionEntry @@ -356,6 +403,7 @@ from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest from revengai.models.invite_user_input_body import InviteUserInputBody from revengai.models.issuer_allowed_domain import IssuerAllowedDomain +from revengai.models.known_constant_evidence import KnownConstantEvidence from revengai.models.line_attributions_data import LineAttributionsData from revengai.models.list_analyses_output_body import ListAnalysesOutputBody from revengai.models.list_analysis_data_types_output_body import ListAnalysisDataTypesOutputBody @@ -378,7 +426,11 @@ from revengai.models.matched_function import MatchedFunction from revengai.models.memdump_entry import MemdumpEntry from revengai.models.message_body import MessageBody +from revengai.models.meta import Meta from revengai.models.meta_model import MetaModel +from revengai.models.metadata import Metadata +from revengai.models.model_interpretation import ModelInterpretation +from revengai.models.model_interpretation_evidence import ModelInterpretationEvidence from revengai.models.model_name import ModelName from revengai.models.models_response import ModelsResponse from revengai.models.module_load_entry import ModuleLoadEntry @@ -387,8 +439,29 @@ from revengai.models.name_source_type import NameSourceType from revengai.models.names_finished_event import NamesFinishedEvent from revengai.models.network_activity import NetworkActivity +from revengai.models.networking_call import NetworkingCall +from revengai.models.networking_direct_match import NetworkingDirectMatch +from revengai.models.networking_explain_metadata import NetworkingExplainMetadata +from revengai.models.networking_explain_result import NetworkingExplainResult +from revengai.models.networking_explained_function import NetworkingExplainedFunction +from revengai.models.networking_finding import NetworkingFinding +from revengai.models.networking_scan_metadata import NetworkingScanMetadata +from revengai.models.networking_scan_result import NetworkingScanResult from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody +from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult +from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult +from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult +from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult +from revengai.models.operation_filesystem_scan_metadata_filesystem_scan_result import OperationFilesystemScanMetadataFilesystemScanResult +from revengai.models.operation_metadata_capabilities_result import OperationMetadataCapabilitiesResult +from revengai.models.operation_metadata_remediation_result import OperationMetadataRemediationResult +from revengai.models.operation_metadata_report_result import OperationMetadataReportResult +from revengai.models.operation_metadata_threat_report_result import OperationMetadataThreatReportResult +from revengai.models.operation_metadata_triage_result import OperationMetadataTriageResult +from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult +from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult from revengai.models.operation_workflow_progress_result_body import OperationWorkflowProgressResultBody from revengai.models.order import Order @@ -423,16 +496,20 @@ from revengai.models.product_summary import ProductSummary from revengai.models.progress_message import ProgressMessage from revengai.models.prose_event import ProseEvent +from revengai.models.protocols_agent_response import ProtocolsAgentResponse from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent +from revengai.models.referenced_constant import ReferencedConstant +from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence from revengai.models.refresh_body import RefreshBody from revengai.models.regenerate_output_body import RegenerateOutputBody from revengai.models.register_user_input_body import RegisterUserInputBody from revengai.models.registry_operation import RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse from revengai.models.remediation_agent_response import RemediationAgentResponse +from revengai.models.remediation_result import RemediationResult from revengai.models.remove_collection_binaries_input_body import RemoveCollectionBinariesInputBody from revengai.models.rename_applied_event import RenameAppliedEvent from revengai.models.rename_input_body import RenameInputBody @@ -443,16 +520,21 @@ from revengai.models.report_event import ReportEvent from revengai.models.report_info import ReportInfo from revengai.models.report_options import ReportOptions +from revengai.models.report_reachability_status import ReportReachabilityStatus +from revengai.models.report_result import ReportResult from revengai.models.resolved_entity import ResolvedEntity from revengai.models.result_body import ResultBody from revengai.models.revoke_body import RevokeBody +from revengai.models.rule_kind import RuleKind from revengai.models.sso_provider import SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody +from revengai.models.sandbox_config import SandboxConfig from revengai.models.sandbox_options import SandboxOptions from revengai.models.sandbox_start_method import SandboxStartMethod from revengai.models.sandbox_timeout import SandboxTimeout from revengai.models.scheduled_task_entry import ScheduledTaskEntry from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig +from revengai.models.secrets_agent_response import SecretsAgentResponse from revengai.models.section_model import SectionModel from revengai.models.security_finding import SecurityFinding from revengai.models.security_model import SecurityModel @@ -505,11 +587,19 @@ from revengai.models.string_source import StringSource from revengai.models.struct_data_type import StructDataType from revengai.models.struct_definition import StructDefinition +from revengai.models.subject import Subject +from revengai.models.subject_any_of import SubjectAnyOf +from revengai.models.subject_any_of1 import SubjectAnyOf1 +from revengai.models.subject_any_of2 import SubjectAnyOf2 +from revengai.models.subject_any_of3 import SubjectAnyOf3 +from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest from revengai.models.suggested_hole import SuggestedHole from revengai.models.suggested_member_view import SuggestedMemberView from revengai.models.suggested_type_view import SuggestedTypeView from revengai.models.summary_data import SummaryData +from revengai.models.suspicious_string import SuspiciousString +from revengai.models.suspicious_string_evidence import SuspiciousStringEvidence from revengai.models.symbols import Symbols from revengai.models.tag import Tag from revengai.models.tag_item import TagItem @@ -522,15 +612,25 @@ from revengai.models.tcp_carved_file import TcpCarvedFile from revengai.models.team import Team from revengai.models.team_member import TeamMember +from revengai.models.technique import Technique +from revengai.models.threat_report_result import ThreatReportResult from revengai.models.timestamp_model import TimestampModel from revengai.models.token import Token from revengai.models.token_input_body import TokenInputBody from revengai.models.token_response import TokenResponse from revengai.models.tokenised_data import TokenisedData +from revengai.models.triage_function import TriageFunction from revengai.models.triage_function_response import TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse +from revengai.models.triage_result import TriageResult from revengai.models.trigger_crypto_scan_input_body import TriggerCryptoScanInputBody from revengai.models.trigger_dynamic_execution_input_body import TriggerDynamicExecutionInputBody +from revengai.models.trigger_execution_explain_input_body import TriggerExecutionExplainInputBody +from revengai.models.trigger_execution_scan_input_body import TriggerExecutionScanInputBody +from revengai.models.trigger_filesystem_analyse_input_body import TriggerFilesystemAnalyseInputBody +from revengai.models.trigger_filesystem_scan_input_body import TriggerFilesystemScanInputBody +from revengai.models.trigger_networking_explain_input_body import TriggerNetworkingExplainInputBody +from revengai.models.trigger_networking_scan_input_body import TriggerNetworkingScanInputBody from revengai.models.trigger_rename_unnamed_functions_input_body import TriggerRenameUnnamedFunctionsInputBody from revengai.models.trigger_security_scan_input_body import TriggerSecurityScanInputBody from revengai.models.ttp import Ttp @@ -564,6 +664,7 @@ from revengai.models.update_user_password_input_body import UpdateUserPasswordInputBody from revengai.models.upgrade_analysis_model_output_body import UpgradeAnalysisModelOutputBody from revengai.models.upload_file_type import UploadFileType +from revengai.models.upload_output_body import UploadOutputBody from revengai.models.upload_response import UploadResponse from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest from revengai.models.upsert_overrides_data import UpsertOverridesData diff --git a/revengai/models/additional_details_status_response.py b/revengai/models/additional_details_status_response.py index 50f1a9f..4457ffa 100644 --- a/revengai/models/additional_details_status_response.py +++ b/revengai/models/additional_details_status_response.py @@ -26,6 +26,7 @@ class AdditionalDetailsStatusResponse(BaseModel): AdditionalDetailsStatusResponse """ # noqa: E501 status: StrictStr = Field(description="The current status of the additional details task") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_access_info.py b/revengai/models/analysis_access_info.py index ec8a0a7..08a69c8 100644 --- a/revengai/models/analysis_access_info.py +++ b/revengai/models/analysis_access_info.py @@ -27,6 +27,7 @@ class AnalysisAccessInfo(BaseModel): """ # noqa: E501 owner: StrictBool username: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["owner", "username"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "owner": obj.get("owner"), "username": obj.get("username") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_bulk_add_tags_request.py b/revengai/models/analysis_bulk_add_tags_request.py index 4f57e37..8933845 100644 --- a/revengai/models/analysis_bulk_add_tags_request.py +++ b/revengai/models/analysis_bulk_add_tags_request.py @@ -27,6 +27,7 @@ class AnalysisBulkAddTagsRequest(BaseModel): """ # noqa: E501 tags: List[StrictStr] analysis_ids: List[StrictInt] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags", "analysis_ids"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "analysis_ids": obj.get("analysis_ids") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_bulk_add_tags_response.py b/revengai/models/analysis_bulk_add_tags_response.py index 107526a..3185dcc 100644 --- a/revengai/models/analysis_bulk_add_tags_response.py +++ b/revengai/models/analysis_bulk_add_tags_response.py @@ -27,6 +27,7 @@ class AnalysisBulkAddTagsResponse(BaseModel): AnalysisBulkAddTagsResponse """ # noqa: E501 results: List[AnalysisBulkAddTagsResponseItem] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [AnalysisBulkAddTagsResponseItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_bulk_add_tags_response_item.py b/revengai/models/analysis_bulk_add_tags_response_item.py index fcd9738..107c048 100644 --- a/revengai/models/analysis_bulk_add_tags_response_item.py +++ b/revengai/models/analysis_bulk_add_tags_response_item.py @@ -28,6 +28,7 @@ class AnalysisBulkAddTagsResponseItem(BaseModel): analysis_id: StrictInt message: Optional[StrictStr] error: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "message", "error"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if message (nullable) is None # and model_fields_set contains the field if self.message is None and "message" in self.model_fields_set: @@ -95,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "error": obj.get("error") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_config.py b/revengai/models/analysis_config.py index 77fd755..9753487 100644 --- a/revengai/models/analysis_config.py +++ b/revengai/models/analysis_config.py @@ -32,6 +32,7 @@ class AnalysisConfig(BaseModel): no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") advanced_analysis: Optional[StrictBool] = Field(default=False, description="Enables an advanced security analysis.") sandbox_config: Optional[SandboxOptions] = Field(default=None, description="Including a sandbox config enables the dynamic execution sandbox") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of sandbox_config if self.sandbox_config: _dict['sandbox_config'] = self.sandbox_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -97,6 +105,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "advanced_analysis": obj.get("advanced_analysis") if obj.get("advanced_analysis") is not None else False, "sandbox_config": SandboxOptions.from_dict(obj["sandbox_config"]) if obj.get("sandbox_config") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_config_snapshot.py b/revengai/models/analysis_config_snapshot.py index fd02868..b2de2b6 100644 --- a/revengai/models/analysis_config_snapshot.py +++ b/revengai/models/analysis_config_snapshot.py @@ -30,6 +30,7 @@ class AnalysisConfigSnapshot(BaseModel): scrape: StrictBool capabilities: StrictBool triage: StrictBool + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions", "sandbox", "scrape", "capabilities", "triage"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "capabilities": obj.get("capabilities"), "triage": obj.get("triage") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_create_request.py b/revengai/models/analysis_create_request.py index 3e18f78..d09dcc3 100644 --- a/revengai/models/analysis_create_request.py +++ b/revengai/models/analysis_create_request.py @@ -40,6 +40,7 @@ class AnalysisCreateRequest(BaseModel): analysis_config: Optional[AnalysisConfig] = Field(default=None, description="The analysis config enables the configuration of optional analysis stages") binary_config: Optional[BinaryConfig] = Field(default=None, description="The binary config can override automatically determined values such as ISA, Platform, File Format, etc") auto_run_agents: Optional[AutoRunAgents] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["filename", "sha_256_hash", "tags", "analysis_scope", "symbols", "debug_hash", "analysis_config", "binary_config", "auto_run_agents"] model_config = ConfigDict( @@ -72,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -100,6 +103,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of auto_run_agents if self.auto_run_agents: _dict['auto_run_agents'] = self.auto_run_agents.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if symbols (nullable) is None # and model_fields_set contains the field if self.symbols is None and "symbols" in self.model_fields_set: @@ -132,6 +140,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_config": BinaryConfig.from_dict(obj["binary_config"]) if obj.get("binary_config") is not None else None, "auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_create_response.py b/revengai/models/analysis_create_response.py index 5296b18..13aa88a 100644 --- a/revengai/models/analysis_create_response.py +++ b/revengai/models/analysis_create_response.py @@ -27,6 +27,7 @@ class AnalysisCreateResponse(BaseModel): """ # noqa: E501 analysis_id: StrictInt = Field(description="ID of created analysis") binary_id: StrictInt = Field(description="ID of created binary") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "analysis_id": obj.get("analysis_id"), "binary_id": obj.get("binary_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_detail_response.py b/revengai/models/analysis_detail_response.py index 96962d4..474c3ea 100644 --- a/revengai/models/analysis_detail_response.py +++ b/revengai/models/analysis_detail_response.py @@ -44,6 +44,7 @@ class AnalysisDetailResponse(BaseModel): sha_256_hash: StrictStr auto_run_agents: AutoRunAgents requested_config: AnalysisConfigSnapshot = Field(description="Snapshot of the configuration the analysis was submitted with.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "dashboard_url", "debug", "model_name", "sha_256_hash", "auto_run_agents", "requested_config"] model_config = ConfigDict( @@ -76,8 +77,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -94,6 +97,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of requested_config if self.requested_config: _dict['requested_config'] = self.requested_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -123,6 +131,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None, "requested_config": AnalysisConfigSnapshot.from_dict(obj["requested_config"]) if obj.get("requested_config") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_function_entry.py b/revengai/models/analysis_function_entry.py index 913ee13..1894e6e 100644 --- a/revengai/models/analysis_function_entry.py +++ b/revengai/models/analysis_function_entry.py @@ -85,11 +85,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if mangled_name (nullable) is None - # and model_fields_set contains the field - if self.mangled_name is None and "mangled_name" in self.model_fields_set: - _dict['mangled_name'] = None - return _dict @classmethod diff --git a/revengai/models/analysis_function_mapping.py b/revengai/models/analysis_function_mapping.py index 5090cc8..109d63b 100644 --- a/revengai/models/analysis_function_mapping.py +++ b/revengai/models/analysis_function_mapping.py @@ -27,6 +27,7 @@ class AnalysisFunctionMapping(BaseModel): AnalysisFunctionMapping """ # noqa: E501 function_maps: FunctionMapping = Field(description="A map of function ids to function addresses for the analysis, and it's inverse.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_maps"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of function_maps if self.function_maps: _dict['function_maps'] = self.function_maps.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "function_maps": FunctionMapping.from_dict(obj["function_maps"]) if obj.get("function_maps") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_functions.py b/revengai/models/analysis_functions.py index 961621c..cc930b7 100644 --- a/revengai/models/analysis_functions.py +++ b/revengai/models/analysis_functions.py @@ -27,6 +27,7 @@ class AnalysisFunctions(BaseModel): AnalysisFunctions """ # noqa: E501 functions: List[AppApiRestV2FunctionsTypesFunction] = Field(description="The functions associated with the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_functions: _items.append(_item_functions.to_dict()) _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "functions": [AppApiRestV2FunctionsTypesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_functions_list.py b/revengai/models/analysis_functions_list.py index ff317e5..487a63c 100644 --- a/revengai/models/analysis_functions_list.py +++ b/revengai/models/analysis_functions_list.py @@ -27,6 +27,7 @@ class AnalysisFunctionsList(BaseModel): API response schema for paginated functions list """ # noqa: E501 functions: List[FunctionListItem] = Field(description="The functions associated with the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_functions: _items.append(_item_functions.to_dict()) _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "functions": [FunctionListItem.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_record.py b/revengai/models/analysis_record.py index 85cd20a..a07ac15 100644 --- a/revengai/models/analysis_record.py +++ b/revengai/models/analysis_record.py @@ -45,6 +45,7 @@ class AnalysisRecord(BaseModel): dynamic_execution_task_id: Optional[StrictInt] = None base_address: StrictInt = Field(description="The base address of the binary") tags: Optional[List[TagItem]] = Field(default=None, description="List of tags associated with the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "analysis_scope", "binary_id", "model_id", "model_name", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "function_boundaries_hash", "binary_size", "username", "dynamic_execution_status", "dynamic_execution_task_id", "base_address", "tags"] model_config = ConfigDict( @@ -77,8 +78,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -93,6 +96,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_tags: _items.append(_item_tags.to_dict()) _dict['tags'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if dynamic_execution_status (nullable) is None # and model_fields_set contains the field if self.dynamic_execution_status is None and "dynamic_execution_status" in self.model_fields_set: @@ -133,6 +141,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "base_address": obj.get("base_address"), "tags": [TagItem.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_requirement.py b/revengai/models/analysis_requirement.py new file mode 100644 index 0000000..984b934 --- /dev/null +++ b/revengai/models/analysis_requirement.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisRequirement(BaseModel): + """ + AnalysisRequirement + """ # noqa: E501 + fields: Optional[List[StrictStr]] = Field(description="CreateAnalysis field paths that must be provided or enabled to satisfy this requirement.") + reason: StrictStr = Field(description="Why this requirement unblocks analysis.") + values: Optional[Dict[str, StrictStr]] = Field(default=None, description="Field paths that must carry a specific value, keyed the same way as fields.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fields", "reason", "values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalysisRequirement from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict['fields'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisRequirement from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fields": obj.get("fields"), + "reason": obj.get("reason"), + "values": obj.get("values") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/analysis_string_input.py b/revengai/models/analysis_string_input.py index 7762d7d..f193e58 100644 --- a/revengai/models/analysis_string_input.py +++ b/revengai/models/analysis_string_input.py @@ -29,6 +29,7 @@ class AnalysisStringInput(BaseModel): value: StrictStr = Field(description="The string literal value") vaddr: StrictInt = Field(description="The virtual address of the string") source: StringSource = Field(description="The source of the string") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -86,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "vaddr": obj.get("vaddr"), "source": obj.get("source") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_strings_response.py b/revengai/models/analysis_strings_response.py index 232d316..b3e7748 100644 --- a/revengai/models/analysis_strings_response.py +++ b/revengai/models/analysis_strings_response.py @@ -28,6 +28,7 @@ class AnalysisStringsResponse(BaseModel): """ # noqa: E501 strings: List[StringFunctions] = Field(description="The strings associated with the analysis") total_strings: StrictInt = Field(description="The total number of strings associated with this analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["strings", "total_strings"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_strings: _items.append(_item_strings.to_dict()) _dict['strings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "strings": [StringFunctions.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, "total_strings": obj.get("total_strings") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_strings_status_response.py b/revengai/models/analysis_strings_status_response.py index 016a2f9..52045bf 100644 --- a/revengai/models/analysis_strings_status_response.py +++ b/revengai/models/analysis_strings_status_response.py @@ -27,6 +27,7 @@ class AnalysisStringsStatusResponse(BaseModel): AnalysisStringsStatusResponse """ # noqa: E501 status: BinariesTaskStatus = Field(description="The current status of the strings extraction task") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -82,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_tags.py b/revengai/models/analysis_tags.py index 3bdb823..be0ad45 100644 --- a/revengai/models/analysis_tags.py +++ b/revengai/models/analysis_tags.py @@ -27,6 +27,7 @@ class AnalysisTags(BaseModel): AnalysisTags """ # noqa: E501 analysis_tags: List[TagItem] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_tags"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_analysis_tags: _items.append(_item_analysis_tags.to_dict()) _dict['analysis_tags'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "analysis_tags": [TagItem.from_dict(_item) for _item in obj["analysis_tags"]] if obj.get("analysis_tags") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_update_request.py b/revengai/models/analysis_update_request.py index cf4744a..d9556a8 100644 --- a/revengai/models/analysis_update_request.py +++ b/revengai/models/analysis_update_request.py @@ -28,6 +28,7 @@ class AnalysisUpdateRequest(BaseModel): """ # noqa: E501 binary_name: Optional[StrictStr] = None analysis_scope: Optional[AnalysisScope] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_name", "analysis_scope"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if binary_name (nullable) is None # and model_fields_set contains the field if self.binary_name is None and "binary_name" in self.model_fields_set: @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_name": obj.get("binary_name"), "analysis_scope": obj.get("analysis_scope") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_update_tags_request.py b/revengai/models/analysis_update_tags_request.py index 7cc647d..388dca8 100644 --- a/revengai/models/analysis_update_tags_request.py +++ b/revengai/models/analysis_update_tags_request.py @@ -26,6 +26,7 @@ class AnalysisUpdateTagsRequest(BaseModel): AnalysisUpdateTagsRequest """ # noqa: E501 tags: List[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tags": obj.get("tags") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/analysis_update_tags_response.py b/revengai/models/analysis_update_tags_response.py index 2d8cf08..6a688c9 100644 --- a/revengai/models/analysis_update_tags_response.py +++ b/revengai/models/analysis_update_tags_response.py @@ -27,6 +27,7 @@ class AnalysisUpdateTagsResponse(BaseModel): AnalysisUpdateTagsResponse """ # noqa: E501 tags: List[TagResponse] = Field(description="The analysis tags after updating") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_tags: _items.append(_item_tags.to_dict()) _dict['tags'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tags": [TagResponse.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/api_combination_evidence.py b/revengai/models/api_combination_evidence.py new file mode 100644 index 0000000..30523c0 --- /dev/null +++ b/revengai/models/api_combination_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.imported_api import ImportedApi +from typing import Optional, Set +from typing_extensions import Self + +class ApiCombinationEvidence(BaseModel): + """ + A known combination of APIs without a demonstrated semantic flow. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'api_combination' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'indirect' + apis: Annotated[List[ImportedApi], Field(min_length=2)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "apis"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['api_combination', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api_combination', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['indirect', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('indirect', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCombinationEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in apis (list) + _items = [] + if self.apis: + for _item_apis in self.apis: + if _item_apis: + _items.append(_item_apis.to_dict()) + _dict['apis'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCombinationEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'api_combination', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'indirect', + "apis": [ImportedApi.from_dict(_item) for _item in obj["apis"]] if obj.get("apis") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/app_api_rest_v2_agent_schema_capability.py b/revengai/models/app_api_rest_v2_agent_schema_capability.py index 80e82fd..940b1fb 100644 --- a/revengai/models/app_api_rest_v2_agent_schema_capability.py +++ b/revengai/models/app_api_rest_v2_agent_schema_capability.py @@ -31,6 +31,7 @@ class AppApiRestV2AgentSchemaCapability(BaseModel): type: StrictStr = Field(description="Type of the capability") function_name: StrictStr = Field(description="Name of the function containing the capability") function_id: StrictInt = Field(description="ID of the function containing the capability") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_vaddr", "description", "capability", "type", "function_name", "function_id"] @field_validator('type') @@ -70,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_name": obj.get("function_name"), "function_id": obj.get("function_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/app_api_rest_v2_functions_responses_function.py b/revengai/models/app_api_rest_v2_functions_responses_function.py index 405ef1d..a5987a1 100644 --- a/revengai/models/app_api_rest_v2_functions_responses_function.py +++ b/revengai/models/app_api_rest_v2_functions_responses_function.py @@ -27,6 +27,7 @@ class AppApiRestV2FunctionsResponsesFunction(BaseModel): """ # noqa: E501 function_id: Optional[StrictInt] = None function_vaddr: StrictInt = Field(description="Function virtual address") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_vaddr"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if function_id (nullable) is None # and model_fields_set contains the field if self.function_id is None and "function_id" in self.model_fields_set: @@ -88,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_id": obj.get("function_id"), "function_vaddr": obj.get("function_vaddr") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/app_api_rest_v2_functions_types_function.py b/revengai/models/app_api_rest_v2_functions_types_function.py index b04283e..af8b33c 100644 --- a/revengai/models/app_api_rest_v2_functions_types_function.py +++ b/revengai/models/app_api_rest_v2_functions_types_function.py @@ -31,6 +31,7 @@ class AppApiRestV2FunctionsTypesFunction(BaseModel): function_vaddr: StrictInt = Field(description="Function virtual address") function_size: StrictInt = Field(description="Function size") debug: StrictBool = Field(description="Whether the function is debug") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_mangled_name", "function_vaddr", "function_size", "debug"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_size": obj.get("function_size"), "debug": obj.get("debug") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/app_api_rest_v2_info_types_capability.py b/revengai/models/app_api_rest_v2_info_types_capability.py index 30b9a03..8cdfc0a 100644 --- a/revengai/models/app_api_rest_v2_info_types_capability.py +++ b/revengai/models/app_api_rest_v2_info_types_capability.py @@ -28,6 +28,7 @@ class AppApiRestV2InfoTypesCapability(BaseModel): function_name: StrictStr = Field(description="The name of the function with a capability") function_vaddr: StrictInt = Field(description="The virtual address of the function where the capability comes from") capabilities: List[StrictStr] = Field(description="The list of capabilities associated with the function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_name", "function_vaddr", "capabilities"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_vaddr": obj.get("function_vaddr"), "capabilities": obj.get("capabilities") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/auto_run_agents.py b/revengai/models/auto_run_agents.py index ff4e39f..c92ff5d 100644 --- a/revengai/models/auto_run_agents.py +++ b/revengai/models/auto_run_agents.py @@ -25,7 +25,8 @@ class AutoRunAgents(BaseModel): """ AutoRunAgents """ # noqa: E501 - triage: Optional[StrictBool] = False + triage: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["triage"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -79,8 +87,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "triage": obj.get("triage") if obj.get("triage") is not None else False + "triage": obj.get("triage") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response.py b/revengai/models/base_response.py index 27d8e53..d373934 100644 --- a/revengai/models/base_response.py +++ b/revengai/models/base_response.py @@ -32,6 +32,7 @@ class BaseResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -83,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -116,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_additional_details_status_response.py b/revengai/models/base_response_additional_details_status_response.py index 632e714..e528ec0 100644 --- a/revengai/models/base_response_additional_details_status_response.py +++ b/revengai/models/base_response_additional_details_status_response.py @@ -33,6 +33,7 @@ class BaseResponseAdditionalDetailsStatusResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_bulk_add_tags_response.py b/revengai/models/base_response_analysis_bulk_add_tags_response.py index d14bfea..98af35c 100644 --- a/revengai/models/base_response_analysis_bulk_add_tags_response.py +++ b/revengai/models/base_response_analysis_bulk_add_tags_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisBulkAddTagsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_create_response.py b/revengai/models/base_response_analysis_create_response.py index 76856b2..cac46a9 100644 --- a/revengai/models/base_response_analysis_create_response.py +++ b/revengai/models/base_response_analysis_create_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisCreateResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_detail_response.py b/revengai/models/base_response_analysis_detail_response.py index 9a2d294..b6a5d6d 100644 --- a/revengai/models/base_response_analysis_detail_response.py +++ b/revengai/models/base_response_analysis_detail_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisDetailResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_function_mapping.py b/revengai/models/base_response_analysis_function_mapping.py index d716d85..e9cb9a5 100644 --- a/revengai/models/base_response_analysis_function_mapping.py +++ b/revengai/models/base_response_analysis_function_mapping.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisFunctionMapping(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_functions.py b/revengai/models/base_response_analysis_functions.py index e243c9c..3e40fc8 100644 --- a/revengai/models/base_response_analysis_functions.py +++ b/revengai/models/base_response_analysis_functions.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisFunctions(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_functions_list.py b/revengai/models/base_response_analysis_functions_list.py index ee5e7fc..c211550 100644 --- a/revengai/models/base_response_analysis_functions_list.py +++ b/revengai/models/base_response_analysis_functions_list.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisFunctionsList(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_strings_response.py b/revengai/models/base_response_analysis_strings_response.py index e05091c..479e9aa 100644 --- a/revengai/models/base_response_analysis_strings_response.py +++ b/revengai/models/base_response_analysis_strings_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisStringsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_strings_status_response.py b/revengai/models/base_response_analysis_strings_status_response.py index f259f60..75d786e 100644 --- a/revengai/models/base_response_analysis_strings_status_response.py +++ b/revengai/models/base_response_analysis_strings_status_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisStringsStatusResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_tags.py b/revengai/models/base_response_analysis_tags.py index 6b4ee41..d6eeb5c 100644 --- a/revengai/models/base_response_analysis_tags.py +++ b/revengai/models/base_response_analysis_tags.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisTags(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_analysis_update_tags_response.py b/revengai/models/base_response_analysis_update_tags_response.py index d068066..999aa69 100644 --- a/revengai/models/base_response_analysis_update_tags_response.py +++ b/revengai/models/base_response_analysis_update_tags_response.py @@ -33,6 +33,7 @@ class BaseResponseAnalysisUpdateTagsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_basic.py b/revengai/models/base_response_basic.py index 2a10233..88492a4 100644 --- a/revengai/models/base_response_basic.py +++ b/revengai/models/base_response_basic.py @@ -33,6 +33,7 @@ class BaseResponseBasic(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_binaries_related_status_response.py b/revengai/models/base_response_binaries_related_status_response.py index d99aced..4be70af 100644 --- a/revengai/models/base_response_binaries_related_status_response.py +++ b/revengai/models/base_response_binaries_related_status_response.py @@ -33,6 +33,7 @@ class BaseResponseBinariesRelatedStatusResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_binary_additional_response.py b/revengai/models/base_response_binary_additional_response.py index 0177cc7..3c05d6f 100644 --- a/revengai/models/base_response_binary_additional_response.py +++ b/revengai/models/base_response_binary_additional_response.py @@ -33,6 +33,7 @@ class BaseResponseBinaryAdditionalResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_binary_details_response.py b/revengai/models/base_response_binary_details_response.py index 6710cea..d19de65 100644 --- a/revengai/models/base_response_binary_details_response.py +++ b/revengai/models/base_response_binary_details_response.py @@ -33,6 +33,7 @@ class BaseResponseBinaryDetailsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_binary_externals_response.py b/revengai/models/base_response_binary_externals_response.py index 455cf62..ef834f3 100644 --- a/revengai/models/base_response_binary_externals_response.py +++ b/revengai/models/base_response_binary_externals_response.py @@ -33,6 +33,7 @@ class BaseResponseBinaryExternalsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_binary_search_response.py b/revengai/models/base_response_binary_search_response.py index 673655f..9829a2f 100644 --- a/revengai/models/base_response_binary_search_response.py +++ b/revengai/models/base_response_binary_search_response.py @@ -33,6 +33,7 @@ class BaseResponseBinarySearchResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_bool.py b/revengai/models/base_response_bool.py index d48ca77..99de349 100644 --- a/revengai/models/base_response_bool.py +++ b/revengai/models/base_response_bool.py @@ -32,6 +32,7 @@ class BaseResponseBool(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -83,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -116,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_callees_caller_functions_response.py b/revengai/models/base_response_callees_caller_functions_response.py index deb9de8..eeb4609 100644 --- a/revengai/models/base_response_callees_caller_functions_response.py +++ b/revengai/models/base_response_callees_caller_functions_response.py @@ -33,6 +33,7 @@ class BaseResponseCalleesCallerFunctionsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_capabilities.py b/revengai/models/base_response_capabilities.py index 420ad9d..32818a8 100644 --- a/revengai/models/base_response_capabilities.py +++ b/revengai/models/base_response_capabilities.py @@ -33,6 +33,7 @@ class BaseResponseCapabilities(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_capabilities_agent_response.py b/revengai/models/base_response_capabilities_agent_response.py index 86a16c2..a0a94ff 100644 --- a/revengai/models/base_response_capabilities_agent_response.py +++ b/revengai/models/base_response_capabilities_agent_response.py @@ -33,6 +33,7 @@ class BaseResponseCapabilitiesAgentResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_child_binaries_response.py b/revengai/models/base_response_child_binaries_response.py index cc56a7b..30ebb38 100644 --- a/revengai/models/base_response_child_binaries_response.py +++ b/revengai/models/base_response_child_binaries_response.py @@ -33,6 +33,7 @@ class BaseResponseChildBinariesResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_collection_binaries_update_response.py b/revengai/models/base_response_collection_binaries_update_response.py index 7465c9a..0bd5a08 100644 --- a/revengai/models/base_response_collection_binaries_update_response.py +++ b/revengai/models/base_response_collection_binaries_update_response.py @@ -33,6 +33,7 @@ class BaseResponseCollectionBinariesUpdateResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_collection_response.py b/revengai/models/base_response_collection_response.py index 770d149..03b8c7d 100644 --- a/revengai/models/base_response_collection_response.py +++ b/revengai/models/base_response_collection_response.py @@ -33,6 +33,7 @@ class BaseResponseCollectionResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_collection_search_response.py b/revengai/models/base_response_collection_search_response.py index 396dbf9..65eb087 100644 --- a/revengai/models/base_response_collection_search_response.py +++ b/revengai/models/base_response_collection_search_response.py @@ -33,6 +33,7 @@ class BaseResponseCollectionSearchResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_collection_tags_update_response.py b/revengai/models/base_response_collection_tags_update_response.py index 54a8f66..956e795 100644 --- a/revengai/models/base_response_collection_tags_update_response.py +++ b/revengai/models/base_response_collection_tags_update_response.py @@ -33,6 +33,7 @@ class BaseResponseCollectionTagsUpdateResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_comment_response.py b/revengai/models/base_response_comment_response.py index 08202a1..9573098 100644 --- a/revengai/models/base_response_comment_response.py +++ b/revengai/models/base_response_comment_response.py @@ -33,6 +33,7 @@ class BaseResponseCommentResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_config_response.py b/revengai/models/base_response_config_response.py index 4462283..8300d38 100644 --- a/revengai/models/base_response_config_response.py +++ b/revengai/models/base_response_config_response.py @@ -33,6 +33,7 @@ class BaseResponseConfigResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_created.py b/revengai/models/base_response_created.py index 2f8739d..5944ffb 100644 --- a/revengai/models/base_response_created.py +++ b/revengai/models/base_response_created.py @@ -33,6 +33,7 @@ class BaseResponseCreated(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_dict.py b/revengai/models/base_response_dict.py index 0cec332..569e2a8 100644 --- a/revengai/models/base_response_dict.py +++ b/revengai/models/base_response_dict.py @@ -32,6 +32,7 @@ class BaseResponseDict(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -83,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -116,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_external_response.py b/revengai/models/base_response_external_response.py index 347989b..0f62c6f 100644 --- a/revengai/models/base_response_external_response.py +++ b/revengai/models/base_response_external_response.py @@ -33,6 +33,7 @@ class BaseResponseExternalResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_function_blocks_response.py b/revengai/models/base_response_function_blocks_response.py index bc72948..4c302dd 100644 --- a/revengai/models/base_response_function_blocks_response.py +++ b/revengai/models/base_response_function_blocks_response.py @@ -33,6 +33,7 @@ class BaseResponseFunctionBlocksResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_function_capability_response.py b/revengai/models/base_response_function_capability_response.py index cacdf2f..6f82f42 100644 --- a/revengai/models/base_response_function_capability_response.py +++ b/revengai/models/base_response_function_capability_response.py @@ -33,6 +33,7 @@ class BaseResponseFunctionCapabilityResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_function_search_response.py b/revengai/models/base_response_function_search_response.py index 94795a4..7d61cba 100644 --- a/revengai/models/base_response_function_search_response.py +++ b/revengai/models/base_response_function_search_response.py @@ -33,6 +33,7 @@ class BaseResponseFunctionSearchResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_function_strings_response.py b/revengai/models/base_response_function_strings_response.py index 83d13db..84c968c 100644 --- a/revengai/models/base_response_function_strings_response.py +++ b/revengai/models/base_response_function_strings_response.py @@ -33,6 +33,7 @@ class BaseResponseFunctionStringsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_functions_detail_response.py b/revengai/models/base_response_functions_detail_response.py index 5533d5f..288a832 100644 --- a/revengai/models/base_response_functions_detail_response.py +++ b/revengai/models/base_response_functions_detail_response.py @@ -33,6 +33,7 @@ class BaseResponseFunctionsDetailResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_get_public_user_response.py b/revengai/models/base_response_get_public_user_response.py index 5983c88..953d819 100644 --- a/revengai/models/base_response_get_public_user_response.py +++ b/revengai/models/base_response_get_public_user_response.py @@ -33,6 +33,7 @@ class BaseResponseGetPublicUserResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_callees_caller_functions_response.py b/revengai/models/base_response_list_callees_caller_functions_response.py index 852a22f..d981bf7 100644 --- a/revengai/models/base_response_list_callees_caller_functions_response.py +++ b/revengai/models/base_response_list_callees_caller_functions_response.py @@ -33,6 +33,7 @@ class BaseResponseListCalleesCallerFunctionsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -91,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_collection_results.py b/revengai/models/base_response_list_collection_results.py index 366c231..c89ecfa 100644 --- a/revengai/models/base_response_list_collection_results.py +++ b/revengai/models/base_response_list_collection_results.py @@ -33,6 +33,7 @@ class BaseResponseListCollectionResults(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_comment_response.py b/revengai/models/base_response_list_comment_response.py index f286316..99b66c2 100644 --- a/revengai/models/base_response_list_comment_response.py +++ b/revengai/models/base_response_list_comment_response.py @@ -33,6 +33,7 @@ class BaseResponseListCommentResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -91,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_die_match.py b/revengai/models/base_response_list_die_match.py index f91ae9c..7b726ce 100644 --- a/revengai/models/base_response_list_die_match.py +++ b/revengai/models/base_response_list_die_match.py @@ -33,6 +33,7 @@ class BaseResponseListDieMatch(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -91,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_function_name_history.py b/revengai/models/base_response_list_function_name_history.py index 195c965..f3dc240 100644 --- a/revengai/models/base_response_list_function_name_history.py +++ b/revengai/models/base_response_list_function_name_history.py @@ -33,6 +33,7 @@ class BaseResponseListFunctionNameHistory(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -91,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_list_user_activity_response.py b/revengai/models/base_response_list_user_activity_response.py index 58352f4..33ae394 100644 --- a/revengai/models/base_response_list_user_activity_response.py +++ b/revengai/models/base_response_list_user_activity_response.py @@ -33,6 +33,7 @@ class BaseResponseListUserActivityResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -91,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_logs.py b/revengai/models/base_response_logs.py index e0d68ab..6f22589 100644 --- a/revengai/models/base_response_logs.py +++ b/revengai/models/base_response_logs.py @@ -33,6 +33,7 @@ class BaseResponseLogs(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_models_response.py b/revengai/models/base_response_models_response.py index c509770..f1694e6 100644 --- a/revengai/models/base_response_models_response.py +++ b/revengai/models/base_response_models_response.py @@ -33,6 +33,7 @@ class BaseResponseModelsResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_params.py b/revengai/models/base_response_params.py index 1fdd8c8..5717f4c 100644 --- a/revengai/models/base_response_params.py +++ b/revengai/models/base_response_params.py @@ -33,6 +33,7 @@ class BaseResponseParams(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_protocols_agent_response.py b/revengai/models/base_response_protocols_agent_response.py new file mode 100644 index 0000000..29e9057 --- /dev/null +++ b/revengai/models/base_response_protocols_agent_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from revengai.models.protocols_agent_response import ProtocolsAgentResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseProtocolsAgentResponse(BaseModel): + """ + BaseResponseProtocolsAgentResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ProtocolsAgentResponse] = None + message: Optional[StrictStr] = None + errors: Optional[List[ErrorModel]] = None + meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseResponseProtocolsAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseResponseProtocolsAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") if obj.get("status") is not None else True, + "data": ProtocolsAgentResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, + "message": obj.get("message"), + "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, + "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/base_response_queued_workflow_task_response.py b/revengai/models/base_response_queued_workflow_task_response.py index 316775a..78c41cd 100644 --- a/revengai/models/base_response_queued_workflow_task_response.py +++ b/revengai/models/base_response_queued_workflow_task_response.py @@ -33,6 +33,7 @@ class BaseResponseQueuedWorkflowTaskResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_recent.py b/revengai/models/base_response_recent.py index d770ad0..d36730a 100644 --- a/revengai/models/base_response_recent.py +++ b/revengai/models/base_response_recent.py @@ -33,6 +33,7 @@ class BaseResponseRecent(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_remediation_agent_response.py b/revengai/models/base_response_remediation_agent_response.py index c9e33db..a5d0909 100644 --- a/revengai/models/base_response_remediation_agent_response.py +++ b/revengai/models/base_response_remediation_agent_response.py @@ -33,6 +33,7 @@ class BaseResponseRemediationAgentResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_report_analysis_response.py b/revengai/models/base_response_report_analysis_response.py index cc76210..7892181 100644 --- a/revengai/models/base_response_report_analysis_response.py +++ b/revengai/models/base_response_report_analysis_response.py @@ -33,6 +33,7 @@ class BaseResponseReportAnalysisResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_secrets_agent_response.py b/revengai/models/base_response_secrets_agent_response.py new file mode 100644 index 0000000..d4f1a19 --- /dev/null +++ b/revengai/models/base_response_secrets_agent_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from revengai.models.secrets_agent_response import SecretsAgentResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseSecretsAgentResponse(BaseModel): + """ + BaseResponseSecretsAgentResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[SecretsAgentResponse] = None + message: Optional[StrictStr] = None + errors: Optional[List[ErrorModel]] = None + meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseResponseSecretsAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseResponseSecretsAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") if obj.get("status") is not None else True, + "data": SecretsAgentResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, + "message": obj.get("message"), + "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, + "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/base_response_status.py b/revengai/models/base_response_status.py index 9b20217..2ba1ae0 100644 --- a/revengai/models/base_response_status.py +++ b/revengai/models/base_response_status.py @@ -33,6 +33,7 @@ class BaseResponseStatus(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_str.py b/revengai/models/base_response_str.py index 6e75df9..c0e4efc 100644 --- a/revengai/models/base_response_str.py +++ b/revengai/models/base_response_str.py @@ -32,6 +32,7 @@ class BaseResponseStr(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -83,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -116,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_tag_search_response.py b/revengai/models/base_response_tag_search_response.py index 28c7b1d..ce55375 100644 --- a/revengai/models/base_response_tag_search_response.py +++ b/revengai/models/base_response_tag_search_response.py @@ -33,6 +33,7 @@ class BaseResponseTagSearchResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_task_response.py b/revengai/models/base_response_task_response.py index b07a178..f6e0323 100644 --- a/revengai/models/base_response_task_response.py +++ b/revengai/models/base_response_task_response.py @@ -33,6 +33,7 @@ class BaseResponseTaskResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_task_status_response.py b/revengai/models/base_response_task_status_response.py index e86f287..420a5ea 100644 --- a/revengai/models/base_response_task_status_response.py +++ b/revengai/models/base_response_task_status_response.py @@ -33,6 +33,7 @@ class BaseResponseTaskStatusResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_triage_report_response.py b/revengai/models/base_response_triage_report_response.py index f918565..0fb30c0 100644 --- a/revengai/models/base_response_triage_report_response.py +++ b/revengai/models/base_response_triage_report_response.py @@ -33,6 +33,7 @@ class BaseResponseTriageReportResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_union_get_ai_decompilation_rating_response_none_type.py b/revengai/models/base_response_union_get_ai_decompilation_rating_response_none_type.py index 85aa614..9727355 100644 --- a/revengai/models/base_response_union_get_ai_decompilation_rating_response_none_type.py +++ b/revengai/models/base_response_union_get_ai_decompilation_rating_response_none_type.py @@ -33,6 +33,7 @@ class BaseResponseUnionGetAiDecompilationRatingResponseNoneType(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_upload_response.py b/revengai/models/base_response_upload_response.py index b92075c..68690f1 100644 --- a/revengai/models/base_response_upload_response.py +++ b/revengai/models/base_response_upload_response.py @@ -33,6 +33,7 @@ class BaseResponseUploadResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/base_response_xref_response.py b/revengai/models/base_response_xref_response.py index a1424c9..cedfd89 100644 --- a/revengai/models/base_response_xref_response.py +++ b/revengai/models/base_response_xref_response.py @@ -33,6 +33,7 @@ class BaseResponseXrefResponse(BaseModel): message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of meta if self.meta: _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -120,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/basic.py b/revengai/models/basic.py index 5bc6eca..8e9efcf 100644 --- a/revengai/models/basic.py +++ b/revengai/models/basic.py @@ -44,6 +44,7 @@ class Basic(BaseModel): binary_uuid: Optional[StrictStr] = None sequencer_version: Optional[StrictStr] = None team_id: StrictInt = Field(description="The team ID of the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["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"] model_config = ConfigDict( @@ -76,8 +77,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -85,6 +88,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if base_address (nullable) is None # and model_fields_set contains the field if self.base_address is None and "base_address" in self.model_fields_set: @@ -131,6 +139,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sequencer_version": obj.get("sequencer_version"), "team_id": obj.get("team_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binaries_related_status_response.py b/revengai/models/binaries_related_status_response.py index 203bc82..622a802 100644 --- a/revengai/models/binaries_related_status_response.py +++ b/revengai/models/binaries_related_status_response.py @@ -26,6 +26,7 @@ class BinariesRelatedStatusResponse(BaseModel): BinariesRelatedStatusResponse """ # noqa: E501 status: StrictStr = Field(description="The current status of the unpack binary task") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_additional_details_data_response.py b/revengai/models/binary_additional_details_data_response.py index 94d566a..43918e6 100644 --- a/revengai/models/binary_additional_details_data_response.py +++ b/revengai/models/binary_additional_details_data_response.py @@ -31,6 +31,7 @@ class BinaryAdditionalDetailsDataResponse(BaseModel): file: FileMetadata pe: Optional[PEModel] = None elf: Optional[ELFModel] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["file", "pe", "elf"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of elf if self.elf: _dict['elf'] = self.elf.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if pe (nullable) is None # and model_fields_set contains the field if self.pe is None and "pe" in self.model_fields_set: @@ -107,6 +115,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pe": PEModel.from_dict(obj["pe"]) if obj.get("pe") is not None else None, "elf": ELFModel.from_dict(obj["elf"]) if obj.get("elf") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_additional_response.py b/revengai/models/binary_additional_response.py index a7684fb..76f6b3c 100644 --- a/revengai/models/binary_additional_response.py +++ b/revengai/models/binary_additional_response.py @@ -30,6 +30,7 @@ class BinaryAdditionalResponse(BaseModel): binary_id: StrictInt details: Optional[BinaryAdditionalDetailsDataResponse] creation: Optional[datetime] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_id", "details", "creation"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if details (nullable) is None # and model_fields_set contains the field if self.details is None and "details" in self.model_fields_set: @@ -100,6 +108,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": BinaryAdditionalDetailsDataResponse.from_dict(obj["details"]) if obj.get("details") is not None else None, "creation": obj.get("creation") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_config.py b/revengai/models/binary_config.py index 1a7dcb8..2d0c137 100644 --- a/revengai/models/binary_config.py +++ b/revengai/models/binary_config.py @@ -16,11 +16,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.file_format import FileFormat -from revengai.models.isa import ISA -from revengai.models.platform import Platform from typing import Optional, Set from typing_extensions import Self @@ -28,10 +25,41 @@ class BinaryConfig(BaseModel): """ BinaryConfig """ # noqa: E501 - isa: Optional[ISA] = None - platform: Optional[Platform] = None - file_format: Optional[FileFormat] = None - __properties: ClassVar[List[str]] = ["isa", "platform", "file_format"] + file_format: Optional[StrictStr] = None + isa: Optional[StrictStr] = None + platform: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file_format", "isa", "platform"] + + @field_validator('file_format') + def file_format_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['pe', 'elf', 'blob', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('pe', 'elf', 'blob', 'unknown_default_open_api')") + return value + + @field_validator('isa') + def isa_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['x86', 'x86_64', 'arm', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('x86', 'x86_64', 'arm', 'unknown_default_open_api')") + return value + + @field_validator('platform') + def platform_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['linux', 'windows', 'android', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('linux', 'windows', 'android', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -63,8 +91,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,20 +102,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if isa (nullable) is None - # and model_fields_set contains the field - if self.isa is None and "isa" in self.model_fields_set: - _dict['isa'] = None - - # set to None if platform (nullable) is None - # and model_fields_set contains the field - if self.platform is None and "platform" in self.model_fields_set: - _dict['platform'] = None - - # set to None if file_format (nullable) is None - # and model_fields_set contains the field - if self.file_format is None and "file_format" in self.model_fields_set: - _dict['file_format'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -99,10 +119,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "file_format": obj.get("file_format"), "isa": obj.get("isa"), - "platform": obj.get("platform"), - "file_format": obj.get("file_format") + "platform": obj.get("platform") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_details_response.py b/revengai/models/binary_details_response.py index 46ae956..85377ff 100644 --- a/revengai/models/binary_details_response.py +++ b/revengai/models/binary_details_response.py @@ -28,24 +28,25 @@ class BinaryDetailsResponse(BaseModel): """ # noqa: E501 arch: StrictStr = Field(description="The architecture of the binary") bits: StrictInt = Field(description="The size of the binary in bits") - crc32: StrictStr + crc32: Optional[StrictStr] var_class: StrictStr = Field(alias="Class") - entropy: Union[StrictFloat, StrictInt] - file_size: StrictInt + entropy: Optional[Union[StrictFloat, StrictInt]] + file_size: Optional[StrictInt] language: StrictStr - md5: StrictStr + md5: Optional[StrictStr] machine: StrictStr os: StrictStr = Field(description="OS target of the binary") - sha1: StrictStr = Field(description="SHA1 hash of the binary") - sha256: StrictStr = Field(description="SHA256 hash of the binary") + sha1: Optional[StrictStr] + sha256: Optional[StrictStr] ssdeep: Optional[StrictStr] static: StrictBool stripped: StrictBool sub_sys: StrictStr - tlsh: StrictStr + tlsh: Optional[StrictStr] type: StrictStr debug: StrictBool first_seen: datetime + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["arch", "bits", "crc32", "Class", "entropy", "file_size", "language", "md5", "machine", "os", "sha1", "sha256", "ssdeep", "static", "stripped", "sub_sys", "tlsh", "type", "debug", "first_seen"] model_config = ConfigDict( @@ -78,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -87,11 +90,51 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if crc32 (nullable) is None + # and model_fields_set contains the field + if self.crc32 is None and "crc32" in self.model_fields_set: + _dict['crc32'] = None + + # set to None if entropy (nullable) is None + # and model_fields_set contains the field + if self.entropy is None and "entropy" in self.model_fields_set: + _dict['entropy'] = None + + # set to None if file_size (nullable) is None + # and model_fields_set contains the field + if self.file_size is None and "file_size" in self.model_fields_set: + _dict['file_size'] = None + + # set to None if md5 (nullable) is None + # and model_fields_set contains the field + if self.md5 is None and "md5" in self.model_fields_set: + _dict['md5'] = None + + # set to None if sha1 (nullable) is None + # and model_fields_set contains the field + if self.sha1 is None and "sha1" in self.model_fields_set: + _dict['sha1'] = None + + # set to None if sha256 (nullable) is None + # and model_fields_set contains the field + if self.sha256 is None and "sha256" in self.model_fields_set: + _dict['sha256'] = None + # set to None if ssdeep (nullable) is None # and model_fields_set contains the field if self.ssdeep is None and "ssdeep" in self.model_fields_set: _dict['ssdeep'] = None + # set to None if tlsh (nullable) is None + # and model_fields_set contains the field + if self.tlsh is None and "tlsh" in self.model_fields_set: + _dict['tlsh'] = None + return _dict @classmethod @@ -125,6 +168,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "debug": obj.get("debug"), "first_seen": obj.get("first_seen") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_externals_response.py b/revengai/models/binary_externals_response.py index 5e57361..e8f82b5 100644 --- a/revengai/models/binary_externals_response.py +++ b/revengai/models/binary_externals_response.py @@ -31,6 +31,7 @@ class BinaryExternalsResponse(BaseModel): vt_last_updated: datetime = Field(description="VirusTotal last updated date") mb: Dict[str, Any] = Field(description="MalwareBazaar information") mb_last_updated: datetime = Field(description="MalwareBazaar last updated date") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["sha_256_hash", "vt", "vt_last_updated", "mb", "mb_last_updated"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "mb": obj.get("mb"), "mb_last_updated": obj.get("mb_last_updated") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_search_response.py b/revengai/models/binary_search_response.py index 5cf0a89..bbbe6f9 100644 --- a/revengai/models/binary_search_response.py +++ b/revengai/models/binary_search_response.py @@ -27,6 +27,7 @@ class BinarySearchResponse(BaseModel): BinarySearchResponse """ # noqa: E501 results: List[BinarySearchResult] = Field(description="The results of the search") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [BinarySearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/binary_search_result.py b/revengai/models/binary_search_result.py index c335ed3..7a81002 100644 --- a/revengai/models/binary_search_result.py +++ b/revengai/models/binary_search_result.py @@ -35,6 +35,7 @@ class BinarySearchResult(BaseModel): model_id: StrictInt = Field(description="The model ID of the binary") model_name: StrictStr = Field(description="The name of the model") owned_by: StrictStr = Field(description="The owner of the binary") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_id", "binary_name", "analysis_id", "sha_256_hash", "tags", "created_at", "model_id", "model_name", "owned_by"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: @@ -103,6 +111,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "model_name": obj.get("model_name"), "owned_by": obj.get("owned_by") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/bulk_delete_analyses_request.py b/revengai/models/bulk_delete_analyses_request.py index d3828cd..f991050 100644 --- a/revengai/models/bulk_delete_analyses_request.py +++ b/revengai/models/bulk_delete_analyses_request.py @@ -26,6 +26,7 @@ class BulkDeleteAnalysesRequest(BaseModel): BulkDeleteAnalysesRequest """ # noqa: E501 analysis_ids: List[StrictInt] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_ids"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "analysis_ids": obj.get("analysis_ids") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/bytes_constant.py b/revengai/models/bytes_constant.py new file mode 100644 index 0000000..7cfcea2 --- /dev/null +++ b/revengai/models/bytes_constant.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.display import Display +from typing import Optional, Set +from typing_extensions import Self + +class BytesConstant(BaseModel): + """ + One exact, contiguous sequence of binary bytes. + """ # noqa: E501 + format: Optional[StrictStr] = 'bytes' + value: StrictStr = Field(description="Hexadecimal byte pairs representing one exact, contiguous binary value.") + display: Optional[Display] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["format", "value", "display"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['bytes', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('bytes', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BytesConstant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BytesConstant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format") if obj.get("format") is not None else 'bytes', + "value": obj.get("value"), + "display": obj.get("display") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/call_chain.py b/revengai/models/call_chain.py new file mode 100644 index 0000000..e1c9c55 --- /dev/null +++ b/revengai/models/call_chain.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CallChain(BaseModel): + """ + CallChain + """ # noqa: E501 + path: Annotated[List[Annotated[int, Field(strict=True, ge=0)]], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallChain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallChain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/call_chain_evidence.py b/revengai/models/call_chain_evidence.py new file mode 100644 index 0000000..c33bd15 --- /dev/null +++ b/revengai/models/call_chain_evidence.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from typing import Optional, Set +from typing_extensions import Self + +class CallChainEvidence(BaseModel): + """ + A concrete sequence of calls connecting program locations. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'call_chain' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'direct' + call_chain: Annotated[List[StrictInt], Field(min_length=2)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "call_chain"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['call_chain', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('call_chain', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['direct', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('direct', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallChainEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallChainEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'call_chain', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'direct', + "call_chain": obj.get("call_chain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/callee_function_info.py b/revengai/models/callee_function_info.py index a8e7f2f..6323de9 100644 --- a/revengai/models/callee_function_info.py +++ b/revengai/models/callee_function_info.py @@ -31,6 +31,7 @@ class CalleeFunctionInfo(BaseModel): is_external: Optional[StrictBool] = Field(default=False, description="Indicates if the function is external") callee_name: StrictStr = Field(description="Name of the called function") callee_vaddr: StrictStr = Field(description="Virtual address of the called function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "matched_function_id", "dashboard_url", "is_external", "callee_name", "callee_vaddr"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if matched_function_id (nullable) is None # and model_fields_set contains the field if self.matched_function_id is None and "matched_function_id" in self.model_fields_set: @@ -101,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "callee_name": obj.get("callee_name"), "callee_vaddr": obj.get("callee_vaddr") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/callees_caller_functions_response.py b/revengai/models/callees_caller_functions_response.py index eeba04e..b9b8ae6 100644 --- a/revengai/models/callees_caller_functions_response.py +++ b/revengai/models/callees_caller_functions_response.py @@ -30,6 +30,7 @@ class CalleesCallerFunctionsResponse(BaseModel): base_address: StrictInt = Field(description="Base address of the binary") callees: List[CalleeFunctionInfo] = Field(description="List of functions called by the target function") callers: List[CallerFunctionInfo] = Field(description="List of functions that call the target function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["base_address", "callees", "callers"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -85,6 +88,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_callers: _items.append(_item_callers.to_dict()) _dict['callers'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -101,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "callees": [CalleeFunctionInfo.from_dict(_item) for _item in obj["callees"]] if obj.get("callees") is not None else None, "callers": [CallerFunctionInfo.from_dict(_item) for _item in obj["callers"]] if obj.get("callers") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/caller_function_info.py b/revengai/models/caller_function_info.py index 109cd7d..a0851f0 100644 --- a/revengai/models/caller_function_info.py +++ b/revengai/models/caller_function_info.py @@ -31,6 +31,7 @@ class CallerFunctionInfo(BaseModel): is_external: Optional[StrictBool] = Field(default=False, description="Indicates if the function is external") caller_name: StrictStr = Field(description="Name of the calling function") caller_vaddr: StrictStr = Field(description="Virtual address of the calling function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "matched_function_id", "dashboard_url", "is_external", "caller_name", "caller_vaddr"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if matched_function_id (nullable) is None # and model_fields_set contains the field if self.matched_function_id is None and "matched_function_id" in self.model_fields_set: @@ -101,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "caller_name": obj.get("caller_name"), "caller_vaddr": obj.get("caller_vaddr") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/capabilities.py b/revengai/models/capabilities.py index 2151393..f4d9540 100644 --- a/revengai/models/capabilities.py +++ b/revengai/models/capabilities.py @@ -27,6 +27,7 @@ class Capabilities(BaseModel): Capabilities """ # noqa: E501 capabilities: List[AppApiRestV2InfoTypesCapability] = Field(description="List of capabilities for a given analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["capabilities"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_capabilities: _items.append(_item_capabilities.to_dict()) _dict['capabilities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "capabilities": [AppApiRestV2InfoTypesCapability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/capabilities_agent_response.py b/revengai/models/capabilities_agent_response.py index 71166c7..e744912 100644 --- a/revengai/models/capabilities_agent_response.py +++ b/revengai/models/capabilities_agent_response.py @@ -27,6 +27,7 @@ class CapabilitiesAgentResponse(BaseModel): CapabilitiesAgentResponse """ # noqa: E501 capabilities: List[AppApiRestV2AgentSchemaCapability] = Field(description="List of enriched capability data") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["capabilities"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_capabilities: _items.append(_item_capabilities.to_dict()) _dict['capabilities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "capabilities": [AppApiRestV2AgentSchemaCapability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/capabilities_result.py b/revengai/models/capabilities_result.py new file mode 100644 index 0000000..5b27713 --- /dev/null +++ b/revengai/models/capabilities_result.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.capability import Capability +from typing import Optional, Set +from typing_extensions import Self + +class CapabilitiesResult(BaseModel): + """ + CapabilitiesResult + """ # noqa: E501 + capabilities: Optional[List[Capability]] = Field(description="Capabilities found. A capability whose address no longer resolves within the analysis is omitted.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["capabilities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CapabilitiesResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in capabilities (list) + _items = [] + if self.capabilities: + for _item_capabilities in self.capabilities: + if _item_capabilities: + _items.append(_item_capabilities.to_dict()) + _dict['capabilities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if capabilities (nullable) is None + # and model_fields_set contains the field + if self.capabilities is None and "capabilities" in self.model_fields_set: + _dict['capabilities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CapabilitiesResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "capabilities": [Capability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/capability.py b/revengai/models/capability.py new file mode 100644 index 0000000..a8bd5b4 --- /dev/null +++ b/revengai/models/capability.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Capability(BaseModel): + """ + Capability + """ # noqa: E501 + capability: StrictStr = Field(description="The capability itself") + description: StrictStr = Field(description="What the function does to exhibit the capability") + function_id: StrictInt = Field(description="ID of the function") + function_name: StrictStr = Field(description="Name of the function") + function_vaddr: StrictStr = Field(description="Virtual address of the function, hex-encoded") + type: StrictStr = Field(description="Capability category") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["capability", "description", "function_id", "function_name", "function_vaddr", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Capability from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Capability from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "capability": obj.get("capability"), + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_vaddr": obj.get("function_vaddr"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/child_binaries_response.py b/revengai/models/child_binaries_response.py index 3f8955b..eca5bbf 100644 --- a/revengai/models/child_binaries_response.py +++ b/revengai/models/child_binaries_response.py @@ -28,6 +28,7 @@ class ChildBinariesResponse(BaseModel): """ # noqa: E501 children: List[RelativeBinaryResponse] = Field(description="List of child binaries associated with the parent binary") parent: Optional[RelativeBinaryResponse] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["children", "parent"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of parent if self.parent: _dict['parent'] = self.parent.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if parent (nullable) is None # and model_fields_set contains the field if self.parent is None and "parent" in self.model_fields_set: @@ -99,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "children": [RelativeBinaryResponse.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None, "parent": RelativeBinaryResponse.from_dict(obj["parent"]) if obj.get("parent") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/code_signature_model.py b/revengai/models/code_signature_model.py index 6d4f180..644cdf8 100644 --- a/revengai/models/code_signature_model.py +++ b/revengai/models/code_signature_model.py @@ -29,6 +29,7 @@ class CodeSignatureModel(BaseModel): signed: StrictBool valid_signature: StrictBool signatures: List[SingleCodeSignatureModel] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["signed", "valid_signature", "signatures"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_signatures: _items.append(_item_signatures.to_dict()) _dict['signatures'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -93,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "valid_signature": obj.get("valid_signature"), "signatures": [SingleCodeSignatureModel.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_binaries_update_request.py b/revengai/models/collection_binaries_update_request.py index 63c0ad3..4335de3 100644 --- a/revengai/models/collection_binaries_update_request.py +++ b/revengai/models/collection_binaries_update_request.py @@ -26,6 +26,7 @@ class CollectionBinariesUpdateRequest(BaseModel): CollectionBinariesUpdateRequest """ # noqa: E501 binaries: List[StrictInt] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "binaries": obj.get("binaries") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_binaries_update_response.py b/revengai/models/collection_binaries_update_response.py index 2125816..b80bcbc 100644 --- a/revengai/models/collection_binaries_update_response.py +++ b/revengai/models/collection_binaries_update_response.py @@ -27,6 +27,7 @@ class CollectionBinariesUpdateResponse(BaseModel): CollectionBinariesUpdateResponse """ # noqa: E501 binaries: List[CollectionBinaryResponse] = Field(description="Collection binaries") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_binaries: _items.append(_item_binaries.to_dict()) _dict['binaries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "binaries": [CollectionBinaryResponse.from_dict(_item) for _item in obj["binaries"]] if obj.get("binaries") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_binary_response.py b/revengai/models/collection_binary_response.py index bd2c867..6dba7f7 100644 --- a/revengai/models/collection_binary_response.py +++ b/revengai/models/collection_binary_response.py @@ -33,6 +33,7 @@ class CollectionBinaryResponse(BaseModel): sha_256_hash: StrictStr = Field(description="Binary SHA-256 hash") created_at: datetime = Field(description="Binary creation date") is_system_analysis: StrictBool = Field(description="Is the analysis owned by a RevEng.AI account") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "binary_name", "owner_id", "sha_256_hash", "created_at", "is_system_analysis"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "is_system_analysis": obj.get("is_system_analysis") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_create_request.py b/revengai/models/collection_create_request.py index ddb86c2..2eb8de5 100644 --- a/revengai/models/collection_create_request.py +++ b/revengai/models/collection_create_request.py @@ -31,6 +31,7 @@ class CollectionCreateRequest(BaseModel): collection_scope: Optional[CollectionScope] = None tags: Optional[List[StrictStr]] = None binaries: Optional[List[StrictInt]] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope", "tags", "binaries"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: @@ -100,6 +108,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "binaries": obj.get("binaries") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_list_item.py b/revengai/models/collection_list_item.py index ea76f65..08f9858 100644 --- a/revengai/models/collection_list_item.py +++ b/revengai/models/collection_list_item.py @@ -36,6 +36,7 @@ class CollectionListItem(BaseModel): collection_id: StrictInt = Field(description="The ID of the collection") creation: datetime = Field(description="The datetime of when the collection was created") team_id: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_tags", "collection_size", "collection_id", "creation", "team_id"] model_config = ConfigDict( @@ -68,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if team_id (nullable) is None # and model_fields_set contains the field if self.team_id is None and "team_id" in self.model_fields_set: @@ -105,6 +113,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creation": obj.get("creation"), "team_id": obj.get("team_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_response.py b/revengai/models/collection_response.py index 9dca686..1cc2888 100644 --- a/revengai/models/collection_response.py +++ b/revengai/models/collection_response.py @@ -38,6 +38,7 @@ class CollectionResponse(BaseModel): updated_at: datetime = Field(description="Collection last update date") tags: Optional[List[StrictStr]] = None binaries: Optional[List[CollectionResponseBinariesInner]] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_id", "collection_name", "description", "user_id", "team_id", "collection_scope", "created_at", "updated_at", "tags", "binaries"] model_config = ConfigDict( @@ -70,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +89,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_binaries: _items.append(_item_binaries.to_dict()) _dict['binaries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if team_id (nullable) is None # and model_fields_set contains the field if self.team_id is None and "team_id" in self.model_fields_set: @@ -124,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "binaries": [CollectionResponseBinariesInner.from_dict(_item) for _item in obj["binaries"]] if obj.get("binaries") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_search_response.py b/revengai/models/collection_search_response.py index bbe381e..b68d8e4 100644 --- a/revengai/models/collection_search_response.py +++ b/revengai/models/collection_search_response.py @@ -27,6 +27,7 @@ class CollectionSearchResponse(BaseModel): CollectionSearchResponse """ # noqa: E501 results: List[CollectionSearchResult] = Field(description="The results of the search") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [CollectionSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_search_result.py b/revengai/models/collection_search_result.py index 33d14a6..14b0317 100644 --- a/revengai/models/collection_search_result.py +++ b/revengai/models/collection_search_result.py @@ -36,6 +36,7 @@ class CollectionSearchResult(BaseModel): size: Optional[StrictInt] = None description: StrictStr = Field(description="The description of the collection") team_id: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_id", "collection_name", "scope", "last_updated_at", "created_at", "owned_by", "tags", "size", "description", "team_id"] model_config = ConfigDict( @@ -68,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if tags (nullable) is None # and model_fields_set contains the field if self.tags is None and "tags" in self.model_fields_set: @@ -115,6 +123,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "team_id": obj.get("team_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_tags_update_request.py b/revengai/models/collection_tags_update_request.py index b8b3f8d..e54e053 100644 --- a/revengai/models/collection_tags_update_request.py +++ b/revengai/models/collection_tags_update_request.py @@ -26,6 +26,7 @@ class CollectionTagsUpdateRequest(BaseModel): CollectionTagsUpdateRequest """ # noqa: E501 tags: List[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tags": obj.get("tags") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_tags_update_response.py b/revengai/models/collection_tags_update_response.py index b8c73c3..7ee947f 100644 --- a/revengai/models/collection_tags_update_response.py +++ b/revengai/models/collection_tags_update_response.py @@ -26,6 +26,7 @@ class CollectionTagsUpdateResponse(BaseModel): CollectionTagsUpdateResponse """ # noqa: E501 tags: List[StrictStr] = Field(description="Collection tags") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tags": obj.get("tags") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/collection_update_request.py b/revengai/models/collection_update_request.py index e31a2a2..1aa23b5 100644 --- a/revengai/models/collection_update_request.py +++ b/revengai/models/collection_update_request.py @@ -29,6 +29,7 @@ class CollectionUpdateRequest(BaseModel): collection_name: Optional[StrictStr] = None description: Optional[StrictStr] = None collection_scope: Optional[CollectionScope] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if collection_name (nullable) is None # and model_fields_set contains the field if self.collection_name is None and "collection_name" in self.model_fields_set: @@ -101,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "collection_scope": obj.get("collection_scope") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/comment_base.py b/revengai/models/comment_base.py index 47e8b63..4e40f9c 100644 --- a/revengai/models/comment_base.py +++ b/revengai/models/comment_base.py @@ -26,6 +26,7 @@ class CommentBase(BaseModel): CommentBase """ # noqa: E501 content: StrictStr = Field(description="Comment text content") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["content"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": obj.get("content") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/comment_response.py b/revengai/models/comment_response.py index 4c27726..ff8b463 100644 --- a/revengai/models/comment_response.py +++ b/revengai/models/comment_response.py @@ -35,6 +35,7 @@ class CommentResponse(BaseModel): context: Optional[Context] = None created_at: datetime updated_at: datetime + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["content", "id", "user_id", "resource_type", "resource_id", "context", "created_at", "updated_at"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of context if self.context: _dict['context'] = self.context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if context (nullable) is None # and model_fields_set contains the field if self.context is None and "context" in self.model_fields_set: @@ -105,6 +113,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "updated_at": obj.get("updated_at") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/comment_update_request.py b/revengai/models/comment_update_request.py index 6ed9611..2703028 100644 --- a/revengai/models/comment_update_request.py +++ b/revengai/models/comment_update_request.py @@ -26,6 +26,7 @@ class CommentUpdateRequest(BaseModel): CommentUpdateRequest """ # noqa: E501 content: StrictStr = Field(description="Updated comment text") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["content"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": obj.get("content") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/config.py b/revengai/models/config.py new file mode 100644 index 0000000..a2c662c --- /dev/null +++ b/revengai/models/config.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.sandbox_config import SandboxConfig +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig +from typing import Optional, Set +from typing_extensions import Self + +class Config(BaseModel): + """ + Config + """ # noqa: E501 + generate_capabilities: Optional[StrictBool] = None + no_cache: Optional[StrictBool] = None + sandbox_config: Optional[SandboxConfig] = None + scrape_third_party_config: Optional[ScrapeThirdPartyConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["generate_capabilities", "no_cache", "sandbox_config", "scrape_third_party_config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Config from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of sandbox_config + if self.sandbox_config: + _dict['sandbox_config'] = self.sandbox_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of scrape_third_party_config + if self.scrape_third_party_config: + _dict['scrape_third_party_config'] = self.scrape_third_party_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Config from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "generate_capabilities": obj.get("generate_capabilities"), + "no_cache": obj.get("no_cache"), + "sandbox_config": SandboxConfig.from_dict(obj["sandbox_config"]) if obj.get("sandbox_config") is not None else None, + "scrape_third_party_config": ScrapeThirdPartyConfig.from_dict(obj["scrape_third_party_config"]) if obj.get("scrape_third_party_config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/config_response.py b/revengai/models/config_response.py index ef409e8..7668d44 100644 --- a/revengai/models/config_response.py +++ b/revengai/models/config_response.py @@ -29,6 +29,7 @@ class ConfigResponse(BaseModel): max_file_size_bytes: StrictInt = Field(description="Maximum file size (in bytes) that can be uploaded for analysis") ai_decompiler_unsupported_languages: List[StrictStr] = Field(description="List of programming languages that are not supported for AI decompilation") ai_decompiler_supported_models: List[StrictStr] = Field(description="List of models that support AI decompilation") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["dashboard_url", "max_file_size_bytes", "ai_decompiler_unsupported_languages", "ai_decompiler_supported_models"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ai_decompiler_unsupported_languages": obj.get("ai_decompiler_unsupported_languages"), "ai_decompiler_supported_models": obj.get("ai_decompiler_supported_models") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/create_metadata.py b/revengai/models/create_metadata.py new file mode 100644 index 0000000..edd6bb8 --- /dev/null +++ b/revengai/models/create_metadata.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateMetadata(BaseModel): + """ + CreateMetadata + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis ID") + binary_id: StrictInt = Field(description="Binary ID") + status: StrictStr = Field(description="Analysis status") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Uploaded', 'Queued', 'Processing', 'Complete', 'Error', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('Uploaded', 'Queued', 'Processing', 'Complete', 'Error', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_id": obj.get("analysis_id"), + "binary_id": obj.get("binary_id"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/create_request.py b/revengai/models/create_request.py new file mode 100644 index 0000000..804f827 --- /dev/null +++ b/revengai/models/create_request.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.auto_run_agents import AutoRunAgents +from revengai.models.binary_config import BinaryConfig +from revengai.models.config import Config +from revengai.models.symbols import Symbols +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequest(BaseModel): + """ + CreateRequest + """ # noqa: E501 + analysis_config: Optional[Config] = None + analysis_scope: Optional[StrictStr] = 'PRIVATE' + auto_run_agents: Optional[AutoRunAgents] = None + binary_config: Optional[BinaryConfig] = None + debug_hash: Optional[Annotated[str, Field(strict=True)]] = None + filename: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + sha_256_hash: Annotated[str, Field(strict=True)] + symbols: Optional[Symbols] = None + tags: Optional[Annotated[List[StrictStr], Field(max_length=64)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_config", "analysis_scope", "auto_run_agents", "binary_config", "debug_hash", "filename", "sha_256_hash", "symbols", "tags"] + + @field_validator('analysis_scope') + def analysis_scope_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PRIVATE', 'PUBLIC', 'TEAM', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('PRIVATE', 'PUBLIC', 'TEAM', 'unknown_default_open_api')") + return value + + @field_validator('debug_hash') + def debug_hash_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-fA-F0-9]{64}$", value): + raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{64}$/") + return value + + @field_validator('sha_256_hash') + def sha_256_hash_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-fA-F0-9]{64}$", value): + raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{64}$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of analysis_config + if self.analysis_config: + _dict['analysis_config'] = self.analysis_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of auto_run_agents + if self.auto_run_agents: + _dict['auto_run_agents'] = self.auto_run_agents.to_dict() + # override the default output from pydantic by calling `to_dict()` of binary_config + if self.binary_config: + _dict['binary_config'] = self.binary_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of symbols + if self.symbols: + _dict['symbols'] = self.symbols.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_config": Config.from_dict(obj["analysis_config"]) if obj.get("analysis_config") is not None else None, + "analysis_scope": obj.get("analysis_scope") if obj.get("analysis_scope") is not None else 'PRIVATE', + "auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None, + "binary_config": BinaryConfig.from_dict(obj["binary_config"]) if obj.get("binary_config") is not None else None, + "debug_hash": obj.get("debug_hash"), + "filename": obj.get("filename"), + "sha_256_hash": obj.get("sha_256_hash"), + "symbols": Symbols.from_dict(obj["symbols"]) if obj.get("symbols") is not None else None, + "tags": obj.get("tags") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/create_result.py b/revengai/models/create_result.py new file mode 100644 index 0000000..4e5ef9d --- /dev/null +++ b/revengai/models/create_result.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateResult(BaseModel): + """ + CreateResult + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis ID") + binary_id: StrictInt = Field(description="Binary ID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_id", "binary_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_id": obj.get("analysis_id"), + "binary_id": obj.get("binary_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/created.py b/revengai/models/created.py index e6d8b99..52200d7 100644 --- a/revengai/models/created.py +++ b/revengai/models/created.py @@ -28,6 +28,7 @@ class Created(BaseModel): analysis_id: StrictInt = Field(description="The ID corresponding to the newly created analysis") binary_id: StrictInt = Field(description="The ID corresponding to the binary that was created") reference: StrictStr = Field(description="Deprecated will always be empty string") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "reference"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_id": obj.get("binary_id"), "reference": obj.get("reference") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/crypto_explain_metadata.py b/revengai/models/crypto_explain_metadata.py new file mode 100644 index 0000000..f4f88b0 --- /dev/null +++ b/revengai/models/crypto_explain_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CryptoExplainMetadata(BaseModel): + """ + CryptoExplainMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this function.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CryptoExplainMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CryptoExplainMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/crypto_explain_result.py b/revengai/models/crypto_explain_result.py new file mode 100644 index 0000000..88320c3 --- /dev/null +++ b/revengai/models/crypto_explain_result.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.crypto_explained_function import CryptoExplainedFunction +from typing import Optional, Set +from typing_extensions import Self + +class CryptoExplainResult(BaseModel): + """ + CryptoExplainResult + """ # noqa: E501 + cancelled: StrictBool = Field(description="Whether the run was cancelled") + error: Optional[StrictStr] = Field(default=None, description="Why no explanation could be produced. Empty when the run succeeded.") + function_id: StrictInt = Field(description="ID of the explained function") + function_name: Optional[StrictStr] = Field(default=None, description="Name of the explained function") + functions_involved: Optional[List[CryptoExplainedFunction]] = Field(default=None, description="Other functions involved in the cryptographic operation") + summary: Optional[StrictStr] = Field(default=None, description="Explanation of the cryptography the function performs") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cancelled", "error", "function_id", "function_name", "functions_involved", "summary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CryptoExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions_involved (list) + _items = [] + if self.functions_involved: + for _item_functions_involved in self.functions_involved: + if _item_functions_involved: + _items.append(_item_functions_involved.to_dict()) + _dict['functions_involved'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if functions_involved (nullable) is None + # and model_fields_set contains the field + if self.functions_involved is None and "functions_involved" in self.model_fields_set: + _dict['functions_involved'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CryptoExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelled": obj.get("cancelled"), + "error": obj.get("error"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "functions_involved": [CryptoExplainedFunction.from_dict(_item) for _item in obj["functions_involved"]] if obj.get("functions_involved") is not None else None, + "summary": obj.get("summary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/crypto_explained_function.py b/revengai/models/crypto_explained_function.py new file mode 100644 index 0000000..5f5c526 --- /dev/null +++ b/revengai/models/crypto_explained_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CryptoExplainedFunction(BaseModel): + """ + CryptoExplainedFunction + """ # noqa: E501 + description: StrictStr = Field(description="Role this function plays in the cryptographic operation") + function_id: StrictInt = Field(description="ID of the function") + function_name: StrictStr = Field(description="Name of the function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CryptoExplainedFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CryptoExplainedFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/decompilation_comment_context.py b/revengai/models/decompilation_comment_context.py index 70e15c6..fcbe099 100644 --- a/revengai/models/decompilation_comment_context.py +++ b/revengai/models/decompilation_comment_context.py @@ -27,6 +27,7 @@ class DecompilationCommentContext(BaseModel): """ # noqa: E501 start_line: Optional[StrictInt] end_line: Optional[StrictInt] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["start_line", "end_line"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if start_line (nullable) is None # and model_fields_set contains the field if self.start_line is None and "start_line" in self.model_fields_set: @@ -93,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "start_line": obj.get("start_line"), "end_line": obj.get("end_line") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/decompiler_summary.py b/revengai/models/decompiler_summary.py new file mode 100644 index 0000000..7094fcf --- /dev/null +++ b/revengai/models/decompiler_summary.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.call_chain import CallChain +from revengai.models.subject import Subject +from typing import Optional, Set +from typing_extensions import Self + +class DecompilerSummary(BaseModel): + """ + DecompilerSummary + """ # noqa: E501 + subject: Subject + summary: Annotated[str, Field(min_length=1, strict=True)] + reachability: Optional[CallChain] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["subject", "summary", "reachability"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DecompilerSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of subject + if self.subject: + _dict['subject'] = self.subject.to_dict() + # override the default output from pydantic by calling `to_dict()` of reachability + if self.reachability: + _dict['reachability'] = self.reachability.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if reachability (nullable) is None + # and model_fields_set contains the field + if self.reachability is None and "reachability" in self.model_fields_set: + _dict['reachability'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DecompilerSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, + "summary": obj.get("summary"), + "reachability": CallChain.from_dict(obj["reachability"]) if obj.get("reachability") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/decompiler_summary_evidence.py b/revengai/models/decompiler_summary_evidence.py new file mode 100644 index 0000000..2d102d2 --- /dev/null +++ b/revengai/models/decompiler_summary_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.decompiler_summary import DecompilerSummary +from revengai.models.evidence_effect import EvidenceEffect +from typing import Optional, Set +from typing_extensions import Self + +class DecompilerSummaryEvidence(BaseModel): + """ + Semantic summaries derived from decompiler output. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'decompiler_summary' + kind: Optional[StrictStr] = 'model_interpretation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'indirect' + summaries: Annotated[List[DecompilerSummary], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "summaries"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['decompiler_summary', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('decompiler_summary', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['model_interpretation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('model_interpretation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['indirect', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('indirect', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DecompilerSummaryEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in summaries (list) + _items = [] + if self.summaries: + for _item_summaries in self.summaries: + if _item_summaries: + _items.append(_item_summaries.to_dict()) + _dict['summaries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DecompilerSummaryEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'decompiler_summary', + "kind": obj.get("kind") if obj.get("kind") is not None else 'model_interpretation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'indirect', + "summaries": [DecompilerSummary.from_dict(_item) for _item in obj["summaries"]] if obj.get("summaries") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/die_match.py b/revengai/models/die_match.py index 46d1dfa..690b345 100644 --- a/revengai/models/die_match.py +++ b/revengai/models/die_match.py @@ -29,6 +29,7 @@ class DieMatch(BaseModel): type: StrictStr = Field(description="Category assigned by DIE for the match (e.g., 'compiler', 'packer', 'file').") display: StrictStr = Field(description="Human-readable description from DIE's 'string' field; suitable for UI/logs, not for parsing.") version: StrictStr = Field(description="Extracted version string when available; may be empty/None if unknown.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "type", "display", "version"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "display": obj.get("display"), "version": obj.get("version") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/display.py b/revengai/models/display.py new file mode 100644 index 0000000..895e0c0 --- /dev/null +++ b/revengai/models/display.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Display(str, Enum): + """ + Display + """ + + """ + allowed enum values + """ + HEX = 'hex' + UINT8 = 'uint8' + UINT16 = 'uint16' + UINT32 = 'uint32' + UINT64 = 'uint64' + INT8 = 'int8' + INT16 = 'int16' + INT32 = 'int32' + INT64 = 'int64' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Display from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/elf_dynamic_entry.py b/revengai/models/elf_dynamic_entry.py index a7442a3..dba2d00 100644 --- a/revengai/models/elf_dynamic_entry.py +++ b/revengai/models/elf_dynamic_entry.py @@ -27,6 +27,7 @@ class ElfDynamicEntry(BaseModel): """ # noqa: E501 tag: StrictStr value: StrictInt + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tag", "value"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tag": obj.get("tag"), "value": obj.get("value") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_import_model.py b/revengai/models/elf_import_model.py index 5042c1d..c593552 100644 --- a/revengai/models/elf_import_model.py +++ b/revengai/models/elf_import_model.py @@ -27,6 +27,7 @@ class ELFImportModel(BaseModel): """ # noqa: E501 number_of_imports: StrictInt imports: List[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["number_of_imports", "imports"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "number_of_imports": obj.get("number_of_imports"), "imports": obj.get("imports") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_model.py b/revengai/models/elf_model.py index 70fede4..735244b 100644 --- a/revengai/models/elf_model.py +++ b/revengai/models/elf_model.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from revengai.models.elf_dynamic_entry import ElfDynamicEntry from revengai.models.elf_import_model import ELFImportModel from revengai.models.elf_relocation import ELFRelocation @@ -49,9 +49,10 @@ class ELFModel(BaseModel): imports: ELFImportModel exported_functions: List[StrictStr] dynamic_entries: List[ElfDynamicEntry] - notes: List[Dict[str, Any]] + notes: List[Optional[Dict[str, Any]]] debug_info: Dict[str, Any] version_info: Dict[str, Any] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["file_type", "architecture", "endianness", "entry_point", "entry_point_bytes", "import_hash", "export_hash", "build_id", "security", "sections", "segments", "symbols", "dynamic_symbols", "relocations", "imports", "exported_functions", "dynamic_entries", "notes", "debug_info", "version_info"] model_config = ConfigDict( @@ -84,8 +85,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -141,6 +144,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_dynamic_entries: _items.append(_item_dynamic_entries.to_dict()) _dict['dynamic_entries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -174,6 +182,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "debug_info": obj.get("debug_info"), "version_info": obj.get("version_info") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_relocation.py b/revengai/models/elf_relocation.py index 1156b91..191836a 100644 --- a/revengai/models/elf_relocation.py +++ b/revengai/models/elf_relocation.py @@ -33,6 +33,7 @@ class ELFRelocation(BaseModel): is_dynamic: StrictBool is_pltgot: StrictBool is_unicode_symbol_name: Optional[StrictBool] = True + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["address", "type", "size", "addend", "symbol_name", "is_dynamic", "is_pltgot", "is_unicode_symbol_name"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_pltgot": obj.get("is_pltgot"), "is_unicode_symbol_name": obj.get("is_unicode_symbol_name") if obj.get("is_unicode_symbol_name") is not None else True }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_section.py b/revengai/models/elf_section.py index 8546ad4..6e2d35c 100644 --- a/revengai/models/elf_section.py +++ b/revengai/models/elf_section.py @@ -35,6 +35,7 @@ class ELFSection(BaseModel): flags_raw: StrictInt entropy: Union[StrictFloat, StrictInt] alignment: StrictInt + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "type", "virtual_address", "virtual_size", "raw_size", "file_offset", "flags", "flags_raw", "entropy", "alignment"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -99,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "entropy": obj.get("entropy"), "alignment": obj.get("alignment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_security.py b/revengai/models/elf_security.py index fefb36d..5a9b68a 100644 --- a/revengai/models/elf_security.py +++ b/revengai/models/elf_security.py @@ -30,6 +30,7 @@ class ELFSecurity(BaseModel): canary: StrictBool nx: StrictBool relo: StrictBool + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["pie", "stripped", "canary", "nx", "relo"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nx": obj.get("nx"), "relo": obj.get("relo") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_segment.py b/revengai/models/elf_segment.py index 6b1b812..fe5aa3d 100644 --- a/revengai/models/elf_segment.py +++ b/revengai/models/elf_segment.py @@ -34,6 +34,7 @@ class ELFSegment(BaseModel): flags: StrictStr flags_raw: StrictInt alignment: StrictInt + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "virtual_address", "virtual_size", "physical_address", "physical_size", "file_offset", "flags", "flags_raw", "alignment"] model_config = ConfigDict( @@ -66,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -97,6 +105,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "flags_raw": obj.get("flags_raw"), "alignment": obj.get("alignment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/elf_symbol.py b/revengai/models/elf_symbol.py index 077dae3..63e3367 100644 --- a/revengai/models/elf_symbol.py +++ b/revengai/models/elf_symbol.py @@ -33,6 +33,7 @@ class ELFSymbol(BaseModel): visibility: StrictStr section_index: StrictInt is_unicode_name: Optional[StrictBool] = True + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "value", "size", "type", "binding", "visibility", "section_index", "is_unicode_name"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "section_index": obj.get("section_index"), "is_unicode_name": obj.get("is_unicode_name") if obj.get("is_unicode_name") is not None else True }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/endianness.py b/revengai/models/endianness.py new file mode 100644 index 0000000..47e4884 --- /dev/null +++ b/revengai/models/endianness.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Endianness(str, Enum): + """ + Endianness + """ + + """ + allowed enum values + """ + UNSPECIFIED = 'unspecified' + LITTLE = 'little' + BIG = 'big' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Endianness from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/entrypoint_model.py b/revengai/models/entrypoint_model.py index 2b155e7..c668963 100644 --- a/revengai/models/entrypoint_model.py +++ b/revengai/models/entrypoint_model.py @@ -27,6 +27,7 @@ class EntrypointModel(BaseModel): """ # noqa: E501 address: StrictInt first_bytes: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["address", "first_bytes"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "address": obj.get("address"), "first_bytes": obj.get("first_bytes") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/error_body.py b/revengai/models/error_body.py index 08ec1c0..d001c55 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -36,8 +36,8 @@ class ErrorBody(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/error_model.py b/revengai/models/error_model.py index a8978ae..b642bd3 100644 --- a/revengai/models/error_model.py +++ b/revengai/models/error_model.py @@ -27,6 +27,7 @@ class ErrorModel(BaseModel): """ # noqa: E501 code: StrictStr message: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["code", "message"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "code": obj.get("code"), "message": obj.get("message") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_attempt_failed.py b/revengai/models/event_attempt_failed.py index 1e4491f..8a128d1 100644 --- a/revengai/models/event_attempt_failed.py +++ b/revengai/models/event_attempt_failed.py @@ -30,6 +30,7 @@ class EventAttemptFailed(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_attempt_started.py b/revengai/models/event_attempt_started.py index 481da35..bc9dcfd 100644 --- a/revengai/models/event_attempt_started.py +++ b/revengai/models/event_attempt_started.py @@ -30,6 +30,7 @@ class EventAttemptStarted(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_contextcompacted.py b/revengai/models/event_contextcompacted.py index d8d554f..3e1a988 100644 --- a/revengai/models/event_contextcompacted.py +++ b/revengai/models/event_contextcompacted.py @@ -30,6 +30,7 @@ class EventCONTEXTCOMPACTED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_decomp_failed.py b/revengai/models/event_decomp_failed.py index 9e01a92..3dba64f 100644 --- a/revengai/models/event_decomp_failed.py +++ b/revengai/models/event_decomp_failed.py @@ -30,6 +30,7 @@ class EventDecompFailed(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_decomp_finished.py b/revengai/models/event_decomp_finished.py index 79a5889..8f12d95 100644 --- a/revengai/models/event_decomp_finished.py +++ b/revengai/models/event_decomp_finished.py @@ -30,6 +30,7 @@ class EventDecompFinished(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_names_finished.py b/revengai/models/event_names_finished.py index ea35195..3a04014 100644 --- a/revengai/models/event_names_finished.py +++ b/revengai/models/event_names_finished.py @@ -30,6 +30,7 @@ class EventNamesFinished(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_prose.py b/revengai/models/event_prose.py index 3baccc6..d45aab5 100644 --- a/revengai/models/event_prose.py +++ b/revengai/models/event_prose.py @@ -30,6 +30,7 @@ class EventProse(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_rename_applied.py b/revengai/models/event_rename_applied.py index 4d4f322..e9fdab2 100644 --- a/revengai/models/event_rename_applied.py +++ b/revengai/models/event_rename_applied.py @@ -30,6 +30,7 @@ class EventRenameApplied(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_runcancelled.py b/revengai/models/event_runcancelled.py index c27091a..95d93da 100644 --- a/revengai/models/event_runcancelled.py +++ b/revengai/models/event_runcancelled.py @@ -30,6 +30,7 @@ class EventRUNCANCELLED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_runerror.py b/revengai/models/event_runerror.py index d924f5e..ba08be1 100644 --- a/revengai/models/event_runerror.py +++ b/revengai/models/event_runerror.py @@ -30,6 +30,7 @@ class EventRUNERROR(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_runfinished.py b/revengai/models/event_runfinished.py index 74dba99..bdc37cd 100644 --- a/revengai/models/event_runfinished.py +++ b/revengai/models/event_runfinished.py @@ -30,6 +30,7 @@ class EventRUNFINISHED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_runstarted.py b/revengai/models/event_runstarted.py index eaa4215..a33921f 100644 --- a/revengai/models/event_runstarted.py +++ b/revengai/models/event_runstarted.py @@ -30,6 +30,7 @@ class EventRUNSTARTED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_source_delta.py b/revengai/models/event_source_delta.py index e5a8438..72ccbd7 100644 --- a/revengai/models/event_source_delta.py +++ b/revengai/models/event_source_delta.py @@ -30,6 +30,7 @@ class EventSourceDelta(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_source_reset.py b/revengai/models/event_source_reset.py index 4ae72f5..29a5346 100644 --- a/revengai/models/event_source_reset.py +++ b/revengai/models/event_source_reset.py @@ -30,6 +30,7 @@ class EventSourceReset(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_stepfinished.py b/revengai/models/event_stepfinished.py index 1f428b9..ce32410 100644 --- a/revengai/models/event_stepfinished.py +++ b/revengai/models/event_stepfinished.py @@ -30,6 +30,7 @@ class EventSTEPFINISHED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_stepstarted.py b/revengai/models/event_stepstarted.py index 3b0b61e..db2b270 100644 --- a/revengai/models/event_stepstarted.py +++ b/revengai/models/event_stepstarted.py @@ -30,6 +30,7 @@ class EventSTEPSTARTED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_textmessagecontent.py b/revengai/models/event_textmessagecontent.py index 0b357f4..c810442 100644 --- a/revengai/models/event_textmessagecontent.py +++ b/revengai/models/event_textmessagecontent.py @@ -30,6 +30,7 @@ class EventTEXTMESSAGECONTENT(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_textmessageend.py b/revengai/models/event_textmessageend.py index f231062..6493d58 100644 --- a/revengai/models/event_textmessageend.py +++ b/revengai/models/event_textmessageend.py @@ -30,6 +30,7 @@ class EventTEXTMESSAGEEND(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_textmessagestart.py b/revengai/models/event_textmessagestart.py index 9c7c8eb..bfabc2f 100644 --- a/revengai/models/event_textmessagestart.py +++ b/revengai/models/event_textmessagestart.py @@ -30,6 +30,7 @@ class EventTEXTMESSAGESTART(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_titleupdated.py b/revengai/models/event_titleupdated.py index 16ad60e..d7863b9 100644 --- a/revengai/models/event_titleupdated.py +++ b/revengai/models/event_titleupdated.py @@ -30,6 +30,7 @@ class EventTITLEUPDATED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolcallargsdelta.py b/revengai/models/event_toolcallargsdelta.py index b9de31f..997e255 100644 --- a/revengai/models/event_toolcallargsdelta.py +++ b/revengai/models/event_toolcallargsdelta.py @@ -30,6 +30,7 @@ class EventTOOLCALLARGSDELTA(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolcallend.py b/revengai/models/event_toolcallend.py index d63c9b1..69a9647 100644 --- a/revengai/models/event_toolcallend.py +++ b/revengai/models/event_toolcallend.py @@ -30,6 +30,7 @@ class EventTOOLCALLEND(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolcallprogress.py b/revengai/models/event_toolcallprogress.py index d64938d..e1772b0 100644 --- a/revengai/models/event_toolcallprogress.py +++ b/revengai/models/event_toolcallprogress.py @@ -30,6 +30,7 @@ class EventTOOLCALLPROGRESS(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolcallresult.py b/revengai/models/event_toolcallresult.py index 44a12ab..75956ef 100644 --- a/revengai/models/event_toolcallresult.py +++ b/revengai/models/event_toolcallresult.py @@ -30,6 +30,7 @@ class EventTOOLCALLRESULT(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolcallstart.py b/revengai/models/event_toolcallstart.py index bae6899..bd57a46 100644 --- a/revengai/models/event_toolcallstart.py +++ b/revengai/models/event_toolcallstart.py @@ -30,6 +30,7 @@ class EventTOOLCALLSTART(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_toolconfirmationrequired.py b/revengai/models/event_toolconfirmationrequired.py index db1b2d5..6b7682c 100644 --- a/revengai/models/event_toolconfirmationrequired.py +++ b/revengai/models/event_toolconfirmationrequired.py @@ -30,6 +30,7 @@ class EventTOOLCONFIRMATIONREQUIRED(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_types_suggested.py b/revengai/models/event_types_suggested.py index 056e922..7860c15 100644 --- a/revengai/models/event_types_suggested.py +++ b/revengai/models/event_types_suggested.py @@ -30,6 +30,7 @@ class EventTypesSuggested(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/event_warning.py b/revengai/models/event_warning.py index 69444ab..0473f41 100644 --- a/revengai/models/event_warning.py +++ b/revengai/models/event_warning.py @@ -30,6 +30,7 @@ class EventWarning(BaseModel): event: StrictStr = Field(description="The event name.") id: Optional[StrictInt] = Field(default=None, description="The event ID.") retry: Optional[StrictInt] = Field(default=None, description="The retry time in milliseconds.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event", "id", "retry"] @field_validator('event') @@ -69,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "retry": obj.get("retry") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/evidence_effect.py b/revengai/models/evidence_effect.py new file mode 100644 index 0000000..569a5a3 --- /dev/null +++ b/revengai/models/evidence_effect.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EvidenceEffect(str, Enum): + """ + EvidenceEffect + """ + + """ + allowed enum values + """ + SUPPORTS = 'supports' + REFUTES = 'refutes' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EvidenceEffect from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/evidence_strength.py b/revengai/models/evidence_strength.py new file mode 100644 index 0000000..7a81ef9 --- /dev/null +++ b/revengai/models/evidence_strength.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EvidenceStrength(str, Enum): + """ + EvidenceStrength + """ + + """ + allowed enum values + """ + DIRECT = 'direct' + INDIRECT = 'indirect' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EvidenceStrength from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/execution_call.py b/revengai/models/execution_call.py new file mode 100644 index 0000000..2cf2dd6 --- /dev/null +++ b/revengai/models/execution_call.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionCall(BaseModel): + """ + ExecutionCall + """ # noqa: E501 + callee_name: StrictStr = Field(description="Name of the called function") + category: StrictStr = Field(description="Execution category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Execution source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["callee_name", "category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callee_name": obj.get("callee_name"), + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_direct_match.py b/revengai/models/execution_direct_match.py new file mode 100644 index 0000000..bfc1519 --- /dev/null +++ b/revengai/models/execution_direct_match.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionDirectMatch(BaseModel): + """ + ExecutionDirectMatch + """ # noqa: E501 + category: StrictStr = Field(description="Execution category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Execution source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionDirectMatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionDirectMatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_explain_metadata.py b/revengai/models/execution_explain_metadata.py new file mode 100644 index 0000000..a5cb363 --- /dev/null +++ b/revengai/models/execution_explain_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionExplainMetadata(BaseModel): + """ + ExecutionExplainMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this function.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionExplainMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionExplainMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_explain_result.py b/revengai/models/execution_explain_result.py new file mode 100644 index 0000000..2d52918 --- /dev/null +++ b/revengai/models/execution_explain_result.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.execution_explained_function import ExecutionExplainedFunction +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionExplainResult(BaseModel): + """ + ExecutionExplainResult + """ # noqa: E501 + cancelled: StrictBool = Field(description="Whether the run was cancelled") + code_origin: Optional[StrictStr] = Field(default=None, description="Where the executed code originates from") + executed_targets: Optional[List[StrictStr]] = Field(default=None, description="Concrete targets that end up executed -- process names, module paths, or shellcode buffers") + function_id: StrictInt = Field(description="ID of the explained function") + function_name: Optional[StrictStr] = Field(default=None, description="Name of the explained function") + functions_involved: Optional[List[ExecutionExplainedFunction]] = Field(default=None, description="Other functions involved in the code execution") + purpose: Optional[StrictStr] = Field(default=None, description="Purpose of the code execution") + summary: Optional[StrictStr] = Field(default=None, description="Explanation of the code execution the function performs") + trigger: Optional[StrictStr] = Field(default=None, description="What triggers the execution") + what_executes: Optional[StrictStr] = Field(default=None, description="What code ends up executing") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cancelled", "code_origin", "executed_targets", "function_id", "function_name", "functions_involved", "purpose", "summary", "trigger", "what_executes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions_involved (list) + _items = [] + if self.functions_involved: + for _item_functions_involved in self.functions_involved: + if _item_functions_involved: + _items.append(_item_functions_involved.to_dict()) + _dict['functions_involved'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if executed_targets (nullable) is None + # and model_fields_set contains the field + if self.executed_targets is None and "executed_targets" in self.model_fields_set: + _dict['executed_targets'] = None + + # set to None if functions_involved (nullable) is None + # and model_fields_set contains the field + if self.functions_involved is None and "functions_involved" in self.model_fields_set: + _dict['functions_involved'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelled": obj.get("cancelled"), + "code_origin": obj.get("code_origin"), + "executed_targets": obj.get("executed_targets"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "functions_involved": [ExecutionExplainedFunction.from_dict(_item) for _item in obj["functions_involved"]] if obj.get("functions_involved") is not None else None, + "purpose": obj.get("purpose"), + "summary": obj.get("summary"), + "trigger": obj.get("trigger"), + "what_executes": obj.get("what_executes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_explained_function.py b/revengai/models/execution_explained_function.py new file mode 100644 index 0000000..cb650cb --- /dev/null +++ b/revengai/models/execution_explained_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionExplainedFunction(BaseModel): + """ + ExecutionExplainedFunction + """ # noqa: E501 + description: StrictStr = Field(description="Role this function plays in the code execution") + function_id: StrictInt = Field(description="ID of the function") + function_name: StrictStr = Field(description="Name of the function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionExplainedFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionExplainedFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_finding.py b/revengai/models/execution_finding.py new file mode 100644 index 0000000..cdfaad4 --- /dev/null +++ b/revengai/models/execution_finding.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.execution_call import ExecutionCall +from revengai.models.execution_direct_match import ExecutionDirectMatch +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionFinding(BaseModel): + """ + ExecutionFinding + """ # noqa: E501 + address: StrictStr = Field(description="Function's virtual address, hex-encoded") + categories: Optional[List[StrictStr]] = Field(description="Distinct execution categories evidenced by this function") + confidence: StrictStr = Field(description="High when a direct name match was found, medium when the function only calls into execution APIs") + direct_matches: Optional[List[ExecutionDirectMatch]] = Field(default=None, description="Matches against the function's own name") + evidence_count: StrictInt = Field(description="Total number of direct matches and execution calls") + executes: StrictBool = Field(description="Whether this function evidences executing code rather than only supporting it") + execution_calls: Optional[List[ExecutionCall]] = Field(default=None, description="Matches against names this function calls") + function_id: StrictInt = Field(description="ID of the function the finding was reported in") + function_name: StrictStr = Field(description="Name of the function the finding was reported in") + function_size: StrictInt = Field(description="Size of the function in bytes") + sources: Optional[List[StrictStr]] = Field(description="Distinct execution sources evidenced by this function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "categories", "confidence", "direct_matches", "evidence_count", "executes", "execution_calls", "function_id", "function_name", "function_size", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api')") + return value + + @field_validator('confidence') + def confidence_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['high', 'medium', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('high', 'medium', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionFinding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in direct_matches (list) + _items = [] + if self.direct_matches: + for _item_direct_matches in self.direct_matches: + if _item_direct_matches: + _items.append(_item_direct_matches.to_dict()) + _dict['direct_matches'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in execution_calls (list) + _items = [] + if self.execution_calls: + for _item_execution_calls in self.execution_calls: + if _item_execution_calls: + _items.append(_item_execution_calls.to_dict()) + _dict['execution_calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if direct_matches (nullable) is None + # and model_fields_set contains the field + if self.direct_matches is None and "direct_matches" in self.model_fields_set: + _dict['direct_matches'] = None + + # set to None if execution_calls (nullable) is None + # and model_fields_set contains the field + if self.execution_calls is None and "execution_calls" in self.model_fields_set: + _dict['execution_calls'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionFinding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "categories": obj.get("categories"), + "confidence": obj.get("confidence"), + "direct_matches": [ExecutionDirectMatch.from_dict(_item) for _item in obj["direct_matches"]] if obj.get("direct_matches") is not None else None, + "evidence_count": obj.get("evidence_count"), + "executes": obj.get("executes"), + "execution_calls": [ExecutionCall.from_dict(_item) for _item in obj["execution_calls"]] if obj.get("execution_calls") is not None else None, + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_size": obj.get("function_size"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_scan_metadata.py b/revengai/models/execution_scan_metadata.py new file mode 100644 index 0000000..d2524e3 --- /dev/null +++ b/revengai/models/execution_scan_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionScanMetadata(BaseModel): + """ + ExecutionScanMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this analysis.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionScanMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionScanMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/execution_scan_result.py b/revengai/models/execution_scan_result.py new file mode 100644 index 0000000..2bd8339 --- /dev/null +++ b/revengai/models/execution_scan_result.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.execution_finding import ExecutionFinding +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionScanResult(BaseModel): + """ + ExecutionScanResult + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis the run was performed against") + findings: Optional[List[ExecutionFinding]] = Field(default=None, description="Functions with execution-related evidence, sorted by whether they execute code, then confidence, then evidence count") + total_functions: StrictInt = Field(description="Functions the run considered") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_id", "findings", "total_functions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in findings (list) + _items = [] + if self.findings: + for _item_findings in self.findings: + if _item_findings: + _items.append(_item_findings.to_dict()) + _dict['findings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if findings (nullable) is None + # and model_fields_set contains the field + if self.findings is None and "findings" in self.model_fields_set: + _dict['findings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_id": obj.get("analysis_id"), + "findings": [ExecutionFinding.from_dict(_item) for _item in obj["findings"]] if obj.get("findings") is not None else None, + "total_functions": obj.get("total_functions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/export_model.py b/revengai/models/export_model.py index edf8cf2..99edf3c 100644 --- a/revengai/models/export_model.py +++ b/revengai/models/export_model.py @@ -27,6 +27,7 @@ class ExportModel(BaseModel): """ # noqa: E501 number_of_exports: StrictInt exports: List[Dict[str, StrictInt]] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["number_of_exports", "exports"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "number_of_exports": obj.get("number_of_exports"), "exports": obj.get("exports") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/external_response.py b/revengai/models/external_response.py index fe1d725..2aa43d1 100644 --- a/revengai/models/external_response.py +++ b/revengai/models/external_response.py @@ -29,6 +29,7 @@ class ExternalResponse(BaseModel): sha_256_hash: StrictStr data: Dict[str, Any] last_updated: datetime + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["sha_256_hash", "data", "last_updated"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -86,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "data": obj.get("data"), "last_updated": obj.get("last_updated") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/feedback_output_body.py b/revengai/models/feedback_output_body.py new file mode 100644 index 0000000..46bd19f --- /dev/null +++ b/revengai/models/feedback_output_body.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeedbackOutputBody(BaseModel): + """ + FeedbackOutputBody + """ # noqa: E501 + sentiment: Optional[StrictStr] = Field(description="The sentiment the caller recorded, or null when they have not left any") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sentiment"] + + @field_validator('sentiment') + def sentiment_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeedbackOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if sentiment (nullable) is None + # and model_fields_set contains the field + if self.sentiment is None and "sentiment" in self.model_fields_set: + _dict['sentiment'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeedbackOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sentiment": obj.get("sentiment") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/file_hashes.py b/revengai/models/file_hashes.py index a74d97f..4371c69 100644 --- a/revengai/models/file_hashes.py +++ b/revengai/models/file_hashes.py @@ -33,6 +33,7 @@ class FileHashes(BaseModel): sha3_256: Optional[StrictStr] sha3_384: Optional[StrictStr] sha3_512: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["md5", "sha1", "sha256", "sha512", "sha3_224", "sha3_256", "sha3_384", "sha3_512"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if md5 (nullable) is None # and model_fields_set contains the field if self.md5 is None and "md5" in self.model_fields_set: @@ -135,6 +143,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sha3_384": obj.get("sha3_384"), "sha3_512": obj.get("sha3_512") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/file_metadata.py b/revengai/models/file_metadata.py index 112b72f..116a472 100644 --- a/revengai/models/file_metadata.py +++ b/revengai/models/file_metadata.py @@ -30,6 +30,7 @@ class FileMetadata(BaseModel): friendly_size: StrictStr entropy: Union[StrictFloat, StrictInt] hashes: FileHashes + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["size", "friendly_size", "entropy", "hashes"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of hashes if self.hashes: _dict['hashes'] = self.hashes.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "entropy": obj.get("entropy"), "hashes": FileHashes.from_dict(obj["hashes"]) if obj.get("hashes") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/filesystem_analyse_metadata.py b/revengai/models/filesystem_analyse_metadata.py new file mode 100644 index 0000000..e2178ac --- /dev/null +++ b/revengai/models/filesystem_analyse_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemAnalyseMetadata(BaseModel): + """ + FilesystemAnalyseMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this function.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemAnalyseMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemAnalyseMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_analyse_result.py b/revengai/models/filesystem_analyse_result.py new file mode 100644 index 0000000..e737ca7 --- /dev/null +++ b/revengai/models/filesystem_analyse_result.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.filesystem_explained_function import FilesystemExplainedFunction +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemAnalyseResult(BaseModel): + """ + FilesystemAnalyseResult + """ # noqa: E501 + cancelled: StrictBool = Field(description="Whether the run was cancelled") + data_description: Optional[StrictStr] = Field(default=None, description="Description of the data read or written") + data_destination: Optional[StrictStr] = Field(default=None, description="Where the data ends up") + data_origin: Optional[StrictStr] = Field(default=None, description="Where the data originates from") + function_id: StrictInt = Field(description="ID of the explained function") + function_name: Optional[StrictStr] = Field(default=None, description="Name of the explained function") + functions_involved: Optional[List[FilesystemExplainedFunction]] = Field(default=None, description="Other functions involved in the filesystem access") + summary: Optional[StrictStr] = Field(default=None, description="Explanation of the filesystem access the function performs") + targets: Optional[List[StrictStr]] = Field(default=None, description="Concrete filesystem targets identified -- paths, registry keys, or environment variables") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cancelled", "data_description", "data_destination", "data_origin", "function_id", "function_name", "functions_involved", "summary", "targets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemAnalyseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions_involved (list) + _items = [] + if self.functions_involved: + for _item_functions_involved in self.functions_involved: + if _item_functions_involved: + _items.append(_item_functions_involved.to_dict()) + _dict['functions_involved'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if functions_involved (nullable) is None + # and model_fields_set contains the field + if self.functions_involved is None and "functions_involved" in self.model_fields_set: + _dict['functions_involved'] = None + + # set to None if targets (nullable) is None + # and model_fields_set contains the field + if self.targets is None and "targets" in self.model_fields_set: + _dict['targets'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemAnalyseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelled": obj.get("cancelled"), + "data_description": obj.get("data_description"), + "data_destination": obj.get("data_destination"), + "data_origin": obj.get("data_origin"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "functions_involved": [FilesystemExplainedFunction.from_dict(_item) for _item in obj["functions_involved"]] if obj.get("functions_involved") is not None else None, + "summary": obj.get("summary"), + "targets": obj.get("targets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_call.py b/revengai/models/filesystem_call.py new file mode 100644 index 0000000..8740f5c --- /dev/null +++ b/revengai/models/filesystem_call.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemCall(BaseModel): + """ + FilesystemCall + """ # noqa: E501 + callee_name: StrictStr = Field(description="Name of the called function") + category: StrictStr = Field(description="Filesystem category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Filesystem source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["callee_name", "category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callee_name": obj.get("callee_name"), + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_direct_match.py b/revengai/models/filesystem_direct_match.py new file mode 100644 index 0000000..e4f62a3 --- /dev/null +++ b/revengai/models/filesystem_direct_match.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemDirectMatch(BaseModel): + """ + FilesystemDirectMatch + """ # noqa: E501 + category: StrictStr = Field(description="Filesystem category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Filesystem source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemDirectMatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemDirectMatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_explained_function.py b/revengai/models/filesystem_explained_function.py new file mode 100644 index 0000000..6663810 --- /dev/null +++ b/revengai/models/filesystem_explained_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemExplainedFunction(BaseModel): + """ + FilesystemExplainedFunction + """ # noqa: E501 + description: StrictStr = Field(description="Role this function plays in the filesystem access") + function_id: StrictInt = Field(description="ID of the function") + function_name: StrictStr = Field(description="Name of the function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemExplainedFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemExplainedFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_finding.py b/revengai/models/filesystem_finding.py new file mode 100644 index 0000000..909f1d4 --- /dev/null +++ b/revengai/models/filesystem_finding.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.filesystem_call import FilesystemCall +from revengai.models.filesystem_direct_match import FilesystemDirectMatch +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemFinding(BaseModel): + """ + FilesystemFinding + """ # noqa: E501 + address: StrictStr = Field(description="Function's virtual address, hex-encoded") + categories: Optional[List[StrictStr]] = Field(description="Distinct filesystem categories evidenced by this function") + confidence: StrictStr = Field(description="High when a direct name match was found, medium when the function only calls into filesystem APIs") + direct_matches: Optional[List[FilesystemDirectMatch]] = Field(default=None, description="Matches against the function's own name") + evidence_count: StrictInt = Field(description="Total number of direct matches and filesystem calls") + filesystem_calls: Optional[List[FilesystemCall]] = Field(default=None, description="Matches against names this function calls") + function_id: StrictInt = Field(description="ID of the function the finding was reported in") + function_name: StrictStr = Field(description="Name of the function the finding was reported in") + function_size: StrictInt = Field(description="Size of the function in bytes") + modifies: StrictBool = Field(description="Whether this function evidences modifying the filesystem rather than only observing it") + sources: Optional[List[StrictStr]] = Field(description="Distinct filesystem sources evidenced by this function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "categories", "confidence", "direct_matches", "evidence_count", "filesystem_calls", "function_id", "function_name", "function_size", "modifies", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api')") + return value + + @field_validator('confidence') + def confidence_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['high', 'medium', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('high', 'medium', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemFinding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in direct_matches (list) + _items = [] + if self.direct_matches: + for _item_direct_matches in self.direct_matches: + if _item_direct_matches: + _items.append(_item_direct_matches.to_dict()) + _dict['direct_matches'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filesystem_calls (list) + _items = [] + if self.filesystem_calls: + for _item_filesystem_calls in self.filesystem_calls: + if _item_filesystem_calls: + _items.append(_item_filesystem_calls.to_dict()) + _dict['filesystem_calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if direct_matches (nullable) is None + # and model_fields_set contains the field + if self.direct_matches is None and "direct_matches" in self.model_fields_set: + _dict['direct_matches'] = None + + # set to None if filesystem_calls (nullable) is None + # and model_fields_set contains the field + if self.filesystem_calls is None and "filesystem_calls" in self.model_fields_set: + _dict['filesystem_calls'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemFinding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "categories": obj.get("categories"), + "confidence": obj.get("confidence"), + "direct_matches": [FilesystemDirectMatch.from_dict(_item) for _item in obj["direct_matches"]] if obj.get("direct_matches") is not None else None, + "evidence_count": obj.get("evidence_count"), + "filesystem_calls": [FilesystemCall.from_dict(_item) for _item in obj["filesystem_calls"]] if obj.get("filesystem_calls") is not None else None, + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_size": obj.get("function_size"), + "modifies": obj.get("modifies"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_scan_metadata.py b/revengai/models/filesystem_scan_metadata.py new file mode 100644 index 0000000..31cd9e9 --- /dev/null +++ b/revengai/models/filesystem_scan_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemScanMetadata(BaseModel): + """ + FilesystemScanMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this analysis.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemScanMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemScanMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/filesystem_scan_result.py b/revengai/models/filesystem_scan_result.py new file mode 100644 index 0000000..483f757 --- /dev/null +++ b/revengai/models/filesystem_scan_result.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.filesystem_finding import FilesystemFinding +from typing import Optional, Set +from typing_extensions import Self + +class FilesystemScanResult(BaseModel): + """ + FilesystemScanResult + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis the run was performed against") + findings: Optional[List[FilesystemFinding]] = Field(default=None, description="Functions with filesystem-related evidence, sorted by whether they modify the filesystem, then confidence, then evidence count") + total_functions: StrictInt = Field(description="Functions the run considered") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_id", "findings", "total_functions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilesystemScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in findings (list) + _items = [] + if self.findings: + for _item_findings in self.findings: + if _item_findings: + _items.append(_item_findings.to_dict()) + _dict['findings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if findings (nullable) is None + # and model_fields_set contains the field + if self.findings is None and "findings" in self.model_fields_set: + _dict['findings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilesystemScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_id": obj.get("analysis_id"), + "findings": [FilesystemFinding.from_dict(_item) for _item in obj["findings"]] if obj.get("findings") is not None else None, + "total_functions": obj.get("total_functions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/finding.py b/revengai/models/finding.py new file mode 100644 index 0000000..384dd12 --- /dev/null +++ b/revengai/models/finding.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.finding_evidence_inner import FindingEvidenceInner +from revengai.models.report_reachability_status import ReportReachabilityStatus +from typing import Optional, Set +from typing_extensions import Self + +class Finding(BaseModel): + """ + Finding + """ # noqa: E501 + property_id: Optional[StrictStr] = '' + reachability: Optional[ReportReachabilityStatus] = None + evidence: Optional[List[FindingEvidenceInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["property_id", "reachability", "evidence"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Finding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in evidence (list) + _items = [] + if self.evidence: + for _item_evidence in self.evidence: + if _item_evidence: + _items.append(_item_evidence.to_dict()) + _dict['evidence'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Finding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "property_id": obj.get("property_id") if obj.get("property_id") is not None else '', + "reachability": obj.get("reachability"), + "evidence": [FindingEvidenceInner.from_dict(_item) for _item in obj["evidence"]] if obj.get("evidence") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/finding_evidence_inner.py b/revengai/models/finding_evidence_inner.py new file mode 100644 index 0000000..0dcbe1a --- /dev/null +++ b/revengai/models/finding_evidence_inner.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from revengai.models.api_combination_evidence import ApiCombinationEvidence +from revengai.models.call_chain_evidence import CallChainEvidence +from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence +from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence +from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence +from revengai.models.imported_api_call_evidence import ImportedApiCallEvidence +from revengai.models.known_constant_evidence import KnownConstantEvidence +from revengai.models.model_interpretation_evidence import ModelInterpretationEvidence +from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence +from revengai.models.suspicious_string_evidence import SuspiciousStringEvidence +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +FINDINGEVIDENCEINNER_ONE_OF_SCHEMAS = ["ApiCombinationEvidence", "CallChainEvidence", "DecompilerSummaryEvidence", "FunctionSimilarityEvidence", "HardcodedSecretEvidence", "ImportedApiCallEvidence", "KnownConstantEvidence", "ModelInterpretationEvidence", "ReferencedConstantEvidence", "SuspiciousStringEvidence"] + +class FindingEvidenceInner(BaseModel): + """ + FindingEvidenceInner + """ + # data type: CallChainEvidence + oneof_schema_1_validator: Optional[CallChainEvidence] = None + # data type: ReferencedConstantEvidence + oneof_schema_2_validator: Optional[ReferencedConstantEvidence] = None + # data type: ImportedApiCallEvidence + oneof_schema_3_validator: Optional[ImportedApiCallEvidence] = None + # data type: SuspiciousStringEvidence + oneof_schema_4_validator: Optional[SuspiciousStringEvidence] = None + # data type: FunctionSimilarityEvidence + oneof_schema_5_validator: Optional[FunctionSimilarityEvidence] = None + # data type: ApiCombinationEvidence + oneof_schema_6_validator: Optional[ApiCombinationEvidence] = None + # data type: DecompilerSummaryEvidence + oneof_schema_7_validator: Optional[DecompilerSummaryEvidence] = None + # data type: ModelInterpretationEvidence + oneof_schema_8_validator: Optional[ModelInterpretationEvidence] = None + # data type: KnownConstantEvidence + oneof_schema_9_validator: Optional[KnownConstantEvidence] = None + # data type: HardcodedSecretEvidence + oneof_schema_10_validator: Optional[HardcodedSecretEvidence] = None + actual_instance: Optional[Union[ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence]] = None + one_of_schemas: Set[str] = { "ApiCombinationEvidence", "CallChainEvidence", "DecompilerSummaryEvidence", "FunctionSimilarityEvidence", "HardcodedSecretEvidence", "ImportedApiCallEvidence", "KnownConstantEvidence", "ModelInterpretationEvidence", "ReferencedConstantEvidence", "SuspiciousStringEvidence" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = FindingEvidenceInner.model_construct() + error_messages = [] + match = 0 + # validate data type: CallChainEvidence + if not isinstance(v, CallChainEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `CallChainEvidence`") + else: + match += 1 + # validate data type: ReferencedConstantEvidence + if not isinstance(v, ReferencedConstantEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReferencedConstantEvidence`") + else: + match += 1 + # validate data type: ImportedApiCallEvidence + if not isinstance(v, ImportedApiCallEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `ImportedApiCallEvidence`") + else: + match += 1 + # validate data type: SuspiciousStringEvidence + if not isinstance(v, SuspiciousStringEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `SuspiciousStringEvidence`") + else: + match += 1 + # validate data type: FunctionSimilarityEvidence + if not isinstance(v, FunctionSimilarityEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionSimilarityEvidence`") + else: + match += 1 + # validate data type: ApiCombinationEvidence + if not isinstance(v, ApiCombinationEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApiCombinationEvidence`") + else: + match += 1 + # validate data type: DecompilerSummaryEvidence + if not isinstance(v, DecompilerSummaryEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `DecompilerSummaryEvidence`") + else: + match += 1 + # validate data type: ModelInterpretationEvidence + if not isinstance(v, ModelInterpretationEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `ModelInterpretationEvidence`") + else: + match += 1 + # validate data type: KnownConstantEvidence + if not isinstance(v, KnownConstantEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `KnownConstantEvidence`") + else: + match += 1 + # validate data type: HardcodedSecretEvidence + if not isinstance(v, HardcodedSecretEvidence): + error_messages.append(f"Error! Input type `{type(v)}` is not `HardcodedSecretEvidence`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in FindingEvidenceInner with oneOf schemas: ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in FindingEvidenceInner with oneOf schemas: ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CallChainEvidence + try: + instance.actual_instance = CallChainEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReferencedConstantEvidence + try: + instance.actual_instance = ReferencedConstantEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ImportedApiCallEvidence + try: + instance.actual_instance = ImportedApiCallEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SuspiciousStringEvidence + try: + instance.actual_instance = SuspiciousStringEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionSimilarityEvidence + try: + instance.actual_instance = FunctionSimilarityEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApiCombinationEvidence + try: + instance.actual_instance = ApiCombinationEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DecompilerSummaryEvidence + try: + instance.actual_instance = DecompilerSummaryEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ModelInterpretationEvidence + try: + instance.actual_instance = ModelInterpretationEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into KnownConstantEvidence + try: + instance.actual_instance = KnownConstantEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into HardcodedSecretEvidence + try: + instance.actual_instance = HardcodedSecretEvidence.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into FindingEvidenceInner with oneOf schemas: ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into FindingEvidenceInner with oneOf schemas: ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApiCombinationEvidence, CallChainEvidence, DecompilerSummaryEvidence, FunctionSimilarityEvidence, HardcodedSecretEvidence, ImportedApiCallEvidence, KnownConstantEvidence, ModelInterpretationEvidence, ReferencedConstantEvidence, SuspiciousStringEvidence]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/revengai/models/function_block_destination_response.py b/revengai/models/function_block_destination_response.py index 97010c1..2100fce 100644 --- a/revengai/models/function_block_destination_response.py +++ b/revengai/models/function_block_destination_response.py @@ -28,6 +28,7 @@ class FunctionBlockDestinationResponse(BaseModel): destination_block_id: Optional[StrictInt] flowtype: StrictStr = Field(description="The type of execution flow between chunks") vaddr: StrictStr = Field(description="The vaddr of the destination where the execution flow continues from") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination_block_id", "flowtype", "vaddr"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if destination_block_id (nullable) is None # and model_fields_set contains the field if self.destination_block_id is None and "destination_block_id" in self.model_fields_set: @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "flowtype": obj.get("flowtype"), "vaddr": obj.get("vaddr") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_block_response.py b/revengai/models/function_block_response.py index cda2f5f..b0bed2a 100644 --- a/revengai/models/function_block_response.py +++ b/revengai/models/function_block_response.py @@ -32,6 +32,7 @@ class FunctionBlockResponse(BaseModel): max_addr: StrictInt = Field(description="The maximum vaddr of the block") destinations: List[FunctionBlockDestinationResponse] = Field(description="The potential execution flow destinations from this block") comment: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["asm", "id", "min_addr", "max_addr", "destinations", "comment"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -80,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_destinations: _items.append(_item_destinations.to_dict()) _dict['destinations'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if comment (nullable) is None # and model_fields_set contains the field if self.comment is None and "comment" in self.model_fields_set: @@ -104,6 +112,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "destinations": [FunctionBlockDestinationResponse.from_dict(_item) for _item in obj["destinations"]] if obj.get("destinations") is not None else None, "comment": obj.get("comment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_blocks_response.py b/revengai/models/function_blocks_response.py index a1bf01c..b0cf89c 100644 --- a/revengai/models/function_blocks_response.py +++ b/revengai/models/function_blocks_response.py @@ -32,6 +32,7 @@ class FunctionBlocksResponse(BaseModel): local_variables: List[FunctionLocalVariableResponse] = Field(description="Local variables associated with this function") params: List[FunctionParamResponse] = Field(description="Params associated with this function") overview_comment: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["blocks", "local_variables", "params", "overview_comment"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -94,6 +97,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_params: _items.append(_item_params.to_dict()) _dict['params'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if overview_comment (nullable) is None # and model_fields_set contains the field if self.overview_comment is None and "overview_comment" in self.model_fields_set: @@ -116,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "params": [FunctionParamResponse.from_dict(_item) for _item in obj["params"]] if obj.get("params") is not None else None, "overview_comment": obj.get("overview_comment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_boundary.py b/revengai/models/function_boundary.py index 2c66b7d..91d25eb 100644 --- a/revengai/models/function_boundary.py +++ b/revengai/models/function_boundary.py @@ -16,8 +16,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -25,11 +26,12 @@ class FunctionBoundary(BaseModel): """ FunctionBoundary """ # noqa: E501 - mangled_name: StrictStr - start_address: StrictInt - end_address: StrictInt + end_address: Annotated[int, Field(strict=True, ge=0)] include_in_analysis: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["mangled_name", "start_address", "end_address", "include_in_analysis"] + mangled_name: Annotated[str, Field(min_length=1, strict=True, max_length=4096)] + start_address: Annotated[int, Field(strict=True, ge=0)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["end_address", "include_in_analysis", "mangled_name", "start_address"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if include_in_analysis (nullable) is None - # and model_fields_set contains the field - if self.include_in_analysis is None and "include_in_analysis" in self.model_fields_set: - _dict['include_in_analysis'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -87,11 +91,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "mangled_name": obj.get("mangled_name"), - "start_address": obj.get("start_address"), "end_address": obj.get("end_address"), - "include_in_analysis": obj.get("include_in_analysis") + "include_in_analysis": obj.get("include_in_analysis"), + "mangled_name": obj.get("mangled_name"), + "start_address": obj.get("start_address") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_capability_response.py b/revengai/models/function_capability_response.py index d3e2e22..d646dff 100644 --- a/revengai/models/function_capability_response.py +++ b/revengai/models/function_capability_response.py @@ -26,6 +26,7 @@ class FunctionCapabilityResponse(BaseModel): FunctionCapabilityResponse """ # noqa: E501 capabilities: List[StrictStr] = Field(description="The capabilities of the function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["capabilities"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "capabilities": obj.get("capabilities") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_list_item.py b/revengai/models/function_list_item.py index 8f130ff..23f13ea 100644 --- a/revengai/models/function_list_item.py +++ b/revengai/models/function_list_item.py @@ -34,6 +34,7 @@ class FunctionListItem(BaseModel): vaddr: StrictInt = Field(description="Function virtual address") size: StrictInt = Field(description="Function size in bytes") debug: StrictBool = Field(description="Whether the function has debug information") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "name_source_type", "name_source", "mangled_name", "vaddr", "size", "debug"] @field_validator('name_source_type') @@ -73,8 +74,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -85,6 +88,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of name_source if self.name_source: _dict['name_source'] = self.name_source.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -106,6 +114,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "size": obj.get("size"), "debug": obj.get("debug") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_local_variable_response.py b/revengai/models/function_local_variable_response.py index bbe598a..ad00454 100644 --- a/revengai/models/function_local_variable_response.py +++ b/revengai/models/function_local_variable_response.py @@ -30,6 +30,7 @@ class FunctionLocalVariableResponse(BaseModel): size: StrictInt loc: StrictStr name: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["address", "d_type", "size", "loc", "name"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loc": obj.get("loc"), "name": obj.get("name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_mapping.py b/revengai/models/function_mapping.py index 9315bf2..5f81125 100644 --- a/revengai/models/function_mapping.py +++ b/revengai/models/function_mapping.py @@ -28,6 +28,7 @@ class FunctionMapping(BaseModel): function_map: Dict[str, StrictInt] = Field(description="Mapping of remote function ids to local function addresses") inverse_function_map: Dict[str, StrictInt] = Field(description="Mapping of local function addresses to remote function ids") name_map: Dict[str, StrictStr] = Field(description="Mapping of local function addresses to mangled names") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_map", "inverse_function_map", "name_map"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "inverse_function_map": obj.get("inverse_function_map"), "name_map": obj.get("name_map") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_name_history.py b/revengai/models/function_name_history.py index e8d2ae6..0a63711 100644 --- a/revengai/models/function_name_history.py +++ b/revengai/models/function_name_history.py @@ -33,6 +33,7 @@ class FunctionNameHistory(BaseModel): is_debug: StrictBool = Field(description="Whether the function is debugged") source_type: FunctionSourceType = Field(description="The source type of the function") created_at: StrictStr = Field(description="The timestamp when the function name was created") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["history_id", "change_made_by", "function_name", "mangled_name", "is_debug", "source_type", "created_at"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_type": obj.get("source_type"), "created_at": obj.get("created_at") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_param_response.py b/revengai/models/function_param_response.py index a3ae7f5..e98bdd2 100644 --- a/revengai/models/function_param_response.py +++ b/revengai/models/function_param_response.py @@ -30,6 +30,7 @@ class FunctionParamResponse(BaseModel): addr: StrictStr length: StrictInt name: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["d_type", "loc", "addr", "length", "name"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "length": obj.get("length"), "name": obj.get("name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_rename.py b/revengai/models/function_rename.py index 6789c14..c506bd7 100644 --- a/revengai/models/function_rename.py +++ b/revengai/models/function_rename.py @@ -29,6 +29,7 @@ class FunctionRename(BaseModel): new_name: StrictStr = Field(description="The new name for the function") new_mangled_name: StrictStr = Field(description="The new mangled name for the function") source_type: Optional[FunctionSourceType] = Field(default=None, description="The source that triggered the rename") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["new_name", "new_mangled_name", "source_type"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -86,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "new_mangled_name": obj.get("new_mangled_name"), "source_type": obj.get("source_type") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_rename_map.py b/revengai/models/function_rename_map.py index 17bc4ec..a263f34 100644 --- a/revengai/models/function_rename_map.py +++ b/revengai/models/function_rename_map.py @@ -28,6 +28,7 @@ class FunctionRenameMap(BaseModel): function_id: StrictInt = Field(description="The ID of the function to rename") new_name: StrictStr = Field(description="The new name for the function") new_mangled_name: StrictStr = Field(description="The new mangled name for the function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "new_name", "new_mangled_name"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "new_name": obj.get("new_name"), "new_mangled_name": obj.get("new_mangled_name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_search_response.py b/revengai/models/function_search_response.py index e71891d..2f5daf6 100644 --- a/revengai/models/function_search_response.py +++ b/revengai/models/function_search_response.py @@ -27,6 +27,7 @@ class FunctionSearchResponse(BaseModel): FunctionSearchResponse """ # noqa: E501 results: List[FunctionSearchResult] = Field(description="The results of the search") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [FunctionSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_search_result.py b/revengai/models/function_search_result.py index 154b18d..36fef8c 100644 --- a/revengai/models/function_search_result.py +++ b/revengai/models/function_search_result.py @@ -33,6 +33,7 @@ class FunctionSearchResult(BaseModel): model_id: StrictInt = Field(description="The model ID used to analyze the binary the function belongs to") model_name: StrictStr = Field(description="The name of the model used to analyze the binary the function belongs to") owned_by: StrictStr = Field(description="The owner of the binary the function belongs to") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_name", "binary_name", "created_at", "model_id", "model_name", "owned_by"] model_config = ConfigDict( @@ -65,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "model_name": obj.get("model_name"), "owned_by": obj.get("owned_by") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_similarity.py b/revengai/models/function_similarity.py new file mode 100644 index 0000000..d6c0e6c --- /dev/null +++ b/revengai/models/function_similarity.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from revengai.models.subject import Subject +from typing import Optional, Set +from typing_extensions import Self + +class FunctionSimilarity(BaseModel): + """ + FunctionSimilarity + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] + similarity: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] + subject: Subject + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "similarity", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FunctionSimilarity from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of subject + if self.subject: + _dict['subject'] = self.subject.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionSimilarity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "similarity": obj.get("similarity"), + "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/function_similarity_evidence.py b/revengai/models/function_similarity_evidence.py new file mode 100644 index 0000000..f32fa2f --- /dev/null +++ b/revengai/models/function_similarity_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.function_similarity import FunctionSimilarity +from typing import Optional, Set +from typing_extensions import Self + +class FunctionSimilarityEvidence(BaseModel): + """ + Function-similarity results suggestive of a capability. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'function_similarity' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'indirect' + similarities: Annotated[List[FunctionSimilarity], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "similarities"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['function_similarity', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('function_similarity', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['indirect', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('indirect', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FunctionSimilarityEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in similarities (list) + _items = [] + if self.similarities: + for _item_similarities in self.similarities: + if _item_similarities: + _items.append(_item_similarities.to_dict()) + _dict['similarities'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionSimilarityEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'function_similarity', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'indirect', + "similarities": [FunctionSimilarity.from_dict(_item) for _item in obj["similarities"]] if obj.get("similarities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/function_string.py b/revengai/models/function_string.py index ab8f451..7df23ed 100644 --- a/revengai/models/function_string.py +++ b/revengai/models/function_string.py @@ -29,6 +29,7 @@ class FunctionString(BaseModel): value: StrictStr = Field(description="The value of the string literal") vaddr: StrictInt = Field(description="The vaddr of the string value") source: Optional[StringSource] = Field(default=None, description="The source of the string") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -86,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "vaddr": obj.get("vaddr"), "source": obj.get("source") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/function_strings_response.py b/revengai/models/function_strings_response.py index a2e490d..fd4715f 100644 --- a/revengai/models/function_strings_response.py +++ b/revengai/models/function_strings_response.py @@ -28,6 +28,7 @@ class FunctionStringsResponse(BaseModel): """ # noqa: E501 strings: List[FunctionString] = Field(description="The strings associated with this function") total_strings: StrictInt = Field(description="The total number of strings associated with this function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["strings", "total_strings"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_strings: _items.append(_item_strings.to_dict()) _dict['strings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "strings": [FunctionString.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, "total_strings": obj.get("total_strings") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/functions_detail_response.py b/revengai/models/functions_detail_response.py index f9ec67c..f636f8d 100644 --- a/revengai/models/functions_detail_response.py +++ b/revengai/models/functions_detail_response.py @@ -36,6 +36,7 @@ class FunctionsDetailResponse(BaseModel): sha_256_hash: StrictStr debug_hash: Optional[StrictStr] debug: StrictBool + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_name_mangled", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "debug"] model_config = ConfigDict( @@ -68,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if debug_hash (nullable) is None # and model_fields_set contains the field if self.debug_hash is None and "debug_hash" in self.model_fields_set: @@ -106,6 +114,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "debug_hash": obj.get("debug_hash"), "debug": obj.get("debug") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/functions_list_rename.py b/revengai/models/functions_list_rename.py index 50cbc90..1bca250 100644 --- a/revengai/models/functions_list_rename.py +++ b/revengai/models/functions_list_rename.py @@ -27,6 +27,7 @@ class FunctionsListRename(BaseModel): FunctionsListRename """ # noqa: E501 functions: List[FunctionRenameMap] = Field(description="A list of functions to rename") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_functions: _items.append(_item_functions.to_dict()) _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "functions": [FunctionRenameMap.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/get_ai_decompilation_rating_response.py b/revengai/models/get_ai_decompilation_rating_response.py index 726ef80..e572007 100644 --- a/revengai/models/get_ai_decompilation_rating_response.py +++ b/revengai/models/get_ai_decompilation_rating_response.py @@ -28,6 +28,7 @@ class GetAiDecompilationRatingResponse(BaseModel): """ # noqa: E501 rating: AiDecompilationRating = Field(description="The rating the user has given to the AI decompilation response") reason: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["rating", "reason"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "rating": obj.get("rating"), "reason": obj.get("reason") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/get_public_user_response.py b/revengai/models/get_public_user_response.py index 4c9e688..ac55c2f 100644 --- a/revengai/models/get_public_user_response.py +++ b/revengai/models/get_public_user_response.py @@ -27,6 +27,7 @@ class GetPublicUserResponse(BaseModel): """ # noqa: E501 username: StrictStr user_id: StrictInt + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["username", "user_id"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "username": obj.get("username"), "user_id": obj.get("user_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/hardcoded_secret_evidence.py b/revengai/models/hardcoded_secret_evidence.py new file mode 100644 index 0000000..0b01453 --- /dev/null +++ b/revengai/models/hardcoded_secret_evidence.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from revengai.models.evidence_strength import EvidenceStrength +from revengai.models.rule_kind import RuleKind +from typing import Optional, Set +from typing_extensions import Self + +class HardcodedSecretEvidence(BaseModel): + """ + A hard-coded secret identified in the binary's data. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'hardcoded_secret' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: Optional[StrictStr] = 'supports' + strength: EvidenceStrength + rule_id: Annotated[str, Field(min_length=1, strict=True)] + description: Annotated[str, Field(min_length=1, strict=True)] + secret_kind: RuleKind + secret: Annotated[str, Field(min_length=1, strict=True)] + entropy: Union[Annotated[float, Field(le=8, strict=True, ge=0)], Annotated[int, Field(le=8, strict=True, ge=0)]] + size: Annotated[int, Field(strict=True, ge=1)] + references: Annotated[List[StrictInt], Field(min_length=1, max_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "rule_id", "description", "secret_kind", "secret", "entropy", "size", "references"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['hardcoded_secret', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('hardcoded_secret', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('effect') + def effect_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['supports', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('supports', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HardcodedSecretEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HardcodedSecretEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'hardcoded_secret', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect") if obj.get("effect") is not None else 'supports', + "strength": obj.get("strength"), + "rule_id": obj.get("rule_id"), + "description": obj.get("description"), + "secret_kind": obj.get("secret_kind"), + "secret": obj.get("secret"), + "entropy": obj.get("entropy"), + "size": obj.get("size"), + "references": obj.get("references") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/icon_model.py b/revengai/models/icon_model.py index 5c6058c..6ca5125 100644 --- a/revengai/models/icon_model.py +++ b/revengai/models/icon_model.py @@ -26,6 +26,7 @@ class IconModel(BaseModel): IconModel """ # noqa: E501 content: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["content"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if content (nullable) is None # and model_fields_set contains the field if self.content is None and "content" in self.model_fields_set: @@ -86,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": obj.get("content") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/import_model.py b/revengai/models/import_model.py index bf4c061..ed2e4b9 100644 --- a/revengai/models/import_model.py +++ b/revengai/models/import_model.py @@ -27,6 +27,7 @@ class ImportModel(BaseModel): """ # noqa: E501 number_of_imports: StrictInt imports: List[Dict[str, Dict[str, StrictInt]]] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["number_of_imports", "imports"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "number_of_imports": obj.get("number_of_imports"), "imports": obj.get("imports") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/imported_api.py b/revengai/models/imported_api.py new file mode 100644 index 0000000..45517aa --- /dev/null +++ b/revengai/models/imported_api.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ImportedApi(BaseModel): + """ + ImportedApi + """ # noqa: E501 + module: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + api: Annotated[str, Field(min_length=1, strict=True)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["module", "api"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImportedApi from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if module (nullable) is None + # and model_fields_set contains the field + if self.module is None and "module" in self.model_fields_set: + _dict['module'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImportedApi from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "module": obj.get("module"), + "api": obj.get("api") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/imported_api_call.py b/revengai/models/imported_api_call.py new file mode 100644 index 0000000..3bd85b4 --- /dev/null +++ b/revengai/models/imported_api_call.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.call_chain import CallChain +from revengai.models.imported_api import ImportedApi +from revengai.models.subject import Subject +from typing import Optional, Set +from typing_extensions import Self + +class ImportedApiCall(BaseModel): + """ + ImportedApiCall + """ # noqa: E501 + imported_api: ImportedApi + subject: Subject + reachability: Optional[CallChain] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imported_api", "subject", "reachability"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImportedApiCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of imported_api + if self.imported_api: + _dict['imported_api'] = self.imported_api.to_dict() + # override the default output from pydantic by calling `to_dict()` of subject + if self.subject: + _dict['subject'] = self.subject.to_dict() + # override the default output from pydantic by calling `to_dict()` of reachability + if self.reachability: + _dict['reachability'] = self.reachability.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if reachability (nullable) is None + # and model_fields_set contains the field + if self.reachability is None and "reachability" in self.model_fields_set: + _dict['reachability'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImportedApiCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imported_api": ImportedApi.from_dict(obj["imported_api"]) if obj.get("imported_api") is not None else None, + "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, + "reachability": CallChain.from_dict(obj["reachability"]) if obj.get("reachability") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/imported_api_call_evidence.py b/revengai/models/imported_api_call_evidence.py new file mode 100644 index 0000000..af92a3f --- /dev/null +++ b/revengai/models/imported_api_call_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.imported_api_call import ImportedApiCall +from typing import Optional, Set +from typing_extensions import Self + +class ImportedApiCallEvidence(BaseModel): + """ + Imported API calls observed in the program. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'imported_api_call' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'direct' + calls: Annotated[List[ImportedApiCall], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "calls"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['imported_api_call', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('imported_api_call', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['direct', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('direct', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImportedApiCallEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in calls (list) + _items = [] + if self.calls: + for _item_calls in self.calls: + if _item_calls: + _items.append(_item_calls.to_dict()) + _dict['calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImportedApiCallEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'imported_api_call', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'direct', + "calls": [ImportedApiCall.from_dict(_item) for _item in obj["calls"]] if obj.get("calls") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/insert_analysis_log_request.py b/revengai/models/insert_analysis_log_request.py index 501d787..abc9e1e 100644 --- a/revengai/models/insert_analysis_log_request.py +++ b/revengai/models/insert_analysis_log_request.py @@ -27,6 +27,7 @@ class InsertAnalysisLogRequest(BaseModel): InsertAnalysisLogRequest """ # noqa: E501 log: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The log message to insert for the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["log"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -82,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "log": obj.get("log") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/ioc.py b/revengai/models/ioc.py index c08dcec..a0d7c5e 100644 --- a/revengai/models/ioc.py +++ b/revengai/models/ioc.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -25,20 +25,14 @@ class IOC(BaseModel): """ IOC """ # noqa: E501 - type: StrictStr = Field(description="Type of the IOC") - value: StrictStr = Field(description="Value of the IOC") - description: StrictStr = Field(description="Description of the IOC") - source: Optional[StrictStr] = None - function_id: Optional[StrictInt] = None - function_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["type", "value", "description", "source", "function_id", "function_name"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['ip', 'domain', 'url', 'usernames', 'passwords', 'file_hash', 'mutex', 'registry_key', 'filename', 'email', 'c2_endpoint', 'user_agent', 'pem_key', 'ssh_key', 'network_port', 'ja3', 'ssl_cert_fingerprint', 'http_header', 'service', 'scheduled_task', 'pe_header', 'entropy', 'other', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ip', 'domain', 'url', 'usernames', 'passwords', 'file_hash', 'mutex', 'registry_key', 'filename', 'email', 'c2_endpoint', 'user_agent', 'pem_key', 'ssh_key', 'network_port', 'ja3', 'ssl_cert_fingerprint', 'http_header', 'service', 'scheduled_task', 'pe_header', 'entropy', 'other', 'unknown_default_open_api')") - return value + description: StrictStr = Field(description="What the indicator means") + function_id: Optional[StrictInt] = Field(description="ID of the function it was found in. Null when the source does not resolve to one.") + function_name: Optional[StrictStr] = Field(description="Name of the function it was found in. Null when the source does not resolve to one.") + source: Optional[StrictStr] = Field(description="Where in the binary it was found, usually a hex address. Null when the agent did not report one.") + type: StrictStr = Field(description="Indicator type") + value: StrictStr = Field(description="The indicator itself") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name", "source", "type", "value"] model_config = ConfigDict( populate_by_name=True, @@ -70,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,10 +75,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if source (nullable) is None - # and model_fields_set contains the field - if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value # set to None if function_id (nullable) is None # and model_fields_set contains the field @@ -94,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: if self.function_name is None and "function_name" in self.model_fields_set: _dict['function_name'] = None + # set to None if source (nullable) is None + # and model_fields_set contains the field + if self.source is None and "source" in self.model_fields_set: + _dict['source'] = None + return _dict @classmethod @@ -106,13 +107,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), - "value": obj.get("value"), "description": obj.get("description"), - "source": obj.get("source"), "function_id": obj.get("function_id"), - "function_name": obj.get("function_name") + "function_name": obj.get("function_name"), + "source": obj.get("source"), + "type": obj.get("type"), + "value": obj.get("value") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/known_constant_evidence.py b/revengai/models/known_constant_evidence.py new file mode 100644 index 0000000..8b87807 --- /dev/null +++ b/revengai/models/known_constant_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.bytes_constant import BytesConstant +from revengai.models.evidence_effect import EvidenceEffect +from typing import Optional, Set +from typing_extensions import Self + +class KnownConstantEvidence(BaseModel): + """ + A known constant whose semantic use has not been demonstrated. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'known_constant' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'indirect' + values: Annotated[List[BytesConstant], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "values"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['known_constant', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('known_constant', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['indirect', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('indirect', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KnownConstantEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in values (list) + _items = [] + if self.values: + for _item_values in self.values: + if _item_values: + _items.append(_item_values.to_dict()) + _dict['values'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KnownConstantEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'known_constant', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'indirect', + "values": [BytesConstant.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/list_collection_results.py b/revengai/models/list_collection_results.py index c7398de..57e2cb9 100644 --- a/revengai/models/list_collection_results.py +++ b/revengai/models/list_collection_results.py @@ -27,6 +27,7 @@ class ListCollectionResults(BaseModel): ListCollectionResults """ # noqa: E501 results: List[CollectionListItem] = Field(description="Page containing the results of the collections search") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [CollectionListItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/logs.py b/revengai/models/logs.py index d490f25..94f5e4f 100644 --- a/revengai/models/logs.py +++ b/revengai/models/logs.py @@ -26,6 +26,7 @@ class Logs(BaseModel): Logs """ # noqa: E501 logs: StrictStr = Field(description="Full logs of an analysis of an analysis_id") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["logs"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "logs": obj.get("logs") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/meta.py b/revengai/models/meta.py new file mode 100644 index 0000000..629d94d --- /dev/null +++ b/revengai/models/meta.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.endianness import Endianness +from typing import Optional, Set +from typing_extensions import Self + +class Meta(BaseModel): + """ + Meta + """ # noqa: E501 + endianness: Optional[Endianness] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["endianness"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Meta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Meta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endianness": obj.get("endianness") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/meta_model.py b/revengai/models/meta_model.py index 46a00fb..73a11ef 100644 --- a/revengai/models/meta_model.py +++ b/revengai/models/meta_model.py @@ -27,6 +27,7 @@ class MetaModel(BaseModel): MetaModel """ # noqa: E501 pagination: Optional[PaginationModel] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["pagination"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of pagination if self.pagination: _dict['pagination'] = self.pagination.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if pagination (nullable) is None # and model_fields_set contains the field if self.pagination is None and "pagination" in self.model_fields_set: @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "pagination": PaginationModel.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/metadata.py b/revengai/models/metadata.py new file mode 100644 index 0000000..8083551 --- /dev/null +++ b/revengai/models/metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Metadata(BaseModel): + """ + Metadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(description="Progress messages the run recorded, oldest first, empty until the run logs anything. Each entry is a [timestamp, message] pair.") + status: StrictStr = Field(description="Run status. UNINITIALISED means this agent has never been triggered for the analysis, so it is safe to start one.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Metadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Metadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/mitre_technique.py b/revengai/models/mitre_technique.py index 7595af3..639c07c 100644 --- a/revengai/models/mitre_technique.py +++ b/revengai/models/mitre_technique.py @@ -35,6 +35,7 @@ class MITRETechnique(BaseModel): function_name: StrictStr = Field(description="Name of the function containing the technique") technique_url: StrictStr = Field(description="URL to the MITRE ATT&CK technique page") technique_description: StrictStr = Field(description="Full description of the MITRE technique from ATT&CK") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["start_addr", "end_addr", "function_addr", "technique_id", "technique_name", "description", "function_id", "function_name", "technique_url", "technique_description"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -99,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "technique_url": obj.get("technique_url"), "technique_description": obj.get("technique_description") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/model_interpretation.py b/revengai/models/model_interpretation.py new file mode 100644 index 0000000..d9f7891 --- /dev/null +++ b/revengai/models/model_interpretation.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ModelInterpretation(BaseModel): + """ + ModelInterpretation + """ # noqa: E501 + interpretation: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interpretation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelInterpretation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if interpretation (nullable) is None + # and model_fields_set contains the field + if self.interpretation is None and "interpretation" in self.model_fields_set: + _dict['interpretation'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelInterpretation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interpretation": obj.get("interpretation") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/model_interpretation_evidence.py b/revengai/models/model_interpretation_evidence.py new file mode 100644 index 0000000..fa93785 --- /dev/null +++ b/revengai/models/model_interpretation_evidence.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.evidence_strength import EvidenceStrength +from revengai.models.model_interpretation import ModelInterpretation +from typing import Optional, Set +from typing_extensions import Self + +class ModelInterpretationEvidence(BaseModel): + """ + LLM interpretations of observations. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'model_interpretation' + kind: Optional[StrictStr] = 'model_interpretation' + effect: EvidenceEffect + strength: Optional[EvidenceStrength] = None + interpretations: Annotated[List[ModelInterpretation], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "interpretations"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['model_interpretation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('model_interpretation', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['model_interpretation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('model_interpretation', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelInterpretationEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interpretations (list) + _items = [] + if self.interpretations: + for _item_interpretations in self.interpretations: + if _item_interpretations: + _items.append(_item_interpretations.to_dict()) + _dict['interpretations'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelInterpretationEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'model_interpretation', + "kind": obj.get("kind") if obj.get("kind") is not None else 'model_interpretation', + "effect": obj.get("effect"), + "strength": obj.get("strength"), + "interpretations": [ModelInterpretation.from_dict(_item) for _item in obj["interpretations"]] if obj.get("interpretations") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/models_response.py b/revengai/models/models_response.py index 363ae64..63f8286 100644 --- a/revengai/models/models_response.py +++ b/revengai/models/models_response.py @@ -26,6 +26,7 @@ class ModelsResponse(BaseModel): ModelsResponse """ # noqa: E501 models: List[StrictStr] = Field(description="List of active models available analysis.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["models"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "models": obj.get("models") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/name_source_type.py b/revengai/models/name_source_type.py index 789d1fd..7b94a96 100644 --- a/revengai/models/name_source_type.py +++ b/revengai/models/name_source_type.py @@ -29,6 +29,7 @@ class NameSourceType(BaseModel): function_id: Optional[StrictInt] = None binary_id: Optional[StrictInt] = None analysis_id: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "function_id", "binary_id", "analysis_id"] @field_validator('type') @@ -68,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if function_id (nullable) is None # and model_fields_set contains the field if self.function_id is None and "function_id" in self.model_fields_set: @@ -109,6 +117,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_id": obj.get("binary_id"), "analysis_id": obj.get("analysis_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/networking_call.py b/revengai/models/networking_call.py new file mode 100644 index 0000000..e77afab --- /dev/null +++ b/revengai/models/networking_call.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingCall(BaseModel): + """ + NetworkingCall + """ # noqa: E501 + callee_name: StrictStr = Field(description="Name of the called function") + category: StrictStr = Field(description="Networking category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Networking source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["callee_name", "category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callee_name": obj.get("callee_name"), + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_direct_match.py b/revengai/models/networking_direct_match.py new file mode 100644 index 0000000..fdd5c54 --- /dev/null +++ b/revengai/models/networking_direct_match.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingDirectMatch(BaseModel): + """ + NetworkingDirectMatch + """ # noqa: E501 + category: StrictStr = Field(description="Networking category of the match") + how: StrictStr = Field(description="Detection tier that produced the match") + matched_name: StrictStr = Field(description="Name or token that matched") + source: StrictStr = Field(description="Networking source the match belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category", "how", "matched_name", "source"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api')") + return value + + @field_validator('how') + def how_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('api', 'cpp-class-token', 'generic-keyword', 'unknown_default_open_api')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingDirectMatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingDirectMatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "how": obj.get("how"), + "matched_name": obj.get("matched_name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_explain_metadata.py b/revengai/models/networking_explain_metadata.py new file mode 100644 index 0000000..a27ec88 --- /dev/null +++ b/revengai/models/networking_explain_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingExplainMetadata(BaseModel): + """ + NetworkingExplainMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this function.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingExplainMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingExplainMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_explain_result.py b/revengai/models/networking_explain_result.py new file mode 100644 index 0000000..8fd7237 --- /dev/null +++ b/revengai/models/networking_explain_result.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.networking_explained_function import NetworkingExplainedFunction +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingExplainResult(BaseModel): + """ + NetworkingExplainResult + """ # noqa: E501 + cancelled: StrictBool = Field(description="Whether the run was cancelled") + data_received: Optional[StrictStr] = Field(default=None, description="Description of the data received") + data_sent: Optional[StrictStr] = Field(default=None, description="Description of the data sent") + data_usage: Optional[StrictStr] = Field(default=None, description="How the sent or received data is used") + endpoints: Optional[List[StrictStr]] = Field(default=None, description="Concrete remote endpoints identified -- IPs, hostnames, or URLs") + function_id: StrictInt = Field(description="ID of the explained function") + function_name: Optional[StrictStr] = Field(default=None, description="Name of the explained function") + functions_involved: Optional[List[NetworkingExplainedFunction]] = Field(default=None, description="Other functions involved in the network communication") + protocol: Optional[StrictStr] = Field(default=None, description="Protocol used for the communication") + purpose: Optional[StrictStr] = Field(default=None, description="Purpose of the network communication") + summary: Optional[StrictStr] = Field(default=None, description="Explanation of the network communication the function performs") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cancelled", "data_received", "data_sent", "data_usage", "endpoints", "function_id", "function_name", "functions_involved", "protocol", "purpose", "summary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions_involved (list) + _items = [] + if self.functions_involved: + for _item_functions_involved in self.functions_involved: + if _item_functions_involved: + _items.append(_item_functions_involved.to_dict()) + _dict['functions_involved'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if endpoints (nullable) is None + # and model_fields_set contains the field + if self.endpoints is None and "endpoints" in self.model_fields_set: + _dict['endpoints'] = None + + # set to None if functions_involved (nullable) is None + # and model_fields_set contains the field + if self.functions_involved is None and "functions_involved" in self.model_fields_set: + _dict['functions_involved'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelled": obj.get("cancelled"), + "data_received": obj.get("data_received"), + "data_sent": obj.get("data_sent"), + "data_usage": obj.get("data_usage"), + "endpoints": obj.get("endpoints"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "functions_involved": [NetworkingExplainedFunction.from_dict(_item) for _item in obj["functions_involved"]] if obj.get("functions_involved") is not None else None, + "protocol": obj.get("protocol"), + "purpose": obj.get("purpose"), + "summary": obj.get("summary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_explained_function.py b/revengai/models/networking_explained_function.py new file mode 100644 index 0000000..2348ff1 --- /dev/null +++ b/revengai/models/networking_explained_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingExplainedFunction(BaseModel): + """ + NetworkingExplainedFunction + """ # noqa: E501 + description: StrictStr = Field(description="Role this function plays in the network communication") + function_id: StrictInt = Field(description="ID of the function") + function_name: StrictStr = Field(description="Name of the function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingExplainedFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingExplainedFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_finding.py b/revengai/models/networking_finding.py new file mode 100644 index 0000000..59afbe9 --- /dev/null +++ b/revengai/models/networking_finding.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.networking_call import NetworkingCall +from revengai.models.networking_direct_match import NetworkingDirectMatch +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingFinding(BaseModel): + """ + NetworkingFinding + """ # noqa: E501 + address: StrictStr = Field(description="Function's virtual address, hex-encoded") + categories: Optional[List[StrictStr]] = Field(description="Distinct networking categories evidenced by this function") + confidence: StrictStr = Field(description="High when a direct name match was found, medium when the function only calls into networking APIs") + direct_matches: Optional[List[NetworkingDirectMatch]] = Field(default=None, description="Matches against the function's own name") + evidence_count: StrictInt = Field(description="Total number of direct matches and network calls") + function_id: StrictInt = Field(description="ID of the function the finding was reported in") + function_name: StrictStr = Field(description="Name of the function the finding was reported in") + function_size: StrictInt = Field(description="Size of the function in bytes") + network_calls: Optional[List[NetworkingCall]] = Field(default=None, description="Matches against names this function calls") + remote: StrictBool = Field(description="Whether this function evidences remote communication rather than only supporting it") + sources: Optional[List[StrictStr]] = Field(description="Distinct networking sources evidenced by this function") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "categories", "confidence", "direct_matches", "evidence_count", "function_id", "function_name", "function_size", "network_calls", "remote", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api')") + return value + + @field_validator('confidence') + def confidence_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['high', 'medium', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('high', 'medium', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingFinding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in direct_matches (list) + _items = [] + if self.direct_matches: + for _item_direct_matches in self.direct_matches: + if _item_direct_matches: + _items.append(_item_direct_matches.to_dict()) + _dict['direct_matches'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in network_calls (list) + _items = [] + if self.network_calls: + for _item_network_calls in self.network_calls: + if _item_network_calls: + _items.append(_item_network_calls.to_dict()) + _dict['network_calls'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if direct_matches (nullable) is None + # and model_fields_set contains the field + if self.direct_matches is None and "direct_matches" in self.model_fields_set: + _dict['direct_matches'] = None + + # set to None if network_calls (nullable) is None + # and model_fields_set contains the field + if self.network_calls is None and "network_calls" in self.model_fields_set: + _dict['network_calls'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingFinding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "categories": obj.get("categories"), + "confidence": obj.get("confidence"), + "direct_matches": [NetworkingDirectMatch.from_dict(_item) for _item in obj["direct_matches"]] if obj.get("direct_matches") is not None else None, + "evidence_count": obj.get("evidence_count"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_size": obj.get("function_size"), + "network_calls": [NetworkingCall.from_dict(_item) for _item in obj["network_calls"]] if obj.get("network_calls") is not None else None, + "remote": obj.get("remote"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_scan_metadata.py b/revengai/models/networking_scan_metadata.py new file mode 100644 index 0000000..215c70c --- /dev/null +++ b/revengai/models/networking_scan_metadata.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingScanMetadata(BaseModel): + """ + NetworkingScanMetadata + """ # noqa: E501 + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Progress messages the run recorded, oldest first.") + status: StrictStr = Field(description="Run status. UNINITIALISED means the agent has never been triggered for this analysis.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["log_history", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingScanMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingScanMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "log_history": obj.get("log_history"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/networking_scan_result.py b/revengai/models/networking_scan_result.py new file mode 100644 index 0000000..ca1a692 --- /dev/null +++ b/revengai/models/networking_scan_result.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.networking_finding import NetworkingFinding +from typing import Optional, Set +from typing_extensions import Self + +class NetworkingScanResult(BaseModel): + """ + NetworkingScanResult + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis the run was performed against") + findings: Optional[List[NetworkingFinding]] = Field(default=None, description="Functions with networking-related evidence, sorted by remoteness then confidence then evidence count") + total_functions: StrictInt = Field(description="Functions the run considered") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_id", "findings", "total_functions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkingScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in findings (list) + _items = [] + if self.findings: + for _item_findings in self.findings: + if _item_findings: + _items.append(_item_findings.to_dict()) + _dict['findings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if findings (nullable) is None + # and model_fields_set contains the field + if self.findings is None and "findings" in self.model_fields_set: + _dict['findings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkingScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_id": obj.get("analysis_id"), + "findings": [NetworkingFinding.from_dict(_item) for _item in obj["findings"]] if obj.get("findings") is not None else None, + "total_functions": obj.get("total_functions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_create_metadata_create_result.py b/revengai/models/operation_create_metadata_create_result.py new file mode 100644 index 0000000..d0f7e7b --- /dev/null +++ b/revengai/models/operation_create_metadata_create_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.create_metadata import CreateMetadata +from revengai.models.create_result import CreateResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationCreateMetadataCreateResult(BaseModel): + """ + OperationCreateMetadataCreateResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[CreateMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[CreateResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationCreateMetadataCreateResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationCreateMetadataCreateResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": CreateMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": CreateResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_crypto_explain_metadata_crypto_explain_result.py b/revengai/models/operation_crypto_explain_metadata_crypto_explain_result.py new file mode 100644 index 0000000..57cd2e7 --- /dev/null +++ b/revengai/models/operation_crypto_explain_metadata_crypto_explain_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.crypto_explain_metadata import CryptoExplainMetadata +from revengai.models.crypto_explain_result import CryptoExplainResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationCryptoExplainMetadataCryptoExplainResult(BaseModel): + """ + OperationCryptoExplainMetadataCryptoExplainResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[CryptoExplainMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[CryptoExplainResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationCryptoExplainMetadataCryptoExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationCryptoExplainMetadataCryptoExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": CryptoExplainMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": CryptoExplainResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_execution_explain_metadata_execution_explain_result.py b/revengai/models/operation_execution_explain_metadata_execution_explain_result.py new file mode 100644 index 0000000..70c44a5 --- /dev/null +++ b/revengai/models/operation_execution_explain_metadata_execution_explain_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.execution_explain_metadata import ExecutionExplainMetadata +from revengai.models.execution_explain_result import ExecutionExplainResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationExecutionExplainMetadataExecutionExplainResult(BaseModel): + """ + OperationExecutionExplainMetadataExecutionExplainResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[ExecutionExplainMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[ExecutionExplainResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationExecutionExplainMetadataExecutionExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationExecutionExplainMetadataExecutionExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": ExecutionExplainMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": ExecutionExplainResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_execution_scan_metadata_execution_scan_result.py b/revengai/models/operation_execution_scan_metadata_execution_scan_result.py new file mode 100644 index 0000000..377be7f --- /dev/null +++ b/revengai/models/operation_execution_scan_metadata_execution_scan_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.execution_scan_metadata import ExecutionScanMetadata +from revengai.models.execution_scan_result import ExecutionScanResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationExecutionScanMetadataExecutionScanResult(BaseModel): + """ + OperationExecutionScanMetadataExecutionScanResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[ExecutionScanMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[ExecutionScanResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationExecutionScanMetadataExecutionScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationExecutionScanMetadataExecutionScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": ExecutionScanMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": ExecutionScanResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_filesystem_analyse_metadata_filesystem_analyse_result.py b/revengai/models/operation_filesystem_analyse_metadata_filesystem_analyse_result.py new file mode 100644 index 0000000..3d05b71 --- /dev/null +++ b/revengai/models/operation_filesystem_analyse_metadata_filesystem_analyse_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.filesystem_analyse_metadata import FilesystemAnalyseMetadata +from revengai.models.filesystem_analyse_result import FilesystemAnalyseResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationFilesystemAnalyseMetadataFilesystemAnalyseResult(BaseModel): + """ + OperationFilesystemAnalyseMetadataFilesystemAnalyseResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[FilesystemAnalyseMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[FilesystemAnalyseResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationFilesystemAnalyseMetadataFilesystemAnalyseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationFilesystemAnalyseMetadataFilesystemAnalyseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": FilesystemAnalyseMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": FilesystemAnalyseResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_filesystem_scan_metadata_filesystem_scan_result.py b/revengai/models/operation_filesystem_scan_metadata_filesystem_scan_result.py new file mode 100644 index 0000000..2b3146a --- /dev/null +++ b/revengai/models/operation_filesystem_scan_metadata_filesystem_scan_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.filesystem_scan_metadata import FilesystemScanMetadata +from revengai.models.filesystem_scan_result import FilesystemScanResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationFilesystemScanMetadataFilesystemScanResult(BaseModel): + """ + OperationFilesystemScanMetadataFilesystemScanResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[FilesystemScanMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[FilesystemScanResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationFilesystemScanMetadataFilesystemScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationFilesystemScanMetadataFilesystemScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": FilesystemScanMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": FilesystemScanResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_metadata_capabilities_result.py b/revengai/models/operation_metadata_capabilities_result.py new file mode 100644 index 0000000..f73c36d --- /dev/null +++ b/revengai/models/operation_metadata_capabilities_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.capabilities_result import CapabilitiesResult +from revengai.models.metadata import Metadata +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationMetadataCapabilitiesResult(BaseModel): + """ + OperationMetadataCapabilitiesResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[Metadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[CapabilitiesResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationMetadataCapabilitiesResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationMetadataCapabilitiesResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": Metadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": CapabilitiesResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_metadata_remediation_result.py b/revengai/models/operation_metadata_remediation_result.py new file mode 100644 index 0000000..5091dbd --- /dev/null +++ b/revengai/models/operation_metadata_remediation_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.metadata import Metadata +from revengai.models.remediation_result import RemediationResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationMetadataRemediationResult(BaseModel): + """ + OperationMetadataRemediationResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[Metadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[RemediationResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationMetadataRemediationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationMetadataRemediationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": Metadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": RemediationResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_metadata_report_result.py b/revengai/models/operation_metadata_report_result.py new file mode 100644 index 0000000..2204351 --- /dev/null +++ b/revengai/models/operation_metadata_report_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.metadata import Metadata +from revengai.models.report_result import ReportResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationMetadataReportResult(BaseModel): + """ + OperationMetadataReportResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[Metadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[ReportResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationMetadataReportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationMetadataReportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": Metadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": ReportResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_metadata_threat_report_result.py b/revengai/models/operation_metadata_threat_report_result.py new file mode 100644 index 0000000..7ab70f4 --- /dev/null +++ b/revengai/models/operation_metadata_threat_report_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.metadata import Metadata +from revengai.models.status import Status +from revengai.models.threat_report_result import ThreatReportResult +from typing import Optional, Set +from typing_extensions import Self + +class OperationMetadataThreatReportResult(BaseModel): + """ + OperationMetadataThreatReportResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[Metadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[ThreatReportResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationMetadataThreatReportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationMetadataThreatReportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": Metadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": ThreatReportResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_metadata_triage_result.py b/revengai/models/operation_metadata_triage_result.py new file mode 100644 index 0000000..6e955b6 --- /dev/null +++ b/revengai/models/operation_metadata_triage_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.metadata import Metadata +from revengai.models.status import Status +from revengai.models.triage_result import TriageResult +from typing import Optional, Set +from typing_extensions import Self + +class OperationMetadataTriageResult(BaseModel): + """ + OperationMetadataTriageResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[Metadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[TriageResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationMetadataTriageResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationMetadataTriageResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": Metadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": TriageResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_networking_explain_metadata_networking_explain_result.py b/revengai/models/operation_networking_explain_metadata_networking_explain_result.py new file mode 100644 index 0000000..e29575f --- /dev/null +++ b/revengai/models/operation_networking_explain_metadata_networking_explain_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.networking_explain_metadata import NetworkingExplainMetadata +from revengai.models.networking_explain_result import NetworkingExplainResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationNetworkingExplainMetadataNetworkingExplainResult(BaseModel): + """ + OperationNetworkingExplainMetadataNetworkingExplainResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[NetworkingExplainMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[NetworkingExplainResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationNetworkingExplainMetadataNetworkingExplainResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationNetworkingExplainMetadataNetworkingExplainResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": NetworkingExplainMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": NetworkingExplainResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_networking_scan_metadata_networking_scan_result.py b/revengai/models/operation_networking_scan_metadata_networking_scan_result.py new file mode 100644 index 0000000..dbed6d9 --- /dev/null +++ b/revengai/models/operation_networking_scan_metadata_networking_scan_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.networking_scan_metadata import NetworkingScanMetadata +from revengai.models.networking_scan_result import NetworkingScanResult +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationNetworkingScanMetadataNetworkingScanResult(BaseModel): + """ + OperationNetworkingScanMetadataNetworkingScanResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[NetworkingScanMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[NetworkingScanResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationNetworkingScanMetadataNetworkingScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationNetworkingScanMetadataNetworkingScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": NetworkingScanMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": NetworkingScanResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/pagination_model.py b/revengai/models/pagination_model.py index 8541bc3..3133941 100644 --- a/revengai/models/pagination_model.py +++ b/revengai/models/pagination_model.py @@ -28,6 +28,7 @@ class PaginationModel(BaseModel): page_size: StrictInt page_number: StrictInt has_next_page: StrictBool + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["page_size", "page_number", "has_next_page"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "page_number": obj.get("page_number"), "has_next_page": obj.get("has_next_page") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/params.py b/revengai/models/params.py index 8e41e5f..7778e5b 100644 --- a/revengai/models/params.py +++ b/revengai/models/params.py @@ -32,6 +32,7 @@ class Params(BaseModel): binary_format: StrictStr = Field(description="The format of the binary data") binary_dynamic: StrictBool = Field(description="Whether the binary data is dynamic") model_name: StrictStr = Field(description="The name of the model") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["debug_hash", "binary_size", "architecture", "binary_type", "binary_format", "binary_dynamic", "model_name"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if debug_hash (nullable) is None # and model_fields_set contains the field if self.debug_hash is None and "debug_hash" in self.model_fields_set: @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_dynamic": obj.get("binary_dynamic"), "model_name": obj.get("model_name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/pdb_debug_model.py b/revengai/models/pdb_debug_model.py index ed4e743..b4f7cf3 100644 --- a/revengai/models/pdb_debug_model.py +++ b/revengai/models/pdb_debug_model.py @@ -27,6 +27,7 @@ class PDBDebugModel(BaseModel): PDBDebugModel """ # noqa: E501 debug_entries: List[SinglePDBEntryModel] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["debug_entries"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_debug_entries: _items.append(_item_debug_entries.to_dict()) _dict['debug_entries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "debug_entries": [SinglePDBEntryModel.from_dict(_item) for _item in obj["debug_entries"]] if obj.get("debug_entries") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/pe_model.py b/revengai/models/pe_model.py index f5dea38..b6e2382 100644 --- a/revengai/models/pe_model.py +++ b/revengai/models/pe_model.py @@ -54,6 +54,7 @@ class PEModel(BaseModel): imports: Optional[ImportModel] exports: Optional[ExportModel] icon_data: Optional[IconModel] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "timestamps", "architecture", "checksum", "image_base", "security", "version_info", "debug_info", "number_of_resources", "entry_point", "signature", "dotnet", "debug_stripped", "import_hash", "export_hash", "rich_header_hash", "sections", "imports", "exports", "icon_data"] model_config = ConfigDict( @@ -86,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -122,6 +125,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of icon_data if self.icon_data: _dict['icon_data'] = self.icon_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if timestamps (nullable) is None # and model_fields_set contains the field if self.timestamps is None and "timestamps" in self.model_fields_set: @@ -210,6 +218,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "exports": ExportModel.from_dict(obj["exports"]) if obj.get("exports") is not None else None, "icon_data": IconModel.from_dict(obj["icon_data"]) if obj.get("icon_data") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/protocols_agent_response.py b/revengai/models/protocols_agent_response.py new file mode 100644 index 0000000..e371f58 --- /dev/null +++ b/revengai/models/protocols_agent_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.finding import Finding +from revengai.models.meta import Meta +from typing import Optional, Set +from typing_extensions import Self + +class ProtocolsAgentResponse(BaseModel): + """ + Full protocols report, including metadata, findings, and evidence. + """ # noqa: E501 + meta: Optional[Meta] = None + findings: Optional[List[Finding]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["meta", "findings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProtocolsAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in findings (list) + _items = [] + if self.findings: + for _item_findings in self.findings: + if _item_findings: + _items.append(_item_findings.to_dict()) + _dict['findings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProtocolsAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "meta": Meta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "findings": [Finding.from_dict(_item) for _item in obj["findings"]] if obj.get("findings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/put_analysis_strings_request.py b/revengai/models/put_analysis_strings_request.py index 5fa3072..861cbae 100644 --- a/revengai/models/put_analysis_strings_request.py +++ b/revengai/models/put_analysis_strings_request.py @@ -27,6 +27,7 @@ class PutAnalysisStringsRequest(BaseModel): PutAnalysisStringsRequest """ # noqa: E501 strings: List[AnalysisStringInput] = Field(description="The strings to add to the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["strings"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_strings: _items.append(_item_strings.to_dict()) _dict['strings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "strings": [AnalysisStringInput.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/queued_workflow_task_response.py b/revengai/models/queued_workflow_task_response.py index c609142..5276d1d 100644 --- a/revengai/models/queued_workflow_task_response.py +++ b/revengai/models/queued_workflow_task_response.py @@ -26,6 +26,7 @@ class QueuedWorkflowTaskResponse(BaseModel): QueuedWorkflowTaskResponse """ # noqa: E501 task_id: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["task_id"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "task_id": obj.get("task_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/re_analysis_form.py b/revengai/models/re_analysis_form.py index 353f95d..0855673 100644 --- a/revengai/models/re_analysis_form.py +++ b/revengai/models/re_analysis_form.py @@ -31,6 +31,7 @@ class ReAnalysisForm(BaseModel): essential: Optional[StrictBool] = Field(default=True, description="Only runs essential parts of the analysis, skips tags etc.") model_name: Optional[StrictStr] = None no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags", "command_line_args", "priority", "essential", "model_name", "no_cache"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if model_name (nullable) is None # and model_fields_set contains the field if self.model_name is None and "model_name" in self.model_fields_set: @@ -96,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "model_name": obj.get("model_name"), "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/recent.py b/revengai/models/recent.py index b442aeb..294bda2 100644 --- a/revengai/models/recent.py +++ b/revengai/models/recent.py @@ -27,6 +27,7 @@ class Recent(BaseModel): Recent """ # noqa: E501 results: List[AnalysisRecord] = Field(description="2D List containing the results of the analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [AnalysisRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/referenced_constant.py b/revengai/models/referenced_constant.py new file mode 100644 index 0000000..77a3d5d --- /dev/null +++ b/revengai/models/referenced_constant.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.bytes_constant import BytesConstant +from revengai.models.display import Display +from revengai.models.subject import Subject +from typing import Optional, Set +from typing_extensions import Self + +class ReferencedConstant(BaseModel): + """ + ReferencedConstant + """ # noqa: E501 + subject: Subject + value: BytesConstant + display: Optional[Display] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["subject", "value", "display"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReferencedConstant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of subject + if self.subject: + _dict['subject'] = self.subject.to_dict() + # override the default output from pydantic by calling `to_dict()` of value + if self.value: + _dict['value'] = self.value.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if display (nullable) is None + # and model_fields_set contains the field + if self.display is None and "display" in self.model_fields_set: + _dict['display'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReferencedConstant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, + "value": BytesConstant.from_dict(obj["value"]) if obj.get("value") is not None else None, + "display": obj.get("display") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/referenced_constant_evidence.py b/revengai/models/referenced_constant_evidence.py new file mode 100644 index 0000000..d9afdc3 --- /dev/null +++ b/revengai/models/referenced_constant_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.referenced_constant import ReferencedConstant +from typing import Optional, Set +from typing_extensions import Self + +class ReferencedConstantEvidence(BaseModel): + """ + Constants and the instructions that reference them. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'referenced_constant' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'direct' + constants: Annotated[List[ReferencedConstant], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "constants"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['referenced_constant', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('referenced_constant', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['direct', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('direct', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReferencedConstantEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in constants (list) + _items = [] + if self.constants: + for _item_constants in self.constants: + if _item_constants: + _items.append(_item_constants.to_dict()) + _dict['constants'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReferencedConstantEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'referenced_constant', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'direct', + "constants": [ReferencedConstant.from_dict(_item) for _item in obj["constants"]] if obj.get("constants") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/relative_binary_response.py b/revengai/models/relative_binary_response.py index 5e07eaf..d7dba06 100644 --- a/revengai/models/relative_binary_response.py +++ b/revengai/models/relative_binary_response.py @@ -29,6 +29,7 @@ class RelativeBinaryResponse(BaseModel): analysis_id: Optional[StrictInt] = None name: StrictStr = Field(description="Name of the relative binary") sha256: StrictStr = Field(description="SHA256 hash of the relative binary") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_id", "analysis_id", "name", "sha256"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if analysis_id (nullable) is None # and model_fields_set contains the field if self.analysis_id is None and "analysis_id" in self.model_fields_set: @@ -92,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "sha256": obj.get("sha256") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/remediation_agent_response.py b/revengai/models/remediation_agent_response.py index 04150b6..febafd6 100644 --- a/revengai/models/remediation_agent_response.py +++ b/revengai/models/remediation_agent_response.py @@ -28,6 +28,7 @@ class RemediationAgentResponse(BaseModel): yara_rules: List[StrictStr] = Field(description="Generated YARA rules for the binary") snort_rules: List[StrictStr] = Field(description="Generated Snort rules for the binary") stix_rules: List[StrictStr] = Field(description="Generated STIX rules for the binary") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["yara_rules", "snort_rules", "stix_rules"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "snort_rules": obj.get("snort_rules"), "stix_rules": obj.get("stix_rules") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/remediation_result.py b/revengai/models/remediation_result.py new file mode 100644 index 0000000..d76eb9c --- /dev/null +++ b/revengai/models/remediation_result.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RemediationResult(BaseModel): + """ + RemediationResult + """ # noqa: E501 + snort_rules: Optional[List[StrictStr]] = Field(description="Generated Snort rules") + stix_rules: Optional[List[StrictStr]] = Field(description="Generated STIX rules") + yara_rules: Optional[List[StrictStr]] = Field(description="Generated YARA rules") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["snort_rules", "stix_rules", "yara_rules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if snort_rules (nullable) is None + # and model_fields_set contains the field + if self.snort_rules is None and "snort_rules" in self.model_fields_set: + _dict['snort_rules'] = None + + # set to None if stix_rules (nullable) is None + # and model_fields_set contains the field + if self.stix_rules is None and "stix_rules" in self.model_fields_set: + _dict['stix_rules'] = None + + # set to None if yara_rules (nullable) is None + # and model_fields_set contains the field + if self.yara_rules is None and "yara_rules" in self.model_fields_set: + _dict['yara_rules'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snort_rules": obj.get("snort_rules"), + "stix_rules": obj.get("stix_rules"), + "yara_rules": obj.get("yara_rules") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/report_analysis_response.py b/revengai/models/report_analysis_response.py index 26366db..c8c0554 100644 --- a/revengai/models/report_analysis_response.py +++ b/revengai/models/report_analysis_response.py @@ -35,6 +35,7 @@ class ReportAnalysisResponse(BaseModel): iocs: List[IOC] = Field(description="A list of IOCs (Indicators of Compromise) found in the analysis", alias="IOCs") executable_techniques: List[MITRETechnique] = Field(description="A series of MITRE Techniques found") yara_rule: StrictStr = Field(description="The YARA rule generated for the binary") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["summary", "software_type", "total_number_of_functions", "number_of_analysed_functions", "attack_flow_summary", "IOCs", "executable_techniques", "yara_rule"] @field_validator('software_type') @@ -74,8 +75,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -97,6 +100,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_executable_techniques: _items.append(_item_executable_techniques.to_dict()) _dict['executable_techniques'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -118,6 +126,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "executable_techniques": [MITRETechnique.from_dict(_item) for _item in obj["executable_techniques"]] if obj.get("executable_techniques") is not None else None, "yara_rule": obj.get("yara_rule") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/report_reachability_status.py b/revengai/models/report_reachability_status.py new file mode 100644 index 0000000..2c3900f --- /dev/null +++ b/revengai/models/report_reachability_status.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ReportReachabilityStatus(str, Enum): + """ + ReportReachabilityStatus + """ + + """ + allowed enum values + """ + UNDETERMINED = 'undetermined' + REACHABLE = 'reachable' + UNREACHABLE = 'unreachable' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ReportReachabilityStatus from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/report_result.py b/revengai/models/report_result.py new file mode 100644 index 0000000..95b8de2 --- /dev/null +++ b/revengai/models/report_result.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ReportResult(BaseModel): + """ + ReportResult + """ # noqa: E501 + findings: Optional[Any] + meta: Optional[Any] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["findings", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if findings (nullable) is None + # and model_fields_set contains the field + if self.findings is None and "findings" in self.model_fields_set: + _dict['findings'] = None + + # set to None if meta (nullable) is None + # and model_fields_set contains the field + if self.meta is None and "meta" in self.model_fields_set: + _dict['meta'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "findings": obj.get("findings"), + "meta": obj.get("meta") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/rule_kind.py b/revengai/models/rule_kind.py new file mode 100644 index 0000000..ac0f155 --- /dev/null +++ b/revengai/models/rule_kind.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class RuleKind(str, Enum): + """ + RuleKind + """ + + """ + allowed enum values + """ + CREDENTIALS = 'credentials' + API_MINUS_CREDENTIALS = 'api-credentials' + OAUTH_MINUS_CREDENTIALS = 'oauth-credentials' + ENCRYPTION_MINUS_KEY = 'encryption-key' + JWT_MINUS_TOKEN = 'jwt-token' + WEBHOOK_MINUS_URL = 'webhook-url' + PRIVATE_MINUS_KEY = 'private-key' + SIGNED_MINUS_URL = 'signed-url' + GENERIC = 'generic' + UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RuleKind from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Fall back to the unknown default for values not defined in the SDK.""" + return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") + + diff --git a/revengai/models/sandbox_config.py b/revengai/models/sandbox_config.py new file mode 100644 index 0000000..7455862 --- /dev/null +++ b/revengai/models/sandbox_config.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SandboxConfig(BaseModel): + """ + SandboxConfig + """ # noqa: E501 + archive_entry_path: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + archive_password: Optional[Annotated[str, Field(strict=True, max_length=512)]] = None + archive_sha_256_hash: Optional[Annotated[str, Field(strict=True)]] = None + command_line_args: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + enabled: Optional[StrictBool] = None + start_method: Optional[StrictStr] = None + timeout: Optional[StrictInt] = 120 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["archive_entry_path", "archive_password", "archive_sha_256_hash", "command_line_args", "enabled", "start_method", "timeout"] + + @field_validator('archive_sha_256_hash') + def archive_sha_256_hash_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-fA-F0-9]{64}$", value): + raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{64}$/") + return value + + @field_validator('start_method') + def start_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['standard_user_process', 'administrator_process', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('standard_user_process', 'administrator_process', 'unknown_default_open_api')") + return value + + @field_validator('timeout') + def timeout_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([120, 180, 300, 600, 11184809]): + raise ValueError("must be one of enum values (120, 180, 300, 600, 11184809)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SandboxConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SandboxConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "archive_entry_path": obj.get("archive_entry_path"), + "archive_password": obj.get("archive_password"), + "archive_sha_256_hash": obj.get("archive_sha_256_hash"), + "command_line_args": obj.get("command_line_args"), + "enabled": obj.get("enabled"), + "start_method": obj.get("start_method"), + "timeout": obj.get("timeout") if obj.get("timeout") is not None else 120 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/sandbox_options.py b/revengai/models/sandbox_options.py index 343a4dc..7c861bf 100644 --- a/revengai/models/sandbox_options.py +++ b/revengai/models/sandbox_options.py @@ -34,6 +34,7 @@ class SandboxOptions(BaseModel): archive_sha_256_hash: Optional[StrictStr] = None archive_entry_path: Optional[StrictStr] = None archive_password: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["enabled", "command_line_args", "start_method", "timeout", "archive_sha_256_hash", "archive_entry_path", "archive_password"] model_config = ConfigDict( @@ -66,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if start_method (nullable) is None # and model_fields_set contains the field if self.start_method is None and "start_method" in self.model_fields_set: @@ -115,6 +123,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "archive_entry_path": obj.get("archive_entry_path"), "archive_password": obj.get("archive_password") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/scrape_third_party_config.py b/revengai/models/scrape_third_party_config.py index fd08363..ad8b089 100644 --- a/revengai/models/scrape_third_party_config.py +++ b/revengai/models/scrape_third_party_config.py @@ -25,7 +25,8 @@ class ScrapeThirdPartyConfig(BaseModel): """ ScrapeThirdPartyConfig """ # noqa: E501 - enabled: Optional[StrictBool] = False + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["enabled"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -79,8 +87,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "enabled": obj.get("enabled") if obj.get("enabled") is not None else False + "enabled": obj.get("enabled") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/secrets_agent_response.py b/revengai/models/secrets_agent_response.py new file mode 100644 index 0000000..7717230 --- /dev/null +++ b/revengai/models/secrets_agent_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.finding import Finding +from revengai.models.meta import Meta +from typing import Optional, Set +from typing_extensions import Self + +class SecretsAgentResponse(BaseModel): + """ + Full secrets report, including metadata, findings, and evidence. + """ # noqa: E501 + meta: Optional[Meta] = None + findings: Optional[List[Finding]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["meta", "findings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SecretsAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in findings (list) + _items = [] + if self.findings: + for _item_findings in self.findings: + if _item_findings: + _items.append(_item_findings.to_dict()) + _dict['findings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SecretsAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "meta": Meta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "findings": [Finding.from_dict(_item) for _item in obj["findings"]] if obj.get("findings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/section_model.py b/revengai/models/section_model.py index fa2632f..b288809 100644 --- a/revengai/models/section_model.py +++ b/revengai/models/section_model.py @@ -28,6 +28,7 @@ class SectionModel(BaseModel): """ # noqa: E501 number_of_sections: StrictInt sections: List[SingleSectionModel] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["number_of_sections", "sections"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_sections: _items.append(_item_sections.to_dict()) _dict['sections'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "number_of_sections": obj.get("number_of_sections"), "sections": [SingleSectionModel.from_dict(_item) for _item in obj["sections"]] if obj.get("sections") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/security_model.py b/revengai/models/security_model.py index 8860f09..c138f00 100644 --- a/revengai/models/security_model.py +++ b/revengai/models/security_model.py @@ -36,6 +36,7 @@ class SecurityModel(BaseModel): high_entropy: StrictBool seh: StrictBool bound_image: StrictBool + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["aslr", "dep", "cfg", "driver_model", "app_container", "terminal_server_aware", "image_isolation", "code_integrity", "high_entropy", "seh", "bound_image"] model_config = ConfigDict( @@ -68,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -101,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seh": obj.get("seh"), "bound_image": obj.get("bound_image") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/segment_info.py b/revengai/models/segment_info.py index c4c9fed..cadeba6 100644 --- a/revengai/models/segment_info.py +++ b/revengai/models/segment_info.py @@ -23,7 +23,7 @@ class SegmentInfo(BaseModel): """ - Represents the information about a segment. Attributes: name: The name of the segment. r: Determines if the segment has read permission. w: Determines if the segment has write permission. x: Determines if the segment has execute permission. start: The start address of the segment. end: The end address of the segment (inclusive). kind: Coarse classification of the segment: \"code\", \"data\", or \"other\". + Represents the information about a segment. This is the per-xref view, carried on :class:`XRef.segment`. The binary-wide ``AnalysisModel.segments`` list is written by a different producer with a different shape -- see :class:`MemorySegment`. Attributes: name: The name of the segment. r: Determines if the segment has read permission. w: Determines if the segment has write permission. x: Determines if the segment has execute permission. start: The start address of the segment. end: The end address of the segment (inclusive). kind: Coarse classification of the segment: \"code\", \"data\", or \"other\". """ # noqa: E501 name: Optional[StrictStr] = '' r: Optional[StrictBool] = None @@ -32,6 +32,7 @@ class SegmentInfo(BaseModel): start: Optional[StrictInt] = 0 end: Optional[StrictInt] = 0 kind: Optional[StrictStr] = 'other' + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "r", "w", "x", "start", "end", "kind"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if r (nullable) is None # and model_fields_set contains the field if self.r is None and "r" in self.model_fields_set: @@ -108,6 +116,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "end": obj.get("end") if obj.get("end") is not None else 0, "kind": obj.get("kind") if obj.get("kind") is not None else 'other' }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/single_code_certificate_model.py b/revengai/models/single_code_certificate_model.py index beb0759..79a4dad 100644 --- a/revengai/models/single_code_certificate_model.py +++ b/revengai/models/single_code_certificate_model.py @@ -31,6 +31,7 @@ class SingleCodeCertificateModel(BaseModel): issuer_name: StrictStr serial_number: StrictStr subject_name: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["version", "issued_on", "expires_on", "issuer_name", "serial_number", "subject_name"] model_config = ConfigDict( @@ -63,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "serial_number": obj.get("serial_number"), "subject_name": obj.get("subject_name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/single_code_signature_model.py b/revengai/models/single_code_signature_model.py index f9517f6..02046b0 100644 --- a/revengai/models/single_code_signature_model.py +++ b/revengai/models/single_code_signature_model.py @@ -28,6 +28,7 @@ class SingleCodeSignatureModel(BaseModel): """ # noqa: E501 certificates: List[SingleCodeCertificateModel] authenticode_digest: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["certificates", "authenticode_digest"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_certificates: _items.append(_item_certificates.to_dict()) _dict['certificates'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "certificates": [SingleCodeCertificateModel.from_dict(_item) for _item in obj["certificates"]] if obj.get("certificates") is not None else None, "authenticode_digest": obj.get("authenticode_digest") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/single_pdb_entry_model.py b/revengai/models/single_pdb_entry_model.py index 6c7362f..1a0de62 100644 --- a/revengai/models/single_pdb_entry_model.py +++ b/revengai/models/single_pdb_entry_model.py @@ -28,6 +28,7 @@ class SinglePDBEntryModel(BaseModel): guid: StrictStr age: StrictInt path: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["guid", "age", "path"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "age": obj.get("age"), "path": obj.get("path") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/single_section_model.py b/revengai/models/single_section_model.py index 9216d31..7d92f53 100644 --- a/revengai/models/single_section_model.py +++ b/revengai/models/single_section_model.py @@ -32,6 +32,7 @@ class SingleSectionModel(BaseModel): raw_size: StrictInt entropy: Union[StrictFloat, StrictInt] sha3_256: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "virtual_address", "virtual_size", "characteristics", "raw_size", "entropy", "sha3_256"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -93,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "entropy": obj.get("entropy"), "sha3_256": obj.get("sha3_256") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/status.py b/revengai/models/status.py index 70d8a87..d3440ed 100644 --- a/revengai/models/status.py +++ b/revengai/models/status.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,14 +29,15 @@ class Status(BaseModel): detail: Optional[StrictStr] = Field(default=None, description="Additional context where helpful (quota numbers, validation specifics, etc.).") doc_url: StrictStr = Field(description="Link to documentation explaining this error and resolution steps.") message: StrictStr = Field(description="Brief description of the failure.") + retryable: StrictBool = Field(description="Whether retrying the operation might succeed.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["code", "detail", "doc_url", "message"] + __properties: ClassVar[List[str]] = ["code", "detail", "doc_url", "message", "retryable"] @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( @@ -100,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "code": obj.get("code"), "detail": obj.get("detail"), "doc_url": obj.get("doc_url"), - "message": obj.get("message") + "message": obj.get("message"), + "retryable": obj.get("retryable") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/status_output.py b/revengai/models/status_output.py index d08e4f0..870e0da 100644 --- a/revengai/models/status_output.py +++ b/revengai/models/status_output.py @@ -27,6 +27,7 @@ class StatusOutput(BaseModel): """ # noqa: E501 analysis_id: StrictInt = Field(description="The ID corresponding to the checked status") analysis_status: StrictStr = Field(description="The status of the checked analysis") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "analysis_status"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "analysis_id": obj.get("analysis_id"), "analysis_status": obj.get("analysis_status") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/string_functions.py b/revengai/models/string_functions.py index 5ec6443..ac584e0 100644 --- a/revengai/models/string_functions.py +++ b/revengai/models/string_functions.py @@ -30,6 +30,7 @@ class StringFunctions(BaseModel): value: StrictStr = Field(description="The value of the string literal") functions: List[AppApiRestV2FunctionsResponsesFunction] = Field(description="The function ids the string literal was found within") source: Optional[StringSource] = Field(default=None, description="The source of the string") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value", "functions", "source"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -78,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_functions: _items.append(_item_functions.to_dict()) _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "functions": [AppApiRestV2FunctionsResponsesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, "source": obj.get("source") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/subject.py b/revengai/models/subject.py new file mode 100644 index 0000000..d427549 --- /dev/null +++ b/revengai/models/subject.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from revengai.models.subject_any_of import SubjectAnyOf +from revengai.models.subject_any_of1 import SubjectAnyOf1 +from revengai.models.subject_any_of2 import SubjectAnyOf2 +from revengai.models.subject_any_of3 import SubjectAnyOf3 +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +SUBJECT_ANY_OF_SCHEMAS = ["SubjectAnyOf", "SubjectAnyOf1", "SubjectAnyOf2", "SubjectAnyOf3"] + +class Subject(BaseModel): + """ + Exactly one typed program entity described by an observation. + """ + + # data type: SubjectAnyOf + anyof_schema_1_validator: Optional[SubjectAnyOf] = None + # data type: SubjectAnyOf1 + anyof_schema_2_validator: Optional[SubjectAnyOf1] = None + # data type: SubjectAnyOf2 + anyof_schema_3_validator: Optional[SubjectAnyOf2] = None + # data type: SubjectAnyOf3 + anyof_schema_4_validator: Optional[SubjectAnyOf3] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[SubjectAnyOf, SubjectAnyOf1, SubjectAnyOf2, SubjectAnyOf3]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "SubjectAnyOf", "SubjectAnyOf1", "SubjectAnyOf2", "SubjectAnyOf3" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = Subject.model_construct() + error_messages = [] + # validate data type: SubjectAnyOf + if not isinstance(v, SubjectAnyOf): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubjectAnyOf`") + else: + return v + + # validate data type: SubjectAnyOf1 + if not isinstance(v, SubjectAnyOf1): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubjectAnyOf1`") + else: + return v + + # validate data type: SubjectAnyOf2 + if not isinstance(v, SubjectAnyOf2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubjectAnyOf2`") + else: + return v + + # validate data type: SubjectAnyOf3 + if not isinstance(v, SubjectAnyOf3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubjectAnyOf3`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Subject with anyOf schemas: SubjectAnyOf, SubjectAnyOf1, SubjectAnyOf2, SubjectAnyOf3. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[SubjectAnyOf] = None + try: + instance.actual_instance = SubjectAnyOf.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[SubjectAnyOf1] = None + try: + instance.actual_instance = SubjectAnyOf1.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[SubjectAnyOf2] = None + try: + instance.actual_instance = SubjectAnyOf2.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_4_validator: Optional[SubjectAnyOf3] = None + try: + instance.actual_instance = SubjectAnyOf3.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into Subject with anyOf schemas: SubjectAnyOf, SubjectAnyOf1, SubjectAnyOf2, SubjectAnyOf3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SubjectAnyOf, SubjectAnyOf1, SubjectAnyOf2, SubjectAnyOf3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/revengai/models/subject_any_of.py b/revengai/models/subject_any_of.py new file mode 100644 index 0000000..a9e476d --- /dev/null +++ b/revengai/models/subject_any_of.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubjectAnyOf(BaseModel): + """ + SubjectAnyOf + """ # noqa: E501 + function: Annotated[int, Field(strict=True, ge=0)] = Field(description="Function entry address.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["function"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubjectAnyOf from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubjectAnyOf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function": obj.get("function") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/subject_any_of1.py b/revengai/models/subject_any_of1.py new file mode 100644 index 0000000..1ec528b --- /dev/null +++ b/revengai/models/subject_any_of1.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubjectAnyOf1(BaseModel): + """ + SubjectAnyOf1 + """ # noqa: E501 + call_site: Annotated[int, Field(strict=True, ge=0)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["call_site"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubjectAnyOf1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubjectAnyOf1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "call_site": obj.get("call_site") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/subject_any_of2.py b/revengai/models/subject_any_of2.py new file mode 100644 index 0000000..feab28e --- /dev/null +++ b/revengai/models/subject_any_of2.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubjectAnyOf2(BaseModel): + """ + SubjectAnyOf2 + """ # noqa: E501 + instruction: Annotated[int, Field(strict=True, ge=0)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instruction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubjectAnyOf2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubjectAnyOf2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instruction": obj.get("instruction") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/subject_any_of3.py b/revengai/models/subject_any_of3.py new file mode 100644 index 0000000..feb5752 --- /dev/null +++ b/revengai/models/subject_any_of3.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubjectAnyOf3(BaseModel): + """ + SubjectAnyOf3 + """ # noqa: E501 + data: Annotated[int, Field(strict=True, ge=0)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubjectAnyOf3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubjectAnyOf3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/submit_feedback_input_body.py b/revengai/models/submit_feedback_input_body.py new file mode 100644 index 0000000..d37d94b --- /dev/null +++ b/revengai/models/submit_feedback_input_body.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubmitFeedbackInputBody(BaseModel): + """ + SubmitFeedbackInputBody + """ # noqa: E501 + sentiment: StrictStr = Field(description="How useful the caller found this agent's output") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sentiment"] + + @field_validator('sentiment') + def sentiment_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubmitFeedbackInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubmitFeedbackInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sentiment": obj.get("sentiment") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/submit_user_feedback_request.py b/revengai/models/submit_user_feedback_request.py index 19a9c9c..9a581cb 100644 --- a/revengai/models/submit_user_feedback_request.py +++ b/revengai/models/submit_user_feedback_request.py @@ -28,6 +28,7 @@ class SubmitUserFeedbackRequest(BaseModel): current_route: StrictStr = Field(description="The route from where the feedback was submitted") feedback: StrictStr = Field(description="The user's feedback") screen_capture_url: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["current_route", "feedback", "screen_capture_url"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if screen_capture_url (nullable) is None # and model_fields_set contains the field if self.screen_capture_url is None and "screen_capture_url" in self.model_fields_set: @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "feedback": obj.get("feedback"), "screen_capture_url": obj.get("screen_capture_url") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/suspicious_string.py b/revengai/models/suspicious_string.py new file mode 100644 index 0000000..a9bf14d --- /dev/null +++ b/revengai/models/suspicious_string.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.subject import Subject +from typing import Optional, Set +from typing_extensions import Self + +class SuspiciousString(BaseModel): + """ + SuspiciousString + """ # noqa: E501 + value: Annotated[str, Field(min_length=1, strict=True)] + subject: Optional[Subject] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuspiciousString from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of subject + if self.subject: + _dict['subject'] = self.subject.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if subject (nullable) is None + # and model_fields_set contains the field + if self.subject is None and "subject" in self.model_fields_set: + _dict['subject'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuspiciousString from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/suspicious_string_evidence.py b/revengai/models/suspicious_string_evidence.py new file mode 100644 index 0000000..5fe771d --- /dev/null +++ b/revengai/models/suspicious_string_evidence.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.evidence_effect import EvidenceEffect +from revengai.models.suspicious_string import SuspiciousString +from typing import Optional, Set +from typing_extensions import Self + +class SuspiciousStringEvidence(BaseModel): + """ + Suspicious strings without demonstrated semantic use. + """ # noqa: E501 + evidence_kind: Optional[StrictStr] = 'suspicious_string' + kind: Optional[StrictStr] = 'deterministic_derivation' + effect: EvidenceEffect + strength: Optional[StrictStr] = 'indirect' + strings: Annotated[List[SuspiciousString], Field(min_length=1)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["evidence_kind", "kind", "effect", "strength", "strings"] + + @field_validator('evidence_kind') + def evidence_kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['suspicious_string', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('suspicious_string', 'unknown_default_open_api')") + return value + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['deterministic_derivation', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('deterministic_derivation', 'unknown_default_open_api')") + return value + + @field_validator('strength') + def strength_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['indirect', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('indirect', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuspiciousStringEvidence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in strings (list) + _items = [] + if self.strings: + for _item_strings in self.strings: + if _item_strings: + _items.append(_item_strings.to_dict()) + _dict['strings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuspiciousStringEvidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "evidence_kind": obj.get("evidence_kind") if obj.get("evidence_kind") is not None else 'suspicious_string', + "kind": obj.get("kind") if obj.get("kind") is not None else 'deterministic_derivation', + "effect": obj.get("effect"), + "strength": obj.get("strength") if obj.get("strength") is not None else 'indirect', + "strings": [SuspiciousString.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/symbols.py b/revengai/models/symbols.py index e9b5b5d..25689a5 100644 --- a/revengai/models/symbols.py +++ b/revengai/models/symbols.py @@ -16,8 +16,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from revengai.models.function_boundary import FunctionBoundary from typing import Optional, Set from typing_extensions import Self @@ -26,8 +27,9 @@ class Symbols(BaseModel): """ Symbols """ # noqa: E501 - base_address: StrictInt = Field(description="The starting address of the execution") - function_boundaries: Optional[List[FunctionBoundary]] = Field(default=None, description="List of user defined function boundaries") + base_address: Annotated[int, Field(strict=True, ge=0)] + function_boundaries: Optional[Annotated[List[FunctionBoundary], Field(max_length=200000)]] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["base_address", "function_boundaries"] model_config = ConfigDict( @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +80,16 @@ def to_dict(self) -> Dict[str, Any]: if _item_function_boundaries: _items.append(_item_function_boundaries.to_dict()) _dict['function_boundaries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if function_boundaries (nullable) is None + # and model_fields_set contains the field + if self.function_boundaries is None and "function_boundaries" in self.model_fields_set: + _dict['function_boundaries'] = None + return _dict @classmethod @@ -91,6 +105,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "base_address": obj.get("base_address"), "function_boundaries": [FunctionBoundary.from_dict(_item) for _item in obj["function_boundaries"]] if obj.get("function_boundaries") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/tag.py b/revengai/models/tag.py index ba9933e..a7f2e70 100644 --- a/revengai/models/tag.py +++ b/revengai/models/tag.py @@ -26,6 +26,7 @@ class Tag(BaseModel): Tag """ # noqa: E501 name: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( @@ -58,8 +59,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -67,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,6 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/tag_item.py b/revengai/models/tag_item.py index 852a408..5846f4f 100644 --- a/revengai/models/tag_item.py +++ b/revengai/models/tag_item.py @@ -28,6 +28,7 @@ class TagItem(BaseModel): name: StrictStr origin: StrictStr collection_id: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "origin", "collection_id"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if collection_id (nullable) is None # and model_fields_set contains the field if self.collection_id is None and "collection_id" in self.model_fields_set: @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "origin": obj.get("origin"), "collection_id": obj.get("collection_id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/tag_response.py b/revengai/models/tag_response.py index 2546983..50ed293 100644 --- a/revengai/models/tag_response.py +++ b/revengai/models/tag_response.py @@ -27,6 +27,7 @@ class TagResponse(BaseModel): """ # noqa: E501 name: StrictStr = Field(description="Name of the tag") origin: StrictStr = Field(description="Origin of tag") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "origin"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "origin": obj.get("origin") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/tag_search_response.py b/revengai/models/tag_search_response.py index 0891d33..59c0209 100644 --- a/revengai/models/tag_search_response.py +++ b/revengai/models/tag_search_response.py @@ -27,6 +27,7 @@ class TagSearchResponse(BaseModel): TagSearchResponse """ # noqa: E501 results: List[TagSearchResult] = Field(description="The results of the search") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_results: _items.append(_item_results.to_dict()) _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [TagSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/tag_search_result.py b/revengai/models/tag_search_result.py index aed5136..2a6e028 100644 --- a/revengai/models/tag_search_result.py +++ b/revengai/models/tag_search_result.py @@ -27,6 +27,7 @@ class TagSearchResult(BaseModel): """ # noqa: E501 tag_id: StrictInt = Field(description="The ID of the tag") tag: StrictStr = Field(description="The name of the tag") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tag_id", "tag"] model_config = ConfigDict( @@ -59,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -68,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tag_id": obj.get("tag_id"), "tag": obj.get("tag") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/task_response.py b/revengai/models/task_response.py index cd1e5c4..f67bdb4 100644 --- a/revengai/models/task_response.py +++ b/revengai/models/task_response.py @@ -28,6 +28,7 @@ class TaskResponse(BaseModel): """ # noqa: E501 status: Optional[TaskStatus] = None error_message: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "error_message"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if error_message (nullable) is None # and model_fields_set contains the field if self.error_message is None and "error_message" in self.model_fields_set: @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "error_message": obj.get("error_message") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/task_status_response.py b/revengai/models/task_status_response.py index 9a1493f..0ea98e9 100644 --- a/revengai/models/task_status_response.py +++ b/revengai/models/task_status_response.py @@ -29,6 +29,7 @@ class TaskStatusResponse(BaseModel): """ # noqa: E501 status: BinaryTaskStatus log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status", "log_history"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if log_history (nullable) is None # and model_fields_set contains the field if self.log_history is None and "log_history" in self.model_fields_set: @@ -90,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "log_history": obj.get("log_history") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/technique.py b/revengai/models/technique.py new file mode 100644 index 0000000..0db9f86 --- /dev/null +++ b/revengai/models/technique.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Technique(BaseModel): + """ + Technique + """ # noqa: E501 + description: StrictStr = Field(description="How the technique appears in this binary") + end_addr: StrictStr = Field(description="End address of the containing function, hex-encoded") + function_addr: StrictStr = Field(description="Address of the containing function, hex-encoded") + function_id: StrictInt = Field(description="ID of the containing function") + function_name: StrictStr = Field(description="Name of the containing function") + start_addr: StrictStr = Field(description="Start address of the containing function, hex-encoded") + technique_description: StrictStr = Field(description="Full ATT&CK description of the technique") + technique_id: StrictStr = Field(description="MITRE ATT&CK technique ID") + technique_name: StrictStr = Field(description="MITRE ATT&CK technique name") + technique_url: StrictStr = Field(description="Link to the technique in the ATT&CK catalogue") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["description", "end_addr", "function_addr", "function_id", "function_name", "start_addr", "technique_description", "technique_id", "technique_name", "technique_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Technique from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Technique from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "end_addr": obj.get("end_addr"), + "function_addr": obj.get("function_addr"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "start_addr": obj.get("start_addr"), + "technique_description": obj.get("technique_description"), + "technique_id": obj.get("technique_id"), + "technique_name": obj.get("technique_name"), + "technique_url": obj.get("technique_url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/threat_report_result.py b/revengai/models/threat_report_result.py new file mode 100644 index 0000000..80000af --- /dev/null +++ b/revengai/models/threat_report_result.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.ioc import IOC +from revengai.models.technique import Technique +from typing import Optional, Set +from typing_extensions import Self + +class ThreatReportResult(BaseModel): + """ + ThreatReportResult + """ # noqa: E501 + iocs: Optional[List[IOC]] = Field(description="Indicators of compromise found. An indicator whose source does not resolve to a function is still listed, without function details.", alias="IOCs") + attack_flow_summary: StrictStr = Field(description="Markdown summary of the attack flow") + executable_techniques: Optional[List[Technique]] = Field(description="MITRE ATT&CK techniques found. A technique is listed only when both its function and its ATT&CK catalogue entry resolve.") + number_of_analysed_functions: StrictInt = Field(description="Functions the agent analysed") + software_type: StrictStr = Field(description="Classification of the binary") + summary: StrictStr = Field(description="Summary of the analysis findings") + total_number_of_functions: StrictInt = Field(description="Functions identified in the binary") + yara_rule: StrictStr = Field(description="YARA rule generated for the binary") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["IOCs", "attack_flow_summary", "executable_techniques", "number_of_analysed_functions", "software_type", "summary", "total_number_of_functions", "yara_rule"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreatReportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in iocs (list) + _items = [] + if self.iocs: + for _item_iocs in self.iocs: + if _item_iocs: + _items.append(_item_iocs.to_dict()) + _dict['IOCs'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in executable_techniques (list) + _items = [] + if self.executable_techniques: + for _item_executable_techniques in self.executable_techniques: + if _item_executable_techniques: + _items.append(_item_executable_techniques.to_dict()) + _dict['executable_techniques'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if iocs (nullable) is None + # and model_fields_set contains the field + if self.iocs is None and "iocs" in self.model_fields_set: + _dict['IOCs'] = None + + # set to None if executable_techniques (nullable) is None + # and model_fields_set contains the field + if self.executable_techniques is None and "executable_techniques" in self.model_fields_set: + _dict['executable_techniques'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreatReportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "IOCs": [IOC.from_dict(_item) for _item in obj["IOCs"]] if obj.get("IOCs") is not None else None, + "attack_flow_summary": obj.get("attack_flow_summary"), + "executable_techniques": [Technique.from_dict(_item) for _item in obj["executable_techniques"]] if obj.get("executable_techniques") is not None else None, + "number_of_analysed_functions": obj.get("number_of_analysed_functions"), + "software_type": obj.get("software_type"), + "summary": obj.get("summary"), + "total_number_of_functions": obj.get("total_number_of_functions"), + "yara_rule": obj.get("yara_rule") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/timestamp_model.py b/revengai/models/timestamp_model.py index baf83f6..14056e7 100644 --- a/revengai/models/timestamp_model.py +++ b/revengai/models/timestamp_model.py @@ -28,6 +28,7 @@ class TimestampModel(BaseModel): pe_timestamp: StrictInt export_timestamp: StrictInt debug_timestamp: StrictInt + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["pe_timestamp", "export_timestamp", "debug_timestamp"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "export_timestamp": obj.get("export_timestamp"), "debug_timestamp": obj.get("debug_timestamp") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/triage_function.py b/revengai/models/triage_function.py new file mode 100644 index 0000000..fdbb806 --- /dev/null +++ b/revengai/models/triage_function.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class TriageFunction(BaseModel): + """ + TriageFunction + """ # noqa: E501 + address: StrictInt = Field(description="Virtual address of the function") + capabilities: Optional[List[StrictStr]] = Field(description="Capability categories the function exhibits") + id: StrictInt = Field(description="ID of the function") + score: Union[StrictFloat, StrictInt] = Field(description="Maliciousness score for the function, 0 to 1") + summary: StrictStr = Field(description="What the function does") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "capabilities", "id", "score", "summary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriageFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if capabilities (nullable) is None + # and model_fields_set contains the field + if self.capabilities is None and "capabilities" in self.model_fields_set: + _dict['capabilities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriageFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "capabilities": obj.get("capabilities"), + "id": obj.get("id"), + "score": obj.get("score"), + "summary": obj.get("summary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/triage_function_response.py b/revengai/models/triage_function_response.py index 205955e..04ecc26 100644 --- a/revengai/models/triage_function_response.py +++ b/revengai/models/triage_function_response.py @@ -31,6 +31,7 @@ class TriageFunctionResponse(BaseModel): summary: StrictStr = Field(description="Summary of the function's behaviour") score: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Score indicating the function's relevance") capabilities: List[StrictStr] = Field(description="List of capabilities exhibited by the function") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "address", "summary", "score", "capabilities"] @field_validator('capabilities') @@ -71,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -80,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "score": obj.get("score"), "capabilities": obj.get("capabilities") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/triage_report_response.py b/revengai/models/triage_report_response.py index 89da961..6c55f7f 100644 --- a/revengai/models/triage_report_response.py +++ b/revengai/models/triage_report_response.py @@ -30,6 +30,7 @@ class TriageReportResponse(BaseModel): software_score: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Overall triage score for the software") summary: StrictStr = Field(description="Summary of the triage analysis") functions: List[TriageFunctionResponse] = Field(description="List of triaged functions") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["software_score", "summary", "functions"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -78,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_functions: _items.append(_item_functions.to_dict()) _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "summary": obj.get("summary"), "functions": [TriageFunctionResponse.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/triage_result.py b/revengai/models/triage_result.py new file mode 100644 index 0000000..127aac4 --- /dev/null +++ b/revengai/models/triage_result.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from revengai.models.triage_function import TriageFunction +from typing import Optional, Set +from typing_extensions import Self + +class TriageResult(BaseModel): + """ + TriageResult + """ # noqa: E501 + functions: Optional[List[TriageFunction]] = Field(description="Per-function assessments. A function whose address no longer resolves within the analysis is omitted.") + software_score: Union[StrictFloat, StrictInt] = Field(description="Maliciousness score for the binary, 0 to 1") + summary: StrictStr = Field(description="Summary of the triage assessment") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["functions", "software_score", "summary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriageResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions (list) + _items = [] + if self.functions: + for _item_functions in self.functions: + if _item_functions: + _items.append(_item_functions.to_dict()) + _dict['functions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if functions (nullable) is None + # and model_fields_set contains the field + if self.functions is None and "functions" in self.model_fields_set: + _dict['functions'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriageResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "functions": [TriageFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, + "software_score": obj.get("software_score"), + "summary": obj.get("summary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_execution_explain_input_body.py b/revengai/models/trigger_execution_explain_input_body.py new file mode 100644 index 0000000..cc809ac --- /dev/null +++ b/revengai/models/trigger_execution_explain_input_body.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TriggerExecutionExplainInputBody(BaseModel): + """ + TriggerExecutionExplainInputBody + """ # noqa: E501 + category: StrictStr = Field(description="Execution category to focus the explanation on.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerExecutionExplainInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerExecutionExplainInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_execution_scan_input_body.py b/revengai/models/trigger_execution_scan_input_body.py new file mode 100644 index 0000000..c136a2b --- /dev/null +++ b/revengai/models/trigger_execution_scan_input_body.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TriggerExecutionScanInputBody(BaseModel): + """ + TriggerExecutionScanInputBody + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these categories. Omit to scan the default executes-code set.") + direct_only: Optional[StrictBool] = Field(default=None, description="Only report functions whose own name matches a known execution API; skips the calls-into-execution pass, avoiding a bulk call-graph fetch.") + sources: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these sources. Omit to scan every source.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["categories", "direct_only", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('dynamic-resolve', 'hooking', 'injection', 'memory-exec', 'module-load', 'process-control', 'process-create', 'script-exec', 'shellcode', 'thread-create', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'script-engine', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerExecutionScanInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerExecutionScanInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories"), + "direct_only": obj.get("direct_only"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_filesystem_analyse_input_body.py b/revengai/models/trigger_filesystem_analyse_input_body.py new file mode 100644 index 0000000..cc9466b --- /dev/null +++ b/revengai/models/trigger_filesystem_analyse_input_body.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TriggerFilesystemAnalyseInputBody(BaseModel): + """ + TriggerFilesystemAnalyseInputBody + """ # noqa: E501 + category: StrictStr = Field(description="Filesystem category to focus the explanation on.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerFilesystemAnalyseInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerFilesystemAnalyseInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_filesystem_scan_input_body.py b/revengai/models/trigger_filesystem_scan_input_body.py new file mode 100644 index 0000000..67b54eb --- /dev/null +++ b/revengai/models/trigger_filesystem_scan_input_body.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TriggerFilesystemScanInputBody(BaseModel): + """ + TriggerFilesystemScanInputBody + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these categories. Omit to scan the default filesystem-modifying set.") + direct_only: Optional[StrictBool] = Field(default=None, description="Only report functions whose own name matches a known filesystem API; skips the calls-into-filesystem pass, avoiding a bulk call-graph fetch.") + sources: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these sources. Omit to scan every source.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["categories", "direct_only", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('dir-read', 'dir-write', 'environment', 'file-delete', 'file-open', 'file-perms', 'file-read', 'file-stat', 'file-write', 'module', 'path-write', 'process', 'registry-read', 'registry-write', 'service', 'system', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'cpp-stdlib', 'generic', 'libc', 'qt', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerFilesystemScanInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerFilesystemScanInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories"), + "direct_only": obj.get("direct_only"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_networking_explain_input_body.py b/revengai/models/trigger_networking_explain_input_body.py new file mode 100644 index 0000000..069545c --- /dev/null +++ b/revengai/models/trigger_networking_explain_input_body.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TriggerNetworkingExplainInputBody(BaseModel): + """ + TriggerNetworkingExplainInputBody + """ # noqa: E501 + category: StrictStr = Field(description="Networking category to focus the explanation on.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["category"] + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerNetworkingExplainInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerNetworkingExplainInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/trigger_networking_scan_input_body.py b/revengai/models/trigger_networking_scan_input_body.py new file mode 100644 index 0000000..3c468a3 --- /dev/null +++ b/revengai/models/trigger_networking_scan_input_body.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TriggerNetworkingScanInputBody(BaseModel): + """ + TriggerNetworkingScanInputBody + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these categories. Omit to scan the default remote-communication set.") + direct_only: Optional[StrictBool] = Field(default=None, description="Only report functions whose own name matches a known networking API; skips the calls-into-networking pass, avoiding a bulk call-graph fetch.") + sources: Optional[List[StrictStr]] = Field(default=None, description="Restrict findings to these sources. Omit to scan every source.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["categories", "direct_only", "sources"] + + @field_validator('categories') + def categories_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('accept', 'address', 'connect', 'dns', 'http', 'netinfo', 'raw-packet', 'recv', 'send', 'socket', 'tls', 'url', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api']): + raise ValueError("each list item must be one of ('boost', 'cpp', 'curl', 'generic', 'libc', 'pcap', 'poco', 'qt', 'tls', 'windows', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerNetworkingScanInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerNetworkingScanInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories"), + "direct_only": obj.get("direct_only"), + "sources": obj.get("sources") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/upload_output_body.py b/revengai/models/upload_output_body.py new file mode 100644 index 0000000..fb43076 --- /dev/null +++ b/revengai/models/upload_output_body.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.analysis_requirement import AnalysisRequirement +from typing import Optional, Set +from typing_extensions import Self + +class UploadOutputBody(BaseModel): + """ + UploadOutputBody + """ # noqa: E501 + analysis_requirements: Optional[List[AnalysisRequirement]] = Field(description="Ways to unblock POST /v3/analyses for this file if it cannot be statically analysed as-is; empty if no requirement applies.") + can_extract: StrictBool = Field(description="Whether the firmware/extraction flow can accept this file.") + can_sandbox: StrictBool = Field(description="Whether the file can be extracted and run in the Windows sandbox.") + file_type: StrictStr = Field(description="The kind of file that was uploaded.") + filename: StrictStr = Field(description="The filename as given by the caller.") + is_archive: StrictBool = Field(description="Whether the detected format is a container/compression archive.") + mime: StrictStr = Field(description="The MIME type detected from the file's contents, independent of upload_file_type.") + sha_256_hash: StrictStr = Field(description="SHA-256 hash of the uploaded file; the storage key for every subsequent reference to it.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_requirements", "can_extract", "can_sandbox", "file_type", "filename", "is_archive", "mime", "sha_256_hash"] + + @field_validator('file_type') + def file_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['BINARY', 'DEBUG', 'PACKED', 'FIRMWARE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('BINARY', 'DEBUG', 'PACKED', 'FIRMWARE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UploadOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in analysis_requirements (list) + _items = [] + if self.analysis_requirements: + for _item_analysis_requirements in self.analysis_requirements: + if _item_analysis_requirements: + _items.append(_item_analysis_requirements.to_dict()) + _dict['analysis_requirements'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if analysis_requirements (nullable) is None + # and model_fields_set contains the field + if self.analysis_requirements is None and "analysis_requirements" in self.model_fields_set: + _dict['analysis_requirements'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UploadOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_requirements": [AnalysisRequirement.from_dict(_item) for _item in obj["analysis_requirements"]] if obj.get("analysis_requirements") is not None else None, + "can_extract": obj.get("can_extract"), + "can_sandbox": obj.get("can_sandbox"), + "file_type": obj.get("file_type"), + "filename": obj.get("filename"), + "is_archive": obj.get("is_archive"), + "mime": obj.get("mime"), + "sha_256_hash": obj.get("sha_256_hash") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/upload_response.py b/revengai/models/upload_response.py index 0c8b94c..7293cae 100644 --- a/revengai/models/upload_response.py +++ b/revengai/models/upload_response.py @@ -17,7 +17,8 @@ import json from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.analysis_requirement import AnalysisRequirement from revengai.models.upload_file_type import UploadFileType from typing import Optional, Set from typing_extensions import Self @@ -33,7 +34,9 @@ class UploadResponse(BaseModel): is_archive: StrictBool can_sandbox: StrictBool can_extract: StrictBool - __properties: ClassVar[List[str]] = ["sha_256_hash", "file_type", "filename", "mime", "is_archive", "can_sandbox", "can_extract"] + analysis_requirements: Optional[List[AnalysisRequirement]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sha_256_hash", "file_type", "filename", "mime", "is_archive", "can_sandbox", "can_extract", "analysis_requirements"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +79,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in analysis_requirements (list) + _items = [] + if self.analysis_requirements: + for _item_analysis_requirements in self.analysis_requirements: + if _item_analysis_requirements: + _items.append(_item_analysis_requirements.to_dict()) + _dict['analysis_requirements'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -92,8 +109,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "mime": obj.get("mime"), "is_archive": obj.get("is_archive"), "can_sandbox": obj.get("can_sandbox"), - "can_extract": obj.get("can_extract") + "can_extract": obj.get("can_extract"), + "analysis_requirements": [AnalysisRequirement.from_dict(_item) for _item in obj["analysis_requirements"]] if obj.get("analysis_requirements") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/upsert_ai_decomplation_rating_request.py b/revengai/models/upsert_ai_decomplation_rating_request.py index d633540..275efc5 100644 --- a/revengai/models/upsert_ai_decomplation_rating_request.py +++ b/revengai/models/upsert_ai_decomplation_rating_request.py @@ -28,6 +28,7 @@ class UpsertAiDecomplationRatingRequest(BaseModel): """ # noqa: E501 rating: AiDecompilationRating = Field(description="The rating for the AI decompilation response") reason: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["rating", "reason"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if reason (nullable) is None # and model_fields_set contains the field if self.reason is None and "reason" in self.model_fields_set: @@ -89,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "rating": obj.get("rating"), "reason": obj.get("reason") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/user_activity_response.py b/revengai/models/user_activity_response.py index b3b647a..b1178ec 100644 --- a/revengai/models/user_activity_response.py +++ b/revengai/models/user_activity_response.py @@ -32,6 +32,7 @@ class UserActivityResponse(BaseModel): message: StrictStr sources: StrictStr username: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["actions", "activity_scope", "creation", "message", "sources", "username"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -92,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sources": obj.get("sources"), "username": obj.get("username") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/xref_from_response.py b/revengai/models/xref_from_response.py index 71fd222..6d16de7 100644 --- a/revengai/models/xref_from_response.py +++ b/revengai/models/xref_from_response.py @@ -35,6 +35,7 @@ class XrefFromResponse(BaseModel): segment: Optional[SegmentInfo] = None orig_str_encoding: Optional[StrictStr] = None xref_to: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value", "is_scalar", "is_call", "is_data", "is_string", "raw_data", "segment", "orig_str_encoding", "xref_to"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of segment if self.segment: _dict['segment'] = self.segment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: @@ -146,6 +154,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "orig_str_encoding": obj.get("orig_str_encoding"), "xref_to": obj.get("xref_to") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/xref_response.py b/revengai/models/xref_response.py index 78b4087..4b2a7a7 100644 --- a/revengai/models/xref_response.py +++ b/revengai/models/xref_response.py @@ -29,6 +29,7 @@ class XrefResponse(BaseModel): """ # noqa: E501 xref_to_list: List[XrefToResponse] xref_from_list: List[XrefFromResponse] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["xref_to_list", "xref_from_list"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -84,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_xref_from_list: _items.append(_item_xref_from_list.to_dict()) _dict['xref_from_list'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -99,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "xref_to_list": [XrefToResponse.from_dict(_item) for _item in obj["xref_to_list"]] if obj.get("xref_to_list") is not None else None, "xref_from_list": [XrefFromResponse.from_dict(_item) for _item in obj["xref_from_list"]] if obj.get("xref_from_list") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/xref_to_response.py b/revengai/models/xref_to_response.py index 253563a..4e9ad5d 100644 --- a/revengai/models/xref_to_response.py +++ b/revengai/models/xref_to_response.py @@ -35,6 +35,7 @@ class XrefToResponse(BaseModel): segment: Optional[SegmentInfo] = None orig_str_encoding: Optional[StrictStr] = None xref_from: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value", "is_scalar", "is_call", "is_data", "is_string", "raw_data", "segment", "orig_str_encoding", "xref_from"] model_config = ConfigDict( @@ -67,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of segment if self.segment: _dict['segment'] = self.segment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: @@ -146,6 +154,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "orig_str_encoding": obj.get("orig_str_encoding"), "xref_from": obj.get("xref_from") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj