From 83dc47f045a1d38880d8f3fe41b97a3fab60ae23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Sep 2026 13:58:14 +0000 Subject: [PATCH] Update SDK to version v4.46.0 - Generated from OpenAPI spec version v4.46.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 138 + docs/AgentApi.md | 3588 +++++- docs/AnalysesCoreApi.md | 215 +- docs/AnalysisRequirement.md | 31 + docs/ApiCombinationEvidence.md | 34 + docs/AutoRunAgents.md | 2 +- docs/BaseResponseDict.md | 2 +- docs/BaseResponseProtocolsAgentResponse.md | 33 + docs/BaseResponseSecretsAgentResponse.md | 33 + docs/BinariesApi.md | 98 + docs/BinaryConfig.md | 6 +- docs/BinaryDetailsResponse.md | 4 +- docs/BinaryExternalsResponse.md | 4 +- docs/BytesConstant.md | 32 + docs/CallChain.md | 29 + docs/CallChainEvidence.md | 34 + docs/CapabilitiesResult.md | 29 + docs/Capability.md | 34 + docs/Config.md | 32 + docs/CreateMetadata.md | 31 + docs/CreateRequest.md | 37 + docs/CreateResult.md | 30 + docs/CryptoExplainMetadata.md | 30 + docs/CryptoExplainResult.md | 34 + docs/CryptoExplainedFunction.md | 31 + docs/DecompilerSummary.md | 31 + docs/DecompilerSummaryEvidence.md | 34 + docs/Display.md | 28 + docs/ELFModel.md | 6 +- docs/Endianness.md | 16 + docs/EvidenceEffect.md | 14 + docs/EvidenceStrength.md | 14 + docs/ExecutionCall.md | 33 + docs/ExecutionDirectMatch.md | 32 + docs/ExecutionExplainMetadata.md | 30 + docs/ExecutionExplainResult.md | 38 + docs/ExecutionExplainedFunction.md | 31 + docs/ExecutionFinding.md | 39 + docs/ExecutionScanMetadata.md | 30 + docs/ExecutionScanResult.md | 31 + docs/ExternalResponse.md | 2 +- docs/FeedbackOutputBody.md | 29 + docs/FilesystemAnalyseMetadata.md | 30 + docs/FilesystemAnalyseResult.md | 37 + docs/FilesystemCall.md | 33 + docs/FilesystemDirectMatch.md | 32 + docs/FilesystemExplainedFunction.md | 31 + docs/FilesystemFinding.md | 39 + docs/FilesystemScanMetadata.md | 30 + docs/FilesystemScanResult.md | 31 + docs/Finding.md | 31 + docs/FindingEvidenceInner.md | 48 + docs/FunctionBoundary.md | 4 +- docs/FunctionSimilarity.md | 31 + docs/FunctionSimilarityEvidence.md | 34 + docs/FunctionsCoreApi.md | 8 +- docs/FunctionsRenamingHistoryApi.md | 4 +- docs/HardcodedSecretEvidence.md | 40 + docs/IOC.md | 12 +- docs/ImportedApi.md | 30 + docs/ImportedApiCall.md | 31 + docs/ImportedApiCallEvidence.md | 34 + docs/KnownConstantEvidence.md | 34 + docs/Meta.md | 29 + docs/Metadata.md | 30 + docs/ModelInterpretation.md | 29 + docs/ModelInterpretationEvidence.md | 34 + docs/NetworkingCall.md | 33 + docs/NetworkingDirectMatch.md | 32 + docs/NetworkingExplainMetadata.md | 30 + docs/NetworkingExplainResult.md | 39 + docs/NetworkingExplainedFunction.md | 31 + docs/NetworkingFinding.md | 39 + docs/NetworkingScanMetadata.md | 30 + docs/NetworkingScanResult.md | 31 + docs/OperationCreateMetadataCreateResult.md | 33 + ...ryptoExplainMetadataCryptoExplainResult.md | 33 + ...onExplainMetadataExecutionExplainResult.md | 33 + ...xecutionScanMetadataExecutionScanResult.md | 33 + ...mAnalyseMetadataFilesystemAnalyseResult.md | 33 + ...esystemScanMetadataFilesystemScanResult.md | 33 + docs/OperationMetadataCapabilitiesResult.md | 33 + docs/OperationMetadataRemediationResult.md | 33 + docs/OperationMetadataReportResult.md | 33 + docs/OperationMetadataThreatReportResult.md | 33 + docs/OperationMetadataTriageResult.md | 33 + ...gExplainMetadataNetworkingExplainResult.md | 33 + ...workingScanMetadataNetworkingScanResult.md | 33 + docs/PEModel.md | 2 +- docs/ProtocolsAgentResponse.md | 31 + docs/ReferencedConstant.md | 31 + docs/ReferencedConstantEvidence.md | 34 + docs/RemediationResult.md | 31 + docs/ReportReachabilityStatus.md | 16 + docs/ReportResult.md | 30 + docs/RuleKind.md | 28 + docs/SandboxConfig.md | 35 + docs/ScrapeThirdPartyConfig.md | 2 +- docs/SecretsAgentResponse.md | 31 + docs/SegmentInfo.md | 2 +- docs/Status.md | 1 + docs/Subject.md | 33 + docs/SubjectAnyOf.md | 29 + docs/SubjectAnyOf1.md | 29 + docs/SubjectAnyOf2.md | 29 + docs/SubjectAnyOf3.md | 29 + docs/SubmitFeedbackInputBody.md | 29 + docs/SuspiciousString.md | 30 + docs/SuspiciousStringEvidence.md | 34 + docs/Symbols.md | 4 +- docs/Technique.md | 38 + docs/ThreatReportResult.md | 36 + docs/TriageFunction.md | 33 + docs/TriageResult.md | 31 + docs/TriggerExecutionExplainInputBody.md | 29 + docs/TriggerExecutionScanInputBody.md | 31 + docs/TriggerFilesystemAnalyseInputBody.md | 29 + docs/TriggerFilesystemScanInputBody.md | 31 + docs/TriggerNetworkingExplainInputBody.md | 29 + docs/TriggerNetworkingScanInputBody.md | 31 + docs/UploadOutputBody.md | 36 + docs/UploadResponse.md | 1 + revengai/__init__.py | 204 +- revengai/api/agent_api.py | 10469 +++++++++++++++- revengai/api/analyses_core_api.py | 1076 +- revengai/api/binaries_api.py | 322 +- revengai/api/functions_core_api.py | 20 +- .../api/functions_renaming_history_api.py | 10 +- revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 101 + revengai/models/add_callee_input_body.py | 13 - .../add_collection_binaries_input_body.py | 13 - revengai/models/add_user_string_input_body.py | 13 - .../add_user_string_to_function_input_body.py | 13 - .../models/analysis_basic_info_output_body.py | 13 - revengai/models/analysis_data_types_group.py | 13 - .../models/analysis_data_types_output_body.py | 13 - revengai/models/analysis_function_entry.py | 18 - revengai/models/analysis_log_entry.py | 13 - revengai/models/analysis_log_message.py | 13 - revengai/models/analysis_logs.py | 13 - revengai/models/analysis_report.py | 13 - revengai/models/analysis_requirement.py | 95 + revengai/models/analysis_string_function.py | 13 - revengai/models/analysis_string_item.py | 13 - revengai/models/analysis_tag_body.py | 13 - revengai/models/api_call.py | 13 - revengai/models/api_combination_evidence.py | 134 + revengai/models/api_error.py | 13 - revengai/models/array_data_type.py | 13 - revengai/models/array_definition.py | 13 - revengai/models/artifact.py | 13 - revengai/models/attempt_failed_event.py | 13 - revengai/models/attempt_started_event.py | 13 - revengai/models/auto_run_agents.py | 4 +- .../models/auto_unstrip_status_output_body.py | 13 - revengai/models/base_data_type.py | 13 - .../base_response_protocols_agent_response.py | 125 + .../base_response_secrets_agent_response.py | 125 + .../models/batch_function_signature_entry.py | 13 - revengai/models/batch_rename_input_body.py | 13 - revengai/models/batch_rename_item.py | 13 - revengai/models/batch_rename_output_body.py | 13 - revengai/models/binary.py | 13 - revengai/models/binary_config.py | 62 +- revengai/models/binary_details_response.py | 49 +- revengai/models/bitfield_data_type.py | 13 - revengai/models/bytes_constant.py | 101 + revengai/models/call_chain.py | 87 + revengai/models/call_chain_evidence.py | 126 + revengai/models/call_edge.py | 13 - revengai/models/call_edges_output_body.py | 13 - revengai/models/canonical_name.py | 13 - .../models/canonicalize_names_input_body.py | 13 - .../models/canonicalize_names_output_body.py | 13 - revengai/models/capabilities_output_body.py | 13 - revengai/models/capabilities_result.py | 99 + revengai/models/capability.py | 96 + revengai/models/capability_entry.py | 13 - revengai/models/collection_list_item_body.py | 13 - revengai/models/comments_data.py | 13 - revengai/models/config.py | 100 + revengai/models/confirm_tool_input_body.py | 13 - revengai/models/connection.py | 13 - revengai/models/console_output_entry.py | 13 - revengai/models/conversation.py | 13 - revengai/models/conversation_context.py | 13 - revengai/models/conversation_with_events.py | 13 - .../copy_function_signatures_input_body.py | 13 - .../copy_function_signatures_output_body.py | 13 - revengai/models/copy_signature_item.py | 13 - .../models/create_ai_decomp_output_body.py | 13 - .../create_analysis_data_types_input_body.py | 13 - revengai/models/create_array_data_type.py | 13 - revengai/models/create_base_data_type.py | 13 - revengai/models/create_bitfield_data_type.py | 13 - .../models/create_collection_input_body.py | 13 - .../models/create_collection_output_body.py | 13 - .../models/create_conversation_request.py | 13 - revengai/models/create_enum_data_type.py | 13 - revengai/models/create_function_data_type.py | 13 - revengai/models/create_metadata.py | 97 + revengai/models/create_pointer_data_type.py | 13 - revengai/models/create_request.py | 151 + revengai/models/create_result.py | 88 + revengai/models/create_struct_data_type.py | 13 - revengai/models/create_typedef_data_type.py | 13 - revengai/models/create_union_data_type.py | 13 - revengai/models/create_unknown_data_type.py | 13 - revengai/models/crypto_call.py | 13 - revengai/models/crypto_direct_match.py | 13 - revengai/models/crypto_explain_metadata.py | 101 + revengai/models/crypto_explain_result.py | 122 + revengai/models/crypto_explained_function.py | 90 + revengai/models/crypto_finding.py | 13 - revengai/models/crypto_scan_metadata.py | 13 - revengai/models/crypto_scan_result.py | 13 - revengai/models/data_type_enum_value_entry.py | 13 - revengai/models/data_type_function_entry.py | 13 - .../data_type_function_parameter_entry.py | 13 - revengai/models/data_type_version.py | 13 - revengai/models/decomp_failed_event.py | 13 - revengai/models/decomp_finished_event.py | 13 - revengai/models/decompilation_data.py | 13 - revengai/models/decompiler_summary.py | 104 + .../models/decompiler_summary_evidence.py | 134 + revengai/models/display.py | 49 + revengai/models/dns_query.py | 13 - revengai/models/drakvuf_file_metadata.py | 13 - .../dynamic_execution_status_response.py | 13 - revengai/models/elf_model.py | 4 +- revengai/models/endianness.py | 43 + revengai/models/enum_data_type.py | 13 - revengai/models/enum_definition.py | 13 - revengai/models/error_body.py | 17 +- revengai/models/event.py | 13 - revengai/models/evidence_effect.py | 42 + revengai/models/evidence_strength.py | 42 + revengai/models/execution_call.py | 115 + revengai/models/execution_direct_match.py | 113 + revengai/models/execution_explain_metadata.py | 101 + revengai/models/execution_explain_result.py | 122 + .../models/execution_explained_function.py | 90 + revengai/models/execution_finding.py | 184 + revengai/models/execution_scan_metadata.py | 101 + revengai/models/execution_scan_result.py | 103 + revengai/models/extracted_url.py | 13 - revengai/models/feedback_output_body.py | 101 + revengai/models/file_activity_entry.py | 13 - .../models/filesystem_analyse_metadata.py | 101 + revengai/models/filesystem_analyse_result.py | 120 + revengai/models/filesystem_call.py | 115 + revengai/models/filesystem_direct_match.py | 113 + .../models/filesystem_explained_function.py | 90 + revengai/models/filesystem_finding.py | 184 + revengai/models/filesystem_scan_metadata.py | 101 + revengai/models/filesystem_scan_result.py | 103 + revengai/models/finding.py | 99 + revengai/models/finding_evidence_inner.py | 251 + revengai/models/function_boundary.py | 22 +- revengai/models/function_call_edges.py | 13 - revengai/models/function_data_type.py | 13 - .../models/function_details_output_body.py | 13 - revengai/models/function_match.py | 13 - revengai/models/function_signature_entry.py | 13 - revengai/models/function_signature_version.py | 13 - revengai/models/function_similarity.py | 95 + .../models/function_similarity_evidence.py | 134 + revengai/models/function_string_item.py | 13 - revengai/models/function_type_definition.py | 13 - revengai/models/generate_pdf_output_body.py | 13 - .../get_additional_details_output_body.py | 13 - ...t_additional_details_status_output_body.py | 13 - .../models/get_analysis_logs_output_body.py | 13 - ...get_analysis_strings_status_output_body.py | 13 - revengai/models/get_collection_output_body.py | 13 - revengai/models/get_data_type_history_body.py | 13 - .../get_function_signature_history_body.py | 13 - revengai/models/get_matches_output_body.py | 13 - .../models/get_matches_status_output_body.py | 13 - revengai/models/get_tokens_response.py | 13 - revengai/models/hardcoded_secret_evidence.py | 139 + revengai/models/history_actor.py | 13 - revengai/models/history_entry.py | 13 - revengai/models/http_request.py | 13 - revengai/models/imported_api.py | 94 + revengai/models/imported_api_call.py | 107 + revengai/models/imported_api_call_evidence.py | 134 + .../models/imported_function_caller_entry.py | 13 - .../imported_function_detail_output_body.py | 13 - revengai/models/indirect_call_site.py | 13 - .../models/indirect_call_sites_output_body.py | 13 - revengai/models/inline_comment.py | 13 - revengai/models/ioc.py | 41 +- revengai/models/known_constant_evidence.py | 134 + revengai/models/line_attributions_data.py | 13 - revengai/models/list_analyses_output_body.py | 13 - .../list_analysis_data_types_output_body.py | 13 - .../list_analysis_functions_output_body.py | 13 - .../list_analysis_strings_output_body.py | 13 - .../models/list_collections_output_body.py | 13 - .../models/list_data_type_functions_body.py | 13 - .../list_example_analyses_output_body.py | 13 - .../list_function_signatures_output_body.py | 13 - .../list_function_strings_output_body.py | 13 - .../list_imported_functions_output_body.py | 13 - revengai/models/memdump_entry.py | 13 - revengai/models/meta.py | 87 + revengai/models/metadata.py | 101 + revengai/models/model_interpretation.py | 91 + .../models/model_interpretation_evidence.py | 125 + revengai/models/module_load_entry.py | 13 - revengai/models/mutex_entry.py | 13 - revengai/models/name_confidence.py | 13 - revengai/models/names_finished_event.py | 13 - revengai/models/network_activity.py | 13 - revengai/models/networking_call.py | 115 + revengai/models/networking_direct_match.py | 113 + .../models/networking_explain_metadata.py | 101 + revengai/models/networking_explain_result.py | 124 + .../models/networking_explained_function.py | 90 + revengai/models/networking_finding.py | 184 + revengai/models/networking_scan_metadata.py | 101 + revengai/models/networking_scan_result.py | 103 + ...operation_create_metadata_create_result.py | 119 + ..._explain_metadata_crypto_explain_result.py | 106 + ...crypto_scan_metadata_crypto_scan_result.py | 13 - ...plain_metadata_execution_explain_result.py | 106 + ...ion_scan_metadata_execution_scan_result.py | 106 + ...lyse_metadata_filesystem_analyse_result.py | 106 + ...em_scan_metadata_filesystem_scan_result.py | 106 + .../operation_metadata_capabilities_result.py | 106 + .../operation_metadata_remediation_result.py | 106 + .../operation_metadata_report_result.py | 106 + ...operation_metadata_threat_report_result.py | 106 + .../operation_metadata_triage_result.py | 106 + ...lain_metadata_networking_explain_result.py | 106 + ...ng_scan_metadata_networking_scan_result.py | 106 + ...rity_scan_metadata_security_scan_result.py | 13 - .../patch_collection_binaries_input_body.py | 13 - .../patch_collection_binaries_output_body.py | 13 - .../models/patch_collection_input_body.py | 13 - .../models/patch_collection_output_body.py | 13 - .../patch_collection_tags_input_body.py | 13 - .../patch_collection_tags_output_body.py | 13 - revengai/models/patch_comment_body.py | 13 - revengai/models/pcap_body_info.py | 13 - revengai/models/permissions.py | 13 - revengai/models/pointer_data_type.py | 13 - revengai/models/pointer_definition.py | 13 - revengai/models/process_activity_entry.py | 13 - revengai/models/process_memdumps.py | 13 - revengai/models/process_node.py | 13 - revengai/models/process_tree.py | 13 - revengai/models/progress_message.py | 13 - revengai/models/prose_event.py | 13 - revengai/models/protocols_agent_response.py | 100 + revengai/models/referenced_constant.py | 104 + .../models/referenced_constant_evidence.py | 134 + revengai/models/regenerate_output_body.py | 13 - revengai/models/registry_operation.py | 13 - revengai/models/remediation_result.py | 105 + .../remove_collection_binaries_input_body.py | 13 - revengai/models/rename_applied_event.py | 13 - revengai/models/rename_input_body.py | 13 - revengai/models/rename_output_body.py | 13 - .../models/rename_unnamed_functions_result.py | 13 - revengai/models/rendered_token.py | 13 - revengai/models/report_event.py | 13 - revengai/models/report_info.py | 13 - revengai/models/report_options.py | 13 - revengai/models/report_reachability_status.py | 43 + revengai/models/report_result.py | 98 + revengai/models/rule_kind.py | 49 + revengai/models/sandbox_config.py | 129 + revengai/models/scheduled_task_entry.py | 13 - revengai/models/scrape_third_party_config.py | 4 +- revengai/models/secrets_agent_response.py | 100 + revengai/models/security_finding.py | 13 - revengai/models/security_scan_metadata.py | 13 - revengai/models/segment_info.py | 2 +- revengai/models/send_message_request.py | 13 - revengai/models/service_entry.py | 13 - revengai/models/signature_parameter_entry.py | 13 - revengai/models/signature_parameter_input.py | 13 - revengai/models/signature_storage_entry.py | 13 - revengai/models/signature_storage_input.py | 13 - revengai/models/source_delta_event.py | 13 - revengai/models/source_reset_event.py | 13 - .../sse_event_context_compacted_data.py | 13 - .../models/sse_event_run_cancelled_data.py | 13 - revengai/models/sse_event_run_error_data.py | 13 - .../models/sse_event_run_finished_data.py | 13 - revengai/models/sse_event_run_started_data.py | 13 - .../models/sse_event_step_finished_data.py | 13 - .../models/sse_event_step_started_data.py | 13 - .../sse_event_text_message_content_data.py | 13 - .../models/sse_event_text_message_end_data.py | 13 - .../sse_event_text_message_start_data.py | 13 - .../models/sse_event_title_updated_data.py | 13 - .../sse_event_tool_call_args_delta_data.py | 13 - .../models/sse_event_tool_call_end_data.py | 13 - .../sse_event_tool_call_progress_data.py | 13 - .../models/sse_event_tool_call_result_data.py | 13 - .../models/sse_event_tool_call_start_data.py | 13 - ...e_event_tool_confirmation_required_data.py | 13 - revengai/models/start_matching_output_body.py | 13 - revengai/models/startup_info.py | 13 - revengai/models/status.py | 12 +- revengai/models/status_body.py | 13 - revengai/models/status_response.py | 13 - revengai/models/struct_definition.py | 13 - revengai/models/subject.py | 163 + revengai/models/subject_any_of.py | 87 + revengai/models/subject_any_of1.py | 87 + revengai/models/subject_any_of2.py | 87 + revengai/models/subject_any_of3.py | 87 + revengai/models/submit_feedback_input_body.py | 93 + revengai/models/suggested_hole.py | 13 - revengai/models/suggested_member_view.py | 13 - revengai/models/suggested_type_view.py | 13 - revengai/models/summary_data.py | 13 - revengai/models/suspicious_string.py | 98 + revengai/models/suspicious_string_evidence.py | 134 + revengai/models/symbols.py | 12 +- revengai/models/tcp_carved_file.py | 13 - revengai/models/technique.py | 104 + revengai/models/threat_report_result.py | 126 + revengai/models/token.py | 13 - revengai/models/triage_function.py | 99 + revengai/models/triage_result.py | 103 + .../trigger_execution_explain_input_body.py | 93 + .../trigger_execution_scan_input_body.py | 135 + .../trigger_filesystem_analyse_input_body.py | 93 + .../trigger_filesystem_scan_input_body.py | 135 + .../trigger_networking_explain_input_body.py | 93 + .../trigger_networking_scan_input_body.py | 135 + ...ger_rename_unnamed_functions_input_body.py | 13 - .../trigger_security_scan_input_body.py | 13 - revengai/models/ttp.py | 13 - revengai/models/type_suggestions_data.py | 13 - revengai/models/typedef_data_type.py | 13 - revengai/models/typedef_definition.py | 13 - revengai/models/types_suggested_event.py | 13 - revengai/models/union_data_type.py | 13 - revengai/models/union_definition.py | 13 - revengai/models/unknown_data_type.py | 13 - .../update_analysis_data_types_input_body.py | 13 - revengai/models/update_array_data_type.py | 13 - revengai/models/update_base_data_type.py | 13 - revengai/models/update_bitfield_data_type.py | 13 - revengai/models/update_enum_data_type.py | 13 - revengai/models/update_function_data_type.py | 13 - .../update_function_signature_input_body.py | 13 - revengai/models/update_pointer_data_type.py | 13 - revengai/models/update_struct_data_type.py | 13 - revengai/models/update_typedef_data_type.py | 13 - revengai/models/update_union_data_type.py | 13 - revengai/models/update_unknown_data_type.py | 13 - .../upgrade_analysis_model_output_body.py | 13 - revengai/models/upload_output_body.py | 133 + revengai/models/upload_response.py | 16 +- revengai/models/upsert_overrides_data.py | 13 - .../models/upsert_overrides_input_body.py | 13 - revengai/models/user.py | 13 - revengai/models/user_profile.py | 13 - revengai/models/warning_event.py | 13 - revengai/models/workflow_progress.py | 13 - 470 files changed, 29758 insertions(+), 3899 deletions(-) create mode 100644 docs/AnalysisRequirement.md create mode 100644 docs/ApiCombinationEvidence.md create mode 100644 docs/BaseResponseProtocolsAgentResponse.md create mode 100644 docs/BaseResponseSecretsAgentResponse.md create mode 100644 docs/BytesConstant.md create mode 100644 docs/CallChain.md create mode 100644 docs/CallChainEvidence.md create mode 100644 docs/CapabilitiesResult.md create mode 100644 docs/Capability.md create mode 100644 docs/Config.md create mode 100644 docs/CreateMetadata.md create mode 100644 docs/CreateRequest.md create mode 100644 docs/CreateResult.md create mode 100644 docs/CryptoExplainMetadata.md create mode 100644 docs/CryptoExplainResult.md create mode 100644 docs/CryptoExplainedFunction.md create mode 100644 docs/DecompilerSummary.md create mode 100644 docs/DecompilerSummaryEvidence.md create mode 100644 docs/Display.md create mode 100644 docs/Endianness.md create mode 100644 docs/EvidenceEffect.md create mode 100644 docs/EvidenceStrength.md create mode 100644 docs/ExecutionCall.md create mode 100644 docs/ExecutionDirectMatch.md create mode 100644 docs/ExecutionExplainMetadata.md create mode 100644 docs/ExecutionExplainResult.md create mode 100644 docs/ExecutionExplainedFunction.md create mode 100644 docs/ExecutionFinding.md create mode 100644 docs/ExecutionScanMetadata.md create mode 100644 docs/ExecutionScanResult.md create mode 100644 docs/FeedbackOutputBody.md create mode 100644 docs/FilesystemAnalyseMetadata.md create mode 100644 docs/FilesystemAnalyseResult.md create mode 100644 docs/FilesystemCall.md create mode 100644 docs/FilesystemDirectMatch.md create mode 100644 docs/FilesystemExplainedFunction.md create mode 100644 docs/FilesystemFinding.md create mode 100644 docs/FilesystemScanMetadata.md create mode 100644 docs/FilesystemScanResult.md create mode 100644 docs/Finding.md create mode 100644 docs/FindingEvidenceInner.md create mode 100644 docs/FunctionSimilarity.md create mode 100644 docs/FunctionSimilarityEvidence.md create mode 100644 docs/HardcodedSecretEvidence.md create mode 100644 docs/ImportedApi.md create mode 100644 docs/ImportedApiCall.md create mode 100644 docs/ImportedApiCallEvidence.md create mode 100644 docs/KnownConstantEvidence.md create mode 100644 docs/Meta.md create mode 100644 docs/Metadata.md create mode 100644 docs/ModelInterpretation.md create mode 100644 docs/ModelInterpretationEvidence.md create mode 100644 docs/NetworkingCall.md create mode 100644 docs/NetworkingDirectMatch.md create mode 100644 docs/NetworkingExplainMetadata.md create mode 100644 docs/NetworkingExplainResult.md create mode 100644 docs/NetworkingExplainedFunction.md create mode 100644 docs/NetworkingFinding.md create mode 100644 docs/NetworkingScanMetadata.md create mode 100644 docs/NetworkingScanResult.md create mode 100644 docs/OperationCreateMetadataCreateResult.md create mode 100644 docs/OperationCryptoExplainMetadataCryptoExplainResult.md create mode 100644 docs/OperationExecutionExplainMetadataExecutionExplainResult.md create mode 100644 docs/OperationExecutionScanMetadataExecutionScanResult.md create mode 100644 docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md create mode 100644 docs/OperationFilesystemScanMetadataFilesystemScanResult.md create mode 100644 docs/OperationMetadataCapabilitiesResult.md create mode 100644 docs/OperationMetadataRemediationResult.md create mode 100644 docs/OperationMetadataReportResult.md create mode 100644 docs/OperationMetadataThreatReportResult.md create mode 100644 docs/OperationMetadataTriageResult.md create mode 100644 docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md create mode 100644 docs/OperationNetworkingScanMetadataNetworkingScanResult.md create mode 100644 docs/ProtocolsAgentResponse.md create mode 100644 docs/ReferencedConstant.md create mode 100644 docs/ReferencedConstantEvidence.md create mode 100644 docs/RemediationResult.md create mode 100644 docs/ReportReachabilityStatus.md create mode 100644 docs/ReportResult.md create mode 100644 docs/RuleKind.md create mode 100644 docs/SandboxConfig.md create mode 100644 docs/SecretsAgentResponse.md create mode 100644 docs/Subject.md create mode 100644 docs/SubjectAnyOf.md create mode 100644 docs/SubjectAnyOf1.md create mode 100644 docs/SubjectAnyOf2.md create mode 100644 docs/SubjectAnyOf3.md create mode 100644 docs/SubmitFeedbackInputBody.md create mode 100644 docs/SuspiciousString.md create mode 100644 docs/SuspiciousStringEvidence.md create mode 100644 docs/Technique.md create mode 100644 docs/ThreatReportResult.md create mode 100644 docs/TriageFunction.md create mode 100644 docs/TriageResult.md create mode 100644 docs/TriggerExecutionExplainInputBody.md create mode 100644 docs/TriggerExecutionScanInputBody.md create mode 100644 docs/TriggerFilesystemAnalyseInputBody.md create mode 100644 docs/TriggerFilesystemScanInputBody.md create mode 100644 docs/TriggerNetworkingExplainInputBody.md create mode 100644 docs/TriggerNetworkingScanInputBody.md create mode 100644 docs/UploadOutputBody.md create mode 100644 revengai/models/analysis_requirement.py create mode 100644 revengai/models/api_combination_evidence.py create mode 100644 revengai/models/base_response_protocols_agent_response.py create mode 100644 revengai/models/base_response_secrets_agent_response.py create mode 100644 revengai/models/bytes_constant.py create mode 100644 revengai/models/call_chain.py create mode 100644 revengai/models/call_chain_evidence.py create mode 100644 revengai/models/capabilities_result.py create mode 100644 revengai/models/capability.py create mode 100644 revengai/models/config.py create mode 100644 revengai/models/create_metadata.py create mode 100644 revengai/models/create_request.py create mode 100644 revengai/models/create_result.py create mode 100644 revengai/models/crypto_explain_metadata.py create mode 100644 revengai/models/crypto_explain_result.py create mode 100644 revengai/models/crypto_explained_function.py create mode 100644 revengai/models/decompiler_summary.py create mode 100644 revengai/models/decompiler_summary_evidence.py create mode 100644 revengai/models/display.py create mode 100644 revengai/models/endianness.py create mode 100644 revengai/models/evidence_effect.py create mode 100644 revengai/models/evidence_strength.py create mode 100644 revengai/models/execution_call.py create mode 100644 revengai/models/execution_direct_match.py create mode 100644 revengai/models/execution_explain_metadata.py create mode 100644 revengai/models/execution_explain_result.py create mode 100644 revengai/models/execution_explained_function.py create mode 100644 revengai/models/execution_finding.py create mode 100644 revengai/models/execution_scan_metadata.py create mode 100644 revengai/models/execution_scan_result.py create mode 100644 revengai/models/feedback_output_body.py create mode 100644 revengai/models/filesystem_analyse_metadata.py create mode 100644 revengai/models/filesystem_analyse_result.py create mode 100644 revengai/models/filesystem_call.py create mode 100644 revengai/models/filesystem_direct_match.py create mode 100644 revengai/models/filesystem_explained_function.py create mode 100644 revengai/models/filesystem_finding.py create mode 100644 revengai/models/filesystem_scan_metadata.py create mode 100644 revengai/models/filesystem_scan_result.py create mode 100644 revengai/models/finding.py create mode 100644 revengai/models/finding_evidence_inner.py create mode 100644 revengai/models/function_similarity.py create mode 100644 revengai/models/function_similarity_evidence.py create mode 100644 revengai/models/hardcoded_secret_evidence.py create mode 100644 revengai/models/imported_api.py create mode 100644 revengai/models/imported_api_call.py create mode 100644 revengai/models/imported_api_call_evidence.py create mode 100644 revengai/models/known_constant_evidence.py create mode 100644 revengai/models/meta.py create mode 100644 revengai/models/metadata.py create mode 100644 revengai/models/model_interpretation.py create mode 100644 revengai/models/model_interpretation_evidence.py create mode 100644 revengai/models/networking_call.py create mode 100644 revengai/models/networking_direct_match.py create mode 100644 revengai/models/networking_explain_metadata.py create mode 100644 revengai/models/networking_explain_result.py create mode 100644 revengai/models/networking_explained_function.py create mode 100644 revengai/models/networking_finding.py create mode 100644 revengai/models/networking_scan_metadata.py create mode 100644 revengai/models/networking_scan_result.py create mode 100644 revengai/models/operation_create_metadata_create_result.py create mode 100644 revengai/models/operation_crypto_explain_metadata_crypto_explain_result.py create mode 100644 revengai/models/operation_execution_explain_metadata_execution_explain_result.py create mode 100644 revengai/models/operation_execution_scan_metadata_execution_scan_result.py create mode 100644 revengai/models/operation_filesystem_analyse_metadata_filesystem_analyse_result.py create mode 100644 revengai/models/operation_filesystem_scan_metadata_filesystem_scan_result.py create mode 100644 revengai/models/operation_metadata_capabilities_result.py create mode 100644 revengai/models/operation_metadata_remediation_result.py create mode 100644 revengai/models/operation_metadata_report_result.py create mode 100644 revengai/models/operation_metadata_threat_report_result.py create mode 100644 revengai/models/operation_metadata_triage_result.py create mode 100644 revengai/models/operation_networking_explain_metadata_networking_explain_result.py create mode 100644 revengai/models/operation_networking_scan_metadata_networking_scan_result.py create mode 100644 revengai/models/protocols_agent_response.py create mode 100644 revengai/models/referenced_constant.py create mode 100644 revengai/models/referenced_constant_evidence.py create mode 100644 revengai/models/remediation_result.py create mode 100644 revengai/models/report_reachability_status.py create mode 100644 revengai/models/report_result.py create mode 100644 revengai/models/rule_kind.py create mode 100644 revengai/models/sandbox_config.py create mode 100644 revengai/models/secrets_agent_response.py create mode 100644 revengai/models/subject.py create mode 100644 revengai/models/subject_any_of.py create mode 100644 revengai/models/subject_any_of1.py create mode 100644 revengai/models/subject_any_of2.py create mode 100644 revengai/models/subject_any_of3.py create mode 100644 revengai/models/submit_feedback_input_body.py create mode 100644 revengai/models/suspicious_string.py create mode 100644 revengai/models/suspicious_string_evidence.py create mode 100644 revengai/models/technique.py create mode 100644 revengai/models/threat_report_result.py create mode 100644 revengai/models/triage_function.py create mode 100644 revengai/models/triage_result.py create mode 100644 revengai/models/trigger_execution_explain_input_body.py create mode 100644 revengai/models/trigger_execution_scan_input_body.py create mode 100644 revengai/models/trigger_filesystem_analyse_input_body.py create mode 100644 revengai/models/trigger_filesystem_scan_input_body.py create mode 100644 revengai/models/trigger_networking_explain_input_body.py create mode 100644 revengai/models/trigger_networking_scan_input_body.py create mode 100644 revengai/models/upload_output_body.py diff --git a/.sdk-version b/.sdk-version index 56008fbc..cb6924e2 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.24.0 +v4.46.0 diff --git a/README.md b/README.md index ed0e560a..d51e1ff2 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 35d00aea..137bf668 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 5e64ec93..119d4a49 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 00000000..ab638ec8 --- /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 00000000..628f9af3 --- /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 42df771f..3ce9eb63 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/BaseResponseDict.md b/docs/BaseResponseDict.md index a81c6dea..343f730d 100644 --- a/docs/BaseResponseDict.md +++ b/docs/BaseResponseDict.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | **Dict[str, object]** | | [optional] +**data** | **object** | | [optional] **message** | **str** | | [optional] **errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] **meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] diff --git a/docs/BaseResponseProtocolsAgentResponse.md b/docs/BaseResponseProtocolsAgentResponse.md new file mode 100644 index 00000000..8388c113 --- /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 00000000..05e9782b --- /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 6db989c6..427220f6 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 0a90a8bf..0659bb14 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 3f279673..3b89f93b 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/BinaryExternalsResponse.md b/docs/BinaryExternalsResponse.md index 6eb0df66..09b117c9 100644 --- a/docs/BinaryExternalsResponse.md +++ b/docs/BinaryExternalsResponse.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sha_256_hash** | **str** | SHA256 hash of the binary | -**vt** | **Dict[str, object]** | VirusTotal information | +**vt** | **object** | VirusTotal information | **vt_last_updated** | **datetime** | VirusTotal last updated date | -**mb** | **Dict[str, object]** | MalwareBazaar information | +**mb** | **object** | MalwareBazaar information | **mb_last_updated** | **datetime** | MalwareBazaar last updated date | ## Example diff --git a/docs/BytesConstant.md b/docs/BytesConstant.md new file mode 100644 index 00000000..a871c6c5 --- /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 00000000..9ccc6396 --- /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 00000000..07d118fb --- /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 00000000..0970b4ca --- /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 00000000..937ea510 --- /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 00000000..2e5c4c4d --- /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 00000000..c2eea6c0 --- /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 00000000..1df151aa --- /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 00000000..3ed1b68d --- /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 00000000..4e41867c --- /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 00000000..6f41a31d --- /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 00000000..05d4b70e --- /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 00000000..7be1184f --- /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 00000000..b9df7944 --- /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 00000000..f3140e48 --- /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 d899a075..36f6def7 100644 --- a/docs/ELFModel.md +++ b/docs/ELFModel.md @@ -22,9 +22,9 @@ Name | Type | Description | Notes **imports** | [**ELFImportModel**](ELFImportModel.md) | | **exported_functions** | **List[str]** | | **dynamic_entries** | [**List[ElfDynamicEntry]**](ElfDynamicEntry.md) | | -**notes** | **List[Dict[str, object]]** | | -**debug_info** | **Dict[str, object]** | | -**version_info** | **Dict[str, object]** | | +**notes** | **List[Optional[object]]** | | +**debug_info** | **object** | | +**version_info** | **object** | | ## Example diff --git a/docs/Endianness.md b/docs/Endianness.md new file mode 100644 index 00000000..8abda30c --- /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 00000000..2d959f2b --- /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 00000000..d5283854 --- /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 00000000..dfe575ba --- /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 00000000..6e275927 --- /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 00000000..705450e7 --- /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 00000000..cd06cebe --- /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 00000000..c35dc932 --- /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 00000000..4e2f3a63 --- /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 00000000..cc96d61a --- /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 00000000..af98bb54 --- /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/ExternalResponse.md b/docs/ExternalResponse.md index 20de996e..d0b50cc1 100644 --- a/docs/ExternalResponse.md +++ b/docs/ExternalResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sha_256_hash** | **str** | | -**data** | **Dict[str, object]** | | +**data** | **object** | | **last_updated** | **datetime** | | ## Example diff --git a/docs/FeedbackOutputBody.md b/docs/FeedbackOutputBody.md new file mode 100644 index 00000000..f2e536f8 --- /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 00000000..76730d16 --- /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 00000000..60001dfd --- /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 00000000..d1c32333 --- /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 00000000..d4af13ab --- /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 00000000..d8b58a72 --- /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 00000000..0d832639 --- /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 00000000..a6e45a39 --- /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 00000000..9394cda0 --- /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 00000000..924b4217 --- /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 00000000..eb1500ee --- /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 d94f0b2b..6f65db8c 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 00000000..94a3793c --- /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 00000000..eea0b97d --- /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 1588f2ef..46552eb9 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 2702d652..ede41508 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 00000000..5e69c039 --- /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 3c2822ce..9f075715 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 00000000..6171e777 --- /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 00000000..b613dfaa --- /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 00000000..c461b210 --- /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 00000000..5e1a19d6 --- /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 00000000..20a63c87 --- /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 00000000..b5e6db02 --- /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 00000000..1eb79e86 --- /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 00000000..ec4b6d4a --- /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 00000000..196e8d1d --- /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 00000000..3a9c6e18 --- /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 00000000..cae97541 --- /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 00000000..605b0ab1 --- /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 00000000..9507c063 --- /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 00000000..c5d35bbe --- /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 00000000..f109ce1e --- /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 00000000..ddbc35a0 --- /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 00000000..b7e22cb3 --- /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 00000000..c1accd87 --- /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 00000000..d78c7d29 --- /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 00000000..86d1ec6a --- /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 00000000..6a743b6c --- /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 00000000..f886db48 --- /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 00000000..06e9e1f5 --- /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 00000000..ccd4d1f4 --- /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 00000000..df6b378b --- /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 00000000..a28fd736 --- /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 00000000..c9dba613 --- /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 00000000..5ded01bb --- /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 00000000..312dd84f --- /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/PEModel.md b/docs/PEModel.md index 33032c62..76732a9f 100644 --- a/docs/PEModel.md +++ b/docs/PEModel.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **checksum** | **int** | | **image_base** | **int** | | **security** | [**SecurityModel**](SecurityModel.md) | | -**version_info** | **Dict[str, object]** | | +**version_info** | **object** | | **debug_info** | [**PDBDebugModel**](PDBDebugModel.md) | | **number_of_resources** | **int** | | **entry_point** | [**EntrypointModel**](EntrypointModel.md) | | diff --git a/docs/ProtocolsAgentResponse.md b/docs/ProtocolsAgentResponse.md new file mode 100644 index 00000000..4f3d5790 --- /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 00000000..c13f0446 --- /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 00000000..091675da --- /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 00000000..1ae58027 --- /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 00000000..b0df3a21 --- /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 00000000..926fd9c8 --- /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 00000000..7fe67d76 --- /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 00000000..1c5fc2e4 --- /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 e2075179..07c0309c 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 00000000..9f7c9c1a --- /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 325defc2..4f25d49f 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 240426c2..e4ac9322 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 00000000..69427658 --- /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 00000000..f9cde54a --- /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 00000000..f041c9bb --- /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 00000000..a1f842cf --- /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 00000000..b81fa52d --- /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 00000000..850d9c6f --- /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 00000000..98c0ebbf --- /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 00000000..0efa38d4 --- /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 dbdf418d..78866887 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 00000000..dff93a3c --- /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 00000000..df86dfc1 --- /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 00000000..f03cd4e8 --- /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 00000000..1f2d92eb --- /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 00000000..c270b753 --- /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 00000000..ddf5d635 --- /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 00000000..7f2fdcd7 --- /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 00000000..8a3b1bab --- /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 00000000..f5787755 --- /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 00000000..090b2858 --- /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 00000000..c2af1ffa --- /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 5cabc830..365754df 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 74893d4f..439faea2 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 2cb0a580..04adaea7 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='/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='/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='/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='/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 ac056961..67be52b1 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='/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 9bbee448..cb1b26d8 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='/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 ef75b8b6..49019724 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 79671652..b4375212 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 06ab425c..00168615 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 868492ed..9cef5523 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 a5bb40f3..d39d8dc5 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/add_callee_input_body.py b/revengai/models/add_callee_input_body.py index ccc7633a..5582aaf4 100644 --- a/revengai/models/add_callee_input_body.py +++ b/revengai/models/add_callee_input_body.py @@ -31,7 +31,6 @@ class AddCalleeInputBody(BaseModel): callee_vaddr: StrictInt = Field(description="Virtual address of the callee") is_external: StrictBool = Field(description="Whether the callee is outside the binary") thunked_vaddr: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Thunked virtual address") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callee_function_id", "callee_name", "callee_vaddr", "is_external", "thunked_vaddr"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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,11 +90,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_external": obj.get("is_external"), "thunked_vaddr": obj.get("thunked_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/add_collection_binaries_input_body.py b/revengai/models/add_collection_binaries_input_body.py index 4ecdb9f9..20e663f7 100644 --- a/revengai/models/add_collection_binaries_input_body.py +++ b/revengai/models/add_collection_binaries_input_body.py @@ -26,7 +26,6 @@ class AddCollectionBinariesInputBody(BaseModel): AddCollectionBinariesInputBody """ # noqa: E501 binaries: Optional[List[StrictInt]] = Field(description="Binary IDs to add to the collection. Binary IDs already linked to the collection are ignored.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -94,11 +86,6 @@ 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/add_user_string_input_body.py b/revengai/models/add_user_string_input_body.py index 7206911f..3a1765c3 100644 --- a/revengai/models/add_user_string_input_body.py +++ b/revengai/models/add_user_string_input_body.py @@ -28,7 +28,6 @@ class AddUserStringInputBody(BaseModel): """ # noqa: E501 string: Annotated[str, Field(min_length=1, strict=True)] = Field(description="String literal") virtual_address: Annotated[int, Field(strict=True, ge=0)] = Field(description="Virtual address at which this string is defined.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["string", "virtual_address"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +84,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "string": obj.get("string"), "virtual_address": obj.get("virtual_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/add_user_string_to_function_input_body.py b/revengai/models/add_user_string_to_function_input_body.py index dde8b9d4..0b77db35 100644 --- a/revengai/models/add_user_string_to_function_input_body.py +++ b/revengai/models/add_user_string_to_function_input_body.py @@ -28,7 +28,6 @@ class AddUserStringToFunctionInputBody(BaseModel): """ # noqa: E501 string: Annotated[str, Field(min_length=1, strict=True)] = Field(description="String literal") virtual_address: Annotated[int, Field(strict=True, ge=0)] = Field(description="Virtual address at which this string is defined.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["string", "virtual_address"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +84,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "string": obj.get("string"), "virtual_address": obj.get("virtual_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/analysis_basic_info_output_body.py b/revengai/models/analysis_basic_info_output_body.py index 34c214fb..da1ac34d 100644 --- a/revengai/models/analysis_basic_info_output_body.py +++ b/revengai/models/analysis_basic_info_output_body.py @@ -51,7 +51,6 @@ class AnalysisBasicInfoOutputBody(BaseModel): supplied_binary_format: StrictStr = Field(description="User-supplied binary container format; \"AUTO\" when not overridden") supplied_binary_type: StrictStr = Field(description="User-supplied operating-system platform; \"AUTO\" when not overridden") team_id: StrictInt = Field(description="Team ID of the analysis") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_scope", "base_address", "binary_id", "binary_name", "binary_size", "binary_uuid", "creation", "debug", "detected_architecture", "detected_binary_format", "detected_binary_type", "function_count", "is_advanced", "is_owner", "is_system", "model_id", "model_name", "model_upgrade_available", "owner_username", "sequencer_version", "sha_256_hash", "supplied_architecture", "supplied_binary_format", "supplied_binary_type", "team_id"] @field_validator('analysis_scope') @@ -91,10 +90,8 @@ 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( @@ -102,11 +99,6 @@ 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: @@ -150,11 +142,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "supplied_binary_type": obj.get("supplied_binary_type"), "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/analysis_data_types_group.py b/revengai/models/analysis_data_types_group.py index c487f692..6e52363d 100644 --- a/revengai/models/analysis_data_types_group.py +++ b/revengai/models/analysis_data_types_group.py @@ -28,7 +28,6 @@ class AnalysisDataTypesGroup(BaseModel): """ # noqa: E501 analysis_id: StrictInt items: Optional[List[DataTypeEntry]] = Field(description="The analysis's types the returned signatures name, ordered by data_type_id.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "items"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_items: _items.append(_item_items.to_dict()) _dict['items'] = _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 items (nullable) is None # and model_fields_set contains the field if self.items is None and "items" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "analysis_id": obj.get("analysis_id"), "items": [DataTypeEntry.from_dict(_item) for _item in obj["items"]] if obj.get("items") 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_data_types_output_body.py b/revengai/models/analysis_data_types_output_body.py index 50cdfec7..bf8d3f45 100644 --- a/revengai/models/analysis_data_types_output_body.py +++ b/revengai/models/analysis_data_types_output_body.py @@ -27,7 +27,6 @@ class AnalysisDataTypesOutputBody(BaseModel): AnalysisDataTypesOutputBody """ # noqa: E501 data_types: Optional[List[DataTypeEntry]] = Field(description="The stored types, ordered by data_type_id.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_types"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_data_types: _items.append(_item_data_types.to_dict()) _dict['data_types'] = _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 data_types (nullable) is None # and model_fields_set contains the field if self.data_types is None and "data_types" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data_types": [DataTypeEntry.from_dict(_item) for _item in obj["data_types"]] if obj.get("data_types") 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 913ee131..bddcbae1 100644 --- a/revengai/models/analysis_function_entry.py +++ b/revengai/models/analysis_function_entry.py @@ -36,7 +36,6 @@ class AnalysisFunctionEntry(BaseModel): source_binary_id: Optional[StrictInt] = None source_function_id: Optional[StrictInt] = Field(default=None, description="ID of the source function this name was transferred from, if any") source_type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_analysis_id", "source_binary_id", "source_function_id", "source_type"] model_config = ConfigDict( @@ -69,10 +68,8 @@ 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,16 +77,6 @@ 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 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 @@ -114,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/analysis_log_entry.py b/revengai/models/analysis_log_entry.py index c686362a..7b0031a3 100644 --- a/revengai/models/analysis_log_entry.py +++ b/revengai/models/analysis_log_entry.py @@ -30,7 +30,6 @@ class AnalysisLogEntry(BaseModel): source: StrictStr = Field(description="Component that emitted the line") text: StrictStr = Field(description="Log line text") timestamp: datetime = Field(description="When the line was emitted (UTC)") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["level", "source", "text", "timestamp"] @field_validator('level') @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "text": obj.get("text"), "timestamp": obj.get("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/analysis_log_message.py b/revengai/models/analysis_log_message.py index 6e8fbe71..28433c8e 100644 --- a/revengai/models/analysis_log_message.py +++ b/revengai/models/analysis_log_message.py @@ -27,7 +27,6 @@ class AnalysisLogMessage(BaseModel): """ # noqa: E501 message: StrictStr time: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["message", "time"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "time": obj.get("time") }) - # store additional fields in additional_properties - for _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_logs.py b/revengai/models/analysis_logs.py index 335e613b..1fd2d67a 100644 --- a/revengai/models/analysis_logs.py +++ b/revengai/models/analysis_logs.py @@ -28,7 +28,6 @@ class AnalysisLogs(BaseModel): """ # noqa: E501 message_count: StrictInt messages: Optional[List[AnalysisLogMessage]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["message_count", "messages"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_messages: _items.append(_item_messages.to_dict()) _dict['messages'] = _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 messages (nullable) is None # and model_fields_set contains the field if self.messages is None and "messages" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message_count": obj.get("message_count"), "messages": [AnalysisLogMessage.from_dict(_item) for _item in obj["messages"]] if obj.get("messages") 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_report.py b/revengai/models/analysis_report.py index 8af7db04..baf5362b 100644 --- a/revengai/models/analysis_report.py +++ b/revengai/models/analysis_report.py @@ -55,7 +55,6 @@ class AnalysisReport(BaseModel): services: Optional[List[ServiceEntry]] = None startup: Optional[StartupInfo] = None ttps: Optional[List[Ttp]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["artifacts", "console_output", "file_activity", "info", "memdumps", "module_load_addresses", "mutexes", "network_activity", "process_activity", "process_tree", "registry_operations", "scheduled_tasks", "services", "startup", "ttps"] model_config = ConfigDict( @@ -88,10 +87,8 @@ 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( @@ -188,11 +185,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_ttps: _items.append(_item_ttps.to_dict()) _dict['ttps'] = _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 artifacts (nullable) is None # and model_fields_set contains the field if self.artifacts is None and "artifacts" in self.model_fields_set: @@ -276,11 +268,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "startup": StartupInfo.from_dict(obj["startup"]) if obj.get("startup") is not None else None, "ttps": [Ttp.from_dict(_item) for _item in obj["ttps"]] if obj.get("ttps") 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 00000000..84f56505 --- /dev/null +++ b/revengai/models/analysis_requirement.py @@ -0,0 +1,95 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/analysis_string_function.py b/revengai/models/analysis_string_function.py index 7e6f5563..a58bbed6 100644 --- a/revengai/models/analysis_string_function.py +++ b/revengai/models/analysis_string_function.py @@ -27,7 +27,6 @@ class AnalysisStringFunction(BaseModel): """ # noqa: E501 function_id: Optional[StrictInt] function_vaddr: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_vaddr"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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: @@ -96,11 +88,6 @@ 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/analysis_string_item.py b/revengai/models/analysis_string_item.py index f836d755..bfacad64 100644 --- a/revengai/models/analysis_string_item.py +++ b/revengai/models/analysis_string_item.py @@ -29,7 +29,6 @@ class AnalysisStringItem(BaseModel): functions: Optional[List[AnalysisStringFunction]] source: StrictStr value: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions", "source", "value"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +77,6 @@ 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 - # 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: @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source": obj.get("source"), "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/analysis_tag_body.py b/revengai/models/analysis_tag_body.py index 57d5ed99..ecbb6e75 100644 --- a/revengai/models/analysis_tag_body.py +++ b/revengai/models/analysis_tag_body.py @@ -28,7 +28,6 @@ class AnalysisTagBody(BaseModel): collection_id: Optional[StrictInt] = Field(description="Collection this tag maps to, or null") name: StrictStr = Field(description="Tag name") origin: StrictStr = Field(description="Origin of the tag") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_id", "name", "origin"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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: @@ -98,11 +90,6 @@ 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/api_call.py b/revengai/models/api_call.py index ede185bb..1745410b 100644 --- a/revengai/models/api_call.py +++ b/revengai/models/api_call.py @@ -29,7 +29,6 @@ class ApiCall(BaseModel): called_from_rva: Optional[StrictStr] = None from_module: Optional[StrictStr] = None method: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["called_from", "called_from_rva", "from_module", "method"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "from_module": obj.get("from_module"), "method": obj.get("method") }) - # store additional fields in additional_properties - for _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 00000000..14873ead --- /dev/null +++ b/revengai/models/api_combination_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/api_error.py b/revengai/models/api_error.py index fd630e0d..899c43a4 100644 --- a/revengai/models/api_error.py +++ b/revengai/models/api_error.py @@ -27,7 +27,6 @@ class APIError(BaseModel): APIError """ # noqa: E501 error: ErrorBody - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +71,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of error if self.error: _dict['error'] = self.error.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 @@ -93,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "error": ErrorBody.from_dict(obj["error"]) if obj.get("error") 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/array_data_type.py b/revengai/models/array_data_type.py index 39fd7dcf..65f2e215 100644 --- a/revengai/models/array_data_type.py +++ b/revengai/models/array_data_type.py @@ -37,7 +37,6 @@ class ArrayDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/array_definition.py b/revengai/models/array_definition.py index a9848522..997a9a7f 100644 --- a/revengai/models/array_definition.py +++ b/revengai/models/array_definition.py @@ -27,7 +27,6 @@ class ArrayDefinition(BaseModel): """ # noqa: E501 count: Optional[StrictInt] = Field(default=None, description="Element count. Zero is a genuinely empty trailing array; absent means it could not be determined.") element_data_type_id: Optional[StrictInt] = Field(default=None, description="The element type.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["count", "element_data_type_id"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "count": obj.get("count"), "element_data_type_id": obj.get("element_data_type_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/artifact.py b/revengai/models/artifact.py index c8963b37..9770e668 100644 --- a/revengai/models/artifact.py +++ b/revengai/models/artifact.py @@ -45,7 +45,6 @@ class Artifact(BaseModel): uri: Optional[StrictStr] = None was_mapped: Optional[StrictBool] = None yara_hits: Optional[List[StrictStr]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["direction", "dump_addr", "dump_pid", "file_type", "host", "is_pe", "mime_type", "name", "network_source", "original_filename", "path", "process_seqid", "reason", "response_status", "sha256", "size", "source", "uri", "was_mapped", "yara_hits"] @field_validator('reason') @@ -85,10 +84,8 @@ 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( @@ -96,11 +93,6 @@ 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 yara_hits (nullable) is None # and model_fields_set contains the field if self.yara_hits is None and "yara_hits" in self.model_fields_set: @@ -139,11 +131,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "was_mapped": obj.get("was_mapped"), "yara_hits": obj.get("yara_hits") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/attempt_failed_event.py b/revengai/models/attempt_failed_event.py index c76ba67f..e038a6a4 100644 --- a/revengai/models/attempt_failed_event.py +++ b/revengai/models/attempt_failed_event.py @@ -29,7 +29,6 @@ class AttemptFailedEvent(BaseModel): error: StrictStr seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "error", "seq", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/attempt_started_event.py b/revengai/models/attempt_started_event.py index 057023aa..a3d6c939 100644 --- a/revengai/models/attempt_started_event.py +++ b/revengai/models/attempt_started_event.py @@ -28,7 +28,6 @@ class AttemptStartedEvent(BaseModel): attempt: StrictInt seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "seq", "type"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/auto_run_agents.py b/revengai/models/auto_run_agents.py index ff4e39f0..ce710327 100644 --- a/revengai/models/auto_run_agents.py +++ b/revengai/models/auto_run_agents.py @@ -25,7 +25,7 @@ class AutoRunAgents(BaseModel): """ AutoRunAgents """ # noqa: E501 - triage: Optional[StrictBool] = False + triage: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["triage"] model_config = ConfigDict( @@ -79,7 +79,7 @@ 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") }) return _obj diff --git a/revengai/models/auto_unstrip_status_output_body.py b/revengai/models/auto_unstrip_status_output_body.py index dada9104..afadf269 100644 --- a/revengai/models/auto_unstrip_status_output_body.py +++ b/revengai/models/auto_unstrip_status_output_body.py @@ -26,7 +26,6 @@ class AutoUnstripStatusOutputBody(BaseModel): AutoUnstripStatusOutputBody """ # noqa: E501 status: StrictStr = Field(description="Auto-unstrip task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] @field_validator('status') @@ -66,10 +65,8 @@ 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,11 +74,6 @@ 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 @@ -96,11 +88,6 @@ 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/base_data_type.py b/revengai/models/base_data_type.py index 17ef7fa9..c884e8b2 100644 --- a/revengai/models/base_data_type.py +++ b/revengai/models/base_data_type.py @@ -35,7 +35,6 @@ class BaseDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -82,10 +81,8 @@ 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,11 +90,6 @@ 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 @@ -120,11 +112,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/base_response_protocols_agent_response.py b/revengai/models/base_response_protocols_agent_response.py new file mode 100644 index 00000000..b2796a5e --- /dev/null +++ b/revengai/models/base_response_protocols_agent_response.py @@ -0,0 +1,125 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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 + }) + 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 00000000..60741c64 --- /dev/null +++ b/revengai/models/base_response_secrets_agent_response.py @@ -0,0 +1,125 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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 + }) + return _obj + + diff --git a/revengai/models/batch_function_signature_entry.py b/revengai/models/batch_function_signature_entry.py index bee85b46..c2f71cb2 100644 --- a/revengai/models/batch_function_signature_entry.py +++ b/revengai/models/batch_function_signature_entry.py @@ -37,7 +37,6 @@ class BatchFunctionSignatureEntry(BaseModel): return_data_type_id: Optional[StrictInt] = Field(default=None, description="Return type, resolvable against the analysis data types list. Absent for an unresolved return type.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this signature was copied from, when it was transferred rather than extracted.") source_type: Optional[StrictStr] = Field(default=None, description="Where this signature came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "calling_convention", "created_at", "function_id", "function_name", "has_signature", "parameters", "return_data_type_id", "source_function_id", "source_type"] @field_validator('source_type') @@ -80,10 +79,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_parameters: _items.append(_item_parameters.to_dict()) _dict['parameters'] = _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 parameters (nullable) is None # and model_fields_set contains the field if self.parameters is None and "parameters" in self.model_fields_set: @@ -131,11 +123,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/batch_rename_input_body.py b/revengai/models/batch_rename_input_body.py index a389c4f8..3ce2d637 100644 --- a/revengai/models/batch_rename_input_body.py +++ b/revengai/models/batch_rename_input_body.py @@ -28,7 +28,6 @@ class BatchRenameInputBody(BaseModel): BatchRenameInputBody """ # noqa: E501 functions: Optional[Annotated[List[BatchRenameItem], Field(min_length=1, max_length=1000)]] = Field(description="List of functions to rename") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ 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 - # 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: @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "functions": [BatchRenameItem.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/batch_rename_item.py b/revengai/models/batch_rename_item.py index f22cd96e..d86dc8eb 100644 --- a/revengai/models/batch_rename_item.py +++ b/revengai/models/batch_rename_item.py @@ -29,7 +29,6 @@ class BatchRenameItem(BaseModel): function_id: Annotated[int, Field(strict=True, ge=1)] = Field(description="Function ID to rename") new_mangled_name: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="New mangled function name") new_name: Annotated[str, Field(min_length=1, strict=True, max_length=2048)] = Field(description="New function name") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "new_mangled_name", "new_name"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +86,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "new_mangled_name": obj.get("new_mangled_name"), "new_name": obj.get("new_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/batch_rename_output_body.py b/revengai/models/batch_rename_output_body.py index a0633a7d..6fc4a601 100644 --- a/revengai/models/batch_rename_output_body.py +++ b/revengai/models/batch_rename_output_body.py @@ -26,7 +26,6 @@ class BatchRenameOutputBody(BaseModel): BatchRenameOutputBody """ # noqa: E501 renamed_count: StrictInt = Field(description="Number of functions renamed") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["renamed_count"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "renamed_count": obj.get("renamed_count") }) - # store additional fields in additional_properties - for _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.py b/revengai/models/binary.py index 516692cd..c065b55c 100644 --- a/revengai/models/binary.py +++ b/revengai/models/binary.py @@ -33,7 +33,6 @@ class Binary(BaseModel): is_system_analysis: StrictBool owner_id: StrictInt sha_256_hash: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "binary_name", "created_at", "is_system_analysis", "owner_id", "sha_256_hash"] model_config = ConfigDict( @@ -66,10 +65,8 @@ 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,11 +74,6 @@ 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 @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "owner_id": obj.get("owner_id"), "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/binary_config.py b/revengai/models/binary_config.py index 1a7dcb8f..9fffe97e 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,40 @@ 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 + __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, @@ -72,21 +99,6 @@ 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 - return _dict @classmethod @@ -99,9 +111,9 @@ 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") }) return _obj diff --git a/revengai/models/binary_details_response.py b/revengai/models/binary_details_response.py index 46ae9561..f6ee8a78 100644 --- a/revengai/models/binary_details_response.py +++ b/revengai/models/binary_details_response.py @@ -28,21 +28,21 @@ 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 @@ -87,11 +87,46 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # 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 diff --git a/revengai/models/bitfield_data_type.py b/revengai/models/bitfield_data_type.py index 34a8d61c..cabc7ba0 100644 --- a/revengai/models/bitfield_data_type.py +++ b/revengai/models/bitfield_data_type.py @@ -35,7 +35,6 @@ class BitfieldDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -82,10 +81,8 @@ 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,11 +90,6 @@ 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 @@ -120,11 +112,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/bytes_constant.py b/revengai/models/bytes_constant.py new file mode 100644 index 00000000..ee01390c --- /dev/null +++ b/revengai/models/bytes_constant.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, 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/call_chain.py b/revengai/models/call_chain.py new file mode 100644 index 00000000..aa29e943 --- /dev/null +++ b/revengai/models/call_chain.py @@ -0,0 +1,87 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/call_chain_evidence.py b/revengai/models/call_chain_evidence.py new file mode 100644 index 00000000..920fc115 --- /dev/null +++ b/revengai/models/call_chain_evidence.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, 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/call_edge.py b/revengai/models/call_edge.py index 1a5a245c..5b37865d 100644 --- a/revengai/models/call_edge.py +++ b/revengai/models/call_edge.py @@ -34,7 +34,6 @@ class CallEdge(BaseModel): imported_function_id: Optional[StrictInt] = Field(default=None, description="Imported function ID for an external callee, resolved via the thunk/stub address.") is_external: StrictBool thunked_vaddr: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callee_function_id", "callee_name", "callee_vaddr", "caller_function_id", "caller_name", "caller_vaddr", "imported_function_id", "is_external", "thunked_vaddr"] model_config = ConfigDict( @@ -67,10 +66,8 @@ 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,11 +75,6 @@ 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 @@ -105,11 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_external": obj.get("is_external"), "thunked_vaddr": obj.get("thunked_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/call_edges_output_body.py b/revengai/models/call_edges_output_body.py index 9d6ca202..7d0ae583 100644 --- a/revengai/models/call_edges_output_body.py +++ b/revengai/models/call_edges_output_body.py @@ -27,7 +27,6 @@ class CallEdgesOutputBody(BaseModel): CallEdgesOutputBody """ # noqa: E501 edges: Optional[List[FunctionCallEdges]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["edges"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_edges: _items.append(_item_edges.to_dict()) _dict['edges'] = _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 edges (nullable) is None # and model_fields_set contains the field if self.edges is None and "edges" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "edges": [FunctionCallEdges.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") 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/canonical_name.py b/revengai/models/canonical_name.py index c8e41b32..7129feb7 100644 --- a/revengai/models/canonical_name.py +++ b/revengai/models/canonical_name.py @@ -27,7 +27,6 @@ class CanonicalName(BaseModel): """ # noqa: E501 canonical_name: StrictStr = Field(description="Canonical form of the name, or the input name itself when it has no canonical form.") name: StrictStr = Field(description="The input function name.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["canonical_name", "name"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "canonical_name": obj.get("canonical_name"), "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/canonicalize_names_input_body.py b/revengai/models/canonicalize_names_input_body.py index b929a58d..cc2aa541 100644 --- a/revengai/models/canonicalize_names_input_body.py +++ b/revengai/models/canonicalize_names_input_body.py @@ -27,7 +27,6 @@ class CanonicalizeNamesInputBody(BaseModel): CanonicalizeNamesInputBody """ # noqa: E501 names: Optional[Annotated[List[StrictStr], Field(min_length=1, max_length=25)]] = Field(description="Function names to canonicalize.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["names"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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 names (nullable) is None # and model_fields_set contains the field if self.names is None and "names" in self.model_fields_set: @@ -95,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "names": obj.get("names") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/canonicalize_names_output_body.py b/revengai/models/canonicalize_names_output_body.py index 8c96bbd1..be3b6c05 100644 --- a/revengai/models/canonicalize_names_output_body.py +++ b/revengai/models/canonicalize_names_output_body.py @@ -27,7 +27,6 @@ class CanonicalizeNamesOutputBody(BaseModel): CanonicalizeNamesOutputBody """ # noqa: E501 results: Optional[List[CanonicalName]] = Field(description="Canonicalized names in the same order as the input.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ 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 - # set to None if results (nullable) is None # and model_fields_set contains the field if self.results is None and "results" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "results": [CanonicalName.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/capabilities_output_body.py b/revengai/models/capabilities_output_body.py index 7eb2bf47..9ae48c29 100644 --- a/revengai/models/capabilities_output_body.py +++ b/revengai/models/capabilities_output_body.py @@ -27,7 +27,6 @@ class CapabilitiesOutputBody(BaseModel): CapabilitiesOutputBody """ # noqa: E501 capabilities: Optional[List[CapabilityEntry]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["capabilities"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ 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 - # 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: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "capabilities": [CapabilityEntry.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 00000000..0bc33a9f --- /dev/null +++ b/revengai/models/capabilities_result.py @@ -0,0 +1,99 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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 + }) + return _obj + + diff --git a/revengai/models/capability.py b/revengai/models/capability.py new file mode 100644 index 00000000..1b0f61cc --- /dev/null +++ b/revengai/models/capability.py @@ -0,0 +1,96 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/capability_entry.py b/revengai/models/capability_entry.py index dd282f9f..cbc45000 100644 --- a/revengai/models/capability_entry.py +++ b/revengai/models/capability_entry.py @@ -31,7 +31,6 @@ class CapabilityEntry(BaseModel): function_name: StrictStr type: StrictStr vaddr: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["capability", "description", "function_id", "function_name", "type", "vaddr"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "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/collection_list_item_body.py b/revengai/models/collection_list_item_body.py index 90fc53a8..6b0e3d95 100644 --- a/revengai/models/collection_list_item_body.py +++ b/revengai/models/collection_list_item_body.py @@ -37,7 +37,6 @@ class CollectionListItemBody(BaseModel): official_collection: StrictBool team_id: StrictInt updated_at: datetime - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_id", "collection_name", "collection_owner", "collection_scope", "collection_size", "collection_tags", "creation", "description", "official_collection", "team_id", "updated_at"] model_config = ConfigDict( @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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_tags (nullable) is None # and model_fields_set contains the field if self.collection_tags is None and "collection_tags" in self.model_fields_set: @@ -115,11 +107,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "team_id": obj.get("team_id"), "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/comments_data.py b/revengai/models/comments_data.py index 4841c803..b909dc01 100644 --- a/revengai/models/comments_data.py +++ b/revengai/models/comments_data.py @@ -28,7 +28,6 @@ class CommentsData(BaseModel): """ # noqa: E501 inline_comments: Optional[List[InlineComment]] = Field(description="Structured inline comments with line numbers") task_status: StrictStr = Field(description="Task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["inline_comments", "task_status"] @field_validator('task_status') @@ -68,10 +67,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_inline_comments: _items.append(_item_inline_comments.to_dict()) _dict['inline_comments'] = _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 inline_comments (nullable) is None # and model_fields_set contains the field if self.inline_comments is None and "inline_comments" in self.model_fields_set: @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "inline_comments": [InlineComment.from_dict(_item) for _item in obj["inline_comments"]] if obj.get("inline_comments") is not None else None, "task_status": obj.get("task_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/config.py b/revengai/models/config.py new file mode 100644 index 00000000..f356bf13 --- /dev/null +++ b/revengai/models/config.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, 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + return _obj + + diff --git a/revengai/models/confirm_tool_input_body.py b/revengai/models/confirm_tool_input_body.py index 150a92eb..e82cb1bd 100644 --- a/revengai/models/confirm_tool_input_body.py +++ b/revengai/models/confirm_tool_input_body.py @@ -26,7 +26,6 @@ class ConfirmToolInputBody(BaseModel): ConfirmToolInputBody """ # noqa: E501 approved: StrictBool = Field(description="Whether the user approves the pending tool call.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["approved"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "approved": obj.get("approved") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/connection.py b/revengai/models/connection.py index cdc5760d..f389ae78 100644 --- a/revengai/models/connection.py +++ b/revengai/models/connection.py @@ -38,7 +38,6 @@ class Connection(BaseModel): remote_ip: StrictStr remote_port: Optional[Any] tcp_carved_files: Optional[List[TcpCarvedFile]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["bytes_received", "bytes_sent", "events", "ja3", "ja3s", "local_ip", "local_port", "protocol", "remote_ip", "remote_port", "tcp_carved_files"] model_config = ConfigDict( @@ -71,10 +70,8 @@ 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( @@ -96,11 +93,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_tcp_carved_files: _items.append(_item_tcp_carved_files.to_dict()) _dict['tcp_carved_files'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -145,11 +137,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "remote_port": obj.get("remote_port"), "tcp_carved_files": [TcpCarvedFile.from_dict(_item) for _item in obj["tcp_carved_files"]] if obj.get("tcp_carved_files") 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/console_output_entry.py b/revengai/models/console_output_entry.py index 9265721f..b709eb15 100644 --- a/revengai/models/console_output_entry.py +++ b/revengai/models/console_output_entry.py @@ -27,7 +27,6 @@ class ConsoleOutputEntry(BaseModel): """ # noqa: E501 output: StrictStr process_seqid: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["output", "process_seqid"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "output": obj.get("output"), "process_seqid": obj.get("process_seqid") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/conversation.py b/revengai/models/conversation.py index 8b3dabf9..046b4591 100644 --- a/revengai/models/conversation.py +++ b/revengai/models/conversation.py @@ -32,7 +32,6 @@ class Conversation(BaseModel): title: StrictStr updated_at: datetime user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["context", "conversation_uuid", "created_at", "title", "updated_at", "user_id"] model_config = ConfigDict( @@ -65,10 +64,8 @@ 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,11 +73,6 @@ 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 context (nullable) is None # and model_fields_set contains the field if self.context is None and "context" in self.model_fields_set: @@ -105,11 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "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/conversation_context.py b/revengai/models/conversation_context.py index 87ba770c..c4ad7954 100644 --- a/revengai/models/conversation_context.py +++ b/revengai/models/conversation_context.py @@ -27,7 +27,6 @@ class ConversationContext(BaseModel): """ # noqa: E501 analysis_id: Optional[StrictInt] = None function_id: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "function_id"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "analysis_id": obj.get("analysis_id"), "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/conversation_with_events.py b/revengai/models/conversation_with_events.py index d9c3d98c..a309a3e7 100644 --- a/revengai/models/conversation_with_events.py +++ b/revengai/models/conversation_with_events.py @@ -34,7 +34,6 @@ class ConversationWithEvents(BaseModel): title: StrictStr updated_at: datetime user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["context", "conversation_uuid", "created_at", "events", "title", "updated_at", "user_id"] model_config = ConfigDict( @@ -67,10 +66,8 @@ 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,11 +82,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 context (nullable) is None # and model_fields_set contains the field if self.context is None and "context" in self.model_fields_set: @@ -120,11 +112,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "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/copy_function_signatures_input_body.py b/revengai/models/copy_function_signatures_input_body.py index dc5dcd4d..bb523572 100644 --- a/revengai/models/copy_function_signatures_input_body.py +++ b/revengai/models/copy_function_signatures_input_body.py @@ -28,7 +28,6 @@ class CopyFunctionSignaturesInputBody(BaseModel): CopyFunctionSignaturesInputBody """ # noqa: E501 copies: Optional[Annotated[List[CopySignatureItem], Field(min_length=1, max_length=50)]] = Field(description="Signatures to copy. No target may repeat, and no pair may name the same function twice.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["copies"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_copies: _items.append(_item_copies.to_dict()) _dict['copies'] = _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 copies (nullable) is None # and model_fields_set contains the field if self.copies is None and "copies" in self.model_fields_set: @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "copies": [CopySignatureItem.from_dict(_item) for _item in obj["copies"]] if obj.get("copies") 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/copy_function_signatures_output_body.py b/revengai/models/copy_function_signatures_output_body.py index b4f51db1..5160043e 100644 --- a/revengai/models/copy_function_signatures_output_body.py +++ b/revengai/models/copy_function_signatures_output_body.py @@ -29,7 +29,6 @@ class CopyFunctionSignaturesOutputBody(BaseModel): """ # noqa: E501 data_types: Optional[List[DataTypeEntry]] = Field(description="The data types this analysis gained or had replaced, ordered by data_type_id. Empty when every type the copied signatures need was already stored unchanged.") signatures: Optional[List[FunctionSignatureEntry]] = Field(description="The stored signatures of the target functions, in request order.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_types", "signatures"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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 +84,6 @@ 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 - # set to None if data_types (nullable) is None # and model_fields_set contains the field if self.data_types is None and "data_types" in self.model_fields_set: @@ -117,11 +109,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "data_types": [DataTypeEntry.from_dict(_item) for _item in obj["data_types"]] if obj.get("data_types") is not None else None, "signatures": [FunctionSignatureEntry.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/copy_signature_item.py b/revengai/models/copy_signature_item.py index 050efc2b..e6f2d5d6 100644 --- a/revengai/models/copy_signature_item.py +++ b/revengai/models/copy_signature_item.py @@ -28,7 +28,6 @@ class CopySignatureItem(BaseModel): """ # noqa: E501 source_function_id: Annotated[int, Field(strict=True, ge=1)] = Field(description="Function to copy the signature from. May belong to another analysis the caller can read.") target_function_id: Annotated[int, Field(strict=True, ge=1)] = Field(description="Function to copy the signature to. Must belong to the analysis in the URL.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["source_function_id", "target_function_id"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +84,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "target_function_id": obj.get("target_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/create_ai_decomp_output_body.py b/revengai/models/create_ai_decomp_output_body.py index 19da0fe1..d5f45aba 100644 --- a/revengai/models/create_ai_decomp_output_body.py +++ b/revengai/models/create_ai_decomp_output_body.py @@ -26,7 +26,6 @@ class CreateAIDecompOutputBody(BaseModel): CreateAIDecompOutputBody """ # noqa: E501 status: StrictBool - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ 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/create_analysis_data_types_input_body.py b/revengai/models/create_analysis_data_types_input_body.py index 50f3c69b..ff4474aa 100644 --- a/revengai/models/create_analysis_data_types_input_body.py +++ b/revengai/models/create_analysis_data_types_input_body.py @@ -28,7 +28,6 @@ class CreateAnalysisDataTypesInputBody(BaseModel): CreateAnalysisDataTypesInputBody """ # noqa: E501 data_types: Optional[Annotated[List[CreateDataTypeEntry], Field(min_length=1, max_length=100)]] = Field(description="The types to create. Each namespace, name and kind must be new to the analysis.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_types"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_data_types: _items.append(_item_data_types.to_dict()) _dict['data_types'] = _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 data_types (nullable) is None # and model_fields_set contains the field if self.data_types is None and "data_types" in self.model_fields_set: @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data_types": [CreateDataTypeEntry.from_dict(_item) for _item in obj["data_types"]] if obj.get("data_types") 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/create_array_data_type.py b/revengai/models/create_array_data_type.py index 0778e6cc..2dc9b59d 100644 --- a/revengai/models/create_array_data_type.py +++ b/revengai/models/create_array_data_type.py @@ -32,7 +32,6 @@ class CreateArrayDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_base_data_type.py b/revengai/models/create_base_data_type.py index 0ff5e9e5..99eed450 100644 --- a/revengai/models/create_base_data_type.py +++ b/revengai/models/create_base_data_type.py @@ -30,7 +30,6 @@ class CreateBaseDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["kind", "name", "namespace", "size"] @field_validator('kind') @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_bitfield_data_type.py b/revengai/models/create_bitfield_data_type.py index 262659f8..475aee8b 100644 --- a/revengai/models/create_bitfield_data_type.py +++ b/revengai/models/create_bitfield_data_type.py @@ -30,7 +30,6 @@ class CreateBitfieldDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["kind", "name", "namespace", "size"] @field_validator('kind') @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_collection_input_body.py b/revengai/models/create_collection_input_body.py index 2445c8e6..b8b6160d 100644 --- a/revengai/models/create_collection_input_body.py +++ b/revengai/models/create_collection_input_body.py @@ -31,7 +31,6 @@ class CreateCollectionInputBody(BaseModel): collection_scope: StrictStr = Field(description="Visibility scope.") description: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Collection description.") tags: Optional[List[StrictStr]] = Field(default=None, description="Optional tags to attach to the collection.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries", "collection_name", "collection_scope", "description", "tags"] @field_validator('collection_scope') @@ -71,10 +70,8 @@ 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( @@ -82,11 +79,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -115,11 +107,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "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_collection_output_body.py b/revengai/models/create_collection_output_body.py index 969edc2f..c05a4f1d 100644 --- a/revengai/models/create_collection_output_body.py +++ b/revengai/models/create_collection_output_body.py @@ -37,7 +37,6 @@ class CreateCollectionOutputBody(BaseModel): team_id: StrictInt updated_at: datetime user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "tags", "team_id", "updated_at", "user_id"] model_config = ConfigDict( @@ -70,10 +69,8 @@ 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( @@ -88,11 +85,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "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/create_conversation_request.py b/revengai/models/create_conversation_request.py index 997b4773..d38266cc 100644 --- a/revengai/models/create_conversation_request.py +++ b/revengai/models/create_conversation_request.py @@ -28,7 +28,6 @@ class CreateConversationRequest(BaseModel): """ # noqa: E501 context: Optional[ConversationContext] = None title: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["context", "title"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +72,6 @@ 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 - return _dict @classmethod @@ -95,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "context": ConversationContext.from_dict(obj["context"]) if obj.get("context") is not None else None, "title": obj.get("title") }) - # store additional fields in additional_properties - for _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_enum_data_type.py b/revengai/models/create_enum_data_type.py index d4696df5..a56cbc29 100644 --- a/revengai/models/create_enum_data_type.py +++ b/revengai/models/create_enum_data_type.py @@ -32,7 +32,6 @@ class CreateEnumDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_function_data_type.py b/revengai/models/create_function_data_type.py index f262a3b7..4bd2bb1a 100644 --- a/revengai/models/create_function_data_type.py +++ b/revengai/models/create_function_data_type.py @@ -32,7 +32,6 @@ class CreateFunctionDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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 00000000..4addee25 --- /dev/null +++ b/revengai/models/create_metadata.py @@ -0,0 +1,97 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/create_pointer_data_type.py b/revengai/models/create_pointer_data_type.py index 524c41ae..1bba324d 100644 --- a/revengai/models/create_pointer_data_type.py +++ b/revengai/models/create_pointer_data_type.py @@ -32,7 +32,6 @@ class CreatePointerDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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 00000000..2ea2609f --- /dev/null +++ b/revengai/models/create_request.py @@ -0,0 +1,151 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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") + }) + return _obj + + diff --git a/revengai/models/create_result.py b/revengai/models/create_result.py new file mode 100644 index 00000000..9c7e4eb3 --- /dev/null +++ b/revengai/models/create_result.py @@ -0,0 +1,88 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/create_struct_data_type.py b/revengai/models/create_struct_data_type.py index cc25ad91..dcd0a5b2 100644 --- a/revengai/models/create_struct_data_type.py +++ b/revengai/models/create_struct_data_type.py @@ -32,7 +32,6 @@ class CreateStructDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_typedef_data_type.py b/revengai/models/create_typedef_data_type.py index 0f187ee3..2b9989ee 100644 --- a/revengai/models/create_typedef_data_type.py +++ b/revengai/models/create_typedef_data_type.py @@ -32,7 +32,6 @@ class CreateTypedefDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_union_data_type.py b/revengai/models/create_union_data_type.py index 52877773..631e4295 100644 --- a/revengai/models/create_union_data_type.py +++ b/revengai/models/create_union_data_type.py @@ -32,7 +32,6 @@ class CreateUnionDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -72,10 +71,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_unknown_data_type.py b/revengai/models/create_unknown_data_type.py index fdfca888..61538b6b 100644 --- a/revengai/models/create_unknown_data_type.py +++ b/revengai/models/create_unknown_data_type.py @@ -30,7 +30,6 @@ class CreateUnknownDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["kind", "name", "namespace", "size"] @field_validator('kind') @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _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_call.py b/revengai/models/crypto_call.py index d17c2de9..ebf98b61 100644 --- a/revengai/models/crypto_call.py +++ b/revengai/models/crypto_call.py @@ -30,7 +30,6 @@ class CryptoCall(BaseModel): how: StrictStr = Field(description="Detection tier that produced the match") library: StrictStr = Field(description="Crypto library the match belongs to") matched_name: StrictStr = Field(description="Name or token that matched") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callee_name", "category", "how", "library", "matched_name"] @field_validator('category') @@ -84,10 +83,8 @@ 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( @@ -95,11 +92,6 @@ 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 @@ -118,11 +110,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "library": obj.get("library"), "matched_name": obj.get("matched_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/crypto_direct_match.py b/revengai/models/crypto_direct_match.py index 2df10461..39a9675a 100644 --- a/revengai/models/crypto_direct_match.py +++ b/revengai/models/crypto_direct_match.py @@ -29,7 +29,6 @@ class CryptoDirectMatch(BaseModel): how: StrictStr = Field(description="Detection tier that produced the match") library: StrictStr = Field(description="Crypto library the match belongs to") matched_name: StrictStr = Field(description="Name or token that matched") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["category", "how", "library", "matched_name"] @field_validator('category') @@ -83,10 +82,8 @@ 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,11 +91,6 @@ 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 @@ -116,11 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "library": obj.get("library"), "matched_name": obj.get("matched_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/crypto_explain_metadata.py b/revengai/models/crypto_explain_metadata.py new file mode 100644 index 00000000..b83d445c --- /dev/null +++ b/revengai/models/crypto_explain_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/crypto_explain_result.py b/revengai/models/crypto_explain_result.py new file mode 100644 index 00000000..88320c34 --- /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 00000000..bae785e9 --- /dev/null +++ b/revengai/models/crypto_explained_function.py @@ -0,0 +1,90 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/crypto_finding.py b/revengai/models/crypto_finding.py index 3d631a75..f99c0350 100644 --- a/revengai/models/crypto_finding.py +++ b/revengai/models/crypto_finding.py @@ -37,7 +37,6 @@ class CryptoFinding(BaseModel): 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") libraries: Optional[List[StrictStr]] = Field(description="Distinct crypto libraries evidenced by this function") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["address", "categories", "confidence", "crypto_calls", "direct_matches", "evidence_count", "function_id", "function_name", "function_size", "libraries"] @field_validator('categories') @@ -99,10 +98,8 @@ 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( @@ -124,11 +121,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_direct_matches: _items.append(_item_direct_matches.to_dict()) _dict['direct_matches'] = _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: @@ -172,11 +164,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_size": obj.get("function_size"), "libraries": obj.get("libraries") }) - # store additional fields in additional_properties - for _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_scan_metadata.py b/revengai/models/crypto_scan_metadata.py index acb86b67..6d46ee30 100644 --- a/revengai/models/crypto_scan_metadata.py +++ b/revengai/models/crypto_scan_metadata.py @@ -28,7 +28,6 @@ class CryptoScanMetadata(BaseModel): """ # 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') @@ -68,10 +67,8 @@ 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,11 +76,6 @@ 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: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "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_scan_result.py b/revengai/models/crypto_scan_result.py index d44b7d20..7f9e5b75 100644 --- a/revengai/models/crypto_scan_result.py +++ b/revengai/models/crypto_scan_result.py @@ -29,7 +29,6 @@ class CryptoScanResult(BaseModel): analysis_id: StrictInt = Field(description="Analysis the run was performed against") findings: Optional[List[CryptoFinding]] = Field(default=None, description="Functions with crypto-related evidence, sorted by 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( @@ -62,10 +61,8 @@ 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,11 +77,6 @@ def to_dict(self) -> Dict[str, Any]: 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: @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "findings": [CryptoFinding.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/data_type_enum_value_entry.py b/revengai/models/data_type_enum_value_entry.py index af1cdc28..fa892c31 100644 --- a/revengai/models/data_type_enum_value_entry.py +++ b/revengai/models/data_type_enum_value_entry.py @@ -28,7 +28,6 @@ class DataTypeEnumValueEntry(BaseModel): """ # noqa: E501 name: StrictStr = Field(description="Constant name.") value: Annotated[str, Field(strict=True)] = Field(description="Constant value, a decimal integer as a string, with no leading zeros. A string because the value may be negative or exceed 64 unsigned bits, which a JSON number cannot carry safely.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "value"] @field_validator('value') @@ -68,10 +67,8 @@ 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,11 +76,6 @@ 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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "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/data_type_function_entry.py b/revengai/models/data_type_function_entry.py index 76e7f548..269dda63 100644 --- a/revengai/models/data_type_function_entry.py +++ b/revengai/models/data_type_function_entry.py @@ -27,7 +27,6 @@ class DataTypeFunctionEntry(BaseModel): """ # noqa: E501 function_id: StrictInt function_name: StrictStr = Field(description="Current name of the function.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_name"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "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/data_type_function_parameter_entry.py b/revengai/models/data_type_function_parameter_entry.py index de49d610..783b2564 100644 --- a/revengai/models/data_type_function_parameter_entry.py +++ b/revengai/models/data_type_function_parameter_entry.py @@ -29,7 +29,6 @@ class DataTypeFunctionParameterEntry(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Parameter name, when the producer had one.") ordinal: StrictInt = Field(description="Zero-based argument position.") size: StrictInt = Field(description="Parameter size in bytes.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "name", "ordinal", "size"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ordinal": obj.get("ordinal"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/data_type_version.py b/revengai/models/data_type_version.py index d4366975..0501b2e6 100644 --- a/revengai/models/data_type_version.py +++ b/revengai/models/data_type_version.py @@ -31,7 +31,6 @@ class DataTypeVersion(BaseModel): updated_at: Optional[datetime] = Field(default=None, description="When this version was written. Absent on a version that predates the recorded history.") updated_by: Optional[HistoryActor] = Field(default=None, description="Who wrote this version. Absent on a version that predates the recorded history.") value: DataTypeEntry = Field(description="The type as it stood in this version.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["updated_at", "updated_by", "value"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +78,6 @@ def to_dict(self) -> Dict[str, Any]: # 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 - return _dict @classmethod @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_by": HistoryActor.from_dict(obj["updated_by"]) if obj.get("updated_by") is not None else None, "value": DataTypeEntry.from_dict(obj["value"]) if obj.get("value") 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/decomp_failed_event.py b/revengai/models/decomp_failed_event.py index 9d26a19c..29c69d1d 100644 --- a/revengai/models/decomp_failed_event.py +++ b/revengai/models/decomp_failed_event.py @@ -30,7 +30,6 @@ class DecompFailedEvent(BaseModel): error_code: Optional[StrictStr] = None seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "error", "error_code", "seq", "type"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +71,6 @@ 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,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/decomp_finished_event.py b/revengai/models/decomp_finished_event.py index 06be0dd9..32c1bc1e 100644 --- a/revengai/models/decomp_finished_event.py +++ b/revengai/models/decomp_finished_event.py @@ -28,7 +28,6 @@ class DecompFinishedEvent(BaseModel): attempt: StrictInt seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "seq", "type"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/decompilation_data.py b/revengai/models/decompilation_data.py index 8b996f2e..f8e091f2 100644 --- a/revengai/models/decompilation_data.py +++ b/revengai/models/decompilation_data.py @@ -27,7 +27,6 @@ class DecompilationData(BaseModel): """ # noqa: E501 decompilation: Optional[StrictStr] = Field(default=None, description="Source code with placeholders replaced") status: StrictStr = Field(description="Task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["decompilation", "status"] @field_validator('status') @@ -67,10 +66,8 @@ 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,11 +75,6 @@ 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,11 +90,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "decompilation": obj.get("decompilation"), "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/decompiler_summary.py b/revengai/models/decompiler_summary.py new file mode 100644 index 00000000..b40974ff --- /dev/null +++ b/revengai/models/decompiler_summary.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, 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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 + }) + return _obj + + diff --git a/revengai/models/decompiler_summary_evidence.py b/revengai/models/decompiler_summary_evidence.py new file mode 100644 index 00000000..4638e7ae --- /dev/null +++ b/revengai/models/decompiler_summary_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/display.py b/revengai/models/display.py new file mode 100644 index 00000000..895e0c09 --- /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/dns_query.py b/revengai/models/dns_query.py index d0c915e1..0392e5c8 100644 --- a/revengai/models/dns_query.py +++ b/revengai/models/dns_query.py @@ -31,7 +31,6 @@ class DnsQuery(BaseModel): events: Optional[List[ReportEvent]] = None min_ttl: Optional[StrictInt] = None resolved_ips: Optional[List[StrictStr]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["cname_chain", "domain", "events", "min_ttl", "resolved_ips"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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( @@ -82,11 +79,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 cname_chain (nullable) is None # and model_fields_set contains the field if self.cname_chain is None and "cname_chain" in self.model_fields_set: @@ -120,11 +112,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "min_ttl": obj.get("min_ttl"), "resolved_ips": obj.get("resolved_ips") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/drakvuf_file_metadata.py b/revengai/models/drakvuf_file_metadata.py index 79c54dd6..6578e6bc 100644 --- a/revengai/models/drakvuf_file_metadata.py +++ b/revengai/models/drakvuf_file_metadata.py @@ -30,7 +30,6 @@ class DrakvufFileMetadata(BaseModel): sha256: StrictStr type: Optional[StrictStr] = None type_id: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["mime_type", "name", "sha256", "type", "type_id"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +71,6 @@ 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,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "type_id": obj.get("type_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/dynamic_execution_status_response.py b/revengai/models/dynamic_execution_status_response.py index cd4b75c3..5845aab9 100644 --- a/revengai/models/dynamic_execution_status_response.py +++ b/revengai/models/dynamic_execution_status_response.py @@ -29,7 +29,6 @@ class DynamicExecutionStatusResponse(BaseModel): error_message: Optional[StrictStr] = Field(default=None, description="Error detail, set when status is FAILED") logs: AnalysisLogs = Field(description="Sandbox status log messages captured during the run. Empty when none have been captured yet.") status: StrictStr = Field(description="Task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error_message", "logs", "status"] @field_validator('status') @@ -69,10 +68,8 @@ 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,11 +80,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of logs if self.logs: _dict['logs'] = self.logs.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 @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "logs": AnalysisLogs.from_dict(obj["logs"]) if obj.get("logs") is not None else None, "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/elf_model.py b/revengai/models/elf_model.py index 70fede49..afeaa406 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,7 +49,7 @@ 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] __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"] diff --git a/revengai/models/endianness.py b/revengai/models/endianness.py new file mode 100644 index 00000000..47e4884a --- /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/enum_data_type.py b/revengai/models/enum_data_type.py index e3a355af..5325fca8 100644 --- a/revengai/models/enum_data_type.py +++ b/revengai/models/enum_data_type.py @@ -37,7 +37,6 @@ class EnumDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/enum_definition.py b/revengai/models/enum_definition.py index bfc0ed06..61786ec2 100644 --- a/revengai/models/enum_definition.py +++ b/revengai/models/enum_definition.py @@ -27,7 +27,6 @@ class EnumDefinition(BaseModel): EnumDefinition """ # noqa: E501 values: Optional[List[DataTypeEnumValueEntry]] = Field(description="The type's constants.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["values"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: 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 - # set to None if values (nullable) is None # and model_fields_set contains the field if self.values is None and "values" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "values": [DataTypeEnumValueEntry.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/error_body.py b/revengai/models/error_body.py index 08ec1c0a..e742ab70 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -30,14 +30,13 @@ class ErrorBody(BaseModel): doc_url: Optional[StrictStr] = Field(default=None, description="Link to documentation explaining this error and resolution steps.") message: StrictStr = Field(description="Human-readable summary. Never contains internals. Suitable for direct display.") trace_id: StrictStr = Field(description="Correlation ID from the request. Quote this in support requests.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["code", "detail", "doc_url", "message", "trace_id"] @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( @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "trace_id": obj.get("trace_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/event.py b/revengai/models/event.py index af990fea..b5c58d91 100644 --- a/revengai/models/event.py +++ b/revengai/models/event.py @@ -33,7 +33,6 @@ class Event(BaseModel): role: StrictInt tokens_used: StrictInt type: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["conversation_uuid", "created_at", "data", "event_id", "role", "tokens_used", "type"] model_config = ConfigDict( @@ -66,10 +65,8 @@ 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,11 +74,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -107,11 +99,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tokens_used": obj.get("tokens_used"), "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/evidence_effect.py b/revengai/models/evidence_effect.py new file mode 100644 index 00000000..569a5a32 --- /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 00000000..7a81ef9e --- /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 00000000..7d3c8321 --- /dev/null +++ b/revengai/models/execution_call.py @@ -0,0 +1,115 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/execution_direct_match.py b/revengai/models/execution_direct_match.py new file mode 100644 index 00000000..d57061ab --- /dev/null +++ b/revengai/models/execution_direct_match.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/execution_explain_metadata.py b/revengai/models/execution_explain_metadata.py new file mode 100644 index 00000000..05405aa3 --- /dev/null +++ b/revengai/models/execution_explain_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/execution_explain_result.py b/revengai/models/execution_explain_result.py new file mode 100644 index 00000000..4e2ef9c0 --- /dev/null +++ b/revengai/models/execution_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.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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/execution_explained_function.py b/revengai/models/execution_explained_function.py new file mode 100644 index 00000000..7cbf81f0 --- /dev/null +++ b/revengai/models/execution_explained_function.py @@ -0,0 +1,90 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/execution_finding.py b/revengai/models/execution_finding.py new file mode 100644 index 00000000..cdfaad47 --- /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 00000000..d58bf0c1 --- /dev/null +++ b/revengai/models/execution_scan_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/execution_scan_result.py b/revengai/models/execution_scan_result.py new file mode 100644 index 00000000..2a18ae91 --- /dev/null +++ b/revengai/models/execution_scan_result.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 +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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/extracted_url.py b/revengai/models/extracted_url.py index eecaa640..991d4807 100644 --- a/revengai/models/extracted_url.py +++ b/revengai/models/extracted_url.py @@ -28,7 +28,6 @@ class ExtractedURL(BaseModel): """ # noqa: E501 events: Optional[List[ReportEvent]] = None url: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "url"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, "url": obj.get("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/feedback_output_body.py b/revengai/models/feedback_output_body.py new file mode 100644 index 00000000..d55b55d0 --- /dev/null +++ b/revengai/models/feedback_output_body.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/file_activity_entry.py b/revengai/models/file_activity_entry.py index f0393d75..99a5c17a 100644 --- a/revengai/models/file_activity_entry.py +++ b/revengai/models/file_activity_entry.py @@ -28,7 +28,6 @@ class FileActivityEntry(BaseModel): """ # noqa: E501 events: Optional[List[ReportEvent]] = None path: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "path"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, "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/filesystem_analyse_metadata.py b/revengai/models/filesystem_analyse_metadata.py new file mode 100644 index 00000000..77ed0510 --- /dev/null +++ b/revengai/models/filesystem_analyse_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_analyse_result.py b/revengai/models/filesystem_analyse_result.py new file mode 100644 index 00000000..4ba04f30 --- /dev/null +++ b/revengai/models/filesystem_analyse_result.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_call.py b/revengai/models/filesystem_call.py new file mode 100644 index 00000000..7d96a325 --- /dev/null +++ b/revengai/models/filesystem_call.py @@ -0,0 +1,115 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_direct_match.py b/revengai/models/filesystem_direct_match.py new file mode 100644 index 00000000..c3cb6416 --- /dev/null +++ b/revengai/models/filesystem_direct_match.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_explained_function.py b/revengai/models/filesystem_explained_function.py new file mode 100644 index 00000000..74524717 --- /dev/null +++ b/revengai/models/filesystem_explained_function.py @@ -0,0 +1,90 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_finding.py b/revengai/models/filesystem_finding.py new file mode 100644 index 00000000..909f1d41 --- /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 00000000..c22eea72 --- /dev/null +++ b/revengai/models/filesystem_scan_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/filesystem_scan_result.py b/revengai/models/filesystem_scan_result.py new file mode 100644 index 00000000..cbc18160 --- /dev/null +++ b/revengai/models/filesystem_scan_result.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 +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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/finding.py b/revengai/models/finding.py new file mode 100644 index 00000000..a807def7 --- /dev/null +++ b/revengai/models/finding.py @@ -0,0 +1,99 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/finding_evidence_inner.py b/revengai/models/finding_evidence_inner.py new file mode 100644 index 00000000..0dcbe1a8 --- /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_boundary.py b/revengai/models/function_boundary.py index 2c66b7d8..0c7a2902 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,11 @@ 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)] + __properties: ClassVar[List[str]] = ["end_address", "include_in_analysis", "mangled_name", "start_address"] model_config = ConfigDict( populate_by_name=True, @@ -70,11 +71,6 @@ 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 - return _dict @classmethod @@ -87,10 +83,10 @@ 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") }) return _obj diff --git a/revengai/models/function_call_edges.py b/revengai/models/function_call_edges.py index c300eec5..8a470dea 100644 --- a/revengai/models/function_call_edges.py +++ b/revengai/models/function_call_edges.py @@ -29,7 +29,6 @@ class FunctionCallEdges(BaseModel): callees: Optional[List[CallEdge]] callers: Optional[List[CallEdge]] function_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callees", "callers", "function_id"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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 +84,6 @@ 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 - # set to None if callees (nullable) is None # and model_fields_set contains the field if self.callees is None and "callees" in self.model_fields_set: @@ -118,11 +110,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "callers": [CallEdge.from_dict(_item) for _item in obj["callers"]] if obj.get("callers") is not None else None, "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/function_data_type.py b/revengai/models/function_data_type.py index 9d78264f..89d79051 100644 --- a/revengai/models/function_data_type.py +++ b/revengai/models/function_data_type.py @@ -37,7 +37,6 @@ class FunctionDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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_details_output_body.py b/revengai/models/function_details_output_body.py index 2a56721d..9de86816 100644 --- a/revengai/models/function_details_output_body.py +++ b/revengai/models/function_details_output_body.py @@ -36,7 +36,6 @@ class FunctionDetailsOutputBody(BaseModel): function_vaddr: StrictInt mangled_name: Optional[StrictStr] = None source_function_id: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "creation", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_function_id"] model_config = ConfigDict( @@ -69,10 +68,8 @@ 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,11 +77,6 @@ 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 @@ -108,11 +100,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "mangled_name": obj.get("mangled_name"), "source_function_id": obj.get("source_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/function_match.py b/revengai/models/function_match.py index 54a2fc7b..6cf370bb 100644 --- a/revengai/models/function_match.py +++ b/revengai/models/function_match.py @@ -30,7 +30,6 @@ class FunctionMatch(BaseModel): confidences: Optional[List[NameConfidence]] = Field(default=None, description="Per-name confidences when canonify was requested") function_id: StrictInt = Field(description="Source function ID") matched_functions: Optional[List[MatchedFunction]] = Field(description="Top candidate matches in similarity-descending order") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["confidences", "function_id", "matched_functions"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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( @@ -88,11 +85,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_matched_functions: _items.append(_item_matched_functions.to_dict()) _dict['matched_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 confidences (nullable) is None # and model_fields_set contains the field if self.confidences is None and "confidences" in self.model_fields_set: @@ -119,11 +111,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_id": obj.get("function_id"), "matched_functions": [MatchedFunction.from_dict(_item) for _item in obj["matched_functions"]] if obj.get("matched_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/function_signature_entry.py b/revengai/models/function_signature_entry.py index 58e6bbe8..25c21384 100644 --- a/revengai/models/function_signature_entry.py +++ b/revengai/models/function_signature_entry.py @@ -36,7 +36,6 @@ class FunctionSignatureEntry(BaseModel): return_data_type_id: Optional[StrictInt] = Field(default=None, description="Return type, resolvable against the analysis data types list. Absent for an unresolved return type.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this signature was copied from, when it was transferred rather than extracted.") source_type: Optional[StrictStr] = Field(default=None, description="Where this signature came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["calling_convention", "created_at", "function_id", "function_name", "has_signature", "parameters", "return_data_type_id", "source_function_id", "source_type"] @field_validator('source_type') @@ -79,10 +78,8 @@ 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,11 +94,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_parameters: _items.append(_item_parameters.to_dict()) _dict['parameters'] = _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 parameters (nullable) is None # and model_fields_set contains the field if self.parameters is None and "parameters" in self.model_fields_set: @@ -129,11 +121,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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_signature_version.py b/revengai/models/function_signature_version.py index 79336613..5886298c 100644 --- a/revengai/models/function_signature_version.py +++ b/revengai/models/function_signature_version.py @@ -31,7 +31,6 @@ class FunctionSignatureVersion(BaseModel): updated_at: Optional[datetime] = Field(default=None, description="When this version was written. Absent on a version that predates the recorded history.") updated_by: Optional[HistoryActor] = Field(default=None, description="Who wrote this version. Absent on a version that predates the recorded history.") value: FunctionSignatureEntry = Field(description="The signature as it stood in this version.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["updated_at", "updated_by", "value"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +78,6 @@ def to_dict(self) -> Dict[str, Any]: # 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 - return _dict @classmethod @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_by": HistoryActor.from_dict(obj["updated_by"]) if obj.get("updated_by") is not None else None, "value": FunctionSignatureEntry.from_dict(obj["value"]) if obj.get("value") 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.py b/revengai/models/function_similarity.py new file mode 100644 index 00000000..858205c6 --- /dev/null +++ b/revengai/models/function_similarity.py @@ -0,0 +1,95 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + return _obj + + diff --git a/revengai/models/function_similarity_evidence.py b/revengai/models/function_similarity_evidence.py new file mode 100644 index 00000000..eb9660eb --- /dev/null +++ b/revengai/models/function_similarity_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/function_string_item.py b/revengai/models/function_string_item.py index ad209ed0..eccd2ca5 100644 --- a/revengai/models/function_string_item.py +++ b/revengai/models/function_string_item.py @@ -28,7 +28,6 @@ class FunctionStringItem(BaseModel): source: StrictStr vaddr: StrictInt value: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["source", "vaddr", "value"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "vaddr": obj.get("vaddr"), "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/function_type_definition.py b/revengai/models/function_type_definition.py index 52fc33e7..c5b1d4b9 100644 --- a/revengai/models/function_type_definition.py +++ b/revengai/models/function_type_definition.py @@ -28,7 +28,6 @@ class FunctionTypeDefinition(BaseModel): """ # noqa: E501 parameters: Optional[List[DataTypeFunctionParameterEntry]] = Field(description="The parameters, in argument order.") return_data_type_id: Optional[StrictInt] = Field(default=None, description="The return type.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["parameters", "return_data_type_id"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_parameters: _items.append(_item_parameters.to_dict()) _dict['parameters'] = _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 parameters (nullable) is None # and model_fields_set contains the field if self.parameters is None and "parameters" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "parameters": [DataTypeFunctionParameterEntry.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, "return_data_type_id": obj.get("return_data_type_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/generate_pdf_output_body.py b/revengai/models/generate_pdf_output_body.py index 7b7c2b13..ca0640fd 100644 --- a/revengai/models/generate_pdf_output_body.py +++ b/revengai/models/generate_pdf_output_body.py @@ -26,7 +26,6 @@ class GeneratePDFOutputBody(BaseModel): GeneratePDFOutputBody """ # noqa: E501 already_running: Optional[StrictBool] = Field(default=None, description="True when an existing PDF generation is in progress for this analysis and user") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["already_running"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "already_running": obj.get("already_running") }) - # store additional fields in additional_properties - for _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_additional_details_output_body.py b/revengai/models/get_additional_details_output_body.py index 985f6e87..32060faf 100644 --- a/revengai/models/get_additional_details_output_body.py +++ b/revengai/models/get_additional_details_output_body.py @@ -27,7 +27,6 @@ class GetAdditionalDetailsOutputBody(BaseModel): """ # noqa: E501 binary_id: StrictInt details: Optional[Any] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_id", "details"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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 details (nullable) is None # and model_fields_set contains the field if self.details is None and "details" in self.model_fields_set: @@ -96,11 +88,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_id": obj.get("binary_id"), "details": obj.get("details") }) - # store additional fields in additional_properties - for _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_additional_details_status_output_body.py b/revengai/models/get_additional_details_status_output_body.py index 4bf18243..1aa41211 100644 --- a/revengai/models/get_additional_details_status_output_body.py +++ b/revengai/models/get_additional_details_status_output_body.py @@ -26,7 +26,6 @@ class GetAdditionalDetailsStatusOutputBody(BaseModel): GetAdditionalDetailsStatusOutputBody """ # noqa: E501 status: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ 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/get_analysis_logs_output_body.py b/revengai/models/get_analysis_logs_output_body.py index 6a8beb98..43dd4883 100644 --- a/revengai/models/get_analysis_logs_output_body.py +++ b/revengai/models/get_analysis_logs_output_body.py @@ -27,7 +27,6 @@ class GetAnalysisLogsOutputBody(BaseModel): GetAnalysisLogsOutputBody """ # noqa: E501 entries: Optional[List[AnalysisLogEntry]] = Field(description="Analysis log lines, oldest first") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["entries"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_entries: _items.append(_item_entries.to_dict()) _dict['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 - # set to None if entries (nullable) is None # and model_fields_set contains the field if self.entries is None and "entries" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "entries": [AnalysisLogEntry.from_dict(_item) for _item in obj["entries"]] if obj.get("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/get_analysis_strings_status_output_body.py b/revengai/models/get_analysis_strings_status_output_body.py index ab3ae14e..02c1330c 100644 --- a/revengai/models/get_analysis_strings_status_output_body.py +++ b/revengai/models/get_analysis_strings_status_output_body.py @@ -26,7 +26,6 @@ class GetAnalysisStringsStatusOutputBody(BaseModel): GetAnalysisStringsStatusOutputBody """ # noqa: E501 status: StrictStr = Field(description="String-extraction task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] @field_validator('status') @@ -66,10 +65,8 @@ 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,11 +74,6 @@ 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 @@ -96,11 +88,6 @@ 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/get_collection_output_body.py b/revengai/models/get_collection_output_body.py index a4c63099..ed9351b2 100644 --- a/revengai/models/get_collection_output_body.py +++ b/revengai/models/get_collection_output_body.py @@ -40,7 +40,6 @@ class GetCollectionOutputBody(BaseModel): team_id: StrictInt updated_at: datetime user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries", "collection_id", "collection_name", "collection_scope", "created_at", "description", "has_next_page", "page_number", "page_size", "tags", "team_id", "updated_at", "user_id"] model_config = ConfigDict( @@ -73,10 +72,8 @@ 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,11 +88,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -132,11 +124,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "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/get_data_type_history_body.py b/revengai/models/get_data_type_history_body.py index 33b08205..2e98e54c 100644 --- a/revengai/models/get_data_type_history_body.py +++ b/revengai/models/get_data_type_history_body.py @@ -27,7 +27,6 @@ class GetDataTypeHistoryBody(BaseModel): GetDataTypeHistoryBody """ # noqa: E501 versions: List[DataTypeVersion] = Field(description="Every version of the type, newest first. The first element is the current value, so the list is never empty; a type that has never been edited has that one element only.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["versions"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_versions: _items.append(_item_versions.to_dict()) _dict['versions'] = _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 @@ -97,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "versions": [DataTypeVersion.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") 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_function_signature_history_body.py b/revengai/models/get_function_signature_history_body.py index 986953d5..57b56044 100644 --- a/revengai/models/get_function_signature_history_body.py +++ b/revengai/models/get_function_signature_history_body.py @@ -27,7 +27,6 @@ class GetFunctionSignatureHistoryBody(BaseModel): GetFunctionSignatureHistoryBody """ # noqa: E501 versions: List[FunctionSignatureVersion] = Field(description="Every version of the signature, newest first. The first element is the current value, so the list is never empty; a signature that has never been edited has that one element only.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["versions"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_versions: _items.append(_item_versions.to_dict()) _dict['versions'] = _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 @@ -97,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "versions": [FunctionSignatureVersion.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") 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_matches_output_body.py b/revengai/models/get_matches_output_body.py index 83dfc061..3e5249e3 100644 --- a/revengai/models/get_matches_output_body.py +++ b/revengai/models/get_matches_output_body.py @@ -28,7 +28,6 @@ class GetMatchesOutputBody(BaseModel): """ # noqa: E501 matches: Optional[List[FunctionMatch]] = Field(default=None, description="Per-source-function matches. Populated when status=COMPLETED; empty otherwise.") status: StrictStr = Field(description="Current workflow status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["matches", "status"] @field_validator('status') @@ -68,10 +67,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_matches: _items.append(_item_matches.to_dict()) _dict['matches'] = _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 matches (nullable) is None # and model_fields_set contains the field if self.matches is None and "matches" in self.model_fields_set: @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "matches": [FunctionMatch.from_dict(_item) for _item in obj["matches"]] if obj.get("matches") is not None else None, "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/get_matches_status_output_body.py b/revengai/models/get_matches_status_output_body.py index ace1af37..26182dff 100644 --- a/revengai/models/get_matches_status_output_body.py +++ b/revengai/models/get_matches_status_output_body.py @@ -36,7 +36,6 @@ class GetMatchesStatusOutputBody(BaseModel): sub_step: Optional[StrictStr] = Field(default=None, description="Phase within the current step, when the step reports one") sub_step_done: Optional[StrictInt] = Field(default=None, description="Items completed in the current phase") sub_step_total: Optional[StrictInt] = Field(default=None, description="Items the current phase will process, 0 when unknown") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["messages", "percent", "status", "step", "step_index", "step_share", "steps_total", "sub_step", "sub_step_done", "sub_step_total"] @field_validator('status') @@ -76,10 +75,8 @@ 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,11 +91,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_messages: _items.append(_item_messages.to_dict()) _dict['messages'] = _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 messages (nullable) is None # and model_fields_set contains the field if self.messages is None and "messages" in self.model_fields_set: @@ -127,11 +119,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sub_step_done": obj.get("sub_step_done"), "sub_step_total": obj.get("sub_step_total") }) - # store additional fields in additional_properties - for _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_tokens_response.py b/revengai/models/get_tokens_response.py index ef5d8923..2e0109fc 100644 --- a/revengai/models/get_tokens_response.py +++ b/revengai/models/get_tokens_response.py @@ -31,7 +31,6 @@ class GetTokensResponse(BaseModel): analysis_id: StrictInt = Field(description="Analysis the function belongs to. Scopes every data_type_id below.") placeholder_to_rendered_token: Dict[str, RenderedToken] = Field(description="Each placeholder token mapped to the value the server would render in its place, and the record it refers to. Null until a run has succeeded.") placeholder_to_user_override: Dict[str, Token] = Field(description="The caller's own overrides, keyed by token. Null until a run has succeeded.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ai_decomp", "analysis_id", "placeholder_to_rendered_token", "placeholder_to_user_override"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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( @@ -89,11 +86,6 @@ def to_dict(self) -> Dict[str, Any]: if self.placeholder_to_user_override[_key_placeholder_to_user_override]: _field_dict[_key_placeholder_to_user_override] = self.placeholder_to_user_override[_key_placeholder_to_user_override].to_dict() _dict['placeholder_to_user_override'] = _field_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 @@ -121,11 +113,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("placeholder_to_user_override") 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/hardcoded_secret_evidence.py b/revengai/models/hardcoded_secret_evidence.py new file mode 100644 index 00000000..b93cd537 --- /dev/null +++ b/revengai/models/hardcoded_secret_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, 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/history_actor.py b/revengai/models/history_actor.py index d734f274..ddd7ea49 100644 --- a/revengai/models/history_actor.py +++ b/revengai/models/history_actor.py @@ -27,7 +27,6 @@ class HistoryActor(BaseModel): """ # noqa: E501 user_id: StrictInt = Field(description="The user who made the change.") username: Optional[StrictStr] = Field(default=None, description="Absent when the user no longer exists.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["user_id", "username"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "user_id": obj.get("user_id"), "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/history_entry.py b/revengai/models/history_entry.py index 7da8d43d..5bba7b07 100644 --- a/revengai/models/history_entry.py +++ b/revengai/models/history_entry.py @@ -35,7 +35,6 @@ class HistoryEntry(BaseModel): source_analysis_id: Optional[StrictInt] = Field(default=None, description="ID of the analysis the source function belongs to, if any") source_function_id: Optional[StrictInt] = Field(default=None, description="ID of the source function this name was transferred from, if any") source_type: StrictStr = Field(description="Source of the rename (USER, SYSTEM, AI_UNSTRIP, etc.)") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["change_made_by", "created_at", "function_name", "history_id", "is_debug", "mangled_name", "source_analysis_id", "source_function_id", "source_type"] model_config = ConfigDict( @@ -68,10 +67,8 @@ 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,11 +76,6 @@ 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 @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/http_request.py b/revengai/models/http_request.py index 79752c8c..13e87007 100644 --- a/revengai/models/http_request.py +++ b/revengai/models/http_request.py @@ -50,7 +50,6 @@ class HttpRequest(BaseModel): username: Optional[StrictStr] = None verb: Optional[StrictStr] = None version: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["bytes_received", "bytes_sent", "events", "extra_headers", "flags", "password", "path", "pcap_stream_id", "post_data", "proxy", "proxy_bypass", "referer", "request_body", "response_body", "response_status", "server_ip", "server_name", "server_port", "service", "user_agent", "username", "verb", "version"] model_config = ConfigDict( @@ -83,10 +82,8 @@ 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( @@ -107,11 +104,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of response_body if self.response_body: _dict['response_body'] = self.response_body.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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -158,11 +150,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "verb": obj.get("verb"), "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/imported_api.py b/revengai/models/imported_api.py new file mode 100644 index 00000000..8c57c8ae --- /dev/null +++ b/revengai/models/imported_api.py @@ -0,0 +1,94 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/imported_api_call.py b/revengai/models/imported_api_call.py new file mode 100644 index 00000000..c1f149ad --- /dev/null +++ b/revengai/models/imported_api_call.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 +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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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 + }) + 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 00000000..10ff51dd --- /dev/null +++ b/revengai/models/imported_api_call_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/imported_function_caller_entry.py b/revengai/models/imported_function_caller_entry.py index c0d8eb1d..a3443f71 100644 --- a/revengai/models/imported_function_caller_entry.py +++ b/revengai/models/imported_function_caller_entry.py @@ -29,7 +29,6 @@ class ImportedFunctionCallerEntry(BaseModel): function_name: StrictStr function_vaddr: StrictInt stub_vaddr: StrictInt = Field(description="The PLT/stub address this caller targets.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "stub_vaddr"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_vaddr": obj.get("function_vaddr"), "stub_vaddr": obj.get("stub_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/imported_function_detail_output_body.py b/revengai/models/imported_function_detail_output_body.py index 645065bd..ef7e2528 100644 --- a/revengai/models/imported_function_detail_output_body.py +++ b/revengai/models/imported_function_detail_output_body.py @@ -35,7 +35,6 @@ class ImportedFunctionDetailOutputBody(BaseModel): original_name: Optional[StrictStr] = Field(default=None, description="Pre-demangling / pre-aliasing name, when it differs from name.") stub_vaddrs: Optional[List[StrictInt]] = Field(description="PLT/stub addresses that resolve external call edges (function_call_edges.callee_vaddr) to this import. Use these to link a caller's external callee to this import.") vaddr: Optional[StrictInt] = Field(default=None, description="Virtual address of the import, when known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callers", "imported_function_id", "is_function", "library_name", "library_version", "name", "original_name", "stub_vaddrs", "vaddr"] model_config = ConfigDict( @@ -68,10 +67,8 @@ 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,11 +83,6 @@ 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 - # set to None if callers (nullable) is None # and model_fields_set contains the field if self.callers is None and "callers" in self.model_fields_set: @@ -123,11 +115,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stub_vaddrs": obj.get("stub_vaddrs"), "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/indirect_call_site.py b/revengai/models/indirect_call_site.py index 32352f96..521538cf 100644 --- a/revengai/models/indirect_call_site.py +++ b/revengai/models/indirect_call_site.py @@ -30,7 +30,6 @@ class IndirectCallSite(BaseModel): is_external: StrictBool target_name: Optional[StrictStr] = None target_vaddr: StrictInt = Field(description="Resolved call target vaddr.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["callee_function_id", "inst_vaddr", "is_external", "target_name", "target_vaddr"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +71,6 @@ 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,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "target_name": obj.get("target_name"), "target_vaddr": obj.get("target_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/indirect_call_sites_output_body.py b/revengai/models/indirect_call_sites_output_body.py index 2e0426df..b09ebaf1 100644 --- a/revengai/models/indirect_call_sites_output_body.py +++ b/revengai/models/indirect_call_sites_output_body.py @@ -28,7 +28,6 @@ class IndirectCallSitesOutputBody(BaseModel): """ # noqa: E501 function_id: StrictInt sites: Optional[List[IndirectCallSite]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["function_id", "sites"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_sites: _items.append(_item_sites.to_dict()) _dict['sites'] = _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 sites (nullable) is None # and model_fields_set contains the field if self.sites is None and "sites" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_id": obj.get("function_id"), "sites": [IndirectCallSite.from_dict(_item) for _item in obj["sites"]] if obj.get("sites") 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/inline_comment.py b/revengai/models/inline_comment.py index 2187cf1d..5aa85408 100644 --- a/revengai/models/inline_comment.py +++ b/revengai/models/inline_comment.py @@ -27,7 +27,6 @@ class InlineComment(BaseModel): """ # noqa: E501 comment: StrictStr line: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["comment", "line"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "comment": obj.get("comment"), "line": obj.get("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/ioc.py b/revengai/models/ioc.py index c08dcecf..5bbbd685 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,13 @@ 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") + __properties: ClassVar[List[str]] = ["description", "function_id", "function_name", "source", "type", "value"] model_config = ConfigDict( populate_by_name=True, @@ -79,11 +72,6 @@ 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 - # 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: @@ -94,6 +82,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,12 +99,12 @@ 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") }) return _obj diff --git a/revengai/models/known_constant_evidence.py b/revengai/models/known_constant_evidence.py new file mode 100644 index 00000000..7edce56f --- /dev/null +++ b/revengai/models/known_constant_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/line_attributions_data.py b/revengai/models/line_attributions_data.py index 52311a68..1d568784 100644 --- a/revengai/models/line_attributions_data.py +++ b/revengai/models/line_attributions_data.py @@ -26,7 +26,6 @@ class LineAttributionsData(BaseModel): LineAttributionsData """ # noqa: E501 disassembly_line_number_to_ai_decompilation_line_numbers: Dict[str, Optional[List[StrictInt]]] = Field(description="Each disassembly line number mapped to the AI-decompilation line numbers it fed, e.g. {\"12\": [3, 4, 6], \"17\": [4]}. Both sides 0-based; many-to-many in both directions. Empty when no completed run has produced a correspondence, which is ordinary and not an error.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["disassembly_line_number_to_ai_decompilation_line_numbers"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "disassembly_line_number_to_ai_decompilation_line_numbers": obj.get("disassembly_line_number_to_ai_decompilation_line_numbers") }) - # store additional fields in additional_properties - for _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_analyses_output_body.py b/revengai/models/list_analyses_output_body.py index 6d34f8d2..b5c5aa8c 100644 --- a/revengai/models/list_analyses_output_body.py +++ b/revengai/models/list_analyses_output_body.py @@ -29,7 +29,6 @@ class ListAnalysesOutputBody(BaseModel): next_page_token: Optional[StrictStr] = Field(default=None, description="Opaque cursor to fetch the next page; empty on the last page") page_size: StrictInt = Field(description="Number of results in this page") results: Optional[List[AnalysisRecordBody]] = Field(description="The page of matching analyses") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["next_page_token", "page_size", "results"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +77,6 @@ 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 - # set to None if results (nullable) is None # and model_fields_set contains the field if self.results is None and "results" in self.model_fields_set: @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "page_size": obj.get("page_size"), "results": [AnalysisRecordBody.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/list_analysis_data_types_output_body.py b/revengai/models/list_analysis_data_types_output_body.py index f36e478c..80eee9d0 100644 --- a/revengai/models/list_analysis_data_types_output_body.py +++ b/revengai/models/list_analysis_data_types_output_body.py @@ -28,7 +28,6 @@ class ListAnalysisDataTypesOutputBody(BaseModel): """ # noqa: E501 items: Optional[List[DataTypeEntry]] total_count: StrictInt = Field(description="Total types matching the filters, ignoring pagination.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "total_count"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_items: _items.append(_item_items.to_dict()) _dict['items'] = _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 items (nullable) is None # and model_fields_set contains the field if self.items is None and "items" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "items": [DataTypeEntry.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "total_count": obj.get("total_count") }) - # store additional fields in additional_properties - for _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_analysis_functions_output_body.py b/revengai/models/list_analysis_functions_output_body.py index fbd41c46..f552269d 100644 --- a/revengai/models/list_analysis_functions_output_body.py +++ b/revengai/models/list_analysis_functions_output_body.py @@ -28,7 +28,6 @@ class ListAnalysisFunctionsOutputBody(BaseModel): """ # noqa: E501 functions: Optional[List[AnalysisFunctionEntry]] total_count: StrictInt = Field(description="Total functions in the analysis, ignoring pagination.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions", "total_count"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ 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 - # 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: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "functions": [AnalysisFunctionEntry.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, "total_count": obj.get("total_count") }) - # store additional fields in additional_properties - for _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_analysis_strings_output_body.py b/revengai/models/list_analysis_strings_output_body.py index a7de48a8..f0d88fd1 100644 --- a/revengai/models/list_analysis_strings_output_body.py +++ b/revengai/models/list_analysis_strings_output_body.py @@ -28,7 +28,6 @@ class ListAnalysisStringsOutputBody(BaseModel): """ # noqa: E501 strings: Optional[List[AnalysisStringItem]] total_strings: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["strings", "total_strings"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ 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 - # set to None if strings (nullable) is None # and model_fields_set contains the field if self.strings is None and "strings" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "strings": [AnalysisStringItem.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/list_collections_output_body.py b/revengai/models/list_collections_output_body.py index 8532bddc..2a031fd3 100644 --- a/revengai/models/list_collections_output_body.py +++ b/revengai/models/list_collections_output_body.py @@ -30,7 +30,6 @@ class ListCollectionsOutputBody(BaseModel): page_number: StrictInt page_size: StrictInt results: Optional[List[CollectionListItemBody]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["has_next_page", "page_number", "page_size", "results"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +78,6 @@ 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 - # set to None if results (nullable) is None # and model_fields_set contains the field if self.results is None and "results" in self.model_fields_set: @@ -108,11 +100,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "page_size": obj.get("page_size"), "results": [CollectionListItemBody.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/list_data_type_functions_body.py b/revengai/models/list_data_type_functions_body.py index 96789e34..11a25f7a 100644 --- a/revengai/models/list_data_type_functions_body.py +++ b/revengai/models/list_data_type_functions_body.py @@ -28,7 +28,6 @@ class ListDataTypeFunctionsBody(BaseModel): """ # noqa: E501 items: List[DataTypeFunctionEntry] = Field(description="The page of matching functions, in ascending function ID order. Empty when no function uses the type.") next_after_function_id: Optional[StrictInt] = Field(default=None, description="Pass as after_function_id to fetch the next page. Absent on the last page.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "next_after_function_id"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_items: _items.append(_item_items.to_dict()) _dict['items'] = _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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "items": [DataTypeFunctionEntry.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "next_after_function_id": obj.get("next_after_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/list_example_analyses_output_body.py b/revengai/models/list_example_analyses_output_body.py index e910dce3..d3410bb3 100644 --- a/revengai/models/list_example_analyses_output_body.py +++ b/revengai/models/list_example_analyses_output_body.py @@ -27,7 +27,6 @@ class ListExampleAnalysesOutputBody(BaseModel): ListExampleAnalysesOutputBody """ # noqa: E501 analyses: Optional[List[Example]] = Field(description="List of example analyses") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analyses"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_analyses: _items.append(_item_analyses.to_dict()) _dict['analyses'] = _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 analyses (nullable) is None # and model_fields_set contains the field if self.analyses is None and "analyses" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "analyses": [Example.from_dict(_item) for _item in obj["analyses"]] if obj.get("analyses") 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_function_signatures_output_body.py b/revengai/models/list_function_signatures_output_body.py index dc0845f4..d0293d5f 100644 --- a/revengai/models/list_function_signatures_output_body.py +++ b/revengai/models/list_function_signatures_output_body.py @@ -29,7 +29,6 @@ class ListFunctionSignaturesOutputBody(BaseModel): """ # noqa: E501 data_types: Optional[List[AnalysisDataTypesGroup]] = Field(default=None, description="The types the returned signatures name, grouped by analysis and ordered by analysis_id. Returned only when include_data_types is true.") items: Optional[List[BatchFunctionSignatureEntry]] = Field(description="One entry per distinct requested function ID, in request order. A repeated ID yields one entry.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_types", "items"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_items: _items.append(_item_items.to_dict()) _dict['items'] = _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 data_types (nullable) is None # and model_fields_set contains the field if self.data_types is None and "data_types" in self.model_fields_set: @@ -117,11 +109,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "data_types": [AnalysisDataTypesGroup.from_dict(_item) for _item in obj["data_types"]] if obj.get("data_types") is not None else None, "items": [BatchFunctionSignatureEntry.from_dict(_item) for _item in obj["items"]] if obj.get("items") 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_function_strings_output_body.py b/revengai/models/list_function_strings_output_body.py index 78b22f56..8267ce4b 100644 --- a/revengai/models/list_function_strings_output_body.py +++ b/revengai/models/list_function_strings_output_body.py @@ -28,7 +28,6 @@ class ListFunctionStringsOutputBody(BaseModel): """ # noqa: E501 strings: Optional[List[FunctionStringItem]] total_strings: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["strings", "total_strings"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ 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 - # set to None if strings (nullable) is None # and model_fields_set contains the field if self.strings is None and "strings" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "strings": [FunctionStringItem.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/list_imported_functions_output_body.py b/revengai/models/list_imported_functions_output_body.py index 9db19893..638a8be4 100644 --- a/revengai/models/list_imported_functions_output_body.py +++ b/revengai/models/list_imported_functions_output_body.py @@ -28,7 +28,6 @@ class ListImportedFunctionsOutputBody(BaseModel): """ # noqa: E501 imported_functions: Optional[List[ImportedFunctionEntry]] total_count: StrictInt = Field(description="Total imported functions for the binary, ignoring pagination.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["imported_functions", "total_count"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_imported_functions: _items.append(_item_imported_functions.to_dict()) _dict['imported_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 imported_functions (nullable) is None # and model_fields_set contains the field if self.imported_functions is None and "imported_functions" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "imported_functions": [ImportedFunctionEntry.from_dict(_item) for _item in obj["imported_functions"]] if obj.get("imported_functions") is not None else None, "total_count": obj.get("total_count") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/memdump_entry.py b/revengai/models/memdump_entry.py index 31a2414c..ff82916e 100644 --- a/revengai/models/memdump_entry.py +++ b/revengai/models/memdump_entry.py @@ -37,7 +37,6 @@ class MemdumpEntry(BaseModel): size: StrictInt target_addr: Optional[StrictStr] = None target_process: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["address", "dump_reason", "file_type", "filename", "index", "is_pe", "method", "mime_type", "sha256", "size", "target_addr", "target_process"] model_config = ConfigDict( @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "target_addr": obj.get("target_addr"), "target_process": obj.get("target_process") }) - # store additional fields in additional_properties - for _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 00000000..9bf44895 --- /dev/null +++ b/revengai/models/meta.py @@ -0,0 +1,87 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/metadata.py b/revengai/models/metadata.py new file mode 100644 index 00000000..e8d4269a --- /dev/null +++ b/revengai/models/metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/model_interpretation.py b/revengai/models/model_interpretation.py new file mode 100644 index 00000000..904aa014 --- /dev/null +++ b/revengai/models/model_interpretation.py @@ -0,0 +1,91 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/model_interpretation_evidence.py b/revengai/models/model_interpretation_evidence.py new file mode 100644 index 00000000..86571ed3 --- /dev/null +++ b/revengai/models/model_interpretation_evidence.py @@ -0,0 +1,125 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/module_load_entry.py b/revengai/models/module_load_entry.py index f36d3d75..008293ad 100644 --- a/revengai/models/module_load_entry.py +++ b/revengai/models/module_load_entry.py @@ -29,7 +29,6 @@ class ModuleLoadEntry(BaseModel): pid: StrictInt process_name: Optional[StrictStr] = None process_seqid: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["modules", "pid", "process_name", "process_seqid"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "process_name": obj.get("process_name"), "process_seqid": obj.get("process_seqid") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/mutex_entry.py b/revengai/models/mutex_entry.py index dcddb93d..368e614c 100644 --- a/revengai/models/mutex_entry.py +++ b/revengai/models/mutex_entry.py @@ -28,7 +28,6 @@ class MutexEntry(BaseModel): """ # noqa: E501 events: Optional[List[ReportEvent]] = None name: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "name"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, "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/name_confidence.py b/revengai/models/name_confidence.py index f9779b2a..85db55bc 100644 --- a/revengai/models/name_confidence.py +++ b/revengai/models/name_confidence.py @@ -27,7 +27,6 @@ class NameConfidence(BaseModel): """ # noqa: E501 confidence: Union[StrictFloat, StrictInt] = Field(description="Softmax-normalised confidence for this name") name: StrictStr = Field(description="Candidate name") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["confidence", "name"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "confidence": obj.get("confidence"), "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/names_finished_event.py b/revengai/models/names_finished_event.py index 6121fa6b..e9a51dcb 100644 --- a/revengai/models/names_finished_event.py +++ b/revengai/models/names_finished_event.py @@ -29,7 +29,6 @@ class NamesFinishedEvent(BaseModel): attempt: StrictInt seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["applied", "attempt", "seq", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/network_activity.py b/revengai/models/network_activity.py index adf18f92..a25619dd 100644 --- a/revengai/models/network_activity.py +++ b/revengai/models/network_activity.py @@ -33,7 +33,6 @@ class NetworkActivity(BaseModel): dns_queries: Optional[List[DnsQuery]] = None extracted_urls: Optional[List[ExtractedURL]] = None http_requests: Optional[List[HttpRequest]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["connections", "dns_queries", "extracted_urls", "http_requests"] model_config = ConfigDict( @@ -66,10 +65,8 @@ 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( @@ -105,11 +102,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_http_requests: _items.append(_item_http_requests.to_dict()) _dict['http_requests'] = _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 connections (nullable) is None # and model_fields_set contains the field if self.connections is None and "connections" in self.model_fields_set: @@ -147,11 +139,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "extracted_urls": [ExtractedURL.from_dict(_item) for _item in obj["extracted_urls"]] if obj.get("extracted_urls") is not None else None, "http_requests": [HttpRequest.from_dict(_item) for _item in obj["http_requests"]] if obj.get("http_requests") 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/networking_call.py b/revengai/models/networking_call.py new file mode 100644 index 00000000..b019a03a --- /dev/null +++ b/revengai/models/networking_call.py @@ -0,0 +1,115 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/networking_direct_match.py b/revengai/models/networking_direct_match.py new file mode 100644 index 00000000..ecb04b2e --- /dev/null +++ b/revengai/models/networking_direct_match.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/networking_explain_metadata.py b/revengai/models/networking_explain_metadata.py new file mode 100644 index 00000000..32a1c9f2 --- /dev/null +++ b/revengai/models/networking_explain_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/networking_explain_result.py b/revengai/models/networking_explain_result.py new file mode 100644 index 00000000..2db773d0 --- /dev/null +++ b/revengai/models/networking_explain_result.py @@ -0,0 +1,124 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/networking_explained_function.py b/revengai/models/networking_explained_function.py new file mode 100644 index 00000000..453b744d --- /dev/null +++ b/revengai/models/networking_explained_function.py @@ -0,0 +1,90 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/networking_finding.py b/revengai/models/networking_finding.py new file mode 100644 index 00000000..59afbe9b --- /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 00000000..c4d9b178 --- /dev/null +++ b/revengai/models/networking_scan_metadata.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/networking_scan_result.py b/revengai/models/networking_scan_result.py new file mode 100644 index 00000000..2fd3987a --- /dev/null +++ b/revengai/models/networking_scan_result.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 +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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + 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 00000000..d0f7e7bf --- /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 00000000..ff283006 --- /dev/null +++ b/revengai/models/operation_crypto_explain_metadata_crypto_explain_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + return _obj + + diff --git a/revengai/models/operation_crypto_scan_metadata_crypto_scan_result.py b/revengai/models/operation_crypto_scan_metadata_crypto_scan_result.py index b9728195..44ba7071 100644 --- a/revengai/models/operation_crypto_scan_metadata_crypto_scan_result.py +++ b/revengai/models/operation_crypto_scan_metadata_crypto_scan_result.py @@ -33,7 +33,6 @@ class OperationCryptoScanMetadataCryptoScanResult(BaseModel): metadata: Optional[CryptoScanMetadata] = Field(default=None, description="In-flight information and details.") name: StrictStr = Field(description="API resource name.") response: Optional[CryptoScanResult] = 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( @@ -66,10 +65,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # 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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "response": CryptoScanResult.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 00000000..041319b0 --- /dev/null +++ b/revengai/models/operation_execution_explain_metadata_execution_explain_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..79e89b46 --- /dev/null +++ b/revengai/models/operation_execution_scan_metadata_execution_scan_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..34394c3e --- /dev/null +++ b/revengai/models/operation_filesystem_analyse_metadata_filesystem_analyse_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..20a201a7 --- /dev/null +++ b/revengai/models/operation_filesystem_scan_metadata_filesystem_scan_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..cca5a3fb --- /dev/null +++ b/revengai/models/operation_metadata_capabilities_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..3830eff0 --- /dev/null +++ b/revengai/models/operation_metadata_remediation_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..a126e690 --- /dev/null +++ b/revengai/models/operation_metadata_report_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..34c95009 --- /dev/null +++ b/revengai/models/operation_metadata_threat_report_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..63945de0 --- /dev/null +++ b/revengai/models/operation_metadata_triage_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..d95209dc --- /dev/null +++ b/revengai/models/operation_networking_explain_metadata_networking_explain_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + 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 00000000..142a3549 --- /dev/null +++ b/revengai/models/operation_networking_scan_metadata_networking_scan_result.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, 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + 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 + }) + return _obj + + diff --git a/revengai/models/operation_security_scan_metadata_security_scan_result.py b/revengai/models/operation_security_scan_metadata_security_scan_result.py index c272a0be..d3d4b246 100644 --- a/revengai/models/operation_security_scan_metadata_security_scan_result.py +++ b/revengai/models/operation_security_scan_metadata_security_scan_result.py @@ -33,7 +33,6 @@ class OperationSecurityScanMetadataSecurityScanResult(BaseModel): metadata: Optional[SecurityScanMetadata] = Field(default=None, description="In-flight information and details.") name: StrictStr = Field(description="API resource name.") response: Optional[SecurityScanResult] = 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( @@ -66,10 +65,8 @@ 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,11 +83,6 @@ def to_dict(self) -> Dict[str, Any]: # 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 @@ -109,11 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "response": SecurityScanResult.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/patch_collection_binaries_input_body.py b/revengai/models/patch_collection_binaries_input_body.py index b6a62d1b..d58acd8f 100644 --- a/revengai/models/patch_collection_binaries_input_body.py +++ b/revengai/models/patch_collection_binaries_input_body.py @@ -26,7 +26,6 @@ class PatchCollectionBinariesInputBody(BaseModel): PatchCollectionBinariesInputBody """ # noqa: E501 binaries: Optional[List[StrictInt]] = Field(description="Binary IDs to set on the collection. The collection's binaries are fully replaced with this list.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -94,11 +86,6 @@ 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/patch_collection_binaries_output_body.py b/revengai/models/patch_collection_binaries_output_body.py index 88f492ba..813ebfea 100644 --- a/revengai/models/patch_collection_binaries_output_body.py +++ b/revengai/models/patch_collection_binaries_output_body.py @@ -27,7 +27,6 @@ class PatchCollectionBinariesOutputBody(BaseModel): PatchCollectionBinariesOutputBody """ # noqa: E501 binaries: Optional[List[Binary]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "binaries": [Binary.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/patch_collection_input_body.py b/revengai/models/patch_collection_input_body.py index f8de91d8..ec2d3b94 100644 --- a/revengai/models/patch_collection_input_body.py +++ b/revengai/models/patch_collection_input_body.py @@ -28,7 +28,6 @@ class PatchCollectionInputBody(BaseModel): collection_name: Optional[StrictStr] = Field(default=None, description="New collection name. Omit, null, or empty string to keep existing.") collection_scope: Optional[StrictStr] = Field(default=None, description="New scope (PUBLIC, PRIVATE, PROTECTED, TEAM). Omit or send null to keep existing. Empty string returns 422 UNPROCESSABLE ENTITY.") description: Optional[StrictStr] = Field(default=None, description="New description. Omit, null, or empty string to keep existing.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection_name", "collection_scope", "description"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "collection_scope": obj.get("collection_scope"), "description": obj.get("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/patch_collection_output_body.py b/revengai/models/patch_collection_output_body.py index 79b15fa6..885cfb38 100644 --- a/revengai/models/patch_collection_output_body.py +++ b/revengai/models/patch_collection_output_body.py @@ -35,7 +35,6 @@ class PatchCollectionOutputBody(BaseModel): team_id: StrictInt updated_at: datetime user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_count", "collection_id", "collection_name", "collection_scope", "created_at", "description", "team_id", "updated_at", "user_id"] model_config = ConfigDict( @@ -68,10 +67,8 @@ 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,11 +76,6 @@ 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 @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "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/patch_collection_tags_input_body.py b/revengai/models/patch_collection_tags_input_body.py index db7f810e..86acf6b3 100644 --- a/revengai/models/patch_collection_tags_input_body.py +++ b/revengai/models/patch_collection_tags_input_body.py @@ -26,7 +26,6 @@ class PatchCollectionTagsInputBody(BaseModel): PatchCollectionTagsInputBody """ # noqa: E501 tags: Optional[List[StrictStr]] = Field(description="Tags to set on the collection. The collection's tags are fully replaced with this list.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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: @@ -94,11 +86,6 @@ 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/patch_collection_tags_output_body.py b/revengai/models/patch_collection_tags_output_body.py index db746573..c1a8be2a 100644 --- a/revengai/models/patch_collection_tags_output_body.py +++ b/revengai/models/patch_collection_tags_output_body.py @@ -26,7 +26,6 @@ class PatchCollectionTagsOutputBody(BaseModel): PatchCollectionTagsOutputBody """ # noqa: E501 tags: Optional[List[StrictStr]] - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["tags"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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: @@ -94,11 +86,6 @@ 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/patch_comment_body.py b/revengai/models/patch_comment_body.py index 99fd7bec..114207df 100644 --- a/revengai/models/patch_comment_body.py +++ b/revengai/models/patch_comment_body.py @@ -28,7 +28,6 @@ class PatchCommentBody(BaseModel): """ # noqa: E501 comment: Annotated[str, Field(min_length=1, strict=True, max_length=10000)] = Field(description="Comment text") line: Annotated[int, Field(strict=True, ge=1)] = Field(description="Line number to set the comment on") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["comment", "line"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +84,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "comment": obj.get("comment"), "line": obj.get("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/pcap_body_info.py b/revengai/models/pcap_body_info.py index 1b53455e..bb2442fe 100644 --- a/revengai/models/pcap_body_info.py +++ b/revengai/models/pcap_body_info.py @@ -32,7 +32,6 @@ class PcapBodyInfo(BaseModel): sha256: Optional[StrictStr] = None size: StrictInt yara_hits: Optional[List[StrictStr]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["filename", "is_pe", "mime_type", "preview", "sha256", "size", "yara_hits"] model_config = ConfigDict( @@ -65,10 +64,8 @@ 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,11 +73,6 @@ 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 yara_hits (nullable) is None # and model_fields_set contains the field if self.yara_hits is None and "yara_hits" in self.model_fields_set: @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "size": obj.get("size"), "yara_hits": obj.get("yara_hits") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/permissions.py b/revengai/models/permissions.py index 9a7df610..6c473f52 100644 --- a/revengai/models/permissions.py +++ b/revengai/models/permissions.py @@ -31,7 +31,6 @@ class Permissions(BaseModel): can_use_composition_analysis: StrictBool can_use_malware_sandbox: StrictBool can_use_private_analyses: StrictBool - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["can_export_symbols", "can_generate_pdf_reports", "can_use_ai_malware_analysis", "can_use_composition_analysis", "can_use_malware_sandbox", "can_use_private_analyses"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "can_use_malware_sandbox": obj.get("can_use_malware_sandbox"), "can_use_private_analyses": obj.get("can_use_private_analyses") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/pointer_data_type.py b/revengai/models/pointer_data_type.py index c3d736ec..9365c455 100644 --- a/revengai/models/pointer_data_type.py +++ b/revengai/models/pointer_data_type.py @@ -37,7 +37,6 @@ class PointerDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/pointer_definition.py b/revengai/models/pointer_definition.py index ba84587c..672159d5 100644 --- a/revengai/models/pointer_definition.py +++ b/revengai/models/pointer_definition.py @@ -26,7 +26,6 @@ class PointerDefinition(BaseModel): PointerDefinition """ # noqa: E501 pointee_data_type_id: Optional[StrictInt] = Field(default=None, description="The type pointed at.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["pointee_data_type_id"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "pointee_data_type_id": obj.get("pointee_data_type_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/process_activity_entry.py b/revengai/models/process_activity_entry.py index 975d1793..f11375a3 100644 --- a/revengai/models/process_activity_entry.py +++ b/revengai/models/process_activity_entry.py @@ -33,7 +33,6 @@ class ProcessActivityEntry(BaseModel): exit_code_str: Optional[StrictStr] = None name: StrictStr pid: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["args", "child_seqid", "events", "exit_code", "exit_code_str", "name", "pid"] model_config = ConfigDict( @@ -66,10 +65,8 @@ 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,11 +81,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 args (nullable) is None # and model_fields_set contains the field if self.args is None and "args" in self.model_fields_set: @@ -119,11 +111,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "pid": obj.get("pid") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/process_memdumps.py b/revengai/models/process_memdumps.py index b6134658..7934a9b9 100644 --- a/revengai/models/process_memdumps.py +++ b/revengai/models/process_memdumps.py @@ -28,7 +28,6 @@ class ProcessMemdumps(BaseModel): """ # noqa: E501 dumps: Optional[List[MemdumpEntry]] = None process_seqid: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["dumps", "process_seqid"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_dumps: _items.append(_item_dumps.to_dict()) _dict['dumps'] = _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 dumps (nullable) is None # and model_fields_set contains the field if self.dumps is None and "dumps" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dumps": [MemdumpEntry.from_dict(_item) for _item in obj["dumps"]] if obj.get("dumps") is not None else None, "process_seqid": obj.get("process_seqid") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/process_node.py b/revengai/models/process_node.py index d17abef1..cf4b41e0 100644 --- a/revengai/models/process_node.py +++ b/revengai/models/process_node.py @@ -36,7 +36,6 @@ class ProcessNode(BaseModel): pid: StrictInt seqid: StrictInt started_at: Optional[Union[StrictFloat, StrictInt]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["args", "attributed", "children", "exit_code", "exit_code_str", "exited_at", "killed_by", "name", "pid", "seqid", "started_at"] model_config = ConfigDict( @@ -69,10 +68,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_children: _items.append(_item_children.to_dict()) _dict['children'] = _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 args (nullable) is None # and model_fields_set contains the field if self.args is None and "args" in self.model_fields_set: @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seqid": obj.get("seqid"), "started_at": obj.get("started_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 # TODO: Rewrite to not use raise_errors diff --git a/revengai/models/process_tree.py b/revengai/models/process_tree.py index 67304311..a0c0344f 100644 --- a/revengai/models/process_tree.py +++ b/revengai/models/process_tree.py @@ -28,7 +28,6 @@ class ProcessTree(BaseModel): """ # noqa: E501 nodes: Optional[List[ProcessNode]] = None sample_seqid: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["nodes", "sample_seqid"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_nodes: _items.append(_item_nodes.to_dict()) _dict['nodes'] = _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 nodes (nullable) is None # and model_fields_set contains the field if self.nodes is None and "nodes" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nodes": [ProcessNode.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None, "sample_seqid": obj.get("sample_seqid") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/progress_message.py b/revengai/models/progress_message.py index ba5b8f2b..cd9c3a51 100644 --- a/revengai/models/progress_message.py +++ b/revengai/models/progress_message.py @@ -30,7 +30,6 @@ class ProgressMessage(BaseModel): step: StrictStr = Field(description="Step name when the message was emitted") text: StrictStr = Field(description="Message text") timestamp: datetime = Field(description="When the message was emitted") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["level", "step", "text", "timestamp"] @field_validator('level') @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "text": obj.get("text"), "timestamp": obj.get("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/prose_event.py b/revengai/models/prose_event.py index 7a4f3e2d..035bc534 100644 --- a/revengai/models/prose_event.py +++ b/revengai/models/prose_event.py @@ -29,7 +29,6 @@ class ProseEvent(BaseModel): seq: StrictInt text: StrictStr type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "seq", "text", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "text": obj.get("text"), "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/protocols_agent_response.py b/revengai/models/protocols_agent_response.py new file mode 100644 index 00000000..0257ce71 --- /dev/null +++ b/revengai/models/protocols_agent_response.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.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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/referenced_constant.py b/revengai/models/referenced_constant.py new file mode 100644 index 00000000..b377b58f --- /dev/null +++ b/revengai/models/referenced_constant.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 +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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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") + }) + return _obj + + diff --git a/revengai/models/referenced_constant_evidence.py b/revengai/models/referenced_constant_evidence.py new file mode 100644 index 00000000..5c645469 --- /dev/null +++ b/revengai/models/referenced_constant_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/regenerate_output_body.py b/revengai/models/regenerate_output_body.py index b44c6e03..472dfc21 100644 --- a/revengai/models/regenerate_output_body.py +++ b/revengai/models/regenerate_output_body.py @@ -26,7 +26,6 @@ class RegenerateOutputBody(BaseModel): RegenerateOutputBody """ # noqa: E501 status: StrictBool - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ 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/registry_operation.py b/revengai/models/registry_operation.py index 198051d4..a87c914f 100644 --- a/revengai/models/registry_operation.py +++ b/revengai/models/registry_operation.py @@ -28,7 +28,6 @@ class RegistryOperation(BaseModel): """ # noqa: E501 events: Optional[List[ReportEvent]] = None key: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "key"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, "key": obj.get("key") }) - # store additional fields in additional_properties - for _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 00000000..5d2c8930 --- /dev/null +++ b/revengai/models/remediation_result.py @@ -0,0 +1,105 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/remove_collection_binaries_input_body.py b/revengai/models/remove_collection_binaries_input_body.py index 478f602d..8916ad6f 100644 --- a/revengai/models/remove_collection_binaries_input_body.py +++ b/revengai/models/remove_collection_binaries_input_body.py @@ -26,7 +26,6 @@ class RemoveCollectionBinariesInputBody(BaseModel): RemoveCollectionBinariesInputBody """ # noqa: E501 binaries: Optional[List[StrictInt]] = Field(description="Binary IDs to remove from the collection. Binary IDs not linked to the collection are ignored.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binaries"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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 binaries (nullable) is None # and model_fields_set contains the field if self.binaries is None and "binaries" in self.model_fields_set: @@ -94,11 +86,6 @@ 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/rename_applied_event.py b/revengai/models/rename_applied_event.py index 1b0af624..a6942821 100644 --- a/revengai/models/rename_applied_event.py +++ b/revengai/models/rename_applied_event.py @@ -31,7 +31,6 @@ class RenameAppliedEvent(BaseModel): old_name: StrictStr seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["addr_hex", "attempt", "new_name", "old_name", "seq", "type"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/rename_input_body.py b/revengai/models/rename_input_body.py index 7dfdb337..9cb8d8a1 100644 --- a/revengai/models/rename_input_body.py +++ b/revengai/models/rename_input_body.py @@ -29,7 +29,6 @@ class RenameInputBody(BaseModel): new_mangled_name: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="New mangled function name") new_name: Annotated[str, Field(min_length=1, strict=True, max_length=2048)] = Field(description="New function name") source_type: Optional[StrictStr] = Field(default=None, description="Source that triggered the rename") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["new_mangled_name", "new_name", "source_type"] @field_validator('source_type') @@ -72,10 +71,8 @@ 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,11 +80,6 @@ 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 @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "new_name": obj.get("new_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/rename_output_body.py b/revengai/models/rename_output_body.py index d0e91398..84957db6 100644 --- a/revengai/models/rename_output_body.py +++ b/revengai/models/rename_output_body.py @@ -26,7 +26,6 @@ class RenameOutputBody(BaseModel): RenameOutputBody """ # noqa: E501 renamed_count: StrictInt = Field(description="Number of functions renamed") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["renamed_count"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "renamed_count": obj.get("renamed_count") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/rename_unnamed_functions_result.py b/revengai/models/rename_unnamed_functions_result.py index 8244a924..9596753e 100644 --- a/revengai/models/rename_unnamed_functions_result.py +++ b/revengai/models/rename_unnamed_functions_result.py @@ -30,7 +30,6 @@ class RenameUnnamedFunctionsResult(BaseModel): renamed: StrictInt = Field(description="Functions successfully renamed") skipped: StrictInt = Field(description="Functions the agent chose not to rename") total: StrictInt = Field(description="Unnamed functions the run considered") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "failed", "renamed", "skipped", "total"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +71,6 @@ 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,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skipped": obj.get("skipped"), "total": obj.get("total") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/rendered_token.py b/revengai/models/rendered_token.py index ed7d7f51..46e01cf3 100644 --- a/revengai/models/rendered_token.py +++ b/revengai/models/rendered_token.py @@ -31,7 +31,6 @@ class RenderedToken(BaseModel): kind: StrictStr = Field(description="What the token names.") vaddr: Optional[StrictInt] = Field(default=None, description="Virtual address the token resolves to. Absent for a token with no address.") value: StrictStr = Field(description="Name the token resolves to.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "function_id", "imported_function_id", "kind", "vaddr", "value"] @field_validator('kind') @@ -71,10 +70,8 @@ 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( @@ -82,11 +79,6 @@ 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 @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "vaddr": obj.get("vaddr"), "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/report_event.py b/revengai/models/report_event.py index ef2613e8..b97f83b4 100644 --- a/revengai/models/report_event.py +++ b/revengai/models/report_event.py @@ -34,7 +34,6 @@ class ReportEvent(BaseModel): type: StrictStr value: Optional[StrictStr] = None value_name: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["api_calls", "count", "desired_access", "process_seqid", "total_bytes", "type", "value", "value_name"] model_config = ConfigDict( @@ -67,10 +66,8 @@ 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,11 +82,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_api_calls: _items.append(_item_api_calls.to_dict()) _dict['api_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 api_calls (nullable) is None # and model_fields_set contains the field if self.api_calls is None and "api_calls" in self.model_fields_set: @@ -121,11 +113,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "value": obj.get("value"), "value_name": obj.get("value_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/report_info.py b/revengai/models/report_info.py index 50a75147..b52d57f8 100644 --- a/revengai/models/report_info.py +++ b/revengai/models/report_info.py @@ -35,7 +35,6 @@ class ReportInfo(BaseModel): time_analysis_finished: Optional[StrictStr] = None time_execution_started: Optional[StrictStr] = None time_started: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["file", "id", "options", "os_profile", "status", "time_analysis_finished", "time_execution_started", "time_started"] model_config = ConfigDict( @@ -68,10 +67,8 @@ 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,11 +82,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of options if self.options: _dict['options'] = self.options.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "time_execution_started": obj.get("time_execution_started"), "time_started": obj.get("time_started") }) - # store additional fields in additional_properties - for _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_options.py b/revengai/models/report_options.py index bdcb0d0a..279f6d2a 100644 --- a/revengai/models/report_options.py +++ b/revengai/models/report_options.py @@ -37,7 +37,6 @@ class ReportOptions(BaseModel): start_command: Optional[StrictStr] = None start_method: Optional[StrictStr] = None timeout: Optional[StrictInt] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["archive_entry_path", "extract_archive", "guest_target_directory", "guest_working_directory", "net_enable", "os_profile", "plugins", "preset", "sample_filename", "start_command", "start_method", "timeout"] model_config = ConfigDict( @@ -70,10 +69,8 @@ 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,11 +78,6 @@ 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 plugins (nullable) is None # and model_fields_set contains the field if self.plugins is None and "plugins" in self.model_fields_set: @@ -116,11 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "start_method": obj.get("start_method"), "timeout": obj.get("timeout") }) - # store additional fields in additional_properties - for _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 00000000..2c3900fe --- /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 00000000..655e0cca --- /dev/null +++ b/revengai/models/report_result.py @@ -0,0 +1,98 @@ +# 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] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/rule_kind.py b/revengai/models/rule_kind.py new file mode 100644 index 00000000..ac0f1553 --- /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 00000000..0cec5da9 --- /dev/null +++ b/revengai/models/sandbox_config.py @@ -0,0 +1,129 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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 + }) + return _obj + + diff --git a/revengai/models/scheduled_task_entry.py b/revengai/models/scheduled_task_entry.py index 6bec481d..8d973abb 100644 --- a/revengai/models/scheduled_task_entry.py +++ b/revengai/models/scheduled_task_entry.py @@ -37,7 +37,6 @@ class ScheduledTaskEntry(BaseModel): start_date: Optional[StrictStr] = None start_time: Optional[StrictStr] = None task_name: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["command", "day", "end_date", "events", "executable", "modifier", "run_as", "schedule_type", "start_date", "start_time", "task_name"] model_config = ConfigDict( @@ -70,10 +69,8 @@ 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( @@ -88,11 +85,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -122,11 +114,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "start_time": obj.get("start_time"), "task_name": obj.get("task_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/scrape_third_party_config.py b/revengai/models/scrape_third_party_config.py index fd083637..74bc0b12 100644 --- a/revengai/models/scrape_third_party_config.py +++ b/revengai/models/scrape_third_party_config.py @@ -25,7 +25,7 @@ class ScrapeThirdPartyConfig(BaseModel): """ ScrapeThirdPartyConfig """ # noqa: E501 - enabled: Optional[StrictBool] = False + enabled: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["enabled"] model_config = ConfigDict( @@ -79,7 +79,7 @@ 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") }) return _obj diff --git a/revengai/models/secrets_agent_response.py b/revengai/models/secrets_agent_response.py new file mode 100644 index 00000000..d465fb78 --- /dev/null +++ b/revengai/models/secrets_agent_response.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.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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/security_finding.py b/revengai/models/security_finding.py index c908e4d6..3b96da25 100644 --- a/revengai/models/security_finding.py +++ b/revengai/models/security_finding.py @@ -37,7 +37,6 @@ class SecurityFinding(BaseModel): snippet_lines: Optional[List[StrictStr]] = Field(default=None, description="Source lines making up the reported snippet") snippet_start_line: Optional[StrictInt] = Field(default=None, description="Line the reported snippet starts on") start_line: Optional[StrictInt] = Field(default=None, description="Line the finding starts on") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["check_id", "confidence", "cwe", "end_line", "function_id", "function_name", "impact", "message", "severity", "snippet_lines", "snippet_start_line", "start_line"] @field_validator('confidence') @@ -100,10 +99,8 @@ 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( @@ -111,11 +108,6 @@ 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 cwe (nullable) is None # and model_fields_set contains the field if self.cwe is None and "cwe" in self.model_fields_set: @@ -151,11 +143,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "snippet_start_line": obj.get("snippet_start_line"), "start_line": obj.get("start_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/security_scan_metadata.py b/revengai/models/security_scan_metadata.py index 5b129e13..814cef72 100644 --- a/revengai/models/security_scan_metadata.py +++ b/revengai/models/security_scan_metadata.py @@ -28,7 +28,6 @@ class SecurityScanMetadata(BaseModel): """ # 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') @@ -68,10 +67,8 @@ 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,11 +76,6 @@ 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: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "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/segment_info.py b/revengai/models/segment_info.py index c4c9fede..913b7014 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 diff --git a/revengai/models/send_message_request.py b/revengai/models/send_message_request.py index fada5d62..a529f94a 100644 --- a/revengai/models/send_message_request.py +++ b/revengai/models/send_message_request.py @@ -28,7 +28,6 @@ class SendMessageRequest(BaseModel): """ # noqa: E501 content: StrictStr context: Optional[ConversationContext] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["content", "context"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +72,6 @@ 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 - return _dict @classmethod @@ -95,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "content": obj.get("content"), "context": ConversationContext.from_dict(obj["context"]) if obj.get("context") 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/service_entry.py b/revengai/models/service_entry.py index 3c3e7754..b334412b 100644 --- a/revengai/models/service_entry.py +++ b/revengai/models/service_entry.py @@ -32,7 +32,6 @@ class ServiceEntry(BaseModel): name: Optional[StrictStr] = None service_type: Optional[StrictStr] = None start_type: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["binary_path", "display_name", "events", "name", "service_type", "start_type"] model_config = ConfigDict( @@ -65,10 +64,8 @@ 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,11 +80,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _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 events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: @@ -112,11 +104,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "service_type": obj.get("service_type"), "start_type": obj.get("start_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/signature_parameter_entry.py b/revengai/models/signature_parameter_entry.py index 64fc46f6..f2bbdc6a 100644 --- a/revengai/models/signature_parameter_entry.py +++ b/revengai/models/signature_parameter_entry.py @@ -31,7 +31,6 @@ class SignatureParameterEntry(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Parameter name, absent when the producer had none.") ordinal: StrictInt = Field(description="Zero-based argument position.") storage: Optional[SignatureStorageEntry] = Field(default=None, description="Where the parameter is passed.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["bit_length", "data_type_id", "name", "ordinal", "storage"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of storage if self.storage: _dict['storage'] = self.storage.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 @@ -101,11 +93,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ordinal": obj.get("ordinal"), "storage": SignatureStorageEntry.from_dict(obj["storage"]) if obj.get("storage") 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/signature_parameter_input.py b/revengai/models/signature_parameter_input.py index 83335485..06938e0c 100644 --- a/revengai/models/signature_parameter_input.py +++ b/revengai/models/signature_parameter_input.py @@ -32,7 +32,6 @@ class SignatureParameterInput(BaseModel): name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Parameter name. Omit for an unnamed parameter.") ordinal: Annotated[int, Field(strict=True, ge=0)] = Field(description="Zero-based argument position. Must equal the parameter's index in the list.") storage: Optional[SignatureStorageInput] = Field(default=None, description="Where the parameter is passed.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["bit_length", "data_type_id", "name", "ordinal", "storage"] model_config = ConfigDict( @@ -65,10 +64,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of storage if self.storage: _dict['storage'] = self.storage.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 @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ordinal": obj.get("ordinal"), "storage": SignatureStorageInput.from_dict(obj["storage"]) if obj.get("storage") 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/signature_storage_entry.py b/revengai/models/signature_storage_entry.py index c9eaa0ee..d94f4483 100644 --- a/revengai/models/signature_storage_entry.py +++ b/revengai/models/signature_storage_entry.py @@ -27,7 +27,6 @@ class SignatureStorageEntry(BaseModel): """ # noqa: E501 kind: Optional[StrictStr] = Field(default=None, description="Storage class — typically reg, stack, mem or unknown. Not restricted to a fixed set.") location: Optional[StrictStr] = Field(default=None, description="Register name or stack slot.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["kind", "location"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "kind": obj.get("kind"), "location": obj.get("location") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/signature_storage_input.py b/revengai/models/signature_storage_input.py index 97215350..4b9f5200 100644 --- a/revengai/models/signature_storage_input.py +++ b/revengai/models/signature_storage_input.py @@ -28,7 +28,6 @@ class SignatureStorageInput(BaseModel): """ # noqa: E501 kind: Optional[Annotated[str, Field(strict=True, max_length=32)]] = Field(default=None, description="Storage class — typically reg, stack, mem or unknown. Not restricted to a fixed set.") location: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Register name or stack slot.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["kind", "location"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +84,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "kind": obj.get("kind"), "location": obj.get("location") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/source_delta_event.py b/revengai/models/source_delta_event.py index b8209353..d4c2c70e 100644 --- a/revengai/models/source_delta_event.py +++ b/revengai/models/source_delta_event.py @@ -29,7 +29,6 @@ class SourceDeltaEvent(BaseModel): content: StrictStr seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "content", "seq", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +87,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/source_reset_event.py b/revengai/models/source_reset_event.py index 6cf744fd..cde72184 100644 --- a/revengai/models/source_reset_event.py +++ b/revengai/models/source_reset_event.py @@ -28,7 +28,6 @@ class SourceResetEvent(BaseModel): attempt: StrictInt seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "seq", "type"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/sse_event_context_compacted_data.py b/revengai/models/sse_event_context_compacted_data.py index 9206e1ec..6eabb35a 100644 --- a/revengai/models/sse_event_context_compacted_data.py +++ b/revengai/models/sse_event_context_compacted_data.py @@ -29,7 +29,6 @@ class SseEventContextCompactedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_run_cancelled_data.py b/revengai/models/sse_event_run_cancelled_data.py index dd10b9f2..d8d74533 100644 --- a/revengai/models/sse_event_run_cancelled_data.py +++ b/revengai/models/sse_event_run_cancelled_data.py @@ -29,7 +29,6 @@ class SseEventRunCancelledData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_run_error_data.py b/revengai/models/sse_event_run_error_data.py index 80136d94..c57b0f05 100644 --- a/revengai/models/sse_event_run_error_data.py +++ b/revengai/models/sse_event_run_error_data.py @@ -29,7 +29,6 @@ class SseEventRunErrorData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_run_finished_data.py b/revengai/models/sse_event_run_finished_data.py index aeaca5be..84cfd2e4 100644 --- a/revengai/models/sse_event_run_finished_data.py +++ b/revengai/models/sse_event_run_finished_data.py @@ -29,7 +29,6 @@ class SseEventRunFinishedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_run_started_data.py b/revengai/models/sse_event_run_started_data.py index 3edfb2eb..bfb172ca 100644 --- a/revengai/models/sse_event_run_started_data.py +++ b/revengai/models/sse_event_run_started_data.py @@ -29,7 +29,6 @@ class SseEventRunStartedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_step_finished_data.py b/revengai/models/sse_event_step_finished_data.py index 76ae6d65..840990c0 100644 --- a/revengai/models/sse_event_step_finished_data.py +++ b/revengai/models/sse_event_step_finished_data.py @@ -29,7 +29,6 @@ class SseEventStepFinishedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_step_started_data.py b/revengai/models/sse_event_step_started_data.py index 47557060..fc0ba393 100644 --- a/revengai/models/sse_event_step_started_data.py +++ b/revengai/models/sse_event_step_started_data.py @@ -29,7 +29,6 @@ class SseEventStepStartedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_text_message_content_data.py b/revengai/models/sse_event_text_message_content_data.py index d30469cd..e3f991eb 100644 --- a/revengai/models/sse_event_text_message_content_data.py +++ b/revengai/models/sse_event_text_message_content_data.py @@ -29,7 +29,6 @@ class SseEventTextMessageContentData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_text_message_end_data.py b/revengai/models/sse_event_text_message_end_data.py index d857db06..43dd3230 100644 --- a/revengai/models/sse_event_text_message_end_data.py +++ b/revengai/models/sse_event_text_message_end_data.py @@ -29,7 +29,6 @@ class SseEventTextMessageEndData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_text_message_start_data.py b/revengai/models/sse_event_text_message_start_data.py index ee45413c..0ed7d833 100644 --- a/revengai/models/sse_event_text_message_start_data.py +++ b/revengai/models/sse_event_text_message_start_data.py @@ -29,7 +29,6 @@ class SseEventTextMessageStartData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_title_updated_data.py b/revengai/models/sse_event_title_updated_data.py index 446037e1..60bb9606 100644 --- a/revengai/models/sse_event_title_updated_data.py +++ b/revengai/models/sse_event_title_updated_data.py @@ -29,7 +29,6 @@ class SseEventTitleUpdatedData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_call_args_delta_data.py b/revengai/models/sse_event_tool_call_args_delta_data.py index 587426b5..6a8203bd 100644 --- a/revengai/models/sse_event_tool_call_args_delta_data.py +++ b/revengai/models/sse_event_tool_call_args_delta_data.py @@ -29,7 +29,6 @@ class SseEventToolCallArgsDeltaData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_call_end_data.py b/revengai/models/sse_event_tool_call_end_data.py index 2f638d62..1c83cf6a 100644 --- a/revengai/models/sse_event_tool_call_end_data.py +++ b/revengai/models/sse_event_tool_call_end_data.py @@ -29,7 +29,6 @@ class SseEventToolCallEndData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_call_progress_data.py b/revengai/models/sse_event_tool_call_progress_data.py index 894e5810..b12f40cd 100644 --- a/revengai/models/sse_event_tool_call_progress_data.py +++ b/revengai/models/sse_event_tool_call_progress_data.py @@ -29,7 +29,6 @@ class SseEventToolCallProgressData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_call_result_data.py b/revengai/models/sse_event_tool_call_result_data.py index 69be6599..a828cf11 100644 --- a/revengai/models/sse_event_tool_call_result_data.py +++ b/revengai/models/sse_event_tool_call_result_data.py @@ -29,7 +29,6 @@ class SseEventToolCallResultData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_call_start_data.py b/revengai/models/sse_event_tool_call_start_data.py index abf2175c..7a4e1f72 100644 --- a/revengai/models/sse_event_tool_call_start_data.py +++ b/revengai/models/sse_event_tool_call_start_data.py @@ -29,7 +29,6 @@ class SseEventToolCallStartData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/sse_event_tool_confirmation_required_data.py b/revengai/models/sse_event_tool_confirmation_required_data.py index 95d6a1a4..a3536dc3 100644 --- a/revengai/models/sse_event_tool_confirmation_required_data.py +++ b/revengai/models/sse_event_tool_confirmation_required_data.py @@ -29,7 +29,6 @@ class SseEventToolConfirmationRequiredData(BaseModel): event_id: StrictInt source_run_id: Optional[StrictStr] = None type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "event_id", "source_run_id", "type"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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 data (nullable) is None # and model_fields_set contains the field if self.data is None and "data" in self.model_fields_set: @@ -100,11 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_run_id": obj.get("source_run_id"), "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/start_matching_output_body.py b/revengai/models/start_matching_output_body.py index 7faf1752..21b188c6 100644 --- a/revengai/models/start_matching_output_body.py +++ b/revengai/models/start_matching_output_body.py @@ -37,7 +37,6 @@ class StartMatchingOutputBody(BaseModel): sub_step: Optional[StrictStr] = Field(default=None, description="Phase within the current step, when the step reports one") sub_step_done: Optional[StrictInt] = Field(default=None, description="Items completed in the current phase") sub_step_total: Optional[StrictInt] = Field(default=None, description="Items the current phase will process, 0 when unknown") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["match_id", "messages", "percent", "status", "step", "step_index", "step_share", "steps_total", "sub_step", "sub_step_done", "sub_step_total"] @field_validator('status') @@ -77,10 +76,8 @@ 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( @@ -95,11 +92,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_messages: _items.append(_item_messages.to_dict()) _dict['messages'] = _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 messages (nullable) is None # and model_fields_set contains the field if self.messages is None and "messages" in self.model_fields_set: @@ -129,11 +121,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sub_step_done": obj.get("sub_step_done"), "sub_step_total": obj.get("sub_step_total") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/startup_info.py b/revengai/models/startup_info.py index 85a170e5..4e52b217 100644 --- a/revengai/models/startup_info.py +++ b/revengai/models/startup_info.py @@ -32,7 +32,6 @@ class StartupInfo(BaseModel): process: Optional[StrictInt] = None process_name: Optional[StrictStr] = None status: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["arguments", "error", "error_code", "pid", "process", "process_name", "status"] model_config = ConfigDict( @@ -65,10 +64,8 @@ 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,11 +73,6 @@ 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,11 +93,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "process_name": obj.get("process_name"), "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/status.py b/revengai/models/status.py index 70d8a870..d3440ed5 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_body.py b/revengai/models/status_body.py index 6d0bad4f..02573ce9 100644 --- a/revengai/models/status_body.py +++ b/revengai/models/status_body.py @@ -29,7 +29,6 @@ class StatusBody(BaseModel): error_message: Optional[StrictStr] = Field(default=None, description="Why the run failed. Only set when status is FAILED.") 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]] = ["error_message", "log_history", "status"] @field_validator('status') @@ -69,10 +68,8 @@ 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,11 +77,6 @@ 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: @@ -106,11 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "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/status_response.py b/revengai/models/status_response.py index 6575b457..82f549a1 100644 --- a/revengai/models/status_response.py +++ b/revengai/models/status_response.py @@ -29,7 +29,6 @@ class StatusResponse(BaseModel): conversation_uuid: UUID status: StrictStr trace_id: Optional[StrictStr] = Field(default=None, description="OpenTelemetry trace ID for this run. Use this to look up tool call spans in your trace backend.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["conversation_uuid", "status", "trace_id"] model_config = ConfigDict( @@ -62,10 +61,8 @@ 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,11 +70,6 @@ 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,11 +86,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "trace_id": obj.get("trace_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/struct_definition.py b/revengai/models/struct_definition.py index 09b5ddba..4619e7e8 100644 --- a/revengai/models/struct_definition.py +++ b/revengai/models/struct_definition.py @@ -27,7 +27,6 @@ class StructDefinition(BaseModel): StructDefinition """ # noqa: E501 members: Optional[List[DataTypeMemberEntry]] = Field(description="The type's fields, in offset order.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["members"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_members: _items.append(_item_members.to_dict()) _dict['members'] = _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 members (nullable) is None # and model_fields_set contains the field if self.members is None and "members" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "members": [DataTypeMemberEntry.from_dict(_item) for _item in obj["members"]] if obj.get("members") 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/subject.py b/revengai/models/subject.py new file mode 100644 index 00000000..d4275491 --- /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 00000000..06ea829c --- /dev/null +++ b/revengai/models/subject_any_of.py @@ -0,0 +1,87 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/subject_any_of1.py b/revengai/models/subject_any_of1.py new file mode 100644 index 00000000..2766fe91 --- /dev/null +++ b/revengai/models/subject_any_of1.py @@ -0,0 +1,87 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/subject_any_of2.py b/revengai/models/subject_any_of2.py new file mode 100644 index 00000000..9e29b52e --- /dev/null +++ b/revengai/models/subject_any_of2.py @@ -0,0 +1,87 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/subject_any_of3.py b/revengai/models/subject_any_of3.py new file mode 100644 index 00000000..1d8b7ab4 --- /dev/null +++ b/revengai/models/subject_any_of3.py @@ -0,0 +1,87 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + 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 00000000..a47acf57 --- /dev/null +++ b/revengai/models/submit_feedback_input_body.py @@ -0,0 +1,93 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/suggested_hole.py b/revengai/models/suggested_hole.py index 3bde18cc..b49805a8 100644 --- a/revengai/models/suggested_hole.py +++ b/revengai/models/suggested_hole.py @@ -27,7 +27,6 @@ class SuggestedHole(BaseModel): """ # noqa: E501 byte_offset: StrictInt byte_size: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["byte_offset", "byte_size"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +83,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "byte_offset": obj.get("byte_offset"), "byte_size": obj.get("byte_size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/suggested_member_view.py b/revengai/models/suggested_member_view.py index 7403a28e..f07f0bb1 100644 --- a/revengai/models/suggested_member_view.py +++ b/revengai/models/suggested_member_view.py @@ -35,7 +35,6 @@ class SuggestedMemberView(BaseModel): placement: StrictStr = Field(description="observed means the offset was read off an access; guessed means the model proposed it; unplaced means the member has no offset.") suggested_type: Optional[StrictStr] = Field(description="Type expression for the member.") token: Optional[StrictStr] = Field(default=None, description="Placeholder this member renders as in the tokenised source. Absent for a member no access in this function revealed.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["bit_offset", "byte_offset", "byte_size", "confidence", "name", "origin", "packed", "placement", "suggested_type", "token"] @field_validator('confidence') @@ -85,10 +84,8 @@ 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( @@ -96,11 +93,6 @@ 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 bit_offset (nullable) is None # and model_fields_set contains the field if self.bit_offset is None and "bit_offset" in self.model_fields_set: @@ -149,11 +141,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "suggested_type": obj.get("suggested_type"), "token": obj.get("token") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/suggested_type_view.py b/revengai/models/suggested_type_view.py index 9d5be66e..877f5cf5 100644 --- a/revengai/models/suggested_type_view.py +++ b/revengai/models/suggested_type_view.py @@ -35,7 +35,6 @@ class SuggestedTypeView(BaseModel): name: StrictStr = Field(description="Name the type renders as: a database or frozen name where one exists, else the suggested one.") type_token: Optional[StrictStr] = Field(default=None, description="Placeholder the type renders as, when it appears in this function's source.") underlying_type: Optional[StrictStr] = Field(default=None, description="Set only for a type with no observed members, where the suggestion is a name and a scalar type rather than a layout.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "holes", "implied_size", "key", "members", "name", "type_token", "underlying_type"] model_config = ConfigDict( @@ -68,10 +67,8 @@ 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,11 +90,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_members: _items.append(_item_members.to_dict()) _dict['members'] = _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 holes (nullable) is None # and model_fields_set contains the field if self.holes is None and "holes" in self.model_fields_set: @@ -129,11 +121,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type_token": obj.get("type_token"), "underlying_type": obj.get("underlying_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/summary_data.py b/revengai/models/summary_data.py index edfa0610..8278470f 100644 --- a/revengai/models/summary_data.py +++ b/revengai/models/summary_data.py @@ -29,7 +29,6 @@ class SummaryData(BaseModel): predicted_function_name: Optional[StrictStr] = Field(default=None, description="Name the model proposes for this function, produced alongside the summary.") summary: StrictStr = Field(description="Raw summary from the model") task_status: StrictStr = Field(description="Task status") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ai_summary", "predicted_function_name", "summary", "task_status"] @field_validator('task_status') @@ -69,10 +68,8 @@ 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,11 +77,6 @@ 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 @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "summary": obj.get("summary"), "task_status": obj.get("task_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/suspicious_string.py b/revengai/models/suspicious_string.py new file mode 100644 index 00000000..772e4c4c --- /dev/null +++ b/revengai/models/suspicious_string.py @@ -0,0 +1,98 @@ +# 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 + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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() + # 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 + }) + return _obj + + diff --git a/revengai/models/suspicious_string_evidence.py b/revengai/models/suspicious_string_evidence.py new file mode 100644 index 00000000..859a6181 --- /dev/null +++ b/revengai/models/suspicious_string_evidence.py @@ -0,0 +1,134 @@ +# 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)] + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + 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 + }) + return _obj + + diff --git a/revengai/models/symbols.py b/revengai/models/symbols.py index e9b5b5dd..b0709a52 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,8 @@ 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 __properties: ClassVar[List[str]] = ["base_address", "function_boundaries"] model_config = ConfigDict( @@ -76,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_function_boundaries: _items.append(_item_function_boundaries.to_dict()) _dict['function_boundaries'] = _items + # 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 diff --git a/revengai/models/tcp_carved_file.py b/revengai/models/tcp_carved_file.py index b4f5ae2c..beda6749 100644 --- a/revengai/models/tcp_carved_file.py +++ b/revengai/models/tcp_carved_file.py @@ -33,7 +33,6 @@ class TcpCarvedFile(BaseModel): sha256: StrictStr size: StrictInt yara_hits: Optional[List[StrictStr]] = None - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["direction", "filename", "is_pe", "mime_type", "offset", "sha256", "size", "yara_hits"] model_config = ConfigDict( @@ -66,10 +65,8 @@ 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,11 +74,6 @@ 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 yara_hits (nullable) is None # and model_fields_set contains the field if self.yara_hits is None and "yara_hits" in self.model_fields_set: @@ -108,11 +100,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "size": obj.get("size"), "yara_hits": obj.get("yara_hits") }) - # store additional fields in additional_properties - for _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 00000000..baca81c9 --- /dev/null +++ b/revengai/models/technique.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + return _obj + + diff --git a/revengai/models/threat_report_result.py b/revengai/models/threat_report_result.py new file mode 100644 index 00000000..c9093e3c --- /dev/null +++ b/revengai/models/threat_report_result.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + return _obj + + diff --git a/revengai/models/token.py b/revengai/models/token.py index d1153fb9..eb66d3c8 100644 --- a/revengai/models/token.py +++ b/revengai/models/token.py @@ -26,7 +26,6 @@ class Token(BaseModel): Token """ # noqa: E501 value: StrictStr = Field(description="Name the token resolves to. An empty string in a request removes the override.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["value"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "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/triage_function.py b/revengai/models/triage_function.py new file mode 100644 index 00000000..de9adf98 --- /dev/null +++ b/revengai/models/triage_function.py @@ -0,0 +1,99 @@ +# 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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") + }) + return _obj + + diff --git a/revengai/models/triage_result.py b/revengai/models/triage_result.py new file mode 100644 index 00000000..a68d0190 --- /dev/null +++ b/revengai/models/triage_result.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, 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") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # 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") + }) + 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 00000000..27a56e35 --- /dev/null +++ b/revengai/models/trigger_execution_explain_input_body.py @@ -0,0 +1,93 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + 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 00000000..c136a2bb --- /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 00000000..8c034718 --- /dev/null +++ b/revengai/models/trigger_filesystem_analyse_input_body.py @@ -0,0 +1,93 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + 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 00000000..67b54eb6 --- /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 00000000..2e6fa08a --- /dev/null +++ b/revengai/models/trigger_networking_explain_input_body.py @@ -0,0 +1,93 @@ +# 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.") + __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. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + 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") + }) + 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 00000000..3c468a38 --- /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/trigger_rename_unnamed_functions_input_body.py b/revengai/models/trigger_rename_unnamed_functions_input_body.py index 3defd335..b8dfe1c6 100644 --- a/revengai/models/trigger_rename_unnamed_functions_input_body.py +++ b/revengai/models/trigger_rename_unnamed_functions_input_body.py @@ -27,7 +27,6 @@ class TriggerRenameUnnamedFunctionsInputBody(BaseModel): TriggerRenameUnnamedFunctionsInputBody """ # noqa: E501 limit: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Stop after this many functions. Omit to process every unnamed function in the analysis.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["limit"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +82,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "limit": obj.get("limit") }) - # store additional fields in additional_properties - for _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_security_scan_input_body.py b/revengai/models/trigger_security_scan_input_body.py index 517de412..c8525d4c 100644 --- a/revengai/models/trigger_security_scan_input_body.py +++ b/revengai/models/trigger_security_scan_input_body.py @@ -27,7 +27,6 @@ class TriggerSecurityScanInputBody(BaseModel): TriggerSecurityScanInputBody """ # noqa: E501 max_functions_to_scan: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Stop after decompiling and scanning this many functions. Omit to process every function in the analysis.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["max_functions_to_scan"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +68,6 @@ 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,11 +82,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "max_functions_to_scan": obj.get("max_functions_to_scan") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/ttp.py b/revengai/models/ttp.py index 67407324..a7c3ec54 100644 --- a/revengai/models/ttp.py +++ b/revengai/models/ttp.py @@ -31,7 +31,6 @@ class Ttp(BaseModel): namespace: Optional[StrictStr] = None process_seqids: Optional[List[StrictInt]] = None score: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["att&ck", "mbc", "name", "namespace", "process_seqids", "score"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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 attck (nullable) is None # and model_fields_set contains the field if self.attck is None and "attck" in self.model_fields_set: @@ -114,11 +106,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "process_seqids": obj.get("process_seqids"), "score": obj.get("score") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/type_suggestions_data.py b/revengai/models/type_suggestions_data.py index c85ca44f..7006b6cc 100644 --- a/revengai/models/type_suggestions_data.py +++ b/revengai/models/type_suggestions_data.py @@ -29,7 +29,6 @@ class TypeSuggestionsData(BaseModel): model: Optional[StrictStr] = Field(default=None, description="Language model that produced the suggestions.") status: StrictStr = Field(description="Status of the AI decompilation run that would have produced these suggestions.") types: Optional[List[SuggestedTypeView]] = Field(description="One entry per suggested type. Empty for a run that produced none, and for a run that predates type suggestion — the two are not distinguished.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["model", "status", "types"] @field_validator('status') @@ -69,10 +68,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_types: _items.append(_item_types.to_dict()) _dict['types'] = _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 types (nullable) is None # and model_fields_set contains the field if self.types is None and "types" in self.model_fields_set: @@ -113,11 +105,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "types": [SuggestedTypeView.from_dict(_item) for _item in obj["types"]] if obj.get("types") 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/typedef_data_type.py b/revengai/models/typedef_data_type.py index 36fd4fa0..d8ac77c1 100644 --- a/revengai/models/typedef_data_type.py +++ b/revengai/models/typedef_data_type.py @@ -37,7 +37,6 @@ class TypedefDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/typedef_definition.py b/revengai/models/typedef_definition.py index 8b7dfc1a..8c483c18 100644 --- a/revengai/models/typedef_definition.py +++ b/revengai/models/typedef_definition.py @@ -26,7 +26,6 @@ class TypedefDefinition(BaseModel): TypedefDefinition """ # noqa: E501 target_data_type_id: Optional[StrictInt] = Field(default=None, description="The type being aliased.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["target_data_type_id"] model_config = ConfigDict( @@ -59,10 +58,8 @@ 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,11 +67,6 @@ 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,11 +81,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "target_data_type_id": obj.get("target_data_type_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/types_suggested_event.py b/revengai/models/types_suggested_event.py index 826a1d58..8d6d12ad 100644 --- a/revengai/models/types_suggested_event.py +++ b/revengai/models/types_suggested_event.py @@ -30,7 +30,6 @@ class TypesSuggestedEvent(BaseModel): seq: StrictInt type: StrictStr types: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "members", "seq", "type", "types"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +71,6 @@ 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,11 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "types": obj.get("types") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/union_data_type.py b/revengai/models/union_data_type.py index 7f940527..a7e3a465 100644 --- a/revengai/models/union_data_type.py +++ b/revengai/models/union_data_type.py @@ -37,7 +37,6 @@ class UnionDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "definition", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -84,10 +83,8 @@ 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( @@ -98,11 +95,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -126,11 +118,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/union_definition.py b/revengai/models/union_definition.py index 9415f085..a80d5e95 100644 --- a/revengai/models/union_definition.py +++ b/revengai/models/union_definition.py @@ -27,7 +27,6 @@ class UnionDefinition(BaseModel): UnionDefinition """ # noqa: E501 members: Optional[List[DataTypeMemberEntry]] = Field(description="The type's fields. Every member starts at offset 0.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["members"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_members: _items.append(_item_members.to_dict()) _dict['members'] = _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 members (nullable) is None # and model_fields_set contains the field if self.members is None and "members" in self.model_fields_set: @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "members": [DataTypeMemberEntry.from_dict(_item) for _item in obj["members"]] if obj.get("members") 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/unknown_data_type.py b/revengai/models/unknown_data_type.py index 9ddf1ad9..6c8c69af 100644 --- a/revengai/models/unknown_data_type.py +++ b/revengai/models/unknown_data_type.py @@ -35,7 +35,6 @@ class UnknownDataType(BaseModel): size: Optional[StrictInt] = Field(default=None, description="Size in bytes, absent when it could not be determined.") source_function_id: Optional[StrictInt] = Field(default=None, description="The function this type was copied from, when transferred rather than extracted.") source_type: StrictStr = Field(description="Where this type came from.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "data_type_id", "has_definition", "kind", "name", "namespace", "size", "source_function_id", "source_type"] @field_validator('kind') @@ -82,10 +81,8 @@ 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,11 +90,6 @@ 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 @@ -120,11 +112,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_function_id": obj.get("source_function_id"), "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/update_analysis_data_types_input_body.py b/revengai/models/update_analysis_data_types_input_body.py index 6082891b..155f5b75 100644 --- a/revengai/models/update_analysis_data_types_input_body.py +++ b/revengai/models/update_analysis_data_types_input_body.py @@ -28,7 +28,6 @@ class UpdateAnalysisDataTypesInputBody(BaseModel): UpdateAnalysisDataTypesInputBody """ # noqa: E501 data_types: Optional[Annotated[List[UpdateDataTypeEntry], Field(min_length=1, max_length=100)]] = Field(description="The replacements. Every data_type_id must belong to the analysis, and none may repeat.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_types"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_data_types: _items.append(_item_data_types.to_dict()) _dict['data_types'] = _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 data_types (nullable) is None # and model_fields_set contains the field if self.data_types is None and "data_types" in self.model_fields_set: @@ -103,11 +95,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data_types": [UpdateDataTypeEntry.from_dict(_item) for _item in obj["data_types"]] if obj.get("data_types") 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/update_array_data_type.py b/revengai/models/update_array_data_type.py index f1ea47ff..a1e852e9 100644 --- a/revengai/models/update_array_data_type.py +++ b/revengai/models/update_array_data_type.py @@ -33,7 +33,6 @@ class UpdateArrayDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_base_data_type.py b/revengai/models/update_base_data_type.py index 57cac6cd..e25794c6 100644 --- a/revengai/models/update_base_data_type.py +++ b/revengai/models/update_base_data_type.py @@ -31,7 +31,6 @@ class UpdateBaseDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -71,10 +70,8 @@ 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( @@ -82,11 +79,6 @@ 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 @@ -105,11 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_bitfield_data_type.py b/revengai/models/update_bitfield_data_type.py index 3de374d6..727f530f 100644 --- a/revengai/models/update_bitfield_data_type.py +++ b/revengai/models/update_bitfield_data_type.py @@ -31,7 +31,6 @@ class UpdateBitfieldDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -71,10 +70,8 @@ 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( @@ -82,11 +79,6 @@ 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 @@ -105,11 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_enum_data_type.py b/revengai/models/update_enum_data_type.py index e47a5d11..bee05a9e 100644 --- a/revengai/models/update_enum_data_type.py +++ b/revengai/models/update_enum_data_type.py @@ -33,7 +33,6 @@ class UpdateEnumDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_function_data_type.py b/revengai/models/update_function_data_type.py index 55c128e8..f260ca7f 100644 --- a/revengai/models/update_function_data_type.py +++ b/revengai/models/update_function_data_type.py @@ -33,7 +33,6 @@ class UpdateFunctionDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_function_signature_input_body.py b/revengai/models/update_function_signature_input_body.py index 56005a5c..79690b8c 100644 --- a/revengai/models/update_function_signature_input_body.py +++ b/revengai/models/update_function_signature_input_body.py @@ -30,7 +30,6 @@ class UpdateFunctionSignatureInputBody(BaseModel): calling_convention: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Calling convention. Omit when there is none to record.") parameters: Optional[Annotated[List[SignatureParameterInput], Field(max_length=256)]] = Field(description="Parameters in argument order. An empty list records a function that takes no arguments.") return_data_type_id: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Return type, which must belong to this analysis. Omit for an unresolved return type.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["calling_convention", "parameters", "return_data_type_id"] model_config = ConfigDict( @@ -63,10 +62,8 @@ 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,11 +78,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_parameters: _items.append(_item_parameters.to_dict()) _dict['parameters'] = _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 parameters (nullable) is None # and model_fields_set contains the field if self.parameters is None and "parameters" in self.model_fields_set: @@ -107,11 +99,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "parameters": [SignatureParameterInput.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, "return_data_type_id": obj.get("return_data_type_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/update_pointer_data_type.py b/revengai/models/update_pointer_data_type.py index 7ecf3f37..fabfebb6 100644 --- a/revengai/models/update_pointer_data_type.py +++ b/revengai/models/update_pointer_data_type.py @@ -33,7 +33,6 @@ class UpdatePointerDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_struct_data_type.py b/revengai/models/update_struct_data_type.py index bd750582..6d2753c8 100644 --- a/revengai/models/update_struct_data_type.py +++ b/revengai/models/update_struct_data_type.py @@ -33,7 +33,6 @@ class UpdateStructDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_typedef_data_type.py b/revengai/models/update_typedef_data_type.py index 970c047f..31dcc001 100644 --- a/revengai/models/update_typedef_data_type.py +++ b/revengai/models/update_typedef_data_type.py @@ -33,7 +33,6 @@ class UpdateTypedefDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_union_data_type.py b/revengai/models/update_union_data_type.py index fcfb1f12..1a075d80 100644 --- a/revengai/models/update_union_data_type.py +++ b/revengai/models/update_union_data_type.py @@ -33,7 +33,6 @@ class UpdateUnionDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "definition", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -73,10 +72,8 @@ 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 +84,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of definition if self.definition: _dict['definition'] = self.definition.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 @@ -111,11 +103,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/update_unknown_data_type.py b/revengai/models/update_unknown_data_type.py index 189b5d9d..063c61ba 100644 --- a/revengai/models/update_unknown_data_type.py +++ b/revengai/models/update_unknown_data_type.py @@ -31,7 +31,6 @@ class UpdateUnknownDataType(BaseModel): name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Type name. Unique within the analysis for a given namespace and kind.") namespace: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The scope qualifying the type name. Omit for a type of the binary's own.") size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Size in bytes. Omit when it is not known.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data_type_id", "kind", "name", "namespace", "size"] @field_validator('kind') @@ -71,10 +70,8 @@ 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( @@ -82,11 +79,6 @@ 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 @@ -105,11 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "namespace": obj.get("namespace"), "size": obj.get("size") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj diff --git a/revengai/models/upgrade_analysis_model_output_body.py b/revengai/models/upgrade_analysis_model_output_body.py index aa924a36..9fb94463 100644 --- a/revengai/models/upgrade_analysis_model_output_body.py +++ b/revengai/models/upgrade_analysis_model_output_body.py @@ -28,7 +28,6 @@ class UpgradeAnalysisModelOutputBody(BaseModel): analysis_id: StrictInt = Field(description="ID of the re-queued analysis. Unchanged — the upgrade moves the existing analysis rather than creating a new one.") binary_id: StrictInt = Field(description="ID of the binary the analysis belongs to") model_id: StrictInt = Field(description="Model the analysis is now queued against") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "model_id"] model_config = ConfigDict( @@ -61,10 +60,8 @@ 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,11 +69,6 @@ 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,11 +85,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_id": obj.get("binary_id"), "model_id": obj.get("model_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/upload_output_body.py b/revengai/models/upload_output_body.py new file mode 100644 index 00000000..fb430767 --- /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 0c8b94c4..0c2593e5 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,8 @@ 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 + __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, @@ -74,6 +76,13 @@ 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 return _dict @classmethod @@ -92,7 +101,8 @@ 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 }) return _obj diff --git a/revengai/models/upsert_overrides_data.py b/revengai/models/upsert_overrides_data.py index d9cce59d..0fdccb21 100644 --- a/revengai/models/upsert_overrides_data.py +++ b/revengai/models/upsert_overrides_data.py @@ -27,7 +27,6 @@ class UpsertOverridesData(BaseModel): UpsertOverridesData """ # noqa: E501 placeholder_to_user_override: Dict[str, Token] = Field(description="Every override on the function after applying this request, keyed by placeholder token.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["placeholder_to_user_override"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if self.placeholder_to_user_override[_key_placeholder_to_user_override]: _field_dict[_key_placeholder_to_user_override] = self.placeholder_to_user_override[_key_placeholder_to_user_override].to_dict() _dict['placeholder_to_user_override'] = _field_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 @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("placeholder_to_user_override") 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_overrides_input_body.py b/revengai/models/upsert_overrides_input_body.py index 9d30988e..56564509 100644 --- a/revengai/models/upsert_overrides_input_body.py +++ b/revengai/models/upsert_overrides_input_body.py @@ -27,7 +27,6 @@ class UpsertOverridesInputBody(BaseModel): UpsertOverridesInputBody """ # noqa: E501 overrides: Dict[str, Token] = Field(description="Overrides keyed by placeholder token. An entry whose value is an empty string removes that override.") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["overrides"] model_config = ConfigDict( @@ -60,10 +59,8 @@ 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,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: if self.overrides[_key_overrides]: _field_dict[_key_overrides] = self.overrides[_key_overrides].to_dict() _dict['overrides'] = _field_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 @@ -102,11 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("overrides") 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/user.py b/revengai/models/user.py index ce79e3eb..9881b021 100644 --- a/revengai/models/user.py +++ b/revengai/models/user.py @@ -33,7 +33,6 @@ class User(BaseModel): role: StrictStr tier: Optional[StrictStr] = None user_id: StrictInt - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["created_at", "email", "profile", "role", "tier", "user_id"] @field_validator('role') @@ -83,10 +82,8 @@ 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,11 +94,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of profile if self.profile: _dict['profile'] = self.profile.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 @@ -121,11 +113,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tier": obj.get("tier"), "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/user_profile.py b/revengai/models/user_profile.py index e31fa9ee..6aff4f2d 100644 --- a/revengai/models/user_profile.py +++ b/revengai/models/user_profile.py @@ -31,7 +31,6 @@ class UserProfile(BaseModel): last_name: StrictStr time_zone: StrictStr username: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["default_team_id", "first_name", "hide_example_binaries", "last_name", "time_zone", "username"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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,11 +91,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "time_zone": obj.get("time_zone"), "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/warning_event.py b/revengai/models/warning_event.py index 4de09979..ec18b80a 100644 --- a/revengai/models/warning_event.py +++ b/revengai/models/warning_event.py @@ -31,7 +31,6 @@ class WarningEvent(BaseModel): message: StrictStr seq: StrictInt type: StrictStr - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attempt", "identifiers", "kind", "message", "seq", "type"] model_config = ConfigDict( @@ -64,10 +63,8 @@ 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,11 +72,6 @@ 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 identifiers (nullable) is None # and model_fields_set contains the field if self.identifiers is None and "identifiers" in self.model_fields_set: @@ -104,11 +96,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "seq": obj.get("seq"), "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/workflow_progress.py b/revengai/models/workflow_progress.py index f280deb0..ef80652f 100644 --- a/revengai/models/workflow_progress.py +++ b/revengai/models/workflow_progress.py @@ -36,7 +36,6 @@ class WorkflowProgress(BaseModel): sub_step: Optional[StrictStr] = Field(default=None, description="Phase within the current step, when the step reports one") sub_step_done: Optional[StrictInt] = Field(default=None, description="Items completed in the current phase") sub_step_total: Optional[StrictInt] = Field(default=None, description="Items the current phase will process, 0 when unknown") - additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["messages", "percent", "status", "step", "step_index", "step_share", "steps_total", "sub_step", "sub_step_done", "sub_step_total"] @field_validator('status') @@ -76,10 +75,8 @@ 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,11 +91,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_messages: _items.append(_item_messages.to_dict()) _dict['messages'] = _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 messages (nullable) is None # and model_fields_set contains the field if self.messages is None and "messages" in self.model_fields_set: @@ -127,11 +119,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sub_step_done": obj.get("sub_step_done"), "sub_step_total": obj.get("sub_step_total") }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - return _obj