From 56c65ada1d4ffd121621c59de26eacd9df9b56b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 8 Sep 2025 16:55:12 +0000 Subject: [PATCH] Update SDK to version v1.72.0 - Generated from OpenAPI spec version v1.72.0 - Auto-generated by GitHub Actions --- README.md | 25 +- docs/docs/ANNFunction.md | 35 + docs/docs/Addr.md | 28 + docs/docs/AiDecompilationRating.md | 12 + docs/docs/AiUnstripRequest.md | 29 + docs/docs/AnalysesCommentsApi.md | 355 ++ docs/docs/AnalysesCoreApi.md | 1305 +++++ docs/docs/AnalysesDynamicExecutionApi.md | 576 ++ docs/docs/AnalysesResultsMetadataApi.md | 665 +++ docs/docs/AnalysesSecurityChecksApi.md | 258 + docs/docs/AnalysisAccessInfo.md | 30 + docs/docs/AnalysisConfig.md | 35 + docs/docs/AnalysisCreateRequest.md | 36 + docs/docs/AnalysisCreateResponse.md | 30 + docs/docs/AnalysisDetailResponse.md | 42 + docs/docs/AnalysisFunctions.md | 29 + docs/docs/AnalysisRecord.md | 41 + docs/docs/AnalysisScope.md | 12 + docs/docs/AnalysisStringsResponse.md | 30 + docs/docs/AnalysisTags.md | 30 + docs/docs/AnalysisThreatScoreData.md | 35 + docs/docs/AnalysisUpdateRequest.md | 30 + docs/docs/AnalysisUpdateTagsRequest.md | 29 + docs/docs/AnalysisUpdateTagsResponse.md | 29 + ...stV2AnalysesEnumsDynamicExecutionStatus.md | 17 + docs/docs/AppApiRestV2AnalysesEnumsOrderBy.md | 14 + .../AppApiRestV2AnalysesResponsesTagItem.md | 31 + .../AppApiRestV2CollectionsEnumsOrderBy.md | 20 + .../AppApiRestV2FunctionsResponsesFunction.md | 31 + .../AppApiRestV2FunctionsTypesFunction.md | 35 + .../docs/AppServicesBinaryAnnSchemaTagItem.md | 30 + ...cExecutionSchemasDynamicExecutionStatus.md | 29 + docs/docs/Argument.md | 33 + docs/docs/AuthenticationUsersApi.md | 411 ++ docs/docs/AutoUnstripByGroupResponse.md | 33 + docs/docs/AutoUnstripRequest.md | 30 + docs/docs/AutoUnstripResponse.md | 33 + docs/docs/BaseResponse.md | 33 + .../BaseResponseAnalysisCreateResponse.md | 33 + .../BaseResponseAnalysisDetailResponse.md | 33 + docs/docs/BaseResponseAnalysisFunctions.md | 33 + .../BaseResponseAnalysisStringsResponse.md | 33 + docs/docs/BaseResponseAnalysisTags.md | 33 + .../BaseResponseAnalysisThreatScoreData.md | 33 + .../BaseResponseAnalysisUpdateTagsResponse.md | 33 + docs/docs/BaseResponseBasic.md | 33 + .../BaseResponseBinaryAdditionalResponse.md | 33 + .../docs/BaseResponseBinaryAnnListResponse.md | 33 + .../docs/BaseResponseBinaryDetailsResponse.md | 33 + .../BaseResponseBinaryExternalsResponse.md | 33 + docs/docs/BaseResponseBinarySearchResponse.md | 33 + ...ckCommentsGenerationForFunctionResponse.md | 33 + ...BlockCommentsOverviewGenerationResponse.md | 33 + docs/docs/BaseResponseBool.md | 33 + docs/docs/BaseResponseBoxPlotConfidence.md | 33 + ...eResponseCalleesCallerFunctionsResponse.md | 33 + docs/docs/BaseResponseCapabilities.md | 33 + ...ResponseCheckSecurityChecksTaskResponse.md | 33 + .../docs/BaseResponseChildBinariesResponse.md | 33 + ...esponseCollectionBinariesUpdateResponse.md | 33 + docs/docs/BaseResponseCollectionResponse.md | 33 + .../BaseResponseCollectionSearchResponse.md | 33 + ...aseResponseCollectionTagsUpdateResponse.md | 33 + docs/docs/BaseResponseCommentResponse.md | 33 + docs/docs/BaseResponseCommunities.md | 33 + docs/docs/BaseResponseCreated.md | 33 + .../docs/BaseResponseDecompilationResponse.md | 33 + docs/docs/BaseResponseDict.md | 33 + .../BaseResponseDynamicExecutionStatus.md | 33 + docs/docs/BaseResponseExternalResponse.md | 33 + ...ResponseFunctionAnalysisThreatScoreData.md | 33 + .../BaseResponseFunctionBlocksResponse.md | 33 + .../BaseResponseFunctionCapabilityResponse.md | 33 + docs/docs/BaseResponseFunctionDataTypes.md | 33 + .../docs/BaseResponseFunctionDataTypesList.md | 33 + .../BaseResponseFunctionSearchResponse.md | 33 + .../BaseResponseFunctionStringsResponse.md | 33 + docs/docs/BaseResponseFunctionTaskResponse.md | 33 + docs/docs/BaseResponseFunctionThreatScore.md | 33 + .../BaseResponseFunctionsDetailResponse.md | 33 + .../BaseResponseGenerateFunctionDataTypes.md | 33 + docs/docs/BaseResponseGenerationStatusList.md | 33 + ...esponseGetAiDecompilationRatingResponse.md | 33 + .../BaseResponseGetAiDecompilationTask.md | 33 + .../docs/BaseResponseGetPublicUserResponse.md | 33 + docs/docs/BaseResponseGetUserResponse.md | 33 + .../docs/BaseResponseListCollectionResults.md | 33 + docs/docs/BaseResponseListCommentResponse.md | 33 + docs/docs/BaseResponseListDieMatch.md | 33 + ...seResponseListFunctionBoxPlotConfidence.md | 33 + .../BaseResponseListFunctionNameHistory.md | 33 + docs/docs/BaseResponseListSBOM.md | 33 + ...aseResponseListSimilarFunctionsResponse.md | 33 + ...eResponseListTagOriginBoxPlotConfidence.md | 33 + .../BaseResponseListUserActivityResponse.md | 33 + docs/docs/BaseResponseLoginResponse.md | 33 + docs/docs/BaseResponseLogs.md | 33 + docs/docs/BaseResponseModelsResponse.md | 33 + .../BaseResponseNearestNeighborAnalysis.md | 33 + .../BaseResponseNetworkOverviewResponse.md | 33 + docs/docs/BaseResponseParams.md | 33 + docs/docs/BaseResponseProcessDumps.md | 33 + docs/docs/BaseResponseProcessRegistry.md | 33 + docs/docs/BaseResponseProcessTree.md | 33 + ...esponseQueuedSecurityChecksTaskResponse.md | 33 + docs/docs/BaseResponseRecent.md | 33 + .../BaseResponseSecurityChecksResponse.md | 33 + docs/docs/BaseResponseStatus.md | 33 + docs/docs/BaseResponseStr.md | 33 + docs/docs/BaseResponseSymbolsInfo.md | 33 + docs/docs/BaseResponseTTPS.md | 33 + docs/docs/BaseResponseTagSearchResponse.md | 33 + docs/docs/BaseResponseTaskResponse.md | 33 + docs/docs/BaseResponseUploadResponse.md | 33 + docs/docs/BaseResponseVulnerabilities.md | 33 + docs/docs/Basic.md | 39 + docs/docs/BinariesApi.md | 494 ++ .../BinaryAdditionalDetailsDataResponse.md | 31 + docs/docs/BinaryAdditionalResponse.md | 31 + docs/docs/BinaryAnnForm.md | 32 + docs/docs/BinaryAnnListResponse.md | 29 + docs/docs/BinaryConfig.md | 31 + docs/docs/BinaryDetailsResponse.md | 48 + docs/docs/BinaryExternalsResponse.md | 33 + docs/docs/BinarySearchResponse.md | 29 + docs/docs/BinarySearchResult.md | 37 + docs/docs/BinaryTaskStatus.md | 18 + docs/docs/Block.md | 29 + ...ckCommentsGenerationForFunctionResponse.md | 29 + docs/docs/Boundary.md | 31 + docs/docs/BoxPlotConfidence.md | 36 + docs/docs/CalleeFunctionInfo.md | 34 + docs/docs/CalleesCallerFunctionsResponse.md | 31 + docs/docs/CallerFunctionInfo.md | 34 + docs/docs/Capabilities.md | 29 + docs/docs/Capability.md | 31 + docs/docs/CheckSecurityChecksTaskResponse.md | 29 + docs/docs/ChildBinariesResponse.md | 30 + docs/docs/CodeSignatureModel.md | 31 + docs/docs/CollectionBinariesUpdateRequest.md | 29 + docs/docs/CollectionBinariesUpdateResponse.md | 29 + docs/docs/CollectionBinaryResponse.md | 34 + docs/docs/CollectionCreateRequest.md | 34 + docs/docs/CollectionListItem.md | 39 + docs/docs/CollectionResponse.md | 39 + docs/docs/CollectionResponseBinariesInner.md | 34 + docs/docs/CollectionScope.md | 16 + docs/docs/CollectionSearchResponse.md | 29 + docs/docs/CollectionSearchResult.md | 40 + docs/docs/CollectionTagsUpdateRequest.md | 29 + docs/docs/CollectionTagsUpdateResponse.md | 29 + docs/docs/CollectionUpdateRequest.md | 31 + docs/docs/CollectionsApi.md | 616 +++ docs/docs/CommentBase.md | 29 + docs/docs/CommentResponse.md | 36 + docs/docs/CommentUpdateRequest.md | 29 + docs/docs/Communities.md | 32 + docs/docs/CommunityMatchPercentages.md | 32 + docs/docs/ConfidenceApi.md | 345 ++ docs/docs/ConfidenceType.md | 18 + docs/docs/Context.md | 30 + docs/docs/Created.md | 31 + docs/docs/DecompilationCommentContext.md | 30 + docs/docs/DecompilationResponse.md | 31 + docs/docs/DieMatch.md | 32 + docs/docs/DynamicExecutionStatusInput.md | 17 + docs/docs/ELFImportModel.md | 30 + docs/docs/ELFModel.md | 48 + docs/docs/ELFRelocation.md | 35 + docs/docs/ELFSection.md | 38 + docs/docs/ELFSecurity.md | 33 + docs/docs/ELFSegment.md | 37 + docs/docs/ELFSymbol.md | 35 + docs/docs/ElfDynamicEntry.md | 30 + docs/docs/EntrypointModel.md | 30 + docs/docs/Enumeration.md | 32 + docs/docs/ErrorModel.md | 30 + docs/docs/ExportModel.md | 30 + docs/docs/ExportedBinaryAnnResult.md | 37 + docs/docs/ExternalResponse.md | 31 + docs/docs/ExternalSourcesApi.md | 498 ++ docs/docs/FileFormat.md | 14 + docs/docs/FileHashes.md | 36 + docs/docs/FileMetadata.md | 32 + docs/docs/Filters.md | 18 + docs/docs/FirmwareApi.md | 174 + docs/docs/FunctionAnalysisThreatScoreData.md | 35 + docs/docs/FunctionBlockDestinationResponse.md | 31 + docs/docs/FunctionBlockResponse.md | 34 + docs/docs/FunctionBlocksResponse.md | 33 + docs/docs/FunctionBoundary.md | 31 + docs/docs/FunctionBoxPlotConfidence.md | 30 + docs/docs/FunctionCapabilityResponse.md | 29 + docs/docs/FunctionCommentCreateRequest.md | 30 + docs/docs/FunctionDataTypes.md | 32 + docs/docs/FunctionDataTypesList.md | 31 + docs/docs/FunctionDataTypesListItem.md | 33 + docs/docs/FunctionDataTypesParams.md | 29 + docs/docs/FunctionDataTypesStatus.md | 31 + docs/docs/FunctionHeader.md | 33 + docs/docs/FunctionInfoInput.md | 30 + docs/docs/FunctionInfoInputFuncDepsInner.md | 35 + docs/docs/FunctionInfoOutput.md | 30 + docs/docs/FunctionLocalVariableResponse.md | 33 + docs/docs/FunctionMappingFull.md | 39 + docs/docs/FunctionNameConfidenceBody.md | 30 + docs/docs/FunctionNameHistory.md | 34 + docs/docs/FunctionNameInput.md | 30 + docs/docs/FunctionParamResponse.md | 33 + docs/docs/FunctionRename.md | 30 + docs/docs/FunctionRenameMap.md | 31 + docs/docs/FunctionSearchResponse.md | 29 + docs/docs/FunctionSearchResult.md | 35 + docs/docs/FunctionString.md | 30 + docs/docs/FunctionStringsResponse.md | 31 + docs/docs/FunctionTaskResponse.md | 30 + docs/docs/FunctionTaskStatus.md | 18 + docs/docs/FunctionThreatScore.md | 29 + docs/docs/FunctionTypeInput.md | 36 + docs/docs/FunctionTypeOutput.md | 36 + docs/docs/FunctionsAIDecompilationApi.md | 776 +++ docs/docs/FunctionsBlockCommentsApi.md | 254 + docs/docs/FunctionsCoreApi.md | 1033 ++++ docs/docs/FunctionsDataTypesApi.md | 519 ++ docs/docs/FunctionsDecompilationApi.md | 600 +++ docs/docs/FunctionsDetailResponse.md | 39 + docs/docs/FunctionsListRename.md | 29 + docs/docs/FunctionsRenamingHistoryApi.md | 348 ++ docs/docs/FunctionsThreatScoreApi.md | 174 + docs/docs/GenerateFunctionDataTypes.md | 31 + docs/docs/GenerationStatusList.md | 31 + docs/docs/GetAiDecompilationRatingResponse.md | 29 + docs/docs/GetAiDecompilationTask.md | 36 + docs/docs/GetPublicUserResponse.md | 30 + docs/docs/GetUserResponse.md | 35 + docs/docs/GlobalVariable.md | 34 + docs/docs/ISA.md | 14 + docs/docs/IconModel.md | 29 + docs/docs/ImportModel.md | 30 + docs/docs/InverseFunctionMapItem.md | 31 + docs/docs/InverseStringMapItem.md | 30 + docs/docs/InverseValue.md | 29 + docs/docs/ListCollectionResults.md | 29 + docs/docs/LoginRequest.md | 30 + docs/docs/LoginResponse.md | 29 + docs/docs/Logs.md | 29 + docs/docs/MatchedFunctionGroup.md | 30 + docs/docs/MatchedFunctionSuggestion.md | 31 + docs/docs/MetaModel.md | 29 + docs/docs/ModelName.md | 25 + docs/docs/ModelsApi.md | 89 + docs/docs/ModelsResponse.md | 29 + docs/docs/NearestNeighbor.md | 36 + docs/docs/NetworkOverviewDns.md | 31 + docs/docs/NetworkOverviewDnsAnswer.md | 30 + docs/docs/NetworkOverviewMetadata.md | 32 + docs/docs/NetworkOverviewResponse.md | 30 + docs/docs/Order.md | 12 + docs/docs/Origin.md | 24 + docs/docs/PDBDebugModel.md | 29 + docs/docs/PEModel.md | 48 + docs/docs/PaginationModel.md | 31 + docs/docs/Params.md | 35 + docs/docs/Platform.md | 12 + docs/docs/Process.md | 35 + docs/docs/ProcessDump.md | 32 + docs/docs/ProcessDumpMetadata.md | 31 + docs/docs/ProcessDumps.md | 30 + docs/docs/ProcessDumpsData.md | 30 + docs/docs/ProcessRegistry.md | 30 + docs/docs/ProcessTree.md | 30 + docs/docs/QueuedSecurityChecksTaskResponse.md | 29 + docs/docs/ReAnalysisForm.md | 35 + docs/docs/Recent.md | 29 + docs/docs/Registry.md | 32 + docs/docs/RelativeBinaryResponse.md | 31 + docs/docs/SBOM.md | 30 + docs/docs/SBOMPackage.md | 30 + docs/docs/SandboxOptions.md | 30 + docs/docs/ScrapeThirdPartyConfig.md | 29 + docs/docs/SearchApi.md | 382 ++ docs/docs/SearchBinaryIds.md | 29 + docs/docs/SearchFunctionIds.md | 29 + docs/docs/SectionModel.md | 30 + docs/docs/SecurityChecksResponse.md | 31 + docs/docs/SecurityChecksResult.md | 36 + docs/docs/SecurityModel.md | 39 + docs/docs/SeverityType.md | 20 + docs/docs/SimilarFunctionsResponse.md | 36 + docs/docs/SingleCodeCertificateModel.md | 34 + docs/docs/SingleCodeSignatureModel.md | 30 + docs/docs/SinglePDBEntryModel.md | 31 + docs/docs/SingleSectionModel.md | 35 + docs/docs/StackVariable.md | 34 + docs/docs/StatusInput.md | 21 + docs/docs/StatusOutput.md | 30 + docs/docs/StringFunctions.md | 31 + docs/docs/Structure.md | 33 + docs/docs/StructureMember.md | 33 + docs/docs/Symbols.md | 30 + docs/docs/SymbolsInfo.md | 30 + docs/docs/TTPS.md | 30 + docs/docs/TTPSAttack.md | 30 + docs/docs/TTPSData.md | 30 + docs/docs/TTPSElement.md | 32 + docs/docs/TTPSOccurance.md | 30 + docs/docs/Tag.md | 29 + docs/docs/TagConfidenceBody.md | 29 + docs/docs/TagOriginBoxPlotConfidence.md | 30 + docs/docs/TagResponse.md | 30 + docs/docs/TagSearchResponse.md | 29 + docs/docs/TagSearchResult.md | 30 + docs/docs/Tags.md | 30 + docs/docs/TaskResponse.md | 30 + docs/docs/TaskStatus.md | 18 + docs/docs/ThreatScoreFunctionBody.md | 29 + docs/docs/TimestampModel.md | 31 + docs/docs/TypeDefinition.md | 32 + docs/docs/UnstripRequest.md | 31 + docs/docs/UpdateFunctionDataTypes.md | 30 + docs/docs/UploadFileType.md | 16 + docs/docs/UploadResponse.md | 31 + .../docs/UpsertAiDecomplationRatingRequest.md | 29 + docs/docs/UserActivityResponse.md | 34 + docs/docs/Vulnerabilities.md | 29 + docs/docs/Vulnerability.md | 39 + docs/docs/VulnerabilityType.md | 20 + docs/docs/Workspace.md | 14 + python-client/.github/workflows/python.yml | 34 + python-client/.gitignore | 66 + python-client/.gitlab-ci.yml | 31 + python-client/.openapi-generator-ignore | 23 + python-client/.travis.yml | 17 + python-client/git_push.sh | 57 + python-client/pyproject.toml | 95 + python-client/requirements.txt | 5 + python-client/setup.cfg | 2 + python-client/setup.py | 50 + python-client/test-requirements.txt | 6 + python-client/tox.ini | 9 + revengai/revengai/__init__.py | 1056 ++++ revengai/revengai/api/__init__.py | 58 + .../revengai/api/analyses_comments_api.py | 1260 +++++ revengai/revengai/api/analyses_core_api.py | 4643 +++++++++++++++++ .../api/analyses_dynamic_execution_api.py | 1991 +++++++ .../api/analyses_results_metadata_api.py | 2324 +++++++++ .../api/analyses_security_checks_api.py | 909 ++++ .../revengai/api/authentication_users_api.py | 1386 +++++ revengai/revengai/api/binaries_api.py | 1702 ++++++ revengai/revengai/api/collections_api.py | 2222 ++++++++ revengai/revengai/api/confidence_api.py | 1214 +++++ revengai/revengai/api/external_sources_api.py | 1709 ++++++ revengai/revengai/api/firmware_api.py | 624 +++ .../api/functions_ai_decompilation_api.py | 2728 ++++++++++ .../api/functions_block_comments_api.py | 897 ++++ revengai/revengai/api/functions_core_api.py | 3700 +++++++++++++ .../revengai/api/functions_data_types_api.py | 1838 +++++++ .../api/functions_decompilation_api.py | 2097 ++++++++ .../api/functions_renaming_history_api.py | 1214 +++++ .../api/functions_threat_score_api.py | 610 +++ revengai/revengai/api/models_api.py | 303 ++ revengai/revengai/api/search_api.py | 1500 ++++++ revengai/revengai/api_client.py | 804 +++ revengai/revengai/api_response.py | 21 + revengai/revengai/configuration.py | 602 +++ revengai/revengai/exceptions.py | 216 + revengai/revengai/models/__init__.py | 645 +++ revengai/revengai/models/addr.py | 144 + .../models/ai_decompilation_rating.py | 37 + .../revengai/models/ai_unstrip_request.py | 87 + .../revengai/models/analysis_access_info.py | 89 + revengai/revengai/models/analysis_config.py | 107 + .../models/analysis_create_request.py | 132 + .../models/analysis_create_response.py | 89 + .../models/analysis_detail_response.py | 122 + .../revengai/models/analysis_functions.py | 95 + revengai/revengai/models/analysis_record.py | 123 + revengai/revengai/models/analysis_scope.py | 37 + .../models/analysis_strings_response.py | 97 + revengai/revengai/models/analysis_tags.py | 104 + .../models/analysis_threat_score_data.py | 99 + .../models/analysis_update_request.py | 109 + .../models/analysis_update_tags_request.py | 87 + .../models/analysis_update_tags_response.py | 95 + revengai/revengai/models/ann_function.py | 121 + ...analyses_enums_dynamic_execution_status.py | 39 + ...app_api_rest_v2_analyses_enums_order_by.py | 38 + ...api_rest_v2_analyses_responses_tag_item.py | 96 + ..._api_rest_v2_collections_enums_order_by.py | 41 + ...pi_rest_v2_functions_responses_function.py | 89 + ...pp_api_rest_v2_functions_types_function.py | 109 + ...app_services_binary_ann_schema_tag_item.py | 99 + ...cution_schemas_dynamic_execution_status.py | 87 + revengai/revengai/models/argument.py | 100 + .../models/auto_unstrip_by_group_response.py | 132 + .../revengai/models/auto_unstrip_request.py | 90 + .../revengai/models/auto_unstrip_response.py | 123 + revengai/revengai/models/base_response.py | 125 + .../base_response_analysis_create_response.py | 126 + .../base_response_analysis_detail_response.py | 126 + .../base_response_analysis_functions.py | 126 + ...base_response_analysis_strings_response.py | 126 + .../models/base_response_analysis_tags.py | 126 + ...ase_response_analysis_threat_score_data.py | 126 + ..._response_analysis_update_tags_response.py | 126 + .../revengai/models/base_response_basic.py | 126 + ...ase_response_binary_additional_response.py | 126 + .../base_response_binary_ann_list_response.py | 126 + .../base_response_binary_details_response.py | 126 + ...base_response_binary_externals_response.py | 126 + .../base_response_binary_search_response.py | 126 + ...mments_generation_for_function_response.py | 126 + ...k_comments_overview_generation_response.py | 117 + .../revengai/models/base_response_bool.py | 122 + .../base_response_box_plot_confidence.py | 126 + ...ponse_callees_caller_functions_response.py | 126 + .../models/base_response_capabilities.py | 126 + ...nse_check_security_checks_task_response.py | 126 + .../base_response_child_binaries_response.py | 126 + ...nse_collection_binaries_update_response.py | 126 + .../base_response_collection_response.py | 126 + ...ase_response_collection_search_response.py | 126 + ...esponse_collection_tags_update_response.py | 126 + .../models/base_response_comment_response.py | 126 + .../models/base_response_communities.py | 126 + .../revengai/models/base_response_created.py | 126 + .../base_response_decompilation_response.py | 126 + .../revengai/models/base_response_dict.py | 122 + .../base_response_dynamic_execution_status.py | 126 + .../models/base_response_external_response.py | 126 + ...nse_function_analysis_threat_score_data.py | 126 + .../base_response_function_blocks_response.py | 126 + ...e_response_function_capability_response.py | 126 + .../base_response_function_data_types.py | 126 + .../base_response_function_data_types_list.py | 126 + .../base_response_function_search_response.py | 126 + ...base_response_function_strings_response.py | 126 + .../base_response_function_task_response.py | 126 + .../base_response_function_threat_score.py | 126 + ...base_response_functions_detail_response.py | 126 + ...e_response_generate_function_data_types.py | 126 + .../base_response_generation_status_list.py | 126 + ...se_get_ai_decompilation_rating_response.py | 126 + ...base_response_get_ai_decompilation_task.py | 126 + .../base_response_get_public_user_response.py | 126 + .../models/base_response_get_user_response.py | 126 + .../base_response_list_collection_results.py | 126 + .../base_response_list_comment_response.py | 130 + .../models/base_response_list_die_match.py | 130 + ...ponse_list_function_box_plot_confidence.py | 130 + ...ase_response_list_function_name_history.py | 130 + .../models/base_response_list_sbom.py | 130 + ...esponse_list_similar_functions_response.py | 130 + ...nse_list_tag_origin_box_plot_confidence.py | 130 + ...se_response_list_user_activity_response.py | 130 + .../models/base_response_login_response.py | 126 + .../revengai/models/base_response_logs.py | 126 + .../models/base_response_models_response.py | 126 + ...base_response_nearest_neighbor_analysis.py | 136 + ...base_response_network_overview_response.py | 126 + .../revengai/models/base_response_params.py | 126 + .../models/base_response_process_dumps.py | 126 + .../models/base_response_process_registry.py | 126 + .../models/base_response_process_tree.py | 126 + ...se_queued_security_checks_task_response.py | 126 + .../revengai/models/base_response_recent.py | 126 + .../base_response_security_checks_response.py | 126 + .../revengai/models/base_response_status.py | 126 + revengai/revengai/models/base_response_str.py | 122 + .../models/base_response_symbols_info.py | 126 + .../base_response_tag_search_response.py | 126 + .../models/base_response_task_response.py | 126 + .../revengai/models/base_response_ttps.py | 126 + .../models/base_response_upload_response.py | 126 + .../models/base_response_vulnerabilities.py | 126 + revengai/revengai/models/basic.py | 108 + ...binary_additional_details_data_response.py | 113 + .../models/binary_additional_response.py | 106 + revengai/revengai/models/binary_ann_form.py | 94 + .../models/binary_ann_list_response.py | 95 + revengai/revengai/models/binary_config.py | 109 + .../models/binary_details_response.py | 126 + .../models/binary_externals_response.py | 96 + .../revengai/models/binary_search_response.py | 95 + .../revengai/models/binary_search_result.py | 109 + .../revengai/models/binary_task_status.py | 40 + revengai/revengai/models/block.py | 87 + ...mments_generation_for_function_response.py | 87 + revengai/revengai/models/boundary.py | 91 + .../revengai/models/box_plot_confidence.py | 99 + .../revengai/models/callee_function_info.py | 107 + .../callees_caller_functions_response.py | 107 + .../revengai/models/caller_function_info.py | 107 + revengai/revengai/models/capabilities.py | 95 + revengai/revengai/models/capability.py | 91 + .../check_security_checks_task_response.py | 88 + .../models/child_binaries_response.py | 105 + .../revengai/models/code_signature_model.py | 99 + .../collection_binaries_update_request.py | 87 + .../collection_binaries_update_response.py | 95 + .../models/collection_binary_response.py | 98 + .../models/collection_create_request.py | 108 + .../revengai/models/collection_list_item.py | 113 + .../revengai/models/collection_response.py | 132 + .../collection_response_binaries_inner.py | 136 + revengai/revengai/models/collection_scope.py | 39 + .../models/collection_search_response.py | 95 + .../models/collection_search_result.py | 125 + .../models/collection_tags_update_request.py | 87 + .../models/collection_tags_update_response.py | 87 + .../models/collection_update_request.py | 107 + revengai/revengai/models/comment_base.py | 87 + revengai/revengai/models/comment_response.py | 111 + .../revengai/models/comment_update_request.py | 87 + revengai/revengai/models/communities.py | 101 + .../models/community_match_percentages.py | 93 + revengai/revengai/models/confidence_type.py | 40 + revengai/revengai/models/context.py | 142 + revengai/revengai/models/created.py | 91 + .../models/decompilation_comment_context.py | 99 + .../revengai/models/decompilation_response.py | 91 + revengai/revengai/models/die_match.py | 93 + .../models/dynamic_execution_status_input.py | 39 + revengai/revengai/models/elf_dynamic_entry.py | 89 + revengai/revengai/models/elf_import_model.py | 89 + revengai/revengai/models/elf_model.py | 180 + revengai/revengai/models/elf_relocation.py | 99 + revengai/revengai/models/elf_section.py | 105 + revengai/revengai/models/elf_security.py | 95 + revengai/revengai/models/elf_segment.py | 103 + revengai/revengai/models/elf_symbol.py | 99 + revengai/revengai/models/entrypoint_model.py | 89 + revengai/revengai/models/enumeration.py | 98 + revengai/revengai/models/error_model.py | 89 + revengai/revengai/models/export_model.py | 89 + .../models/exported_binary_ann_result.py | 111 + revengai/revengai/models/external_response.py | 92 + revengai/revengai/models/file_format.py | 38 + revengai/revengai/models/file_hashes.py | 141 + revengai/revengai/models/file_metadata.py | 97 + revengai/revengai/models/filters.py | 40 + .../function_analysis_threat_score_data.py | 99 + .../function_block_destination_response.py | 96 + .../models/function_block_response.py | 110 + .../models/function_blocks_response.py | 122 + revengai/revengai/models/function_boundary.py | 91 + .../models/function_box_plot_confidence.py | 93 + .../models/function_capability_response.py | 87 + .../models/function_comment_create_request.py | 93 + .../revengai/models/function_data_types.py | 107 + .../models/function_data_types_list.py | 99 + .../models/function_data_types_list_item.py | 109 + .../models/function_data_types_params.py | 87 + .../models/function_data_types_status.py | 91 + revengai/revengai/models/function_header.py | 113 + .../revengai/models/function_info_input.py | 106 + .../function_info_input_func_deps_inner.py | 164 + .../revengai/models/function_info_output.py | 106 + .../function_local_variable_response.py | 95 + .../revengai/models/function_mapping_full.py | 248 + .../models/function_name_confidence_body.py | 98 + .../revengai/models/function_name_history.py | 97 + .../revengai/models/function_name_input.py | 89 + .../models/function_param_response.py | 95 + revengai/revengai/models/function_rename.py | 94 + .../revengai/models/function_rename_map.py | 96 + .../models/function_search_response.py | 95 + .../revengai/models/function_search_result.py | 100 + revengai/revengai/models/function_string.py | 89 + .../models/function_strings_response.py | 97 + .../revengai/models/function_task_response.py | 95 + .../revengai/models/function_task_status.py | 40 + .../revengai/models/function_threat_score.py | 100 + .../revengai/models/function_type_input.py | 128 + .../revengai/models/function_type_output.py | 128 + .../models/functions_detail_response.py | 122 + .../revengai/models/functions_list_rename.py | 95 + .../models/generate_function_data_types.py | 95 + .../revengai/models/generation_status_list.py | 99 + .../get_ai_decompilation_rating_response.py | 88 + .../models/get_ai_decompilation_task.py | 153 + .../models/get_public_user_response.py | 89 + revengai/revengai/models/get_user_response.py | 100 + revengai/revengai/models/global_variable.py | 102 + revengai/revengai/models/icon_model.py | 92 + revengai/revengai/models/import_model.py | 89 + .../models/inverse_function_map_item.py | 100 + .../models/inverse_string_map_item.py | 94 + revengai/revengai/models/inverse_value.py | 87 + revengai/revengai/models/isa.py | 38 + .../models/list_collection_results.py | 95 + revengai/revengai/models/login_request.py | 90 + revengai/revengai/models/login_response.py | 87 + revengai/revengai/models/logs.py | 87 + .../revengai/models/matched_function_group.py | 89 + .../models/matched_function_suggestion.py | 96 + revengai/revengai/models/meta_model.py | 96 + revengai/revengai/models/model_name.py | 43 + revengai/revengai/models/models_response.py | 87 + revengai/revengai/models/nearest_neighbor.py | 106 + .../revengai/models/network_overview_dns.py | 99 + .../models/network_overview_dns_answer.py | 89 + .../models/network_overview_metadata.py | 100 + .../models/network_overview_response.py | 105 + revengai/revengai/models/order.py | 37 + revengai/revengai/models/origin.py | 43 + revengai/revengai/models/pagination_model.py | 91 + revengai/revengai/models/params.py | 104 + revengai/revengai/models/pdb_debug_model.py | 95 + revengai/revengai/models/pe_model.py | 216 + revengai/revengai/models/platform.py | 37 + revengai/revengai/models/process.py | 104 + revengai/revengai/models/process_dump.py | 97 + .../revengai/models/process_dump_metadata.py | 91 + revengai/revengai/models/process_dumps.py | 93 + .../revengai/models/process_dumps_data.py | 97 + revengai/revengai/models/process_registry.py | 106 + revengai/revengai/models/process_tree.py | 97 + .../queued_security_checks_task_response.py | 87 + revengai/revengai/models/re_analysis_form.py | 102 + revengai/revengai/models/recent.py | 95 + revengai/revengai/models/registry.py | 103 + .../models/relative_binary_response.py | 91 + revengai/revengai/models/sandbox_options.py | 89 + revengai/revengai/models/sbom.py | 97 + revengai/revengai/models/sbom_package.py | 89 + .../models/scrape_third_party_config.py | 87 + revengai/revengai/models/search_binary_ids.py | 138 + .../revengai/models/search_function_ids.py | 138 + revengai/revengai/models/section_model.py | 97 + .../models/security_checks_response.py | 99 + .../revengai/models/security_checks_result.py | 104 + revengai/revengai/models/security_model.py | 107 + revengai/revengai/models/severity_type.py | 41 + .../models/similar_functions_response.py | 101 + .../models/single_code_certificate_model.py | 97 + .../models/single_code_signature_model.py | 97 + .../revengai/models/single_pdb_entry_model.py | 91 + .../revengai/models/single_section_model.py | 99 + revengai/revengai/models/stack_variable.py | 102 + revengai/revengai/models/status_input.py | 41 + revengai/revengai/models/status_output.py | 89 + revengai/revengai/models/string_functions.py | 97 + revengai/revengai/models/structure.py | 118 + revengai/revengai/models/structure_member.py | 100 + revengai/revengai/models/symbols.py | 97 + revengai/revengai/models/symbols_info.py | 103 + revengai/revengai/models/tag.py | 87 + .../revengai/models/tag_confidence_body.py | 96 + .../models/tag_origin_box_plot_confidence.py | 97 + revengai/revengai/models/tag_response.py | 89 + .../revengai/models/tag_search_response.py | 95 + revengai/revengai/models/tag_search_result.py | 89 + revengai/revengai/models/tags.py | 90 + revengai/revengai/models/task_response.py | 95 + revengai/revengai/models/task_status.py | 40 + .../models/threat_score_function_body.py | 88 + revengai/revengai/models/timestamp_model.py | 91 + revengai/revengai/models/ttps.py | 93 + revengai/revengai/models/ttps_attack.py | 89 + revengai/revengai/models/ttps_data.py | 97 + revengai/revengai/models/ttps_element.py | 109 + revengai/revengai/models/ttps_occurance.py | 89 + revengai/revengai/models/type_definition.py | 98 + revengai/revengai/models/unstrip_request.py | 92 + .../models/update_function_data_types.py | 93 + revengai/revengai/models/upload_file_type.py | 39 + revengai/revengai/models/upload_response.py | 92 + .../upsert_ai_decomplation_rating_request.py | 88 + .../revengai/models/user_activity_response.py | 98 + revengai/revengai/models/vulnerabilities.py | 95 + revengai/revengai/models/vulnerability.py | 114 + .../revengai/models/vulnerability_type.py | 41 + revengai/revengai/models/workspace.py | 38 + revengai/revengai/py.typed | 0 revengai/revengai/rest.py | 258 + test/test/__init__.py | 0 test/test/test_addr.py | 50 + test/test/test_ai_decompilation_rating.py | 33 + test/test/test_ai_unstrip_request.py | 51 + test/test/test_analyses_comments_api.py | 59 + test/test/test_analyses_core_api.py | 136 + .../test_analyses_dynamic_execution_api.py | 80 + .../test_analyses_results_metadata_api.py | 87 + .../test/test_analyses_security_checks_api.py | 52 + test/test/test_analysis_access_info.py | 54 + test/test/test_analysis_config.py | 60 + test/test/test_analysis_create_request.py | 83 + test/test/test_analysis_create_response.py | 54 + test/test/test_analysis_detail_response.py | 83 + test/test/test_analysis_functions.py | 78 + test/test/test_analysis_record.py | 74 + test/test/test_analysis_scope.py | 33 + test/test/test_analysis_strings_response.py | 70 + test/test/test_analysis_tags.py | 74 + test/test/test_analysis_threat_score_data.py | 64 + test/test/test_analysis_update_request.py | 52 + .../test/test_analysis_update_tags_request.py | 56 + .../test_analysis_update_tags_response.py | 60 + test/test/test_ann_function.py | 61 + ...analyses_enums_dynamic_execution_status.py | 33 + ...app_api_rest_v2_analyses_enums_order_by.py | 33 + ...api_rest_v2_analyses_responses_tag_item.py | 55 + ..._api_rest_v2_collections_enums_order_by.py | 33 + ...pi_rest_v2_functions_responses_function.py | 54 + ...pp_api_rest_v2_functions_types_function.py | 72 + ...app_services_binary_ann_schema_tag_item.py | 52 + ...cution_schemas_dynamic_execution_status.py | 52 + test/test/test_argument.py | 59 + test/test/test_authentication_users_api.py | 66 + .../test_auto_unstrip_by_group_response.py | 61 + test/test/test_auto_unstrip_request.py | 52 + test/test/test_auto_unstrip_response.py | 60 + test/test/test_base_response.py | 63 + ..._base_response_analysis_create_response.py | 65 + ..._base_response_analysis_detail_response.py | 81 + .../test_base_response_analysis_functions.py | 77 + ...base_response_analysis_strings_response.py | 73 + test/test/test_base_response_analysis_tags.py | 75 + ...ase_response_analysis_threat_score_data.py | 70 + ..._response_analysis_update_tags_response.py | 68 + test/test/test_base_response_basic.py | 74 + ...ase_response_binary_additional_response.py | 259 + ..._base_response_binary_ann_list_response.py | 83 + ...t_base_response_binary_details_response.py | 83 + ...base_response_binary_externals_response.py | 72 + ...st_base_response_binary_search_response.py | 77 + ...mments_generation_for_function_response.py | 64 + ...k_comments_overview_generation_response.py | 63 + test/test/test_base_response_bool.py | 63 + .../test_base_response_box_plot_confidence.py | 70 + ...ponse_callees_caller_functions_response.py | 82 + test/test/test_base_response_capabilities.py | 71 + ...nse_check_security_checks_task_response.py | 64 + ...t_base_response_child_binaries_response.py | 73 + ...nse_collection_binaries_update_response.py | 72 + .../test_base_response_collection_response.py | 78 + ...ase_response_collection_search_response.py | 80 + ...esponse_collection_tags_update_response.py | 66 + .../test_base_response_comment_response.py | 71 + test/test/test_base_response_communities.py | 77 + test/test/test_base_response_created.py | 66 + ...st_base_response_decompilation_response.py | 66 + test/test/test_base_response_dict.py | 65 + ..._base_response_dynamic_execution_status.py | 64 + .../test_base_response_external_response.py | 68 + ...nse_function_analysis_threat_score_data.py | 70 + ..._base_response_function_blocks_response.py | 96 + ...e_response_function_capability_response.py | 66 + .../test_base_response_function_data_types.py | 99 + ..._base_response_function_data_types_list.py | 105 + ..._base_response_function_search_response.py | 73 + ...base_response_function_strings_response.py | 69 + ...st_base_response_function_task_response.py | 65 + ...est_base_response_function_threat_score.py | 73 + ...base_response_functions_detail_response.py | 78 + ...e_response_generate_function_data_types.py | 74 + ...st_base_response_generation_status_list.py | 71 + ...se_get_ai_decompilation_rating_response.py | 64 + ...base_response_get_ai_decompilation_task.py | 118 + ..._base_response_get_public_user_response.py | 65 + .../test_base_response_get_user_response.py | 70 + ...t_base_response_list_collection_results.py | 79 + ...est_base_response_list_comment_response.py | 73 + .../test/test_base_response_list_die_match.py | 69 + ...ponse_list_function_box_plot_confidence.py | 74 + ...ase_response_list_function_name_history.py | 71 + test/test/test_base_response_list_sbom.py | 73 + ...esponse_list_similar_functions_response.py | 77 + ...nse_list_tag_origin_box_plot_confidence.py | 76 + ...se_response_list_user_activity_response.py | 71 + .../test/test_base_response_login_response.py | 64 + test/test/test_base_response_logs.py | 64 + .../test_base_response_models_response.py | 66 + ...base_response_nearest_neighbor_analysis.py | 75 + ...base_response_network_overview_response.py | 80 + test/test/test_base_response_params.py | 70 + test/test/test_base_response_process_dumps.py | 76 + .../test_base_response_process_registry.py | 73 + test/test/test_base_response_process_tree.py | 78 + ...se_queued_security_checks_task_response.py | 64 + test/test/test_base_response_recent.py | 79 + ..._base_response_security_checks_response.py | 76 + test/test/test_base_response_status.py | 65 + test/test/test_base_response_str.py | 63 + test/test/test_base_response_symbols_info.py | 68 + .../test_base_response_tag_search_response.py | 68 + test/test/test_base_response_task_response.py | 65 + test/test/test_base_response_ttps.py | 81 + .../test_base_response_upload_response.py | 66 + .../test_base_response_vulnerabilities.py | 77 + test/test/test_basic.py | 72 + test/test/test_binaries_api.py | 73 + ...binary_additional_details_data_response.py | 256 + test/test/test_binary_additional_response.py | 441 ++ test/test/test_binary_ann_form.py | 58 + test/test/test_binary_ann_list_response.py | 90 + test/test/test_binary_config.py | 53 + test/test/test_binary_details_response.py | 90 + test/test/test_binary_externals_response.py | 68 + test/test/test_binary_search_response.py | 78 + test/test/test_binary_search_result.py | 72 + test/test/test_binary_task_status.py | 33 + test/test/test_block.py | 52 + ...mments_generation_for_function_response.py | 52 + test/test/test_boundary.py | 56 + test/test/test_box_plot_confidence.py | 64 + test/test/test_callee_function_info.py | 61 + .../test_callees_caller_functions_response.py | 87 + test/test/test_caller_function_info.py | 61 + test/test/test_capabilities.py | 66 + test/test/test_capability.py | 60 + ...est_check_security_checks_task_response.py | 52 + test/test/test_child_binaries_response.py | 66 + test/test/test_code_signature_model.py | 80 + ...test_collection_binaries_update_request.py | 56 + ...est_collection_binaries_update_response.py | 68 + test/test/test_collection_binary_response.py | 62 + test/test/test_collection_create_request.py | 63 + test/test/test_collection_list_item.py | 72 + test/test/test_collection_response.py | 73 + ...test_collection_response_binaries_inner.py | 62 + test/test/test_collection_scope.py | 33 + test/test/test_collection_search_response.py | 84 + test/test/test_collection_search_result.py | 73 + .../test_collection_tags_update_request.py | 56 + .../test_collection_tags_update_response.py | 56 + test/test/test_collection_update_request.py | 53 + test/test/test_collections_api.py | 80 + test/test/test_comment_base.py | 52 + test/test/test_comment_response.py | 65 + test/test/test_comment_update_request.py | 52 + test/test/test_communities.py | 78 + test/test/test_community_match_percentages.py | 58 + test/test/test_confidence_api.py | 59 + test/test/test_confidence_type.py | 33 + test/test/test_context.py | 54 + test/test/test_created.py | 56 + .../test_decompilation_comment_context.py | 54 + test/test/test_decompilation_response.py | 56 + test/test/test_die_match.py | 58 + .../test_dynamic_execution_status_input.py | 33 + test/test/test_elf_dynamic_entry.py | 54 + test/test/test_elf_import_model.py | 58 + test/test/test_elf_model.py | 236 + test/test/test_elf_relocation.py | 64 + test/test/test_elf_section.py | 70 + test/test/test_elf_security.py | 60 + test/test/test_elf_segment.py | 68 + test/test/test_elf_symbol.py | 64 + test/test/test_entrypoint_model.py | 54 + test/test/test_enumeration.py | 60 + test/test/test_error_model.py | 54 + test/test/test_export_model.py | 62 + test/test/test_exported_binary_ann_result.py | 79 + test/test/test_external_response.py | 60 + test/test/test_external_sources_api.py | 73 + test/test/test_file_format.py | 33 + test/test/test_file_hashes.py | 66 + test/test/test_file_metadata.py | 74 + test/test/test_filters.py | 33 + test/test/test_firmware_api.py | 45 + ...est_function_analysis_threat_score_data.py | 64 + ...est_function_block_destination_response.py | 56 + test/test/test_function_block_response.py | 75 + test/test/test_function_blocks_response.py | 116 + test/test/test_function_boundary.py | 56 + .../test/test_function_box_plot_confidence.py | 68 + .../test/test_function_capability_response.py | 56 + .../test_function_comment_create_request.py | 55 + test/test/test_function_data_types.py | 88 + test/test/test_function_data_types_list.py | 132 + .../test_function_data_types_list_item.py | 90 + test/test/test_function_data_types_params.py | 56 + test/test/test_function_data_types_status.py | 56 + test/test/test_function_header.py | 73 + test/test/test_function_info_input.py | 85 + ...est_function_info_input_func_deps_inner.py | 66 + test/test/test_function_info_output.py | 85 + .../test_function_local_variable_response.py | 60 + test/test/test_function_mapping_full.py | 148 + .../test_function_name_confidence_body.py | 56 + test/test/test_function_name_history.py | 62 + test/test/test_function_name_input.py | 54 + test/test/test_function_param_response.py | 60 + test/test/test_function_rename.py | 52 + test/test/test_function_rename_map.py | 54 + test/test/test_function_search_response.py | 70 + test/test/test_function_search_result.py | 64 + test/test/test_function_string.py | 54 + test/test/test_function_strings_response.py | 62 + test/test/test_function_task_response.py | 52 + test/test/test_function_task_status.py | 33 + test/test/test_function_threat_score.py | 70 + test/test/test_function_type_input.py | 95 + test/test/test_function_type_output.py | 95 + .../test_functions_ai_decompilation_api.py | 94 + .../test/test_functions_block_comments_api.py | 52 + test/test/test_functions_core_api.py | 115 + test/test/test_functions_data_types_api.py | 73 + test/test/test_functions_decompilation_api.py | 80 + test/test/test_functions_detail_response.py | 74 + test/test/test_functions_list_rename.py | 62 + .../test_functions_renaming_history_api.py | 59 + test/test/test_functions_threat_score_api.py | 45 + .../test/test_generate_function_data_types.py | 72 + test/test/test_generation_status_list.py | 64 + ...st_get_ai_decompilation_rating_response.py | 52 + test/test/test_get_ai_decompilation_task.py | 157 + test/test/test_get_public_user_response.py | 54 + test/test/test_get_user_response.py | 64 + test/test/test_global_variable.py | 60 + test/test/test_icon_model.py | 52 + test/test/test_import_model.py | 66 + test/test/test_inverse_function_map_item.py | 55 + test/test/test_inverse_string_map_item.py | 54 + test/test/test_inverse_value.py | 52 + test/test/test_isa.py | 33 + test/test/test_list_collection_results.py | 82 + test/test/test_login_request.py | 54 + test/test/test_login_response.py | 52 + test/test/test_logs.py | 52 + test/test/test_matched_function_group.py | 54 + test/test/test_matched_function_suggestion.py | 56 + test/test/test_meta_model.py | 54 + test/test/test_model_name.py | 33 + test/test/test_models_api.py | 38 + test/test/test_models_response.py | 56 + test/test/test_nearest_neighbor.py | 66 + test/test/test_network_overview_dns.py | 64 + test/test/test_network_overview_dns_answer.py | 54 + test/test/test_network_overview_metadata.py | 58 + test/test/test_network_overview_response.py | 84 + test/test/test_order.py | 33 + test/test/test_origin.py | 33 + test/test/test_pagination_model.py | 56 + test/test/test_params.py | 64 + test/test/test_pdb_debug_model.py | 62 + test/test/test_pe_model.py | 220 + test/test/test_platform.py | 33 + test/test/test_process.py | 72 + test/test/test_process_dump.py | 64 + test/test/test_process_dump_metadata.py | 56 + test/test/test_process_dumps.py | 76 + test/test/test_process_dumps_data.py | 72 + test/test/test_process_registry.py | 70 + test/test/test_process_tree.py | 80 + ...st_queued_security_checks_task_response.py | 52 + test/test/test_re_analysis_form.py | 58 + test/test/test_recent.py | 82 + test/test/test_registry.py | 58 + test/test/test_relative_binary_response.py | 56 + test/test/test_sandbox_options.py | 52 + test/test/test_sbom.py | 66 + test/test/test_sbom_package.py | 54 + test/test/test_scrape_third_party_config.py | 51 + test/test/test_search_api.py | 59 + test/test/test_search_binary_ids.py | 50 + test/test/test_search_function_ids.py | 50 + test/test/test_section_model.py | 72 + test/test/test_security_checks_response.py | 76 + test/test/test_security_checks_result.py | 66 + test/test/test_security_model.py | 72 + test/test/test_severity_type.py | 33 + test/test/test_similar_functions_response.py | 74 + .../test_single_code_certificate_model.py | 62 + test/test/test_single_code_signature_model.py | 70 + test/test/test_single_pdb_entry_model.py | 56 + test/test/test_single_section_model.py | 64 + test/test/test_stack_variable.py | 61 + test/test/test_status_input.py | 33 + test/test/test_status_output.py | 54 + test/test/test_string_functions.py | 62 + test/test/test_structure.py | 71 + test/test/test_structure_member.py | 59 + test/test/test_symbols.py | 57 + test/test/test_symbols_info.py | 55 + test/test/test_tag.py | 52 + test/test/test_tag_confidence_body.py | 60 + .../test_tag_origin_box_plot_confidence.py | 72 + test/test/test_tag_response.py | 54 + test/test/test_tag_search_response.py | 60 + test/test/test_tag_search_result.py | 54 + test/test/test_tags.py | 54 + test/test/test_task_response.py | 52 + test/test/test_task_status.py | 33 + test/test/test_threat_score_function_body.py | 53 + test/test/test_timestamp_model.py | 56 + test/test/test_ttps.py | 86 + test/test/test_ttps_attack.py | 54 + test/test/test_ttps_data.py | 82 + test/test/test_ttps_element.py | 74 + test/test/test_ttps_occurance.py | 54 + test/test/test_type_definition.py | 56 + test/test/test_unstrip_request.py | 53 + test/test/test_update_function_data_types.py | 118 + test/test/test_upload_file_type.py | 33 + test/test/test_upload_response.py | 56 + ...t_upsert_ai_decomplation_rating_request.py | 52 + test/test/test_user_activity_response.py | 62 + test/test/test_vulnerabilities.py | 78 + test/test/test_vulnerability.py | 71 + test/test/test_vulnerability_type.py | 33 + test/test/test_workspace.py | 33 + 1004 files changed, 112410 insertions(+), 6 deletions(-) create mode 100644 docs/docs/ANNFunction.md create mode 100644 docs/docs/Addr.md create mode 100644 docs/docs/AiDecompilationRating.md create mode 100644 docs/docs/AiUnstripRequest.md create mode 100644 docs/docs/AnalysesCommentsApi.md create mode 100644 docs/docs/AnalysesCoreApi.md create mode 100644 docs/docs/AnalysesDynamicExecutionApi.md create mode 100644 docs/docs/AnalysesResultsMetadataApi.md create mode 100644 docs/docs/AnalysesSecurityChecksApi.md create mode 100644 docs/docs/AnalysisAccessInfo.md create mode 100644 docs/docs/AnalysisConfig.md create mode 100644 docs/docs/AnalysisCreateRequest.md create mode 100644 docs/docs/AnalysisCreateResponse.md create mode 100644 docs/docs/AnalysisDetailResponse.md create mode 100644 docs/docs/AnalysisFunctions.md create mode 100644 docs/docs/AnalysisRecord.md create mode 100644 docs/docs/AnalysisScope.md create mode 100644 docs/docs/AnalysisStringsResponse.md create mode 100644 docs/docs/AnalysisTags.md create mode 100644 docs/docs/AnalysisThreatScoreData.md create mode 100644 docs/docs/AnalysisUpdateRequest.md create mode 100644 docs/docs/AnalysisUpdateTagsRequest.md create mode 100644 docs/docs/AnalysisUpdateTagsResponse.md create mode 100644 docs/docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md create mode 100644 docs/docs/AppApiRestV2AnalysesEnumsOrderBy.md create mode 100644 docs/docs/AppApiRestV2AnalysesResponsesTagItem.md create mode 100644 docs/docs/AppApiRestV2CollectionsEnumsOrderBy.md create mode 100644 docs/docs/AppApiRestV2FunctionsResponsesFunction.md create mode 100644 docs/docs/AppApiRestV2FunctionsTypesFunction.md create mode 100644 docs/docs/AppServicesBinaryAnnSchemaTagItem.md create mode 100644 docs/docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md create mode 100644 docs/docs/Argument.md create mode 100644 docs/docs/AuthenticationUsersApi.md create mode 100644 docs/docs/AutoUnstripByGroupResponse.md create mode 100644 docs/docs/AutoUnstripRequest.md create mode 100644 docs/docs/AutoUnstripResponse.md create mode 100644 docs/docs/BaseResponse.md create mode 100644 docs/docs/BaseResponseAnalysisCreateResponse.md create mode 100644 docs/docs/BaseResponseAnalysisDetailResponse.md create mode 100644 docs/docs/BaseResponseAnalysisFunctions.md create mode 100644 docs/docs/BaseResponseAnalysisStringsResponse.md create mode 100644 docs/docs/BaseResponseAnalysisTags.md create mode 100644 docs/docs/BaseResponseAnalysisThreatScoreData.md create mode 100644 docs/docs/BaseResponseAnalysisUpdateTagsResponse.md create mode 100644 docs/docs/BaseResponseBasic.md create mode 100644 docs/docs/BaseResponseBinaryAdditionalResponse.md create mode 100644 docs/docs/BaseResponseBinaryAnnListResponse.md create mode 100644 docs/docs/BaseResponseBinaryDetailsResponse.md create mode 100644 docs/docs/BaseResponseBinaryExternalsResponse.md create mode 100644 docs/docs/BaseResponseBinarySearchResponse.md create mode 100644 docs/docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md create mode 100644 docs/docs/BaseResponseBlockCommentsOverviewGenerationResponse.md create mode 100644 docs/docs/BaseResponseBool.md create mode 100644 docs/docs/BaseResponseBoxPlotConfidence.md create mode 100644 docs/docs/BaseResponseCalleesCallerFunctionsResponse.md create mode 100644 docs/docs/BaseResponseCapabilities.md create mode 100644 docs/docs/BaseResponseCheckSecurityChecksTaskResponse.md create mode 100644 docs/docs/BaseResponseChildBinariesResponse.md create mode 100644 docs/docs/BaseResponseCollectionBinariesUpdateResponse.md create mode 100644 docs/docs/BaseResponseCollectionResponse.md create mode 100644 docs/docs/BaseResponseCollectionSearchResponse.md create mode 100644 docs/docs/BaseResponseCollectionTagsUpdateResponse.md create mode 100644 docs/docs/BaseResponseCommentResponse.md create mode 100644 docs/docs/BaseResponseCommunities.md create mode 100644 docs/docs/BaseResponseCreated.md create mode 100644 docs/docs/BaseResponseDecompilationResponse.md create mode 100644 docs/docs/BaseResponseDict.md create mode 100644 docs/docs/BaseResponseDynamicExecutionStatus.md create mode 100644 docs/docs/BaseResponseExternalResponse.md create mode 100644 docs/docs/BaseResponseFunctionAnalysisThreatScoreData.md create mode 100644 docs/docs/BaseResponseFunctionBlocksResponse.md create mode 100644 docs/docs/BaseResponseFunctionCapabilityResponse.md create mode 100644 docs/docs/BaseResponseFunctionDataTypes.md create mode 100644 docs/docs/BaseResponseFunctionDataTypesList.md create mode 100644 docs/docs/BaseResponseFunctionSearchResponse.md create mode 100644 docs/docs/BaseResponseFunctionStringsResponse.md create mode 100644 docs/docs/BaseResponseFunctionTaskResponse.md create mode 100644 docs/docs/BaseResponseFunctionThreatScore.md create mode 100644 docs/docs/BaseResponseFunctionsDetailResponse.md create mode 100644 docs/docs/BaseResponseGenerateFunctionDataTypes.md create mode 100644 docs/docs/BaseResponseGenerationStatusList.md create mode 100644 docs/docs/BaseResponseGetAiDecompilationRatingResponse.md create mode 100644 docs/docs/BaseResponseGetAiDecompilationTask.md create mode 100644 docs/docs/BaseResponseGetPublicUserResponse.md create mode 100644 docs/docs/BaseResponseGetUserResponse.md create mode 100644 docs/docs/BaseResponseListCollectionResults.md create mode 100644 docs/docs/BaseResponseListCommentResponse.md create mode 100644 docs/docs/BaseResponseListDieMatch.md create mode 100644 docs/docs/BaseResponseListFunctionBoxPlotConfidence.md create mode 100644 docs/docs/BaseResponseListFunctionNameHistory.md create mode 100644 docs/docs/BaseResponseListSBOM.md create mode 100644 docs/docs/BaseResponseListSimilarFunctionsResponse.md create mode 100644 docs/docs/BaseResponseListTagOriginBoxPlotConfidence.md create mode 100644 docs/docs/BaseResponseListUserActivityResponse.md create mode 100644 docs/docs/BaseResponseLoginResponse.md create mode 100644 docs/docs/BaseResponseLogs.md create mode 100644 docs/docs/BaseResponseModelsResponse.md create mode 100644 docs/docs/BaseResponseNearestNeighborAnalysis.md create mode 100644 docs/docs/BaseResponseNetworkOverviewResponse.md create mode 100644 docs/docs/BaseResponseParams.md create mode 100644 docs/docs/BaseResponseProcessDumps.md create mode 100644 docs/docs/BaseResponseProcessRegistry.md create mode 100644 docs/docs/BaseResponseProcessTree.md create mode 100644 docs/docs/BaseResponseQueuedSecurityChecksTaskResponse.md create mode 100644 docs/docs/BaseResponseRecent.md create mode 100644 docs/docs/BaseResponseSecurityChecksResponse.md create mode 100644 docs/docs/BaseResponseStatus.md create mode 100644 docs/docs/BaseResponseStr.md create mode 100644 docs/docs/BaseResponseSymbolsInfo.md create mode 100644 docs/docs/BaseResponseTTPS.md create mode 100644 docs/docs/BaseResponseTagSearchResponse.md create mode 100644 docs/docs/BaseResponseTaskResponse.md create mode 100644 docs/docs/BaseResponseUploadResponse.md create mode 100644 docs/docs/BaseResponseVulnerabilities.md create mode 100644 docs/docs/Basic.md create mode 100644 docs/docs/BinariesApi.md create mode 100644 docs/docs/BinaryAdditionalDetailsDataResponse.md create mode 100644 docs/docs/BinaryAdditionalResponse.md create mode 100644 docs/docs/BinaryAnnForm.md create mode 100644 docs/docs/BinaryAnnListResponse.md create mode 100644 docs/docs/BinaryConfig.md create mode 100644 docs/docs/BinaryDetailsResponse.md create mode 100644 docs/docs/BinaryExternalsResponse.md create mode 100644 docs/docs/BinarySearchResponse.md create mode 100644 docs/docs/BinarySearchResult.md create mode 100644 docs/docs/BinaryTaskStatus.md create mode 100644 docs/docs/Block.md create mode 100644 docs/docs/BlockCommentsGenerationForFunctionResponse.md create mode 100644 docs/docs/Boundary.md create mode 100644 docs/docs/BoxPlotConfidence.md create mode 100644 docs/docs/CalleeFunctionInfo.md create mode 100644 docs/docs/CalleesCallerFunctionsResponse.md create mode 100644 docs/docs/CallerFunctionInfo.md create mode 100644 docs/docs/Capabilities.md create mode 100644 docs/docs/Capability.md create mode 100644 docs/docs/CheckSecurityChecksTaskResponse.md create mode 100644 docs/docs/ChildBinariesResponse.md create mode 100644 docs/docs/CodeSignatureModel.md create mode 100644 docs/docs/CollectionBinariesUpdateRequest.md create mode 100644 docs/docs/CollectionBinariesUpdateResponse.md create mode 100644 docs/docs/CollectionBinaryResponse.md create mode 100644 docs/docs/CollectionCreateRequest.md create mode 100644 docs/docs/CollectionListItem.md create mode 100644 docs/docs/CollectionResponse.md create mode 100644 docs/docs/CollectionResponseBinariesInner.md create mode 100644 docs/docs/CollectionScope.md create mode 100644 docs/docs/CollectionSearchResponse.md create mode 100644 docs/docs/CollectionSearchResult.md create mode 100644 docs/docs/CollectionTagsUpdateRequest.md create mode 100644 docs/docs/CollectionTagsUpdateResponse.md create mode 100644 docs/docs/CollectionUpdateRequest.md create mode 100644 docs/docs/CollectionsApi.md create mode 100644 docs/docs/CommentBase.md create mode 100644 docs/docs/CommentResponse.md create mode 100644 docs/docs/CommentUpdateRequest.md create mode 100644 docs/docs/Communities.md create mode 100644 docs/docs/CommunityMatchPercentages.md create mode 100644 docs/docs/ConfidenceApi.md create mode 100644 docs/docs/ConfidenceType.md create mode 100644 docs/docs/Context.md create mode 100644 docs/docs/Created.md create mode 100644 docs/docs/DecompilationCommentContext.md create mode 100644 docs/docs/DecompilationResponse.md create mode 100644 docs/docs/DieMatch.md create mode 100644 docs/docs/DynamicExecutionStatusInput.md create mode 100644 docs/docs/ELFImportModel.md create mode 100644 docs/docs/ELFModel.md create mode 100644 docs/docs/ELFRelocation.md create mode 100644 docs/docs/ELFSection.md create mode 100644 docs/docs/ELFSecurity.md create mode 100644 docs/docs/ELFSegment.md create mode 100644 docs/docs/ELFSymbol.md create mode 100644 docs/docs/ElfDynamicEntry.md create mode 100644 docs/docs/EntrypointModel.md create mode 100644 docs/docs/Enumeration.md create mode 100644 docs/docs/ErrorModel.md create mode 100644 docs/docs/ExportModel.md create mode 100644 docs/docs/ExportedBinaryAnnResult.md create mode 100644 docs/docs/ExternalResponse.md create mode 100644 docs/docs/ExternalSourcesApi.md create mode 100644 docs/docs/FileFormat.md create mode 100644 docs/docs/FileHashes.md create mode 100644 docs/docs/FileMetadata.md create mode 100644 docs/docs/Filters.md create mode 100644 docs/docs/FirmwareApi.md create mode 100644 docs/docs/FunctionAnalysisThreatScoreData.md create mode 100644 docs/docs/FunctionBlockDestinationResponse.md create mode 100644 docs/docs/FunctionBlockResponse.md create mode 100644 docs/docs/FunctionBlocksResponse.md create mode 100644 docs/docs/FunctionBoundary.md create mode 100644 docs/docs/FunctionBoxPlotConfidence.md create mode 100644 docs/docs/FunctionCapabilityResponse.md create mode 100644 docs/docs/FunctionCommentCreateRequest.md create mode 100644 docs/docs/FunctionDataTypes.md create mode 100644 docs/docs/FunctionDataTypesList.md create mode 100644 docs/docs/FunctionDataTypesListItem.md create mode 100644 docs/docs/FunctionDataTypesParams.md create mode 100644 docs/docs/FunctionDataTypesStatus.md create mode 100644 docs/docs/FunctionHeader.md create mode 100644 docs/docs/FunctionInfoInput.md create mode 100644 docs/docs/FunctionInfoInputFuncDepsInner.md create mode 100644 docs/docs/FunctionInfoOutput.md create mode 100644 docs/docs/FunctionLocalVariableResponse.md create mode 100644 docs/docs/FunctionMappingFull.md create mode 100644 docs/docs/FunctionNameConfidenceBody.md create mode 100644 docs/docs/FunctionNameHistory.md create mode 100644 docs/docs/FunctionNameInput.md create mode 100644 docs/docs/FunctionParamResponse.md create mode 100644 docs/docs/FunctionRename.md create mode 100644 docs/docs/FunctionRenameMap.md create mode 100644 docs/docs/FunctionSearchResponse.md create mode 100644 docs/docs/FunctionSearchResult.md create mode 100644 docs/docs/FunctionString.md create mode 100644 docs/docs/FunctionStringsResponse.md create mode 100644 docs/docs/FunctionTaskResponse.md create mode 100644 docs/docs/FunctionTaskStatus.md create mode 100644 docs/docs/FunctionThreatScore.md create mode 100644 docs/docs/FunctionTypeInput.md create mode 100644 docs/docs/FunctionTypeOutput.md create mode 100644 docs/docs/FunctionsAIDecompilationApi.md create mode 100644 docs/docs/FunctionsBlockCommentsApi.md create mode 100644 docs/docs/FunctionsCoreApi.md create mode 100644 docs/docs/FunctionsDataTypesApi.md create mode 100644 docs/docs/FunctionsDecompilationApi.md create mode 100644 docs/docs/FunctionsDetailResponse.md create mode 100644 docs/docs/FunctionsListRename.md create mode 100644 docs/docs/FunctionsRenamingHistoryApi.md create mode 100644 docs/docs/FunctionsThreatScoreApi.md create mode 100644 docs/docs/GenerateFunctionDataTypes.md create mode 100644 docs/docs/GenerationStatusList.md create mode 100644 docs/docs/GetAiDecompilationRatingResponse.md create mode 100644 docs/docs/GetAiDecompilationTask.md create mode 100644 docs/docs/GetPublicUserResponse.md create mode 100644 docs/docs/GetUserResponse.md create mode 100644 docs/docs/GlobalVariable.md create mode 100644 docs/docs/ISA.md create mode 100644 docs/docs/IconModel.md create mode 100644 docs/docs/ImportModel.md create mode 100644 docs/docs/InverseFunctionMapItem.md create mode 100644 docs/docs/InverseStringMapItem.md create mode 100644 docs/docs/InverseValue.md create mode 100644 docs/docs/ListCollectionResults.md create mode 100644 docs/docs/LoginRequest.md create mode 100644 docs/docs/LoginResponse.md create mode 100644 docs/docs/Logs.md create mode 100644 docs/docs/MatchedFunctionGroup.md create mode 100644 docs/docs/MatchedFunctionSuggestion.md create mode 100644 docs/docs/MetaModel.md create mode 100644 docs/docs/ModelName.md create mode 100644 docs/docs/ModelsApi.md create mode 100644 docs/docs/ModelsResponse.md create mode 100644 docs/docs/NearestNeighbor.md create mode 100644 docs/docs/NetworkOverviewDns.md create mode 100644 docs/docs/NetworkOverviewDnsAnswer.md create mode 100644 docs/docs/NetworkOverviewMetadata.md create mode 100644 docs/docs/NetworkOverviewResponse.md create mode 100644 docs/docs/Order.md create mode 100644 docs/docs/Origin.md create mode 100644 docs/docs/PDBDebugModel.md create mode 100644 docs/docs/PEModel.md create mode 100644 docs/docs/PaginationModel.md create mode 100644 docs/docs/Params.md create mode 100644 docs/docs/Platform.md create mode 100644 docs/docs/Process.md create mode 100644 docs/docs/ProcessDump.md create mode 100644 docs/docs/ProcessDumpMetadata.md create mode 100644 docs/docs/ProcessDumps.md create mode 100644 docs/docs/ProcessDumpsData.md create mode 100644 docs/docs/ProcessRegistry.md create mode 100644 docs/docs/ProcessTree.md create mode 100644 docs/docs/QueuedSecurityChecksTaskResponse.md create mode 100644 docs/docs/ReAnalysisForm.md create mode 100644 docs/docs/Recent.md create mode 100644 docs/docs/Registry.md create mode 100644 docs/docs/RelativeBinaryResponse.md create mode 100644 docs/docs/SBOM.md create mode 100644 docs/docs/SBOMPackage.md create mode 100644 docs/docs/SandboxOptions.md create mode 100644 docs/docs/ScrapeThirdPartyConfig.md create mode 100644 docs/docs/SearchApi.md create mode 100644 docs/docs/SearchBinaryIds.md create mode 100644 docs/docs/SearchFunctionIds.md create mode 100644 docs/docs/SectionModel.md create mode 100644 docs/docs/SecurityChecksResponse.md create mode 100644 docs/docs/SecurityChecksResult.md create mode 100644 docs/docs/SecurityModel.md create mode 100644 docs/docs/SeverityType.md create mode 100644 docs/docs/SimilarFunctionsResponse.md create mode 100644 docs/docs/SingleCodeCertificateModel.md create mode 100644 docs/docs/SingleCodeSignatureModel.md create mode 100644 docs/docs/SinglePDBEntryModel.md create mode 100644 docs/docs/SingleSectionModel.md create mode 100644 docs/docs/StackVariable.md create mode 100644 docs/docs/StatusInput.md create mode 100644 docs/docs/StatusOutput.md create mode 100644 docs/docs/StringFunctions.md create mode 100644 docs/docs/Structure.md create mode 100644 docs/docs/StructureMember.md create mode 100644 docs/docs/Symbols.md create mode 100644 docs/docs/SymbolsInfo.md create mode 100644 docs/docs/TTPS.md create mode 100644 docs/docs/TTPSAttack.md create mode 100644 docs/docs/TTPSData.md create mode 100644 docs/docs/TTPSElement.md create mode 100644 docs/docs/TTPSOccurance.md create mode 100644 docs/docs/Tag.md create mode 100644 docs/docs/TagConfidenceBody.md create mode 100644 docs/docs/TagOriginBoxPlotConfidence.md create mode 100644 docs/docs/TagResponse.md create mode 100644 docs/docs/TagSearchResponse.md create mode 100644 docs/docs/TagSearchResult.md create mode 100644 docs/docs/Tags.md create mode 100644 docs/docs/TaskResponse.md create mode 100644 docs/docs/TaskStatus.md create mode 100644 docs/docs/ThreatScoreFunctionBody.md create mode 100644 docs/docs/TimestampModel.md create mode 100644 docs/docs/TypeDefinition.md create mode 100644 docs/docs/UnstripRequest.md create mode 100644 docs/docs/UpdateFunctionDataTypes.md create mode 100644 docs/docs/UploadFileType.md create mode 100644 docs/docs/UploadResponse.md create mode 100644 docs/docs/UpsertAiDecomplationRatingRequest.md create mode 100644 docs/docs/UserActivityResponse.md create mode 100644 docs/docs/Vulnerabilities.md create mode 100644 docs/docs/Vulnerability.md create mode 100644 docs/docs/VulnerabilityType.md create mode 100644 docs/docs/Workspace.md create mode 100644 python-client/.github/workflows/python.yml create mode 100644 python-client/.gitignore create mode 100644 python-client/.gitlab-ci.yml create mode 100644 python-client/.openapi-generator-ignore create mode 100644 python-client/.travis.yml create mode 100644 python-client/git_push.sh create mode 100644 python-client/pyproject.toml create mode 100644 python-client/requirements.txt create mode 100644 python-client/setup.cfg create mode 100644 python-client/setup.py create mode 100644 python-client/test-requirements.txt create mode 100644 python-client/tox.ini create mode 100644 revengai/revengai/__init__.py create mode 100644 revengai/revengai/api/__init__.py create mode 100644 revengai/revengai/api/analyses_comments_api.py create mode 100644 revengai/revengai/api/analyses_core_api.py create mode 100644 revengai/revengai/api/analyses_dynamic_execution_api.py create mode 100644 revengai/revengai/api/analyses_results_metadata_api.py create mode 100644 revengai/revengai/api/analyses_security_checks_api.py create mode 100644 revengai/revengai/api/authentication_users_api.py create mode 100644 revengai/revengai/api/binaries_api.py create mode 100644 revengai/revengai/api/collections_api.py create mode 100644 revengai/revengai/api/confidence_api.py create mode 100644 revengai/revengai/api/external_sources_api.py create mode 100644 revengai/revengai/api/firmware_api.py create mode 100644 revengai/revengai/api/functions_ai_decompilation_api.py create mode 100644 revengai/revengai/api/functions_block_comments_api.py create mode 100644 revengai/revengai/api/functions_core_api.py create mode 100644 revengai/revengai/api/functions_data_types_api.py create mode 100644 revengai/revengai/api/functions_decompilation_api.py create mode 100644 revengai/revengai/api/functions_renaming_history_api.py create mode 100644 revengai/revengai/api/functions_threat_score_api.py create mode 100644 revengai/revengai/api/models_api.py create mode 100644 revengai/revengai/api/search_api.py create mode 100644 revengai/revengai/api_client.py create mode 100644 revengai/revengai/api_response.py create mode 100644 revengai/revengai/configuration.py create mode 100644 revengai/revengai/exceptions.py create mode 100644 revengai/revengai/models/__init__.py create mode 100644 revengai/revengai/models/addr.py create mode 100644 revengai/revengai/models/ai_decompilation_rating.py create mode 100644 revengai/revengai/models/ai_unstrip_request.py create mode 100644 revengai/revengai/models/analysis_access_info.py create mode 100644 revengai/revengai/models/analysis_config.py create mode 100644 revengai/revengai/models/analysis_create_request.py create mode 100644 revengai/revengai/models/analysis_create_response.py create mode 100644 revengai/revengai/models/analysis_detail_response.py create mode 100644 revengai/revengai/models/analysis_functions.py create mode 100644 revengai/revengai/models/analysis_record.py create mode 100644 revengai/revengai/models/analysis_scope.py create mode 100644 revengai/revengai/models/analysis_strings_response.py create mode 100644 revengai/revengai/models/analysis_tags.py create mode 100644 revengai/revengai/models/analysis_threat_score_data.py create mode 100644 revengai/revengai/models/analysis_update_request.py create mode 100644 revengai/revengai/models/analysis_update_tags_request.py create mode 100644 revengai/revengai/models/analysis_update_tags_response.py create mode 100644 revengai/revengai/models/ann_function.py create mode 100644 revengai/revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py create mode 100644 revengai/revengai/models/app_api_rest_v2_analyses_enums_order_by.py create mode 100644 revengai/revengai/models/app_api_rest_v2_analyses_responses_tag_item.py create mode 100644 revengai/revengai/models/app_api_rest_v2_collections_enums_order_by.py create mode 100644 revengai/revengai/models/app_api_rest_v2_functions_responses_function.py create mode 100644 revengai/revengai/models/app_api_rest_v2_functions_types_function.py create mode 100644 revengai/revengai/models/app_services_binary_ann_schema_tag_item.py create mode 100644 revengai/revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py create mode 100644 revengai/revengai/models/argument.py create mode 100644 revengai/revengai/models/auto_unstrip_by_group_response.py create mode 100644 revengai/revengai/models/auto_unstrip_request.py create mode 100644 revengai/revengai/models/auto_unstrip_response.py create mode 100644 revengai/revengai/models/base_response.py create mode 100644 revengai/revengai/models/base_response_analysis_create_response.py create mode 100644 revengai/revengai/models/base_response_analysis_detail_response.py create mode 100644 revengai/revengai/models/base_response_analysis_functions.py create mode 100644 revengai/revengai/models/base_response_analysis_strings_response.py create mode 100644 revengai/revengai/models/base_response_analysis_tags.py create mode 100644 revengai/revengai/models/base_response_analysis_threat_score_data.py create mode 100644 revengai/revengai/models/base_response_analysis_update_tags_response.py create mode 100644 revengai/revengai/models/base_response_basic.py create mode 100644 revengai/revengai/models/base_response_binary_additional_response.py create mode 100644 revengai/revengai/models/base_response_binary_ann_list_response.py create mode 100644 revengai/revengai/models/base_response_binary_details_response.py create mode 100644 revengai/revengai/models/base_response_binary_externals_response.py create mode 100644 revengai/revengai/models/base_response_binary_search_response.py create mode 100644 revengai/revengai/models/base_response_block_comments_generation_for_function_response.py create mode 100644 revengai/revengai/models/base_response_block_comments_overview_generation_response.py create mode 100644 revengai/revengai/models/base_response_bool.py create mode 100644 revengai/revengai/models/base_response_box_plot_confidence.py create mode 100644 revengai/revengai/models/base_response_callees_caller_functions_response.py create mode 100644 revengai/revengai/models/base_response_capabilities.py create mode 100644 revengai/revengai/models/base_response_check_security_checks_task_response.py create mode 100644 revengai/revengai/models/base_response_child_binaries_response.py create mode 100644 revengai/revengai/models/base_response_collection_binaries_update_response.py create mode 100644 revengai/revengai/models/base_response_collection_response.py create mode 100644 revengai/revengai/models/base_response_collection_search_response.py create mode 100644 revengai/revengai/models/base_response_collection_tags_update_response.py create mode 100644 revengai/revengai/models/base_response_comment_response.py create mode 100644 revengai/revengai/models/base_response_communities.py create mode 100644 revengai/revengai/models/base_response_created.py create mode 100644 revengai/revengai/models/base_response_decompilation_response.py create mode 100644 revengai/revengai/models/base_response_dict.py create mode 100644 revengai/revengai/models/base_response_dynamic_execution_status.py create mode 100644 revengai/revengai/models/base_response_external_response.py create mode 100644 revengai/revengai/models/base_response_function_analysis_threat_score_data.py create mode 100644 revengai/revengai/models/base_response_function_blocks_response.py create mode 100644 revengai/revengai/models/base_response_function_capability_response.py create mode 100644 revengai/revengai/models/base_response_function_data_types.py create mode 100644 revengai/revengai/models/base_response_function_data_types_list.py create mode 100644 revengai/revengai/models/base_response_function_search_response.py create mode 100644 revengai/revengai/models/base_response_function_strings_response.py create mode 100644 revengai/revengai/models/base_response_function_task_response.py create mode 100644 revengai/revengai/models/base_response_function_threat_score.py create mode 100644 revengai/revengai/models/base_response_functions_detail_response.py create mode 100644 revengai/revengai/models/base_response_generate_function_data_types.py create mode 100644 revengai/revengai/models/base_response_generation_status_list.py create mode 100644 revengai/revengai/models/base_response_get_ai_decompilation_rating_response.py create mode 100644 revengai/revengai/models/base_response_get_ai_decompilation_task.py create mode 100644 revengai/revengai/models/base_response_get_public_user_response.py create mode 100644 revengai/revengai/models/base_response_get_user_response.py create mode 100644 revengai/revengai/models/base_response_list_collection_results.py create mode 100644 revengai/revengai/models/base_response_list_comment_response.py create mode 100644 revengai/revengai/models/base_response_list_die_match.py create mode 100644 revengai/revengai/models/base_response_list_function_box_plot_confidence.py create mode 100644 revengai/revengai/models/base_response_list_function_name_history.py create mode 100644 revengai/revengai/models/base_response_list_sbom.py create mode 100644 revengai/revengai/models/base_response_list_similar_functions_response.py create mode 100644 revengai/revengai/models/base_response_list_tag_origin_box_plot_confidence.py create mode 100644 revengai/revengai/models/base_response_list_user_activity_response.py create mode 100644 revengai/revengai/models/base_response_login_response.py create mode 100644 revengai/revengai/models/base_response_logs.py create mode 100644 revengai/revengai/models/base_response_models_response.py create mode 100644 revengai/revengai/models/base_response_nearest_neighbor_analysis.py create mode 100644 revengai/revengai/models/base_response_network_overview_response.py create mode 100644 revengai/revengai/models/base_response_params.py create mode 100644 revengai/revengai/models/base_response_process_dumps.py create mode 100644 revengai/revengai/models/base_response_process_registry.py create mode 100644 revengai/revengai/models/base_response_process_tree.py create mode 100644 revengai/revengai/models/base_response_queued_security_checks_task_response.py create mode 100644 revengai/revengai/models/base_response_recent.py create mode 100644 revengai/revengai/models/base_response_security_checks_response.py create mode 100644 revengai/revengai/models/base_response_status.py create mode 100644 revengai/revengai/models/base_response_str.py create mode 100644 revengai/revengai/models/base_response_symbols_info.py create mode 100644 revengai/revengai/models/base_response_tag_search_response.py create mode 100644 revengai/revengai/models/base_response_task_response.py create mode 100644 revengai/revengai/models/base_response_ttps.py create mode 100644 revengai/revengai/models/base_response_upload_response.py create mode 100644 revengai/revengai/models/base_response_vulnerabilities.py create mode 100644 revengai/revengai/models/basic.py create mode 100644 revengai/revengai/models/binary_additional_details_data_response.py create mode 100644 revengai/revengai/models/binary_additional_response.py create mode 100644 revengai/revengai/models/binary_ann_form.py create mode 100644 revengai/revengai/models/binary_ann_list_response.py create mode 100644 revengai/revengai/models/binary_config.py create mode 100644 revengai/revengai/models/binary_details_response.py create mode 100644 revengai/revengai/models/binary_externals_response.py create mode 100644 revengai/revengai/models/binary_search_response.py create mode 100644 revengai/revengai/models/binary_search_result.py create mode 100644 revengai/revengai/models/binary_task_status.py create mode 100644 revengai/revengai/models/block.py create mode 100644 revengai/revengai/models/block_comments_generation_for_function_response.py create mode 100644 revengai/revengai/models/boundary.py create mode 100644 revengai/revengai/models/box_plot_confidence.py create mode 100644 revengai/revengai/models/callee_function_info.py create mode 100644 revengai/revengai/models/callees_caller_functions_response.py create mode 100644 revengai/revengai/models/caller_function_info.py create mode 100644 revengai/revengai/models/capabilities.py create mode 100644 revengai/revengai/models/capability.py create mode 100644 revengai/revengai/models/check_security_checks_task_response.py create mode 100644 revengai/revengai/models/child_binaries_response.py create mode 100644 revengai/revengai/models/code_signature_model.py create mode 100644 revengai/revengai/models/collection_binaries_update_request.py create mode 100644 revengai/revengai/models/collection_binaries_update_response.py create mode 100644 revengai/revengai/models/collection_binary_response.py create mode 100644 revengai/revengai/models/collection_create_request.py create mode 100644 revengai/revengai/models/collection_list_item.py create mode 100644 revengai/revengai/models/collection_response.py create mode 100644 revengai/revengai/models/collection_response_binaries_inner.py create mode 100644 revengai/revengai/models/collection_scope.py create mode 100644 revengai/revengai/models/collection_search_response.py create mode 100644 revengai/revengai/models/collection_search_result.py create mode 100644 revengai/revengai/models/collection_tags_update_request.py create mode 100644 revengai/revengai/models/collection_tags_update_response.py create mode 100644 revengai/revengai/models/collection_update_request.py create mode 100644 revengai/revengai/models/comment_base.py create mode 100644 revengai/revengai/models/comment_response.py create mode 100644 revengai/revengai/models/comment_update_request.py create mode 100644 revengai/revengai/models/communities.py create mode 100644 revengai/revengai/models/community_match_percentages.py create mode 100644 revengai/revengai/models/confidence_type.py create mode 100644 revengai/revengai/models/context.py create mode 100644 revengai/revengai/models/created.py create mode 100644 revengai/revengai/models/decompilation_comment_context.py create mode 100644 revengai/revengai/models/decompilation_response.py create mode 100644 revengai/revengai/models/die_match.py create mode 100644 revengai/revengai/models/dynamic_execution_status_input.py create mode 100644 revengai/revengai/models/elf_dynamic_entry.py create mode 100644 revengai/revengai/models/elf_import_model.py create mode 100644 revengai/revengai/models/elf_model.py create mode 100644 revengai/revengai/models/elf_relocation.py create mode 100644 revengai/revengai/models/elf_section.py create mode 100644 revengai/revengai/models/elf_security.py create mode 100644 revengai/revengai/models/elf_segment.py create mode 100644 revengai/revengai/models/elf_symbol.py create mode 100644 revengai/revengai/models/entrypoint_model.py create mode 100644 revengai/revengai/models/enumeration.py create mode 100644 revengai/revengai/models/error_model.py create mode 100644 revengai/revengai/models/export_model.py create mode 100644 revengai/revengai/models/exported_binary_ann_result.py create mode 100644 revengai/revengai/models/external_response.py create mode 100644 revengai/revengai/models/file_format.py create mode 100644 revengai/revengai/models/file_hashes.py create mode 100644 revengai/revengai/models/file_metadata.py create mode 100644 revengai/revengai/models/filters.py create mode 100644 revengai/revengai/models/function_analysis_threat_score_data.py create mode 100644 revengai/revengai/models/function_block_destination_response.py create mode 100644 revengai/revengai/models/function_block_response.py create mode 100644 revengai/revengai/models/function_blocks_response.py create mode 100644 revengai/revengai/models/function_boundary.py create mode 100644 revengai/revengai/models/function_box_plot_confidence.py create mode 100644 revengai/revengai/models/function_capability_response.py create mode 100644 revengai/revengai/models/function_comment_create_request.py create mode 100644 revengai/revengai/models/function_data_types.py create mode 100644 revengai/revengai/models/function_data_types_list.py create mode 100644 revengai/revengai/models/function_data_types_list_item.py create mode 100644 revengai/revengai/models/function_data_types_params.py create mode 100644 revengai/revengai/models/function_data_types_status.py create mode 100644 revengai/revengai/models/function_header.py create mode 100644 revengai/revengai/models/function_info_input.py create mode 100644 revengai/revengai/models/function_info_input_func_deps_inner.py create mode 100644 revengai/revengai/models/function_info_output.py create mode 100644 revengai/revengai/models/function_local_variable_response.py create mode 100644 revengai/revengai/models/function_mapping_full.py create mode 100644 revengai/revengai/models/function_name_confidence_body.py create mode 100644 revengai/revengai/models/function_name_history.py create mode 100644 revengai/revengai/models/function_name_input.py create mode 100644 revengai/revengai/models/function_param_response.py create mode 100644 revengai/revengai/models/function_rename.py create mode 100644 revengai/revengai/models/function_rename_map.py create mode 100644 revengai/revengai/models/function_search_response.py create mode 100644 revengai/revengai/models/function_search_result.py create mode 100644 revengai/revengai/models/function_string.py create mode 100644 revengai/revengai/models/function_strings_response.py create mode 100644 revengai/revengai/models/function_task_response.py create mode 100644 revengai/revengai/models/function_task_status.py create mode 100644 revengai/revengai/models/function_threat_score.py create mode 100644 revengai/revengai/models/function_type_input.py create mode 100644 revengai/revengai/models/function_type_output.py create mode 100644 revengai/revengai/models/functions_detail_response.py create mode 100644 revengai/revengai/models/functions_list_rename.py create mode 100644 revengai/revengai/models/generate_function_data_types.py create mode 100644 revengai/revengai/models/generation_status_list.py create mode 100644 revengai/revengai/models/get_ai_decompilation_rating_response.py create mode 100644 revengai/revengai/models/get_ai_decompilation_task.py create mode 100644 revengai/revengai/models/get_public_user_response.py create mode 100644 revengai/revengai/models/get_user_response.py create mode 100644 revengai/revengai/models/global_variable.py create mode 100644 revengai/revengai/models/icon_model.py create mode 100644 revengai/revengai/models/import_model.py create mode 100644 revengai/revengai/models/inverse_function_map_item.py create mode 100644 revengai/revengai/models/inverse_string_map_item.py create mode 100644 revengai/revengai/models/inverse_value.py create mode 100644 revengai/revengai/models/isa.py create mode 100644 revengai/revengai/models/list_collection_results.py create mode 100644 revengai/revengai/models/login_request.py create mode 100644 revengai/revengai/models/login_response.py create mode 100644 revengai/revengai/models/logs.py create mode 100644 revengai/revengai/models/matched_function_group.py create mode 100644 revengai/revengai/models/matched_function_suggestion.py create mode 100644 revengai/revengai/models/meta_model.py create mode 100644 revengai/revengai/models/model_name.py create mode 100644 revengai/revengai/models/models_response.py create mode 100644 revengai/revengai/models/nearest_neighbor.py create mode 100644 revengai/revengai/models/network_overview_dns.py create mode 100644 revengai/revengai/models/network_overview_dns_answer.py create mode 100644 revengai/revengai/models/network_overview_metadata.py create mode 100644 revengai/revengai/models/network_overview_response.py create mode 100644 revengai/revengai/models/order.py create mode 100644 revengai/revengai/models/origin.py create mode 100644 revengai/revengai/models/pagination_model.py create mode 100644 revengai/revengai/models/params.py create mode 100644 revengai/revengai/models/pdb_debug_model.py create mode 100644 revengai/revengai/models/pe_model.py create mode 100644 revengai/revengai/models/platform.py create mode 100644 revengai/revengai/models/process.py create mode 100644 revengai/revengai/models/process_dump.py create mode 100644 revengai/revengai/models/process_dump_metadata.py create mode 100644 revengai/revengai/models/process_dumps.py create mode 100644 revengai/revengai/models/process_dumps_data.py create mode 100644 revengai/revengai/models/process_registry.py create mode 100644 revengai/revengai/models/process_tree.py create mode 100644 revengai/revengai/models/queued_security_checks_task_response.py create mode 100644 revengai/revengai/models/re_analysis_form.py create mode 100644 revengai/revengai/models/recent.py create mode 100644 revengai/revengai/models/registry.py create mode 100644 revengai/revengai/models/relative_binary_response.py create mode 100644 revengai/revengai/models/sandbox_options.py create mode 100644 revengai/revengai/models/sbom.py create mode 100644 revengai/revengai/models/sbom_package.py create mode 100644 revengai/revengai/models/scrape_third_party_config.py create mode 100644 revengai/revengai/models/search_binary_ids.py create mode 100644 revengai/revengai/models/search_function_ids.py create mode 100644 revengai/revengai/models/section_model.py create mode 100644 revengai/revengai/models/security_checks_response.py create mode 100644 revengai/revengai/models/security_checks_result.py create mode 100644 revengai/revengai/models/security_model.py create mode 100644 revengai/revengai/models/severity_type.py create mode 100644 revengai/revengai/models/similar_functions_response.py create mode 100644 revengai/revengai/models/single_code_certificate_model.py create mode 100644 revengai/revengai/models/single_code_signature_model.py create mode 100644 revengai/revengai/models/single_pdb_entry_model.py create mode 100644 revengai/revengai/models/single_section_model.py create mode 100644 revengai/revengai/models/stack_variable.py create mode 100644 revengai/revengai/models/status_input.py create mode 100644 revengai/revengai/models/status_output.py create mode 100644 revengai/revengai/models/string_functions.py create mode 100644 revengai/revengai/models/structure.py create mode 100644 revengai/revengai/models/structure_member.py create mode 100644 revengai/revengai/models/symbols.py create mode 100644 revengai/revengai/models/symbols_info.py create mode 100644 revengai/revengai/models/tag.py create mode 100644 revengai/revengai/models/tag_confidence_body.py create mode 100644 revengai/revengai/models/tag_origin_box_plot_confidence.py create mode 100644 revengai/revengai/models/tag_response.py create mode 100644 revengai/revengai/models/tag_search_response.py create mode 100644 revengai/revengai/models/tag_search_result.py create mode 100644 revengai/revengai/models/tags.py create mode 100644 revengai/revengai/models/task_response.py create mode 100644 revengai/revengai/models/task_status.py create mode 100644 revengai/revengai/models/threat_score_function_body.py create mode 100644 revengai/revengai/models/timestamp_model.py create mode 100644 revengai/revengai/models/ttps.py create mode 100644 revengai/revengai/models/ttps_attack.py create mode 100644 revengai/revengai/models/ttps_data.py create mode 100644 revengai/revengai/models/ttps_element.py create mode 100644 revengai/revengai/models/ttps_occurance.py create mode 100644 revengai/revengai/models/type_definition.py create mode 100644 revengai/revengai/models/unstrip_request.py create mode 100644 revengai/revengai/models/update_function_data_types.py create mode 100644 revengai/revengai/models/upload_file_type.py create mode 100644 revengai/revengai/models/upload_response.py create mode 100644 revengai/revengai/models/upsert_ai_decomplation_rating_request.py create mode 100644 revengai/revengai/models/user_activity_response.py create mode 100644 revengai/revengai/models/vulnerabilities.py create mode 100644 revengai/revengai/models/vulnerability.py create mode 100644 revengai/revengai/models/vulnerability_type.py create mode 100644 revengai/revengai/models/workspace.py create mode 100644 revengai/revengai/py.typed create mode 100644 revengai/revengai/rest.py create mode 100644 test/test/__init__.py create mode 100644 test/test/test_addr.py create mode 100644 test/test/test_ai_decompilation_rating.py create mode 100644 test/test/test_ai_unstrip_request.py create mode 100644 test/test/test_analyses_comments_api.py create mode 100644 test/test/test_analyses_core_api.py create mode 100644 test/test/test_analyses_dynamic_execution_api.py create mode 100644 test/test/test_analyses_results_metadata_api.py create mode 100644 test/test/test_analyses_security_checks_api.py create mode 100644 test/test/test_analysis_access_info.py create mode 100644 test/test/test_analysis_config.py create mode 100644 test/test/test_analysis_create_request.py create mode 100644 test/test/test_analysis_create_response.py create mode 100644 test/test/test_analysis_detail_response.py create mode 100644 test/test/test_analysis_functions.py create mode 100644 test/test/test_analysis_record.py create mode 100644 test/test/test_analysis_scope.py create mode 100644 test/test/test_analysis_strings_response.py create mode 100644 test/test/test_analysis_tags.py create mode 100644 test/test/test_analysis_threat_score_data.py create mode 100644 test/test/test_analysis_update_request.py create mode 100644 test/test/test_analysis_update_tags_request.py create mode 100644 test/test/test_analysis_update_tags_response.py create mode 100644 test/test/test_ann_function.py create mode 100644 test/test/test_app_api_rest_v2_analyses_enums_dynamic_execution_status.py create mode 100644 test/test/test_app_api_rest_v2_analyses_enums_order_by.py create mode 100644 test/test/test_app_api_rest_v2_analyses_responses_tag_item.py create mode 100644 test/test/test_app_api_rest_v2_collections_enums_order_by.py create mode 100644 test/test/test_app_api_rest_v2_functions_responses_function.py create mode 100644 test/test/test_app_api_rest_v2_functions_types_function.py create mode 100644 test/test/test_app_services_binary_ann_schema_tag_item.py create mode 100644 test/test/test_app_services_dynamic_execution_schemas_dynamic_execution_status.py create mode 100644 test/test/test_argument.py create mode 100644 test/test/test_authentication_users_api.py create mode 100644 test/test/test_auto_unstrip_by_group_response.py create mode 100644 test/test/test_auto_unstrip_request.py create mode 100644 test/test/test_auto_unstrip_response.py create mode 100644 test/test/test_base_response.py create mode 100644 test/test/test_base_response_analysis_create_response.py create mode 100644 test/test/test_base_response_analysis_detail_response.py create mode 100644 test/test/test_base_response_analysis_functions.py create mode 100644 test/test/test_base_response_analysis_strings_response.py create mode 100644 test/test/test_base_response_analysis_tags.py create mode 100644 test/test/test_base_response_analysis_threat_score_data.py create mode 100644 test/test/test_base_response_analysis_update_tags_response.py create mode 100644 test/test/test_base_response_basic.py create mode 100644 test/test/test_base_response_binary_additional_response.py create mode 100644 test/test/test_base_response_binary_ann_list_response.py create mode 100644 test/test/test_base_response_binary_details_response.py create mode 100644 test/test/test_base_response_binary_externals_response.py create mode 100644 test/test/test_base_response_binary_search_response.py create mode 100644 test/test/test_base_response_block_comments_generation_for_function_response.py create mode 100644 test/test/test_base_response_block_comments_overview_generation_response.py create mode 100644 test/test/test_base_response_bool.py create mode 100644 test/test/test_base_response_box_plot_confidence.py create mode 100644 test/test/test_base_response_callees_caller_functions_response.py create mode 100644 test/test/test_base_response_capabilities.py create mode 100644 test/test/test_base_response_check_security_checks_task_response.py create mode 100644 test/test/test_base_response_child_binaries_response.py create mode 100644 test/test/test_base_response_collection_binaries_update_response.py create mode 100644 test/test/test_base_response_collection_response.py create mode 100644 test/test/test_base_response_collection_search_response.py create mode 100644 test/test/test_base_response_collection_tags_update_response.py create mode 100644 test/test/test_base_response_comment_response.py create mode 100644 test/test/test_base_response_communities.py create mode 100644 test/test/test_base_response_created.py create mode 100644 test/test/test_base_response_decompilation_response.py create mode 100644 test/test/test_base_response_dict.py create mode 100644 test/test/test_base_response_dynamic_execution_status.py create mode 100644 test/test/test_base_response_external_response.py create mode 100644 test/test/test_base_response_function_analysis_threat_score_data.py create mode 100644 test/test/test_base_response_function_blocks_response.py create mode 100644 test/test/test_base_response_function_capability_response.py create mode 100644 test/test/test_base_response_function_data_types.py create mode 100644 test/test/test_base_response_function_data_types_list.py create mode 100644 test/test/test_base_response_function_search_response.py create mode 100644 test/test/test_base_response_function_strings_response.py create mode 100644 test/test/test_base_response_function_task_response.py create mode 100644 test/test/test_base_response_function_threat_score.py create mode 100644 test/test/test_base_response_functions_detail_response.py create mode 100644 test/test/test_base_response_generate_function_data_types.py create mode 100644 test/test/test_base_response_generation_status_list.py create mode 100644 test/test/test_base_response_get_ai_decompilation_rating_response.py create mode 100644 test/test/test_base_response_get_ai_decompilation_task.py create mode 100644 test/test/test_base_response_get_public_user_response.py create mode 100644 test/test/test_base_response_get_user_response.py create mode 100644 test/test/test_base_response_list_collection_results.py create mode 100644 test/test/test_base_response_list_comment_response.py create mode 100644 test/test/test_base_response_list_die_match.py create mode 100644 test/test/test_base_response_list_function_box_plot_confidence.py create mode 100644 test/test/test_base_response_list_function_name_history.py create mode 100644 test/test/test_base_response_list_sbom.py create mode 100644 test/test/test_base_response_list_similar_functions_response.py create mode 100644 test/test/test_base_response_list_tag_origin_box_plot_confidence.py create mode 100644 test/test/test_base_response_list_user_activity_response.py create mode 100644 test/test/test_base_response_login_response.py create mode 100644 test/test/test_base_response_logs.py create mode 100644 test/test/test_base_response_models_response.py create mode 100644 test/test/test_base_response_nearest_neighbor_analysis.py create mode 100644 test/test/test_base_response_network_overview_response.py create mode 100644 test/test/test_base_response_params.py create mode 100644 test/test/test_base_response_process_dumps.py create mode 100644 test/test/test_base_response_process_registry.py create mode 100644 test/test/test_base_response_process_tree.py create mode 100644 test/test/test_base_response_queued_security_checks_task_response.py create mode 100644 test/test/test_base_response_recent.py create mode 100644 test/test/test_base_response_security_checks_response.py create mode 100644 test/test/test_base_response_status.py create mode 100644 test/test/test_base_response_str.py create mode 100644 test/test/test_base_response_symbols_info.py create mode 100644 test/test/test_base_response_tag_search_response.py create mode 100644 test/test/test_base_response_task_response.py create mode 100644 test/test/test_base_response_ttps.py create mode 100644 test/test/test_base_response_upload_response.py create mode 100644 test/test/test_base_response_vulnerabilities.py create mode 100644 test/test/test_basic.py create mode 100644 test/test/test_binaries_api.py create mode 100644 test/test/test_binary_additional_details_data_response.py create mode 100644 test/test/test_binary_additional_response.py create mode 100644 test/test/test_binary_ann_form.py create mode 100644 test/test/test_binary_ann_list_response.py create mode 100644 test/test/test_binary_config.py create mode 100644 test/test/test_binary_details_response.py create mode 100644 test/test/test_binary_externals_response.py create mode 100644 test/test/test_binary_search_response.py create mode 100644 test/test/test_binary_search_result.py create mode 100644 test/test/test_binary_task_status.py create mode 100644 test/test/test_block.py create mode 100644 test/test/test_block_comments_generation_for_function_response.py create mode 100644 test/test/test_boundary.py create mode 100644 test/test/test_box_plot_confidence.py create mode 100644 test/test/test_callee_function_info.py create mode 100644 test/test/test_callees_caller_functions_response.py create mode 100644 test/test/test_caller_function_info.py create mode 100644 test/test/test_capabilities.py create mode 100644 test/test/test_capability.py create mode 100644 test/test/test_check_security_checks_task_response.py create mode 100644 test/test/test_child_binaries_response.py create mode 100644 test/test/test_code_signature_model.py create mode 100644 test/test/test_collection_binaries_update_request.py create mode 100644 test/test/test_collection_binaries_update_response.py create mode 100644 test/test/test_collection_binary_response.py create mode 100644 test/test/test_collection_create_request.py create mode 100644 test/test/test_collection_list_item.py create mode 100644 test/test/test_collection_response.py create mode 100644 test/test/test_collection_response_binaries_inner.py create mode 100644 test/test/test_collection_scope.py create mode 100644 test/test/test_collection_search_response.py create mode 100644 test/test/test_collection_search_result.py create mode 100644 test/test/test_collection_tags_update_request.py create mode 100644 test/test/test_collection_tags_update_response.py create mode 100644 test/test/test_collection_update_request.py create mode 100644 test/test/test_collections_api.py create mode 100644 test/test/test_comment_base.py create mode 100644 test/test/test_comment_response.py create mode 100644 test/test/test_comment_update_request.py create mode 100644 test/test/test_communities.py create mode 100644 test/test/test_community_match_percentages.py create mode 100644 test/test/test_confidence_api.py create mode 100644 test/test/test_confidence_type.py create mode 100644 test/test/test_context.py create mode 100644 test/test/test_created.py create mode 100644 test/test/test_decompilation_comment_context.py create mode 100644 test/test/test_decompilation_response.py create mode 100644 test/test/test_die_match.py create mode 100644 test/test/test_dynamic_execution_status_input.py create mode 100644 test/test/test_elf_dynamic_entry.py create mode 100644 test/test/test_elf_import_model.py create mode 100644 test/test/test_elf_model.py create mode 100644 test/test/test_elf_relocation.py create mode 100644 test/test/test_elf_section.py create mode 100644 test/test/test_elf_security.py create mode 100644 test/test/test_elf_segment.py create mode 100644 test/test/test_elf_symbol.py create mode 100644 test/test/test_entrypoint_model.py create mode 100644 test/test/test_enumeration.py create mode 100644 test/test/test_error_model.py create mode 100644 test/test/test_export_model.py create mode 100644 test/test/test_exported_binary_ann_result.py create mode 100644 test/test/test_external_response.py create mode 100644 test/test/test_external_sources_api.py create mode 100644 test/test/test_file_format.py create mode 100644 test/test/test_file_hashes.py create mode 100644 test/test/test_file_metadata.py create mode 100644 test/test/test_filters.py create mode 100644 test/test/test_firmware_api.py create mode 100644 test/test/test_function_analysis_threat_score_data.py create mode 100644 test/test/test_function_block_destination_response.py create mode 100644 test/test/test_function_block_response.py create mode 100644 test/test/test_function_blocks_response.py create mode 100644 test/test/test_function_boundary.py create mode 100644 test/test/test_function_box_plot_confidence.py create mode 100644 test/test/test_function_capability_response.py create mode 100644 test/test/test_function_comment_create_request.py create mode 100644 test/test/test_function_data_types.py create mode 100644 test/test/test_function_data_types_list.py create mode 100644 test/test/test_function_data_types_list_item.py create mode 100644 test/test/test_function_data_types_params.py create mode 100644 test/test/test_function_data_types_status.py create mode 100644 test/test/test_function_header.py create mode 100644 test/test/test_function_info_input.py create mode 100644 test/test/test_function_info_input_func_deps_inner.py create mode 100644 test/test/test_function_info_output.py create mode 100644 test/test/test_function_local_variable_response.py create mode 100644 test/test/test_function_mapping_full.py create mode 100644 test/test/test_function_name_confidence_body.py create mode 100644 test/test/test_function_name_history.py create mode 100644 test/test/test_function_name_input.py create mode 100644 test/test/test_function_param_response.py create mode 100644 test/test/test_function_rename.py create mode 100644 test/test/test_function_rename_map.py create mode 100644 test/test/test_function_search_response.py create mode 100644 test/test/test_function_search_result.py create mode 100644 test/test/test_function_string.py create mode 100644 test/test/test_function_strings_response.py create mode 100644 test/test/test_function_task_response.py create mode 100644 test/test/test_function_task_status.py create mode 100644 test/test/test_function_threat_score.py create mode 100644 test/test/test_function_type_input.py create mode 100644 test/test/test_function_type_output.py create mode 100644 test/test/test_functions_ai_decompilation_api.py create mode 100644 test/test/test_functions_block_comments_api.py create mode 100644 test/test/test_functions_core_api.py create mode 100644 test/test/test_functions_data_types_api.py create mode 100644 test/test/test_functions_decompilation_api.py create mode 100644 test/test/test_functions_detail_response.py create mode 100644 test/test/test_functions_list_rename.py create mode 100644 test/test/test_functions_renaming_history_api.py create mode 100644 test/test/test_functions_threat_score_api.py create mode 100644 test/test/test_generate_function_data_types.py create mode 100644 test/test/test_generation_status_list.py create mode 100644 test/test/test_get_ai_decompilation_rating_response.py create mode 100644 test/test/test_get_ai_decompilation_task.py create mode 100644 test/test/test_get_public_user_response.py create mode 100644 test/test/test_get_user_response.py create mode 100644 test/test/test_global_variable.py create mode 100644 test/test/test_icon_model.py create mode 100644 test/test/test_import_model.py create mode 100644 test/test/test_inverse_function_map_item.py create mode 100644 test/test/test_inverse_string_map_item.py create mode 100644 test/test/test_inverse_value.py create mode 100644 test/test/test_isa.py create mode 100644 test/test/test_list_collection_results.py create mode 100644 test/test/test_login_request.py create mode 100644 test/test/test_login_response.py create mode 100644 test/test/test_logs.py create mode 100644 test/test/test_matched_function_group.py create mode 100644 test/test/test_matched_function_suggestion.py create mode 100644 test/test/test_meta_model.py create mode 100644 test/test/test_model_name.py create mode 100644 test/test/test_models_api.py create mode 100644 test/test/test_models_response.py create mode 100644 test/test/test_nearest_neighbor.py create mode 100644 test/test/test_network_overview_dns.py create mode 100644 test/test/test_network_overview_dns_answer.py create mode 100644 test/test/test_network_overview_metadata.py create mode 100644 test/test/test_network_overview_response.py create mode 100644 test/test/test_order.py create mode 100644 test/test/test_origin.py create mode 100644 test/test/test_pagination_model.py create mode 100644 test/test/test_params.py create mode 100644 test/test/test_pdb_debug_model.py create mode 100644 test/test/test_pe_model.py create mode 100644 test/test/test_platform.py create mode 100644 test/test/test_process.py create mode 100644 test/test/test_process_dump.py create mode 100644 test/test/test_process_dump_metadata.py create mode 100644 test/test/test_process_dumps.py create mode 100644 test/test/test_process_dumps_data.py create mode 100644 test/test/test_process_registry.py create mode 100644 test/test/test_process_tree.py create mode 100644 test/test/test_queued_security_checks_task_response.py create mode 100644 test/test/test_re_analysis_form.py create mode 100644 test/test/test_recent.py create mode 100644 test/test/test_registry.py create mode 100644 test/test/test_relative_binary_response.py create mode 100644 test/test/test_sandbox_options.py create mode 100644 test/test/test_sbom.py create mode 100644 test/test/test_sbom_package.py create mode 100644 test/test/test_scrape_third_party_config.py create mode 100644 test/test/test_search_api.py create mode 100644 test/test/test_search_binary_ids.py create mode 100644 test/test/test_search_function_ids.py create mode 100644 test/test/test_section_model.py create mode 100644 test/test/test_security_checks_response.py create mode 100644 test/test/test_security_checks_result.py create mode 100644 test/test/test_security_model.py create mode 100644 test/test/test_severity_type.py create mode 100644 test/test/test_similar_functions_response.py create mode 100644 test/test/test_single_code_certificate_model.py create mode 100644 test/test/test_single_code_signature_model.py create mode 100644 test/test/test_single_pdb_entry_model.py create mode 100644 test/test/test_single_section_model.py create mode 100644 test/test/test_stack_variable.py create mode 100644 test/test/test_status_input.py create mode 100644 test/test/test_status_output.py create mode 100644 test/test/test_string_functions.py create mode 100644 test/test/test_structure.py create mode 100644 test/test/test_structure_member.py create mode 100644 test/test/test_symbols.py create mode 100644 test/test/test_symbols_info.py create mode 100644 test/test/test_tag.py create mode 100644 test/test/test_tag_confidence_body.py create mode 100644 test/test/test_tag_origin_box_plot_confidence.py create mode 100644 test/test/test_tag_response.py create mode 100644 test/test/test_tag_search_response.py create mode 100644 test/test/test_tag_search_result.py create mode 100644 test/test/test_tags.py create mode 100644 test/test/test_task_response.py create mode 100644 test/test/test_task_status.py create mode 100644 test/test/test_threat_score_function_body.py create mode 100644 test/test/test_timestamp_model.py create mode 100644 test/test/test_ttps.py create mode 100644 test/test/test_ttps_attack.py create mode 100644 test/test/test_ttps_data.py create mode 100644 test/test/test_ttps_element.py create mode 100644 test/test/test_ttps_occurance.py create mode 100644 test/test/test_type_definition.py create mode 100644 test/test/test_unstrip_request.py create mode 100644 test/test/test_update_function_data_types.py create mode 100644 test/test/test_upload_file_type.py create mode 100644 test/test/test_upload_response.py create mode 100644 test/test/test_upsert_ai_decomplation_rating_request.py create mode 100644 test/test/test_user_activity_response.py create mode 100644 test/test/test_vulnerabilities.py create mode 100644 test/test/test_vulnerability.py create mode 100644 test/test/test_vulnerability_type.py create mode 100644 test/test/test_workspace.py diff --git a/README.md b/README.md index d6167cf..7301958 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**requeue_analysis**](docs/AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis *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 *AnalysesDynamicExecutionApi* | [**get_dynamic_execution_status**](docs/AnalysesDynamicExecutionApi.md#get_dynamic_execution_status) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/status | Get the status of a dynamic execution task *AnalysesDynamicExecutionApi* | [**get_network_overview**](docs/AnalysesDynamicExecutionApi.md#get_network_overview) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/network-overview | Get the dynamic execution results for network overview *AnalysesDynamicExecutionApi* | [**get_process_dump**](docs/AnalysesDynamicExecutionApi.md#get_process_dump) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/process-dumps/{dump_name} | Get the dynamic execution results for a specific process dump @@ -119,6 +120,10 @@ Class | Method | HTTP request | Description *FunctionsBlockCommentsApi* | [**generate_block_comments_for_block_in_function**](docs/FunctionsBlockCommentsApi.md#generate_block_comments_for_block_in_function) | **POST** /v2/functions/{function_id}/block-comments/single | Generate block comments for a specific block in a function *FunctionsBlockCommentsApi* | [**generate_block_comments_for_function**](docs/FunctionsBlockCommentsApi.md#generate_block_comments_for_function) | **POST** /v2/functions/{function_id}/block-comments | Generate block comments for a function *FunctionsBlockCommentsApi* | [**generate_overview_comment_for_function**](docs/FunctionsBlockCommentsApi.md#generate_overview_comment_for_function) | **POST** /v2/functions/{function_id}/block-comments/overview | Generate overview comment for a function +*FunctionsCoreApi* | [**ai_unstrip**](docs/FunctionsCoreApi.md#ai_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/ai-unstrip | Performs matching and auto-unstrip for an analysis and its functions +*FunctionsCoreApi* | [**auto_unstrip**](docs/FunctionsCoreApi.md#auto_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/auto-unstrip | Performs matching and auto-unstrip for an analysis and its functions +*FunctionsCoreApi* | [**cancel_ai_unstrip**](docs/FunctionsCoreApi.md#cancel_ai_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel | Cancels a running ai-unstrip +*FunctionsCoreApi* | [**cancel_auto_unstrip**](docs/FunctionsCoreApi.md#cancel_auto_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/unstrip/cancel | Cancels a running auto-unstrip *FunctionsCoreApi* | [**get_analysis_strings**](docs/FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis *FunctionsCoreApi* | [**get_function_blocks**](docs/FunctionsCoreApi.md#get_function_blocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function *FunctionsCoreApi* | [**get_function_callees_callers**](docs/FunctionsCoreApi.md#get_function_callees_callers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function @@ -126,6 +131,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**get_function_details**](docs/FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**get_function_strings**](docs/FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function *FunctionsCoreApi* | [**get_similar_functions**](docs/FunctionsCoreApi.md#get_similar_functions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions +*FunctionsCoreApi* | [**unstrip**](docs/FunctionsCoreApi.md#unstrip) | **POST** /v2/analyses/{analysis_id}/functions/unstrip | Performs matching and auto-unstrip for an analysis and its functions *FunctionsDataTypesApi* | [**generate_function_data_types_for_analysis**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_analysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesApi* | [**generate_function_data_types_for_functions**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_functions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions *FunctionsDataTypesApi* | [**get_function_data_types**](docs/FunctionsDataTypesApi.md#get_function_data_types) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types @@ -157,6 +163,7 @@ Class | Method | HTTP request | Description - [ANNFunction](docs/ANNFunction.md) - [Addr](docs/Addr.md) - [AiDecompilationRating](docs/AiDecompilationRating.md) + - [AiUnstripRequest](docs/AiUnstripRequest.md) - [AnalysisAccessInfo](docs/AnalysisAccessInfo.md) - [AnalysisConfig](docs/AnalysisConfig.md) - [AnalysisCreateRequest](docs/AnalysisCreateRequest.md) @@ -166,28 +173,29 @@ Class | Method | HTTP request | Description - [AnalysisRecord](docs/AnalysisRecord.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) + - [AnalysisTags](docs/AnalysisTags.md) - [AnalysisThreatScoreData](docs/AnalysisThreatScoreData.md) - [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md) - [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md) - [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md) - [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - - [AppApiRestV2AnalysesResponsesAnalysisTags](docs/AppApiRestV2AnalysesResponsesAnalysisTags.md) - [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - - [AppApiRestV2InfoResponsesAnalysisTags](docs/AppApiRestV2InfoResponsesAnalysisTags.md) - - [AppCoreResponsesBaseBaseResponseAnalysisTags1](docs/AppCoreResponsesBaseBaseResponseAnalysisTags1.md) - - [AppCoreResponsesBaseBaseResponseAnalysisTags2](docs/AppCoreResponsesBaseBaseResponseAnalysisTags2.md) - [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md) - [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md) - [Argument](docs/Argument.md) + - [AutoUnstripByGroupResponse](docs/AutoUnstripByGroupResponse.md) + - [AutoUnstripRequest](docs/AutoUnstripRequest.md) + - [AutoUnstripResponse](docs/AutoUnstripResponse.md) - [BaseResponse](docs/BaseResponse.md) - [BaseResponseAnalysisCreateResponse](docs/BaseResponseAnalysisCreateResponse.md) - [BaseResponseAnalysisDetailResponse](docs/BaseResponseAnalysisDetailResponse.md) - [BaseResponseAnalysisFunctions](docs/BaseResponseAnalysisFunctions.md) - [BaseResponseAnalysisStringsResponse](docs/BaseResponseAnalysisStringsResponse.md) + - [BaseResponseAnalysisTags](docs/BaseResponseAnalysisTags.md) - [BaseResponseAnalysisThreatScoreData](docs/BaseResponseAnalysisThreatScoreData.md) - [BaseResponseAnalysisUpdateTagsResponse](docs/BaseResponseAnalysisUpdateTagsResponse.md) - [BaseResponseBasic](docs/BaseResponseBasic.md) @@ -258,6 +266,7 @@ Class | Method | HTTP request | Description - [BaseResponseTTPS](docs/BaseResponseTTPS.md) - [BaseResponseTagSearchResponse](docs/BaseResponseTagSearchResponse.md) - [BaseResponseTaskResponse](docs/BaseResponseTaskResponse.md) + - [BaseResponseUploadResponse](docs/BaseResponseUploadResponse.md) - [BaseResponseVulnerabilities](docs/BaseResponseVulnerabilities.md) - [Basic](docs/Basic.md) - [BinaryAdditionalDetailsDataResponse](docs/BinaryAdditionalDetailsDataResponse.md) @@ -378,6 +387,8 @@ Class | Method | HTTP request | Description - [LoginRequest](docs/LoginRequest.md) - [LoginResponse](docs/LoginResponse.md) - [Logs](docs/Logs.md) + - [MatchedFunctionGroup](docs/MatchedFunctionGroup.md) + - [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md) - [MetaModel](docs/MetaModel.md) - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) @@ -434,10 +445,9 @@ Class | Method | HTTP request | Description - [TTPSData](docs/TTPSData.md) - [TTPSElement](docs/TTPSElement.md) - [TTPSOccurance](docs/TTPSOccurance.md) + - [Tag](docs/Tag.md) - [TagConfidenceBody](docs/TagConfidenceBody.md) - - [TagInput](docs/TagInput.md) - [TagOriginBoxPlotConfidence](docs/TagOriginBoxPlotConfidence.md) - - [TagOutput](docs/TagOutput.md) - [TagResponse](docs/TagResponse.md) - [TagSearchResponse](docs/TagSearchResponse.md) - [TagSearchResult](docs/TagSearchResult.md) @@ -447,7 +457,10 @@ Class | Method | HTTP request | Description - [ThreatScoreFunctionBody](docs/ThreatScoreFunctionBody.md) - [TimestampModel](docs/TimestampModel.md) - [TypeDefinition](docs/TypeDefinition.md) + - [UnstripRequest](docs/UnstripRequest.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) + - [UploadFileType](docs/UploadFileType.md) + - [UploadResponse](docs/UploadResponse.md) - [UpsertAiDecomplationRatingRequest](docs/UpsertAiDecomplationRatingRequest.md) - [UserActivityResponse](docs/UserActivityResponse.md) - [Vulnerabilities](docs/Vulnerabilities.md) diff --git a/docs/docs/ANNFunction.md b/docs/docs/ANNFunction.md new file mode 100644 index 0000000..bddf677 --- /dev/null +++ b/docs/docs/ANNFunction.md @@ -0,0 +1,35 @@ +# ANNFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **int** | The amount of neighbours per function ID | [optional] [default to 5] +**distance** | **float** | The distance between two neighbours | [optional] [default to 0.1] +**analysis_search_ids** | **List[int]** | Perform a search on functions within a list of analyses | [optional] [default to []] +**collection_search_ids** | **List[int]** | Search only within these collections | [optional] [default to []] +**search_binary_ids** | [**SearchBinaryIds**](SearchBinaryIds.md) | | [optional] +**search_function_ids** | [**SearchFunctionIds**](SearchFunctionIds.md) | | [optional] +**debug_only** | **bool** | Searches for only functions which are debug | [optional] [default to False] + +## Example + +```python +from revengai.models.ann_function import ANNFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of ANNFunction from a JSON string +ann_function_instance = ANNFunction.from_json(json) +# print the JSON string representation of the object +print(ANNFunction.to_json()) + +# convert the object into a dict +ann_function_dict = ann_function_instance.to_dict() +# create an instance of ANNFunction from a dict +ann_function_from_dict = ANNFunction.from_dict(ann_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/docs/Addr.md b/docs/docs/Addr.md new file mode 100644 index 0000000..17ac6c4 --- /dev/null +++ b/docs/docs/Addr.md @@ -0,0 +1,28 @@ +# Addr + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from revengai.models.addr import Addr + +# TODO update the JSON string below +json = "{}" +# create an instance of Addr from a JSON string +addr_instance = Addr.from_json(json) +# print the JSON string representation of the object +print(Addr.to_json()) + +# convert the object into a dict +addr_dict = addr_instance.to_dict() +# create an instance of Addr from a dict +addr_from_dict = Addr.from_dict(addr_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/docs/AiDecompilationRating.md b/docs/docs/AiDecompilationRating.md new file mode 100644 index 0000000..1578b5c --- /dev/null +++ b/docs/docs/AiDecompilationRating.md @@ -0,0 +1,12 @@ +# AiDecompilationRating + + +## Enum + +* `POSITIVE` (value: `'POSITIVE'`) + +* `NEGATIVE` (value: `'NEGATIVE'`) + +[[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/docs/AiUnstripRequest.md b/docs/docs/AiUnstripRequest.md new file mode 100644 index 0000000..318c345 --- /dev/null +++ b/docs/docs/AiUnstripRequest.md @@ -0,0 +1,29 @@ +# AiUnstripRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply** | **bool** | Whether to apply the suggested function names to the target functions, default is False | [optional] [default to False] + +## Example + +```python +from revengai.models.ai_unstrip_request import AiUnstripRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AiUnstripRequest from a JSON string +ai_unstrip_request_instance = AiUnstripRequest.from_json(json) +# print the JSON string representation of the object +print(AiUnstripRequest.to_json()) + +# convert the object into a dict +ai_unstrip_request_dict = ai_unstrip_request_instance.to_dict() +# create an instance of AiUnstripRequest from a dict +ai_unstrip_request_from_dict = AiUnstripRequest.from_dict(ai_unstrip_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/docs/AnalysesCommentsApi.md b/docs/docs/AnalysesCommentsApi.md new file mode 100644 index 0000000..b885362 --- /dev/null +++ b/docs/docs/AnalysesCommentsApi.md @@ -0,0 +1,355 @@ +# revengai.AnalysesCommentsApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_analysis_comment**](AnalysesCommentsApi.md#create_analysis_comment) | **POST** /v2/analyses/{analysis_id}/comments | Create a comment for this analysis +[**delete_analysis_comment**](AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment +[**get_analysis_comments**](AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis +[**update_analysis_comment**](AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment + + +# **create_analysis_comment** +> BaseResponseCommentResponse create_analysis_comment(analysis_id, comment_base, authorization=authorization) + +Create a comment for this analysis + +Creates a comment associated with a specified analysis). + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.comment_base import CommentBase +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' + +# 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.AnalysesCommentsApi(api_client) + analysis_id = 56 # int | + comment_base = revengai.CommentBase() # CommentBase | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Create a comment for this analysis + api_response = api_instance.create_analysis_comment(analysis_id, comment_base, authorization=authorization) + print("The response of AnalysesCommentsApi->create_analysis_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCommentsApi->create_analysis_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **comment_base** | [**CommentBase**](CommentBase.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**400** | Bad Request | - | + +[[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) + +# **delete_analysis_comment** +> BaseResponseBool delete_analysis_comment(comment_id, analysis_id, authorization=authorization) + +Delete a comment + +Deletes an existing comment. Users can only delete their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_bool import BaseResponseBool +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' + +# 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.AnalysesCommentsApi(api_client) + comment_id = 56 # int | + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Delete a comment + api_response = api_instance.delete_analysis_comment(comment_id, analysis_id, authorization=authorization) + print("The response of AnalysesCommentsApi->delete_analysis_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCommentsApi->delete_analysis_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBool**](BaseResponseBool.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**403** | You can only delete your own comments | - | +**400** | Bad Request | - | + +[[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_analysis_comments** +> BaseResponseListCommentResponse get_analysis_comments(analysis_id, authorization=authorization) + +Get comments for this analysis + +Retrieves all comments created for a specific analysis. Only returns comments for resources the requesting user has access to. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +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' + +# 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.AnalysesCommentsApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get comments for this analysis + api_response = api_instance.get_analysis_comments(analysis_id, authorization=authorization) + print("The response of AnalysesCommentsApi->get_analysis_comments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCommentsApi->get_analysis_comments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **update_analysis_comment** +> BaseResponseCommentResponse update_analysis_comment(comment_id, analysis_id, comment_update_request, authorization=authorization) + +Update a comment + +Updates the content of an existing comment. Users can only update their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest +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' + +# 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.AnalysesCommentsApi(api_client) + comment_id = 56 # int | + analysis_id = 56 # int | + comment_update_request = revengai.CommentUpdateRequest() # CommentUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update a comment + api_response = api_instance.update_analysis_comment(comment_id, analysis_id, comment_update_request, authorization=authorization) + print("The response of AnalysesCommentsApi->update_analysis_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCommentsApi->update_analysis_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **analysis_id** | **int**| | + **comment_update_request** | [**CommentUpdateRequest**](CommentUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | +**403** | You can only update your own comments | - | +**400** | Bad Request | - | + +[[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/docs/AnalysesCoreApi.md b/docs/docs/AnalysesCoreApi.md new file mode 100644 index 0000000..20bac3d --- /dev/null +++ b/docs/docs/AnalysesCoreApi.md @@ -0,0 +1,1305 @@ +# revengai.AnalysesCoreApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_analysis**](AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis +[**delete_analysis**](AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis +[**find_similar_functions_batch**](AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID +[**get_analysis_basic_info**](AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information +[**get_analysis_logs**](AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis +[**get_analysis_params**](AnalysesCoreApi.md#get_analysis_params) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information +[**get_analysis_status**](AnalysesCoreApi.md#get_analysis_status) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis +[**get_binary_ann**](AnalysesCoreApi.md#get_binary_ann) | **POST** /v2/binary_ann/{analysis_id} | Binary Ann +[**get_symbol_info_for_binary**](AnalysesCoreApi.md#get_symbol_info_for_binary) | **GET** /v2/analyses/symbol_info/{binary_id} | Gets the symbol information of a binary +[**list_analyses**](AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses +[**lookup_binary_id**](AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID +[**requeue_analysis**](AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis +[**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 + + +# **create_analysis** +> BaseResponseAnalysisCreateResponse create_analysis(analysis_create_request, authorization=authorization) + +Create Analysis + +Begins an analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_create_request import AnalysisCreateRequest +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse +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' + +# 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_create_request = revengai.AnalysisCreateRequest() # AnalysisCreateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Create Analysis + api_response = api_instance.create_analysis(analysis_create_request, authorization=authorization) + print("The response of AnalysesCoreApi->create_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->create_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_create_request** | [**AnalysisCreateRequest**](AnalysisCreateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisCreateResponse**](BaseResponseAnalysisCreateResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**404** | Not Found | - | +**400** | Bad Request | - | + +[[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) + +# **delete_analysis** +> BaseResponseDict delete_analysis(analysis_id, authorization=authorization) + +Delete Analysis + +Deletes an analysis based on the provided analysis ID. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_dict import BaseResponseDict +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' + +# 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 | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Delete Analysis + api_response = api_instance.delete_analysis(analysis_id, authorization=authorization) + print("The response of AnalysesCoreApi->delete_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->delete_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseDict**](BaseResponseDict.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | Not Found | - | +**403** | Forbidden | - | + +[[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) + +# **find_similar_functions_batch** +> BaseResponseNearestNeighborAnalysis find_similar_functions_batch(analysis_id, ann_function, authorization=authorization) + +Batch Symbol ANN using Analysis ID + +Takes a analysis ID and returns the nearest functions within the database that match those functions + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.ann_function import ANNFunction +from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis +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' + +# 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 | + ann_function = revengai.ANNFunction() # ANNFunction | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Batch Symbol ANN using Analysis ID + api_response = api_instance.find_similar_functions_batch(analysis_id, ann_function, authorization=authorization) + print("The response of AnalysesCoreApi->find_similar_functions_batch:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->find_similar_functions_batch: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **ann_function** | [**ANNFunction**](ANNFunction.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseNearestNeighborAnalysis**](BaseResponseNearestNeighborAnalysis.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_analysis_basic_info** +> BaseResponseBasic get_analysis_basic_info(analysis_id, authorization=authorization) + +Gets basic analysis information + +Just a random placeholder for now + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_basic import BaseResponseBasic +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' + +# 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 | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets basic analysis information + api_response = api_instance.get_analysis_basic_info(analysis_id, authorization=authorization) + print("The response of AnalysesCoreApi->get_analysis_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_basic_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBasic**](BaseResponseBasic.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_analysis_logs** +> BaseResponseLogs get_analysis_logs(analysis_id, authorization=authorization) + +Gets the logs of an analysis + +Given an analysis ID gets the current logs of an analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_logs import BaseResponseLogs +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' + +# 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 | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the logs of an analysis + api_response = api_instance.get_analysis_logs(analysis_id, authorization=authorization) + print("The response of AnalysesCoreApi->get_analysis_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_logs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseLogs**](BaseResponseLogs.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_analysis_params** +> BaseResponseParams get_analysis_params(analysis_id, authorization=authorization) + +Gets analysis param information + +Gets the params that the analysis was run with + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_params import BaseResponseParams +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' + +# 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 | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets analysis param information + api_response = api_instance.get_analysis_params(analysis_id, authorization=authorization) + print("The response of AnalysesCoreApi->get_analysis_params:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_params: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseParams**](BaseResponseParams.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_analysis_status** +> BaseResponseStatus get_analysis_status(analysis_id, authorization=authorization) + +Gets the status of an analysis + +Given an analysis ID gets the current status of the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_status import BaseResponseStatus +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' + +# 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 | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the status of an analysis + api_response = api_instance.get_analysis_status(analysis_id, authorization=authorization) + print("The response of AnalysesCoreApi->get_analysis_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseStatus**](BaseResponseStatus.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_binary_ann** +> BaseResponseBinaryAnnListResponse get_binary_ann(analysis_id, binary_ann_form, authorization=authorization) + +Binary Ann + +Binary Ann + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse +from revengai.models.binary_ann_form import BinaryAnnForm +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' + +# 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 | + binary_ann_form = revengai.BinaryAnnForm() # BinaryAnnForm | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Binary Ann + api_response = api_instance.get_binary_ann(analysis_id, binary_ann_form, authorization=authorization) + print("The response of AnalysesCoreApi->get_binary_ann:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_binary_ann: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **binary_ann_form** | [**BinaryAnnForm**](BinaryAnnForm.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBinaryAnnListResponse**](BaseResponseBinaryAnnListResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_symbol_info_for_binary** +> BaseResponseSymbolsInfo get_symbol_info_for_binary(binary_id, authorization=authorization) + +Gets the symbol information of a binary + +Given a binary ID gets the symbol information of the binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the symbol information of a binary + api_response = api_instance.get_symbol_info_for_binary(binary_id, authorization=authorization) + print("The response of AnalysesCoreApi->get_symbol_info_for_binary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_symbol_info_for_binary: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseSymbolsInfo**](BaseResponseSymbolsInfo.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | Not Found | - | +**403** | Forbidden | - | + +[[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) + +# **list_analyses** +> BaseResponseRecent list_analyses(search_term=search_term, workspace=workspace, status=status, model_name=model_name, dynamic_execution_status=dynamic_execution_status, usernames=usernames, limit=limit, offset=offset, order_by=order_by, order=order, authorization=authorization) + +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 + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy +from revengai.models.base_response_recent import BaseResponseRecent +from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput +from revengai.models.model_name import ModelName +from revengai.models.order import Order +from revengai.models.status_input import StatusInput +from revengai.models.workspace import Workspace +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' + +# 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) + search_term = '' # str | (optional) (default to '') + workspace = ["personal"] # List[Workspace] | The workspace to be viewed (optional) (default to ["personal"]) + status = ["All"] # List[StatusInput] | The status of the analysis (optional) (default to ["All"]) + model_name = [revengai.ModelName()] # List[ModelName] | Show analysis belonging to the model (optional) + dynamic_execution_status = revengai.DynamicExecutionStatusInput() # DynamicExecutionStatusInput | Show analysis that have a dynamic execution with the given status (optional) + usernames = [] # List[Optional[str]] | Show analysis belonging to the user (optional) (default to []) + limit = 20 # int | (optional) (default to 20) + offset = 0 # int | (optional) (default to 0) + order_by = revengai.AppApiRestV2AnalysesEnumsOrderBy() # AppApiRestV2AnalysesEnumsOrderBy | (optional) + order = revengai.Order() # Order | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the most recent analyses + api_response = api_instance.list_analyses(search_term=search_term, workspace=workspace, status=status, model_name=model_name, dynamic_execution_status=dynamic_execution_status, usernames=usernames, limit=limit, offset=offset, order_by=order_by, order=order, authorization=authorization) + print("The response of AnalysesCoreApi->list_analyses:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->list_analyses: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search_term** | **str**| | [optional] [default to ''] + **workspace** | [**List[Workspace]**](Workspace.md)| The workspace to be viewed | [optional] [default to ["personal"]] + **status** | [**List[StatusInput]**](StatusInput.md)| The status of the analysis | [optional] [default to ["All"]] + **model_name** | [**List[ModelName]**](ModelName.md)| Show analysis belonging to the model | [optional] + **dynamic_execution_status** | [**DynamicExecutionStatusInput**](.md)| Show analysis that have a dynamic execution with the given status | [optional] + **usernames** | [**List[Optional[str]]**](str.md)| Show analysis belonging to the user | [optional] [default to []] + **limit** | **int**| | [optional] [default to 20] + **offset** | **int**| | [optional] [default to 0] + **order_by** | [**AppApiRestV2AnalysesEnumsOrderBy**](.md)| | [optional] + **order** | [**Order**](.md)| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseRecent**](BaseResponseRecent.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **lookup_binary_id** +> object lookup_binary_id(binary_id, authorization=authorization) + +Gets the analysis ID from binary ID + +Given an binary ID gets the ID of an analysis + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the analysis ID from binary ID + api_response = api_instance.lookup_binary_id(binary_id, authorization=authorization) + print("The response of AnalysesCoreApi->lookup_binary_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->lookup_binary_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **requeue_analysis** +> BaseResponseCreated requeue_analysis(analysis_id, re_analysis_form, authorization=authorization) + +Requeue Analysis + +Re-queues an already uploaded analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_created import BaseResponseCreated +from revengai.models.re_analysis_form import ReAnalysisForm +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' + +# 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 | + re_analysis_form = revengai.ReAnalysisForm() # ReAnalysisForm | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Requeue Analysis + api_response = api_instance.requeue_analysis(analysis_id, re_analysis_form, authorization=authorization) + print("The response of AnalysesCoreApi->requeue_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->requeue_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **re_analysis_form** | [**ReAnalysisForm**](ReAnalysisForm.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCreated**](BaseResponseCreated.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**404** | Not Found | - | +**400** | Bad Request | - | + +[[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) + +# **update_analysis** +> BaseResponseAnalysisDetailResponse update_analysis(analysis_id, analysis_update_request, authorization=authorization) + +Update Analysis + +Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_update_request import AnalysisUpdateRequest +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse +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' + +# 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_update_request = revengai.AnalysisUpdateRequest() # AnalysisUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update Analysis + api_response = api_instance.update_analysis(analysis_id, analysis_update_request, authorization=authorization) + print("The response of AnalysesCoreApi->update_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->update_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **analysis_update_request** | [**AnalysisUpdateRequest**](AnalysisUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisDetailResponse**](BaseResponseAnalysisDetailResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **update_analysis_tags** +> BaseResponseAnalysisUpdateTagsResponse update_analysis_tags(analysis_id, analysis_update_tags_request, authorization=authorization) + +Update Analysis Tags + +Updates analysis tags. User must be the owner. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse +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' + +# 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_update_tags_request = revengai.AnalysisUpdateTagsRequest() # AnalysisUpdateTagsRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update Analysis Tags + api_response = api_instance.update_analysis_tags(analysis_id, analysis_update_tags_request, authorization=authorization) + print("The response of AnalysesCoreApi->update_analysis_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->update_analysis_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **analysis_update_tags_request** | [**AnalysisUpdateTagsRequest**](AnalysisUpdateTagsRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisUpdateTagsResponse**](BaseResponseAnalysisUpdateTagsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **upload_file** +> BaseResponseUploadResponse upload_file(upload_file_type, file, packed_password=packed_password, authorization=authorization, force_overwrite=force_overwrite) + +Upload File + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_upload_response import BaseResponseUploadResponse +from revengai.models.upload_file_type import UploadFileType +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' + +# 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) + upload_file_type = revengai.UploadFileType() # UploadFileType | + file = None # bytearray | + packed_password = 'packed_password_example' # str | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + force_overwrite = False # bool | (optional) (default to False) + + try: + # Upload File + api_response = api_instance.upload_file(upload_file_type, file, packed_password=packed_password, authorization=authorization, force_overwrite=force_overwrite) + print("The response of AnalysesCoreApi->upload_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->upload_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upload_file_type** | [**UploadFileType**](UploadFileType.md)| | + **file** | **bytearray**| | + **packed_password** | **str**| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + **force_overwrite** | **bool**| | [optional] [default to False] + +### Return type + +[**BaseResponseUploadResponse**](BaseResponseUploadResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **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) + diff --git a/docs/docs/AnalysesDynamicExecutionApi.md b/docs/docs/AnalysesDynamicExecutionApi.md new file mode 100644 index 0000000..947b436 --- /dev/null +++ b/docs/docs/AnalysesDynamicExecutionApi.md @@ -0,0 +1,576 @@ +# revengai.AnalysesDynamicExecutionApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_dynamic_execution_status**](AnalysesDynamicExecutionApi.md#get_dynamic_execution_status) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/status | Get the status of a dynamic execution task +[**get_network_overview**](AnalysesDynamicExecutionApi.md#get_network_overview) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/network-overview | Get the dynamic execution results for network overview +[**get_process_dump**](AnalysesDynamicExecutionApi.md#get_process_dump) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/process-dumps/{dump_name} | Get the dynamic execution results for a specific process dump +[**get_process_dumps**](AnalysesDynamicExecutionApi.md#get_process_dumps) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/process-dumps | Get the dynamic execution results for process dumps +[**get_process_registry**](AnalysesDynamicExecutionApi.md#get_process_registry) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/process-registry | Get the dynamic execution results for process registry +[**get_process_tree**](AnalysesDynamicExecutionApi.md#get_process_tree) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/process-tree | Get the dynamic execution results for process tree +[**get_ttps**](AnalysesDynamicExecutionApi.md#get_ttps) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/ttps | Get the dynamic execution results for ttps + + +# **get_dynamic_execution_status** +> BaseResponseDynamicExecutionStatus get_dynamic_execution_status(analysis_id, authorization=authorization) + +Get the status of a dynamic execution task + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the status of a dynamic execution task + api_response = api_instance.get_dynamic_execution_status(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_dynamic_execution_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_dynamic_execution_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseDynamicExecutionStatus**](BaseResponseDynamicExecutionStatus.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_network_overview** +> BaseResponseNetworkOverviewResponse get_network_overview(analysis_id, authorization=authorization) + +Get the dynamic execution results for network overview + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for network overview + api_response = api_instance.get_network_overview(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_network_overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_network_overview: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseNetworkOverviewResponse**](BaseResponseNetworkOverviewResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_process_dump** +> object get_process_dump(analysis_id, dump_name, authorization=authorization) + +Get the dynamic execution results for a specific process dump + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + dump_name = 'dump_name_example' # str | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for a specific process dump + api_response = api_instance.get_process_dump(analysis_id, dump_name, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_process_dump:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_process_dump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **dump_name** | **str**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_process_dumps** +> BaseResponseProcessDumps get_process_dumps(analysis_id, authorization=authorization) + +Get the dynamic execution results for process dumps + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for process dumps + api_response = api_instance.get_process_dumps(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_process_dumps:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_process_dumps: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseProcessDumps**](BaseResponseProcessDumps.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_process_registry** +> BaseResponseProcessRegistry get_process_registry(analysis_id, authorization=authorization) + +Get the dynamic execution results for process registry + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for process registry + api_response = api_instance.get_process_registry(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_process_registry:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_process_registry: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseProcessRegistry**](BaseResponseProcessRegistry.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_process_tree** +> BaseResponseProcessTree get_process_tree(analysis_id, authorization=authorization) + +Get the dynamic execution results for process tree + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_process_tree import BaseResponseProcessTree +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for process tree + api_response = api_instance.get_process_tree(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_process_tree:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_process_tree: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseProcessTree**](BaseResponseProcessTree.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_ttps** +> BaseResponseTTPS get_ttps(analysis_id, authorization=authorization) + +Get the dynamic execution results for ttps + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_ttps import BaseResponseTTPS +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' + +# 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.AnalysesDynamicExecutionApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the dynamic execution results for ttps + api_response = api_instance.get_ttps(analysis_id, authorization=authorization) + print("The response of AnalysesDynamicExecutionApi->get_ttps:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesDynamicExecutionApi->get_ttps: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseTTPS**](BaseResponseTTPS.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/AnalysesResultsMetadataApi.md b/docs/docs/AnalysesResultsMetadataApi.md new file mode 100644 index 0000000..2b3c9fa --- /dev/null +++ b/docs/docs/AnalysesResultsMetadataApi.md @@ -0,0 +1,665 @@ +# revengai.AnalysesResultsMetadataApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_capabilities**](AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis +[**get_communities**](AnalysesResultsMetadataApi.md#get_communities) | **GET** /v2/analyses/{analysis_id}/communities | Gets the communities found in the analysis +[**get_functions_list**](AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis +[**get_pdf**](AnalysesResultsMetadataApi.md#get_pdf) | **GET** /v2/analyses/{analysis_id}/pdf | Gets the PDF found in the analysis +[**get_sbom**](AnalysesResultsMetadataApi.md#get_sbom) | **GET** /v2/analyses/{analysis_id}/sbom | Gets the software-bill-of-materials (SBOM) found in the analysis +[**get_tags**](AnalysesResultsMetadataApi.md#get_tags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score +[**get_threat_score**](AnalysesResultsMetadataApi.md#get_threat_score) | **GET** /v2/analyses/{analysis_id}/threat_score | Gets the threat score found in the analysis +[**get_vulnerabilities**](AnalysesResultsMetadataApi.md#get_vulnerabilities) | **GET** /v2/analyses/{analysis_id}/vulnerabilities | Gets the vulnerabilities found in the analysis + + +# **get_capabilities** +> BaseResponseCapabilities get_capabilities(analysis_id, authorization=authorization) + +Gets the capabilities from the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_capabilities import BaseResponseCapabilities +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the capabilities from the analysis + api_response = api_instance.get_capabilities(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_capabilities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_capabilities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCapabilities**](BaseResponseCapabilities.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_communities** +> BaseResponseCommunities get_communities(analysis_id, user_name=user_name, authorization=authorization) + +Gets the communities found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_communities import BaseResponseCommunities +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + user_name = 'user_name_example' # str | The user name to limit communities to (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the communities found in the analysis + api_response = api_instance.get_communities(analysis_id, user_name=user_name, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_communities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_communities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **user_name** | **str**| The user name to limit communities to | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommunities**](BaseResponseCommunities.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_functions_list** +> BaseResponseAnalysisFunctions get_functions_list(analysis_id, search_term=search_term, min_v_addr=min_v_addr, max_v_addr=max_v_addr, authorization=authorization) + +Gets functions from analysis + +Gets the functions identified during analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + search_term = 'search_term_example' # str | (optional) + min_v_addr = 56 # int | (optional) + max_v_addr = 56 # int | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets functions from analysis + api_response = api_instance.get_functions_list(analysis_id, search_term=search_term, min_v_addr=min_v_addr, max_v_addr=max_v_addr, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_functions_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_functions_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **search_term** | **str**| | [optional] + **min_v_addr** | **int**| | [optional] + **max_v_addr** | **int**| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisFunctions**](BaseResponseAnalysisFunctions.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_pdf** +> object get_pdf(analysis_id, authorization=authorization) + +Gets the PDF found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the PDF found in the analysis + api_response = api_instance.get_pdf(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_pdf:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_pdf: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_sbom** +> BaseResponseListSBOM get_sbom(analysis_id, authorization=authorization) + +Gets the software-bill-of-materials (SBOM) found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_sbom import BaseResponseListSBOM +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the software-bill-of-materials (SBOM) found in the analysis + api_response = api_instance.get_sbom(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_sbom:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_sbom: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListSBOM**](BaseResponseListSBOM.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_tags** +> BaseResponseAnalysisTags get_tags(analysis_id, authorization=authorization) + +Get function tags with maliciousness score + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get function tags with maliciousness score + api_response = api_instance.get_tags(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisTags**](BaseResponseAnalysisTags.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_threat_score** +> BaseResponseAnalysisThreatScoreData get_threat_score(analysis_id, authorization=authorization) + +Gets the threat score found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the threat score found in the analysis + api_response = api_instance.get_threat_score(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_threat_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_threat_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisThreatScoreData**](BaseResponseAnalysisThreatScoreData.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_vulnerabilities** +> BaseResponseVulnerabilities get_vulnerabilities(analysis_id, authorization=authorization) + +Gets the vulnerabilities found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities +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' + +# 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.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the vulnerabilities found in the analysis + api_response = api_instance.get_vulnerabilities(analysis_id, authorization=authorization) + print("The response of AnalysesResultsMetadataApi->get_vulnerabilities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->get_vulnerabilities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseVulnerabilities**](BaseResponseVulnerabilities.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/AnalysesSecurityChecksApi.md b/docs/docs/AnalysesSecurityChecksApi.md new file mode 100644 index 0000000..529d316 --- /dev/null +++ b/docs/docs/AnalysesSecurityChecksApi.md @@ -0,0 +1,258 @@ +# revengai.AnalysesSecurityChecksApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_scurity_checks_task**](AnalysesSecurityChecksApi.md#create_scurity_checks_task) | **POST** /v2/analyses/{analysis_id}/security-checks | Queues a security check process +[**get_security_checks**](AnalysesSecurityChecksApi.md#get_security_checks) | **GET** /v2/analyses/{analysis_id}/security-checks | Get Security Checks +[**get_security_checks_task_status**](AnalysesSecurityChecksApi.md#get_security_checks_task_status) | **GET** /v2/analyses/{analysis_id}/security-checks/status | Check the status of a security check process + + +# **create_scurity_checks_task** +> QueuedSecurityChecksTaskResponse create_scurity_checks_task(analysis_id, authorization=authorization) + +Queues a security check process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse +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' + +# 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.AnalysesSecurityChecksApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Queues a security check process + api_response = api_instance.create_scurity_checks_task(analysis_id, authorization=authorization) + print("The response of AnalysesSecurityChecksApi->create_scurity_checks_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesSecurityChecksApi->create_scurity_checks_task: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**QueuedSecurityChecksTaskResponse**](QueuedSecurityChecksTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**409** | Security checks already extracted or queued | - | + +[[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_security_checks** +> BaseResponseSecurityChecksResponse get_security_checks(analysis_id, page, page_size, authorization=authorization) + +Get Security Checks + +Retrieve security checks results with pagination. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse +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' + +# 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.AnalysesSecurityChecksApi(api_client) + analysis_id = 56 # int | + page = 56 # int | The page number to retrieve. + page_size = 56 # int | Number of items per page. + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get Security Checks + api_response = api_instance.get_security_checks(analysis_id, page, page_size, authorization=authorization) + print("The response of AnalysesSecurityChecksApi->get_security_checks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesSecurityChecksApi->get_security_checks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **page** | **int**| The page number to retrieve. | + **page_size** | **int**| Number of items per page. | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseSecurityChecksResponse**](BaseResponseSecurityChecksResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_security_checks_task_status** +> CheckSecurityChecksTaskResponse get_security_checks_task_status(analysis_id, authorization=authorization) + +Check the status of a security check process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse +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' + +# 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.AnalysesSecurityChecksApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Check the status of a security check process + api_response = api_instance.get_security_checks_task_status(analysis_id, authorization=authorization) + print("The response of AnalysesSecurityChecksApi->get_security_checks_task_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesSecurityChecksApi->get_security_checks_task_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**CheckSecurityChecksTaskResponse**](CheckSecurityChecksTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/AnalysisAccessInfo.md b/docs/docs/AnalysisAccessInfo.md new file mode 100644 index 0000000..0b5c8dd --- /dev/null +++ b/docs/docs/AnalysisAccessInfo.md @@ -0,0 +1,30 @@ +# AnalysisAccessInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**owner** | **bool** | | +**username** | **str** | | + +## Example + +```python +from revengai.models.analysis_access_info import AnalysisAccessInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisAccessInfo from a JSON string +analysis_access_info_instance = AnalysisAccessInfo.from_json(json) +# print the JSON string representation of the object +print(AnalysisAccessInfo.to_json()) + +# convert the object into a dict +analysis_access_info_dict = analysis_access_info_instance.to_dict() +# create an instance of AnalysisAccessInfo from a dict +analysis_access_info_from_dict = AnalysisAccessInfo.from_dict(analysis_access_info_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/docs/AnalysisConfig.md b/docs/docs/AnalysisConfig.md new file mode 100644 index 0000000..540f94c --- /dev/null +++ b/docs/docs/AnalysisConfig.md @@ -0,0 +1,35 @@ +# AnalysisConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scrape_third_party_config** | [**ScrapeThirdPartyConfig**](ScrapeThirdPartyConfig.md) | Settings to scrape third party sources | [optional] +**generate_cves** | **bool** | A configuration option for fetching CVEs data. | [optional] [default to False] +**generate_sbom** | **bool** | A configuration option for generating software bill of materials data. | [optional] [default to False] +**generate_capabilities** | **bool** | A configuration option for generating capabilities of a binary | [optional] [default to False] +**no_cache** | **bool** | When enabled, skips using cached data within the processing. | [optional] [default to False] +**advanced_analysis** | **bool** | Enables an advanced security analysis. | [optional] [default to False] +**sandbox_config** | [**SandboxOptions**](SandboxOptions.md) | Including a sandbox config enables the dynamic execution sandbox | [optional] + +## Example + +```python +from revengai.models.analysis_config import AnalysisConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisConfig from a JSON string +analysis_config_instance = AnalysisConfig.from_json(json) +# print the JSON string representation of the object +print(AnalysisConfig.to_json()) + +# convert the object into a dict +analysis_config_dict = analysis_config_instance.to_dict() +# create an instance of AnalysisConfig from a dict +analysis_config_from_dict = AnalysisConfig.from_dict(analysis_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/docs/AnalysisCreateRequest.md b/docs/docs/AnalysisCreateRequest.md new file mode 100644 index 0000000..a6a6432 --- /dev/null +++ b/docs/docs/AnalysisCreateRequest.md @@ -0,0 +1,36 @@ +# AnalysisCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | The name of the file | +**sha_256_hash** | **str** | The name of the file | +**tags** | [**List[Tag]**](Tag.md) | List of community tags to assign to an analysis | [optional] [default to []] +**analysis_scope** | [**AnalysisScope**](AnalysisScope.md) | The scope of the analysis determines who can access it | [optional] +**symbols** | [**Symbols**](Symbols.md) | | [optional] +**debug_hash** | **str** | | [optional] +**analysis_config** | [**AnalysisConfig**](AnalysisConfig.md) | The analysis config enables the configuration of optional analysis stages | [optional] +**binary_config** | [**BinaryConfig**](BinaryConfig.md) | The binary config can override automatically determined values such as ISA, Platform, File Format, etc | [optional] + +## Example + +```python +from revengai.models.analysis_create_request import AnalysisCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisCreateRequest from a JSON string +analysis_create_request_instance = AnalysisCreateRequest.from_json(json) +# print the JSON string representation of the object +print(AnalysisCreateRequest.to_json()) + +# convert the object into a dict +analysis_create_request_dict = analysis_create_request_instance.to_dict() +# create an instance of AnalysisCreateRequest from a dict +analysis_create_request_from_dict = AnalysisCreateRequest.from_dict(analysis_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/docs/AnalysisCreateResponse.md b/docs/docs/AnalysisCreateResponse.md new file mode 100644 index 0000000..feb8aaa --- /dev/null +++ b/docs/docs/AnalysisCreateResponse.md @@ -0,0 +1,30 @@ +# AnalysisCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | ID of created analysis | +**binary_id** | **int** | ID of created binary | + +## Example + +```python +from revengai.models.analysis_create_response import AnalysisCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisCreateResponse from a JSON string +analysis_create_response_instance = AnalysisCreateResponse.from_json(json) +# print the JSON string representation of the object +print(AnalysisCreateResponse.to_json()) + +# convert the object into a dict +analysis_create_response_dict = analysis_create_response_instance.to_dict() +# create an instance of AnalysisCreateResponse from a dict +analysis_create_response_from_dict = AnalysisCreateResponse.from_dict(analysis_create_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/docs/AnalysisDetailResponse.md b/docs/docs/AnalysisDetailResponse.md new file mode 100644 index 0000000..2205516 --- /dev/null +++ b/docs/docs/AnalysisDetailResponse.md @@ -0,0 +1,42 @@ +# AnalysisDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access** | [**AnalysisAccessInfo**](AnalysisAccessInfo.md) | | +**analysis_id** | **int** | | +**analysis_scope** | **str** | | +**architecture** | **str** | | +**binary_dynamic** | **bool** | | +**binary_format** | **str** | | +**binary_name** | **str** | | +**binary_size** | **int** | | +**binary_type** | **str** | | +**creation** | **str** | | +**debug** | **bool** | | +**model_name** | **str** | | +**sbom** | **Dict[str, object]** | | [optional] +**sha_256_hash** | **str** | | + +## Example + +```python +from revengai.models.analysis_detail_response import AnalysisDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisDetailResponse from a JSON string +analysis_detail_response_instance = AnalysisDetailResponse.from_json(json) +# print the JSON string representation of the object +print(AnalysisDetailResponse.to_json()) + +# convert the object into a dict +analysis_detail_response_dict = analysis_detail_response_instance.to_dict() +# create an instance of AnalysisDetailResponse from a dict +analysis_detail_response_from_dict = AnalysisDetailResponse.from_dict(analysis_detail_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/docs/AnalysisFunctions.md b/docs/docs/AnalysisFunctions.md new file mode 100644 index 0000000..ecf15ac --- /dev/null +++ b/docs/docs/AnalysisFunctions.md @@ -0,0 +1,29 @@ +# AnalysisFunctions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**functions** | [**List[AppApiRestV2FunctionsTypesFunction]**](AppApiRestV2FunctionsTypesFunction.md) | The functions associated with the analysis | + +## Example + +```python +from revengai.models.analysis_functions import AnalysisFunctions + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisFunctions from a JSON string +analysis_functions_instance = AnalysisFunctions.from_json(json) +# print the JSON string representation of the object +print(AnalysisFunctions.to_json()) + +# convert the object into a dict +analysis_functions_dict = analysis_functions_instance.to_dict() +# create an instance of AnalysisFunctions from a dict +analysis_functions_from_dict = AnalysisFunctions.from_dict(analysis_functions_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/docs/AnalysisRecord.md b/docs/docs/AnalysisRecord.md new file mode 100644 index 0000000..8ee9ddd --- /dev/null +++ b/docs/docs/AnalysisRecord.md @@ -0,0 +1,41 @@ +# AnalysisRecord + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | ID to identify analysis | +**analysis_scope** | **str** | Scope of the analysis | +**binary_id** | **int** | ID to identify the binary analyse | +**model_id** | **int** | ID to identify the model used for analysis | +**status** | **str** | The current status of analysis | +**creation** | **datetime** | The current status of analysis | +**is_owner** | **bool** | Whether the current user is the owner of a binary | +**binary_name** | **str** | The name of the file uploaded | +**sha_256_hash** | **str** | The hash of the binary | +**binary_size** | **int** | The size of the binary | +**username** | **str** | The username of the analysis owner | +**dynamic_execution_status** | [**AppApiRestV2AnalysesEnumsDynamicExecutionStatus**](AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md) | | [optional] +**dynamic_execution_task_id** | **int** | | [optional] + +## Example + +```python +from revengai.models.analysis_record import AnalysisRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisRecord from a JSON string +analysis_record_instance = AnalysisRecord.from_json(json) +# print the JSON string representation of the object +print(AnalysisRecord.to_json()) + +# convert the object into a dict +analysis_record_dict = analysis_record_instance.to_dict() +# create an instance of AnalysisRecord from a dict +analysis_record_from_dict = AnalysisRecord.from_dict(analysis_record_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/docs/AnalysisScope.md b/docs/docs/AnalysisScope.md new file mode 100644 index 0000000..83c366f --- /dev/null +++ b/docs/docs/AnalysisScope.md @@ -0,0 +1,12 @@ +# AnalysisScope + + +## Enum + +* `PRIVATE` (value: `'PRIVATE'`) + +* `PUBLIC` (value: `'PUBLIC'`) + +[[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/docs/AnalysisStringsResponse.md b/docs/docs/AnalysisStringsResponse.md new file mode 100644 index 0000000..d31d5e0 --- /dev/null +++ b/docs/docs/AnalysisStringsResponse.md @@ -0,0 +1,30 @@ +# AnalysisStringsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strings** | [**List[StringFunctions]**](StringFunctions.md) | The strings associated with the analysis | +**total_strings** | **int** | The total number of strings associated with this analysis | + +## Example + +```python +from revengai.models.analysis_strings_response import AnalysisStringsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisStringsResponse from a JSON string +analysis_strings_response_instance = AnalysisStringsResponse.from_json(json) +# print the JSON string representation of the object +print(AnalysisStringsResponse.to_json()) + +# convert the object into a dict +analysis_strings_response_dict = analysis_strings_response_instance.to_dict() +# create an instance of AnalysisStringsResponse from a dict +analysis_strings_response_from_dict = AnalysisStringsResponse.from_dict(analysis_strings_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/docs/AnalysisTags.md b/docs/docs/AnalysisTags.md new file mode 100644 index 0000000..8f290b3 --- /dev/null +++ b/docs/docs/AnalysisTags.md @@ -0,0 +1,30 @@ +# AnalysisTags + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_tags** | [**List[AppApiRestV2AnalysesResponsesTagItem]**](AppApiRestV2AnalysesResponsesTagItem.md) | | +**suggested_tags** | [**List[AppApiRestV2AnalysesResponsesTagItem]**](AppApiRestV2AnalysesResponsesTagItem.md) | | + +## Example + +```python +from revengai.models.analysis_tags import AnalysisTags + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisTags from a JSON string +analysis_tags_instance = AnalysisTags.from_json(json) +# print the JSON string representation of the object +print(AnalysisTags.to_json()) + +# convert the object into a dict +analysis_tags_dict = analysis_tags_instance.to_dict() +# create an instance of AnalysisTags from a dict +analysis_tags_from_dict = AnalysisTags.from_dict(analysis_tags_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/docs/AnalysisThreatScoreData.md b/docs/docs/AnalysisThreatScoreData.md new file mode 100644 index 0000000..1e1bc99 --- /dev/null +++ b/docs/docs/AnalysisThreatScoreData.md @@ -0,0 +1,35 @@ +# AnalysisThreatScoreData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min** | **float** | The minimum value for the analysis score | +**max** | **float** | The maximum value for the analysis score | +**average** | **float** | The average value for the analysis score | +**upper** | **float** | The upper limit for the analysis score | +**lower** | **float** | The lower limit for the analysis score | +**malware_count** | **int** | Number of malware binaries used in threat score calculation | +**benign_count** | **int** | Number of benign binaries used in threat score calculation | + +## Example + +```python +from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisThreatScoreData from a JSON string +analysis_threat_score_data_instance = AnalysisThreatScoreData.from_json(json) +# print the JSON string representation of the object +print(AnalysisThreatScoreData.to_json()) + +# convert the object into a dict +analysis_threat_score_data_dict = analysis_threat_score_data_instance.to_dict() +# create an instance of AnalysisThreatScoreData from a dict +analysis_threat_score_data_from_dict = AnalysisThreatScoreData.from_dict(analysis_threat_score_data_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/docs/AnalysisUpdateRequest.md b/docs/docs/AnalysisUpdateRequest.md new file mode 100644 index 0000000..7679903 --- /dev/null +++ b/docs/docs/AnalysisUpdateRequest.md @@ -0,0 +1,30 @@ +# AnalysisUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_name** | **str** | | [optional] +**analysis_scope** | **str** | | [optional] + +## Example + +```python +from revengai.models.analysis_update_request import AnalysisUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisUpdateRequest from a JSON string +analysis_update_request_instance = AnalysisUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(AnalysisUpdateRequest.to_json()) + +# convert the object into a dict +analysis_update_request_dict = analysis_update_request_instance.to_dict() +# create an instance of AnalysisUpdateRequest from a dict +analysis_update_request_from_dict = AnalysisUpdateRequest.from_dict(analysis_update_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/docs/AnalysisUpdateTagsRequest.md b/docs/docs/AnalysisUpdateTagsRequest.md new file mode 100644 index 0000000..e85d8b5 --- /dev/null +++ b/docs/docs/AnalysisUpdateTagsRequest.md @@ -0,0 +1,29 @@ +# AnalysisUpdateTagsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **List[str]** | | + +## Example + +```python +from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisUpdateTagsRequest from a JSON string +analysis_update_tags_request_instance = AnalysisUpdateTagsRequest.from_json(json) +# print the JSON string representation of the object +print(AnalysisUpdateTagsRequest.to_json()) + +# convert the object into a dict +analysis_update_tags_request_dict = analysis_update_tags_request_instance.to_dict() +# create an instance of AnalysisUpdateTagsRequest from a dict +analysis_update_tags_request_from_dict = AnalysisUpdateTagsRequest.from_dict(analysis_update_tags_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/docs/AnalysisUpdateTagsResponse.md b/docs/docs/AnalysisUpdateTagsResponse.md new file mode 100644 index 0000000..7e9da58 --- /dev/null +++ b/docs/docs/AnalysisUpdateTagsResponse.md @@ -0,0 +1,29 @@ +# AnalysisUpdateTagsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[TagResponse]**](TagResponse.md) | The analysis tags after updating | + +## Example + +```python +from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisUpdateTagsResponse from a JSON string +analysis_update_tags_response_instance = AnalysisUpdateTagsResponse.from_json(json) +# print the JSON string representation of the object +print(AnalysisUpdateTagsResponse.to_json()) + +# convert the object into a dict +analysis_update_tags_response_dict = analysis_update_tags_response_instance.to_dict() +# create an instance of AnalysisUpdateTagsResponse from a dict +analysis_update_tags_response_from_dict = AnalysisUpdateTagsResponse.from_dict(analysis_update_tags_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/docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md b/docs/docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md new file mode 100644 index 0000000..d7fc700 --- /dev/null +++ b/docs/docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md @@ -0,0 +1,17 @@ +# AppApiRestV2AnalysesEnumsDynamicExecutionStatus + +Custom enum for the dynamic execution status + +## Enum + +* `PENDING` (value: `'PENDING'`) + +* `ERROR` (value: `'ERROR'`) + +* `SUCCESS` (value: `'SUCCESS'`) + +* `ALL` (value: `'ALL'`) + +[[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/docs/AppApiRestV2AnalysesEnumsOrderBy.md b/docs/docs/AppApiRestV2AnalysesEnumsOrderBy.md new file mode 100644 index 0000000..77e5a62 --- /dev/null +++ b/docs/docs/AppApiRestV2AnalysesEnumsOrderBy.md @@ -0,0 +1,14 @@ +# AppApiRestV2AnalysesEnumsOrderBy + + +## Enum + +* `CREATED` (value: `'created'`) + +* `NAME` (value: `'name'`) + +* `SIZE` (value: `'size'`) + +[[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/docs/AppApiRestV2AnalysesResponsesTagItem.md b/docs/docs/AppApiRestV2AnalysesResponsesTagItem.md new file mode 100644 index 0000000..2150145 --- /dev/null +++ b/docs/docs/AppApiRestV2AnalysesResponsesTagItem.md @@ -0,0 +1,31 @@ +# AppApiRestV2AnalysesResponsesTagItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**origin** | **str** | | +**collection_id** | **int** | | [optional] + +## Example + +```python +from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AppApiRestV2AnalysesResponsesTagItem from a JSON string +app_api_rest_v2_analyses_responses_tag_item_instance = AppApiRestV2AnalysesResponsesTagItem.from_json(json) +# print the JSON string representation of the object +print(AppApiRestV2AnalysesResponsesTagItem.to_json()) + +# convert the object into a dict +app_api_rest_v2_analyses_responses_tag_item_dict = app_api_rest_v2_analyses_responses_tag_item_instance.to_dict() +# create an instance of AppApiRestV2AnalysesResponsesTagItem from a dict +app_api_rest_v2_analyses_responses_tag_item_from_dict = AppApiRestV2AnalysesResponsesTagItem.from_dict(app_api_rest_v2_analyses_responses_tag_item_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/docs/AppApiRestV2CollectionsEnumsOrderBy.md b/docs/docs/AppApiRestV2CollectionsEnumsOrderBy.md new file mode 100644 index 0000000..a5e09e4 --- /dev/null +++ b/docs/docs/AppApiRestV2CollectionsEnumsOrderBy.md @@ -0,0 +1,20 @@ +# AppApiRestV2CollectionsEnumsOrderBy + + +## Enum + +* `CREATED` (value: `'created'`) + +* `COLLECTION` (value: `'collection'`) + +* `MODEL` (value: `'model'`) + +* `OWNER` (value: `'owner'`) + +* `COLLECTION_SIZE` (value: `'collection_size'`) + +* `UPDATED` (value: `'updated'`) + +[[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/docs/AppApiRestV2FunctionsResponsesFunction.md b/docs/docs/AppApiRestV2FunctionsResponsesFunction.md new file mode 100644 index 0000000..f0c954a --- /dev/null +++ b/docs/docs/AppApiRestV2FunctionsResponsesFunction.md @@ -0,0 +1,31 @@ +# AppApiRestV2FunctionsResponsesFunction + +Function schema used in function strings response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**function_vaddr** | **int** | | + +## Example + +```python +from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of AppApiRestV2FunctionsResponsesFunction from a JSON string +app_api_rest_v2_functions_responses_function_instance = AppApiRestV2FunctionsResponsesFunction.from_json(json) +# print the JSON string representation of the object +print(AppApiRestV2FunctionsResponsesFunction.to_json()) + +# convert the object into a dict +app_api_rest_v2_functions_responses_function_dict = app_api_rest_v2_functions_responses_function_instance.to_dict() +# create an instance of AppApiRestV2FunctionsResponsesFunction from a dict +app_api_rest_v2_functions_responses_function_from_dict = AppApiRestV2FunctionsResponsesFunction.from_dict(app_api_rest_v2_functions_responses_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/docs/AppApiRestV2FunctionsTypesFunction.md b/docs/docs/AppApiRestV2FunctionsTypesFunction.md new file mode 100644 index 0000000..8a37547 --- /dev/null +++ b/docs/docs/AppApiRestV2FunctionsTypesFunction.md @@ -0,0 +1,35 @@ +# AppApiRestV2FunctionsTypesFunction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | Function id | +**function_name** | **str** | Function name | +**function_vaddr** | **int** | Function virtual address | +**function_size** | **int** | Function size | +**debug** | **bool** | Whether the function is debug | +**embedding_3d** | **List[float]** | | +**embedding_1d** | **List[float]** | | + +## Example + +```python +from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of AppApiRestV2FunctionsTypesFunction from a JSON string +app_api_rest_v2_functions_types_function_instance = AppApiRestV2FunctionsTypesFunction.from_json(json) +# print the JSON string representation of the object +print(AppApiRestV2FunctionsTypesFunction.to_json()) + +# convert the object into a dict +app_api_rest_v2_functions_types_function_dict = app_api_rest_v2_functions_types_function_instance.to_dict() +# create an instance of AppApiRestV2FunctionsTypesFunction from a dict +app_api_rest_v2_functions_types_function_from_dict = AppApiRestV2FunctionsTypesFunction.from_dict(app_api_rest_v2_functions_types_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/docs/AppServicesBinaryAnnSchemaTagItem.md b/docs/docs/AppServicesBinaryAnnSchemaTagItem.md new file mode 100644 index 0000000..24cc84b --- /dev/null +++ b/docs/docs/AppServicesBinaryAnnSchemaTagItem.md @@ -0,0 +1,30 @@ +# AppServicesBinaryAnnSchemaTagItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **str** | | [optional] +**origin** | **str** | | [optional] + +## Example + +```python +from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AppServicesBinaryAnnSchemaTagItem from a JSON string +app_services_binary_ann_schema_tag_item_instance = AppServicesBinaryAnnSchemaTagItem.from_json(json) +# print the JSON string representation of the object +print(AppServicesBinaryAnnSchemaTagItem.to_json()) + +# convert the object into a dict +app_services_binary_ann_schema_tag_item_dict = app_services_binary_ann_schema_tag_item_instance.to_dict() +# create an instance of AppServicesBinaryAnnSchemaTagItem from a dict +app_services_binary_ann_schema_tag_item_from_dict = AppServicesBinaryAnnSchemaTagItem.from_dict(app_services_binary_ann_schema_tag_item_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/docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md b/docs/docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md new file mode 100644 index 0000000..0c1b630 --- /dev/null +++ b/docs/docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md @@ -0,0 +1,29 @@ +# AppServicesDynamicExecutionSchemasDynamicExecutionStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | + +## Example + +```python +from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of AppServicesDynamicExecutionSchemasDynamicExecutionStatus from a JSON string +app_services_dynamic_execution_schemas_dynamic_execution_status_instance = AppServicesDynamicExecutionSchemasDynamicExecutionStatus.from_json(json) +# print the JSON string representation of the object +print(AppServicesDynamicExecutionSchemasDynamicExecutionStatus.to_json()) + +# convert the object into a dict +app_services_dynamic_execution_schemas_dynamic_execution_status_dict = app_services_dynamic_execution_schemas_dynamic_execution_status_instance.to_dict() +# create an instance of AppServicesDynamicExecutionSchemasDynamicExecutionStatus from a dict +app_services_dynamic_execution_schemas_dynamic_execution_status_from_dict = AppServicesDynamicExecutionSchemasDynamicExecutionStatus.from_dict(app_services_dynamic_execution_schemas_dynamic_execution_status_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/docs/Argument.md b/docs/docs/Argument.md new file mode 100644 index 0000000..7de2bec --- /dev/null +++ b/docs/docs/Argument.md @@ -0,0 +1,33 @@ +# Argument + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**offset** | **int** | Offset of the argument in the function signature | +**name** | **str** | Name of the argument | +**type** | **str** | Data type of the argument | +**size** | **int** | Size of the argument in bytes | + +## Example + +```python +from revengai.models.argument import Argument + +# TODO update the JSON string below +json = "{}" +# create an instance of Argument from a JSON string +argument_instance = Argument.from_json(json) +# print the JSON string representation of the object +print(Argument.to_json()) + +# convert the object into a dict +argument_dict = argument_instance.to_dict() +# create an instance of Argument from a dict +argument_from_dict = Argument.from_dict(argument_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/docs/AuthenticationUsersApi.md b/docs/docs/AuthenticationUsersApi.md new file mode 100644 index 0000000..7121e9f --- /dev/null +++ b/docs/docs/AuthenticationUsersApi.md @@ -0,0 +1,411 @@ +# revengai.AuthenticationUsersApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_requester_user_info**](AuthenticationUsersApi.md#get_requester_user_info) | **GET** /v2/users/me | Get the requesters user information +[**get_user**](AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information +[**get_user_activity**](AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity +[**get_user_comments**](AuthenticationUsersApi.md#get_user_comments) | **GET** /v2/users/me/comments | Get comments by user +[**login_user**](AuthenticationUsersApi.md#login_user) | **POST** /v2/auth/login | Authenticate a user + + +# **get_requester_user_info** +> BaseResponseGetUserResponse get_requester_user_info(authorization=authorization) + +Get the requesters user information + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse +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' + +# 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.AuthenticationUsersApi(api_client) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get the requesters user information + api_response = api_instance.get_requester_user_info(authorization=authorization) + print("The response of AuthenticationUsersApi->get_requester_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->get_requester_user_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGetUserResponse**](BaseResponseGetUserResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_user** +> BaseResponseGetPublicUserResponse get_user(user_id, authorization=authorization) + +Get a user's public information + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse +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' + +# 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.AuthenticationUsersApi(api_client) + user_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get a user's public information + api_response = api_instance.get_user(user_id, authorization=authorization) + print("The response of AuthenticationUsersApi->get_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->get_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGetPublicUserResponse**](BaseResponseGetPublicUserResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_user_activity** +> BaseResponseListUserActivityResponse get_user_activity(authorization=authorization) + +Get auth user activity + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse +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' + +# 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.AuthenticationUsersApi(api_client) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get auth user activity + api_response = api_instance.get_user_activity(authorization=authorization) + print("The response of AuthenticationUsersApi->get_user_activity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->get_user_activity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListUserActivityResponse**](BaseResponseListUserActivityResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_user_comments** +> BaseResponseListCommentResponse get_user_comments(authorization=authorization) + +Get comments by user + +Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +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' + +# 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.AuthenticationUsersApi(api_client) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get comments by user + api_response = api_instance.get_user_comments(authorization=authorization) + print("The response of AuthenticationUsersApi->get_user_comments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->get_user_comments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **login_user** +> BaseResponseLoginResponse login_user(login_request) + +Authenticate a user + +Authenticates a user and returns a token. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_login_response import BaseResponseLoginResponse +from revengai.models.login_request import LoginRequest +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' + +# 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.AuthenticationUsersApi(api_client) + login_request = revengai.LoginRequest() # LoginRequest | + + try: + # Authenticate a user + api_response = api_instance.login_user(login_request) + print("The response of AuthenticationUsersApi->login_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->login_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **login_request** | [**LoginRequest**](LoginRequest.md)| | + +### Return type + +[**BaseResponseLoginResponse**](BaseResponseLoginResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | +**401** | Invalid credentials | - | + +[[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/docs/AutoUnstripByGroupResponse.md b/docs/docs/AutoUnstripByGroupResponse.md new file mode 100644 index 0000000..ceefb9b --- /dev/null +++ b/docs/docs/AutoUnstripByGroupResponse.md @@ -0,0 +1,33 @@ +# AutoUnstripByGroupResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**progress** | **int** | Progress of the auto-unstrip operation, represented as a percentage | [optional] [default to 0] +**status** | **str** | | [optional] +**total_time** | **int** | | [optional] +**matches_map** | **Dict[str, List[MatchedFunctionGroup]]** | | [optional] +**applied** | **bool** | | [optional] + +## Example + +```python +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AutoUnstripByGroupResponse from a JSON string +auto_unstrip_by_group_response_instance = AutoUnstripByGroupResponse.from_json(json) +# print the JSON string representation of the object +print(AutoUnstripByGroupResponse.to_json()) + +# convert the object into a dict +auto_unstrip_by_group_response_dict = auto_unstrip_by_group_response_instance.to_dict() +# create an instance of AutoUnstripByGroupResponse from a dict +auto_unstrip_by_group_response_from_dict = AutoUnstripByGroupResponse.from_dict(auto_unstrip_by_group_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/docs/AutoUnstripRequest.md b/docs/docs/AutoUnstripRequest.md new file mode 100644 index 0000000..ca93df8 --- /dev/null +++ b/docs/docs/AutoUnstripRequest.md @@ -0,0 +1,30 @@ +# AutoUnstripRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_similarity** | **float** | Minimum similarity expected for a match, default is 0.9 | [optional] [default to 0.9] +**apply** | **bool** | Whether to apply the matched function names to the target binary, default is False | [optional] [default to False] + +## Example + +```python +from revengai.models.auto_unstrip_request import AutoUnstripRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AutoUnstripRequest from a JSON string +auto_unstrip_request_instance = AutoUnstripRequest.from_json(json) +# print the JSON string representation of the object +print(AutoUnstripRequest.to_json()) + +# convert the object into a dict +auto_unstrip_request_dict = auto_unstrip_request_instance.to_dict() +# create an instance of AutoUnstripRequest from a dict +auto_unstrip_request_from_dict = AutoUnstripRequest.from_dict(auto_unstrip_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/docs/AutoUnstripResponse.md b/docs/docs/AutoUnstripResponse.md new file mode 100644 index 0000000..c9374f9 --- /dev/null +++ b/docs/docs/AutoUnstripResponse.md @@ -0,0 +1,33 @@ +# AutoUnstripResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**progress** | **int** | Progress of the auto-unstrip operation, represented as a percentage | [optional] [default to 0] +**status** | **str** | | [optional] +**total_time** | **int** | | [optional] +**matches** | [**List[MatchedFunctionSuggestion]**](MatchedFunctionSuggestion.md) | | [optional] +**applied** | **bool** | | [optional] + +## Example + +```python +from revengai.models.auto_unstrip_response import AutoUnstripResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AutoUnstripResponse from a JSON string +auto_unstrip_response_instance = AutoUnstripResponse.from_json(json) +# print the JSON string representation of the object +print(AutoUnstripResponse.to_json()) + +# convert the object into a dict +auto_unstrip_response_dict = auto_unstrip_response_instance.to_dict() +# create an instance of AutoUnstripResponse from a dict +auto_unstrip_response_from_dict = AutoUnstripResponse.from_dict(auto_unstrip_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/docs/BaseResponse.md b/docs/docs/BaseResponse.md new file mode 100644 index 0000000..186e173 --- /dev/null +++ b/docs/docs/BaseResponse.md @@ -0,0 +1,33 @@ +# BaseResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnyOf**](AnyOf.md) | Response data | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response import BaseResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponse from a JSON string +base_response_instance = BaseResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponse.to_json()) + +# convert the object into a dict +base_response_dict = base_response_instance.to_dict() +# create an instance of BaseResponse from a dict +base_response_from_dict = BaseResponse.from_dict(base_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/docs/BaseResponseAnalysisCreateResponse.md b/docs/docs/BaseResponseAnalysisCreateResponse.md new file mode 100644 index 0000000..93f0097 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisCreateResponse.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisCreateResponse**](AnalysisCreateResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisCreateResponse from a JSON string +base_response_analysis_create_response_instance = BaseResponseAnalysisCreateResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisCreateResponse.to_json()) + +# convert the object into a dict +base_response_analysis_create_response_dict = base_response_analysis_create_response_instance.to_dict() +# create an instance of BaseResponseAnalysisCreateResponse from a dict +base_response_analysis_create_response_from_dict = BaseResponseAnalysisCreateResponse.from_dict(base_response_analysis_create_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/docs/BaseResponseAnalysisDetailResponse.md b/docs/docs/BaseResponseAnalysisDetailResponse.md new file mode 100644 index 0000000..23fa95e --- /dev/null +++ b/docs/docs/BaseResponseAnalysisDetailResponse.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisDetailResponse**](AnalysisDetailResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisDetailResponse from a JSON string +base_response_analysis_detail_response_instance = BaseResponseAnalysisDetailResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisDetailResponse.to_json()) + +# convert the object into a dict +base_response_analysis_detail_response_dict = base_response_analysis_detail_response_instance.to_dict() +# create an instance of BaseResponseAnalysisDetailResponse from a dict +base_response_analysis_detail_response_from_dict = BaseResponseAnalysisDetailResponse.from_dict(base_response_analysis_detail_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/docs/BaseResponseAnalysisFunctions.md b/docs/docs/BaseResponseAnalysisFunctions.md new file mode 100644 index 0000000..99b6512 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisFunctions.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisFunctions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisFunctions**](AnalysisFunctions.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisFunctions from a JSON string +base_response_analysis_functions_instance = BaseResponseAnalysisFunctions.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisFunctions.to_json()) + +# convert the object into a dict +base_response_analysis_functions_dict = base_response_analysis_functions_instance.to_dict() +# create an instance of BaseResponseAnalysisFunctions from a dict +base_response_analysis_functions_from_dict = BaseResponseAnalysisFunctions.from_dict(base_response_analysis_functions_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/docs/BaseResponseAnalysisStringsResponse.md b/docs/docs/BaseResponseAnalysisStringsResponse.md new file mode 100644 index 0000000..da37b43 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisStringsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisStringsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisStringsResponse**](AnalysisStringsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisStringsResponse from a JSON string +base_response_analysis_strings_response_instance = BaseResponseAnalysisStringsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisStringsResponse.to_json()) + +# convert the object into a dict +base_response_analysis_strings_response_dict = base_response_analysis_strings_response_instance.to_dict() +# create an instance of BaseResponseAnalysisStringsResponse from a dict +base_response_analysis_strings_response_from_dict = BaseResponseAnalysisStringsResponse.from_dict(base_response_analysis_strings_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/docs/BaseResponseAnalysisTags.md b/docs/docs/BaseResponseAnalysisTags.md new file mode 100644 index 0000000..2ac24b8 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisTags.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisTags + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisTags**](AnalysisTags.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisTags from a JSON string +base_response_analysis_tags_instance = BaseResponseAnalysisTags.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisTags.to_json()) + +# convert the object into a dict +base_response_analysis_tags_dict = base_response_analysis_tags_instance.to_dict() +# create an instance of BaseResponseAnalysisTags from a dict +base_response_analysis_tags_from_dict = BaseResponseAnalysisTags.from_dict(base_response_analysis_tags_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/docs/BaseResponseAnalysisThreatScoreData.md b/docs/docs/BaseResponseAnalysisThreatScoreData.md new file mode 100644 index 0000000..c613841 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisThreatScoreData.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisThreatScoreData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisThreatScoreData**](AnalysisThreatScoreData.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisThreatScoreData from a JSON string +base_response_analysis_threat_score_data_instance = BaseResponseAnalysisThreatScoreData.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisThreatScoreData.to_json()) + +# convert the object into a dict +base_response_analysis_threat_score_data_dict = base_response_analysis_threat_score_data_instance.to_dict() +# create an instance of BaseResponseAnalysisThreatScoreData from a dict +base_response_analysis_threat_score_data_from_dict = BaseResponseAnalysisThreatScoreData.from_dict(base_response_analysis_threat_score_data_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/docs/BaseResponseAnalysisUpdateTagsResponse.md b/docs/docs/BaseResponseAnalysisUpdateTagsResponse.md new file mode 100644 index 0000000..d02ca02 --- /dev/null +++ b/docs/docs/BaseResponseAnalysisUpdateTagsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisUpdateTagsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisUpdateTagsResponse**](AnalysisUpdateTagsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisUpdateTagsResponse from a JSON string +base_response_analysis_update_tags_response_instance = BaseResponseAnalysisUpdateTagsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisUpdateTagsResponse.to_json()) + +# convert the object into a dict +base_response_analysis_update_tags_response_dict = base_response_analysis_update_tags_response_instance.to_dict() +# create an instance of BaseResponseAnalysisUpdateTagsResponse from a dict +base_response_analysis_update_tags_response_from_dict = BaseResponseAnalysisUpdateTagsResponse.from_dict(base_response_analysis_update_tags_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/docs/BaseResponseBasic.md b/docs/docs/BaseResponseBasic.md new file mode 100644 index 0000000..5015627 --- /dev/null +++ b/docs/docs/BaseResponseBasic.md @@ -0,0 +1,33 @@ +# BaseResponseBasic + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Basic**](Basic.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_basic import BaseResponseBasic + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBasic from a JSON string +base_response_basic_instance = BaseResponseBasic.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBasic.to_json()) + +# convert the object into a dict +base_response_basic_dict = base_response_basic_instance.to_dict() +# create an instance of BaseResponseBasic from a dict +base_response_basic_from_dict = BaseResponseBasic.from_dict(base_response_basic_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/docs/BaseResponseBinaryAdditionalResponse.md b/docs/docs/BaseResponseBinaryAdditionalResponse.md new file mode 100644 index 0000000..8f65a69 --- /dev/null +++ b/docs/docs/BaseResponseBinaryAdditionalResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBinaryAdditionalResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BinaryAdditionalResponse**](BinaryAdditionalResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBinaryAdditionalResponse from a JSON string +base_response_binary_additional_response_instance = BaseResponseBinaryAdditionalResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBinaryAdditionalResponse.to_json()) + +# convert the object into a dict +base_response_binary_additional_response_dict = base_response_binary_additional_response_instance.to_dict() +# create an instance of BaseResponseBinaryAdditionalResponse from a dict +base_response_binary_additional_response_from_dict = BaseResponseBinaryAdditionalResponse.from_dict(base_response_binary_additional_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/docs/BaseResponseBinaryAnnListResponse.md b/docs/docs/BaseResponseBinaryAnnListResponse.md new file mode 100644 index 0000000..6192e46 --- /dev/null +++ b/docs/docs/BaseResponseBinaryAnnListResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBinaryAnnListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BinaryAnnListResponse**](BinaryAnnListResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBinaryAnnListResponse from a JSON string +base_response_binary_ann_list_response_instance = BaseResponseBinaryAnnListResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBinaryAnnListResponse.to_json()) + +# convert the object into a dict +base_response_binary_ann_list_response_dict = base_response_binary_ann_list_response_instance.to_dict() +# create an instance of BaseResponseBinaryAnnListResponse from a dict +base_response_binary_ann_list_response_from_dict = BaseResponseBinaryAnnListResponse.from_dict(base_response_binary_ann_list_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/docs/BaseResponseBinaryDetailsResponse.md b/docs/docs/BaseResponseBinaryDetailsResponse.md new file mode 100644 index 0000000..ef9e4c9 --- /dev/null +++ b/docs/docs/BaseResponseBinaryDetailsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBinaryDetailsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BinaryDetailsResponse**](BinaryDetailsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBinaryDetailsResponse from a JSON string +base_response_binary_details_response_instance = BaseResponseBinaryDetailsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBinaryDetailsResponse.to_json()) + +# convert the object into a dict +base_response_binary_details_response_dict = base_response_binary_details_response_instance.to_dict() +# create an instance of BaseResponseBinaryDetailsResponse from a dict +base_response_binary_details_response_from_dict = BaseResponseBinaryDetailsResponse.from_dict(base_response_binary_details_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/docs/BaseResponseBinaryExternalsResponse.md b/docs/docs/BaseResponseBinaryExternalsResponse.md new file mode 100644 index 0000000..f2f60a1 --- /dev/null +++ b/docs/docs/BaseResponseBinaryExternalsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBinaryExternalsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BinaryExternalsResponse**](BinaryExternalsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBinaryExternalsResponse from a JSON string +base_response_binary_externals_response_instance = BaseResponseBinaryExternalsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBinaryExternalsResponse.to_json()) + +# convert the object into a dict +base_response_binary_externals_response_dict = base_response_binary_externals_response_instance.to_dict() +# create an instance of BaseResponseBinaryExternalsResponse from a dict +base_response_binary_externals_response_from_dict = BaseResponseBinaryExternalsResponse.from_dict(base_response_binary_externals_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/docs/BaseResponseBinarySearchResponse.md b/docs/docs/BaseResponseBinarySearchResponse.md new file mode 100644 index 0000000..00254bf --- /dev/null +++ b/docs/docs/BaseResponseBinarySearchResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBinarySearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BinarySearchResponse**](BinarySearchResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBinarySearchResponse from a JSON string +base_response_binary_search_response_instance = BaseResponseBinarySearchResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBinarySearchResponse.to_json()) + +# convert the object into a dict +base_response_binary_search_response_dict = base_response_binary_search_response_instance.to_dict() +# create an instance of BaseResponseBinarySearchResponse from a dict +base_response_binary_search_response_from_dict = BaseResponseBinarySearchResponse.from_dict(base_response_binary_search_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/docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md b/docs/docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md new file mode 100644 index 0000000..dbe3c85 --- /dev/null +++ b/docs/docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBlockCommentsGenerationForFunctionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BlockCommentsGenerationForFunctionResponse**](BlockCommentsGenerationForFunctionResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBlockCommentsGenerationForFunctionResponse from a JSON string +base_response_block_comments_generation_for_function_response_instance = BaseResponseBlockCommentsGenerationForFunctionResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBlockCommentsGenerationForFunctionResponse.to_json()) + +# convert the object into a dict +base_response_block_comments_generation_for_function_response_dict = base_response_block_comments_generation_for_function_response_instance.to_dict() +# create an instance of BaseResponseBlockCommentsGenerationForFunctionResponse from a dict +base_response_block_comments_generation_for_function_response_from_dict = BaseResponseBlockCommentsGenerationForFunctionResponse.from_dict(base_response_block_comments_generation_for_function_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/docs/BaseResponseBlockCommentsOverviewGenerationResponse.md b/docs/docs/BaseResponseBlockCommentsOverviewGenerationResponse.md new file mode 100644 index 0000000..f5cd89b --- /dev/null +++ b/docs/docs/BaseResponseBlockCommentsOverviewGenerationResponse.md @@ -0,0 +1,33 @@ +# BaseResponseBlockCommentsOverviewGenerationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | **object** | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBlockCommentsOverviewGenerationResponse from a JSON string +base_response_block_comments_overview_generation_response_instance = BaseResponseBlockCommentsOverviewGenerationResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBlockCommentsOverviewGenerationResponse.to_json()) + +# convert the object into a dict +base_response_block_comments_overview_generation_response_dict = base_response_block_comments_overview_generation_response_instance.to_dict() +# create an instance of BaseResponseBlockCommentsOverviewGenerationResponse from a dict +base_response_block_comments_overview_generation_response_from_dict = BaseResponseBlockCommentsOverviewGenerationResponse.from_dict(base_response_block_comments_overview_generation_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/docs/BaseResponseBool.md b/docs/docs/BaseResponseBool.md new file mode 100644 index 0000000..b81b2d9 --- /dev/null +++ b/docs/docs/BaseResponseBool.md @@ -0,0 +1,33 @@ +# BaseResponseBool + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | **bool** | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_bool import BaseResponseBool + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBool from a JSON string +base_response_bool_instance = BaseResponseBool.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBool.to_json()) + +# convert the object into a dict +base_response_bool_dict = base_response_bool_instance.to_dict() +# create an instance of BaseResponseBool from a dict +base_response_bool_from_dict = BaseResponseBool.from_dict(base_response_bool_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/docs/BaseResponseBoxPlotConfidence.md b/docs/docs/BaseResponseBoxPlotConfidence.md new file mode 100644 index 0000000..0a57f06 --- /dev/null +++ b/docs/docs/BaseResponseBoxPlotConfidence.md @@ -0,0 +1,33 @@ +# BaseResponseBoxPlotConfidence + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseBoxPlotConfidence from a JSON string +base_response_box_plot_confidence_instance = BaseResponseBoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(BaseResponseBoxPlotConfidence.to_json()) + +# convert the object into a dict +base_response_box_plot_confidence_dict = base_response_box_plot_confidence_instance.to_dict() +# create an instance of BaseResponseBoxPlotConfidence from a dict +base_response_box_plot_confidence_from_dict = BaseResponseBoxPlotConfidence.from_dict(base_response_box_plot_confidence_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/docs/BaseResponseCalleesCallerFunctionsResponse.md b/docs/docs/BaseResponseCalleesCallerFunctionsResponse.md new file mode 100644 index 0000000..4edde2a --- /dev/null +++ b/docs/docs/BaseResponseCalleesCallerFunctionsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCalleesCallerFunctionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CalleesCallerFunctionsResponse**](CalleesCallerFunctionsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCalleesCallerFunctionsResponse from a JSON string +base_response_callees_caller_functions_response_instance = BaseResponseCalleesCallerFunctionsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCalleesCallerFunctionsResponse.to_json()) + +# convert the object into a dict +base_response_callees_caller_functions_response_dict = base_response_callees_caller_functions_response_instance.to_dict() +# create an instance of BaseResponseCalleesCallerFunctionsResponse from a dict +base_response_callees_caller_functions_response_from_dict = BaseResponseCalleesCallerFunctionsResponse.from_dict(base_response_callees_caller_functions_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/docs/BaseResponseCapabilities.md b/docs/docs/BaseResponseCapabilities.md new file mode 100644 index 0000000..2009b57 --- /dev/null +++ b/docs/docs/BaseResponseCapabilities.md @@ -0,0 +1,33 @@ +# BaseResponseCapabilities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Capabilities**](Capabilities.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_capabilities import BaseResponseCapabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCapabilities from a JSON string +base_response_capabilities_instance = BaseResponseCapabilities.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCapabilities.to_json()) + +# convert the object into a dict +base_response_capabilities_dict = base_response_capabilities_instance.to_dict() +# create an instance of BaseResponseCapabilities from a dict +base_response_capabilities_from_dict = BaseResponseCapabilities.from_dict(base_response_capabilities_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/docs/BaseResponseCheckSecurityChecksTaskResponse.md b/docs/docs/BaseResponseCheckSecurityChecksTaskResponse.md new file mode 100644 index 0000000..b162d95 --- /dev/null +++ b/docs/docs/BaseResponseCheckSecurityChecksTaskResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCheckSecurityChecksTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CheckSecurityChecksTaskResponse**](CheckSecurityChecksTaskResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCheckSecurityChecksTaskResponse from a JSON string +base_response_check_security_checks_task_response_instance = BaseResponseCheckSecurityChecksTaskResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCheckSecurityChecksTaskResponse.to_json()) + +# convert the object into a dict +base_response_check_security_checks_task_response_dict = base_response_check_security_checks_task_response_instance.to_dict() +# create an instance of BaseResponseCheckSecurityChecksTaskResponse from a dict +base_response_check_security_checks_task_response_from_dict = BaseResponseCheckSecurityChecksTaskResponse.from_dict(base_response_check_security_checks_task_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/docs/BaseResponseChildBinariesResponse.md b/docs/docs/BaseResponseChildBinariesResponse.md new file mode 100644 index 0000000..02b5207 --- /dev/null +++ b/docs/docs/BaseResponseChildBinariesResponse.md @@ -0,0 +1,33 @@ +# BaseResponseChildBinariesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ChildBinariesResponse**](ChildBinariesResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseChildBinariesResponse from a JSON string +base_response_child_binaries_response_instance = BaseResponseChildBinariesResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseChildBinariesResponse.to_json()) + +# convert the object into a dict +base_response_child_binaries_response_dict = base_response_child_binaries_response_instance.to_dict() +# create an instance of BaseResponseChildBinariesResponse from a dict +base_response_child_binaries_response_from_dict = BaseResponseChildBinariesResponse.from_dict(base_response_child_binaries_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/docs/BaseResponseCollectionBinariesUpdateResponse.md b/docs/docs/BaseResponseCollectionBinariesUpdateResponse.md new file mode 100644 index 0000000..2244ac3 --- /dev/null +++ b/docs/docs/BaseResponseCollectionBinariesUpdateResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCollectionBinariesUpdateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CollectionBinariesUpdateResponse**](CollectionBinariesUpdateResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCollectionBinariesUpdateResponse from a JSON string +base_response_collection_binaries_update_response_instance = BaseResponseCollectionBinariesUpdateResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCollectionBinariesUpdateResponse.to_json()) + +# convert the object into a dict +base_response_collection_binaries_update_response_dict = base_response_collection_binaries_update_response_instance.to_dict() +# create an instance of BaseResponseCollectionBinariesUpdateResponse from a dict +base_response_collection_binaries_update_response_from_dict = BaseResponseCollectionBinariesUpdateResponse.from_dict(base_response_collection_binaries_update_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/docs/BaseResponseCollectionResponse.md b/docs/docs/BaseResponseCollectionResponse.md new file mode 100644 index 0000000..9a243db --- /dev/null +++ b/docs/docs/BaseResponseCollectionResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCollectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CollectionResponse**](CollectionResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCollectionResponse from a JSON string +base_response_collection_response_instance = BaseResponseCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCollectionResponse.to_json()) + +# convert the object into a dict +base_response_collection_response_dict = base_response_collection_response_instance.to_dict() +# create an instance of BaseResponseCollectionResponse from a dict +base_response_collection_response_from_dict = BaseResponseCollectionResponse.from_dict(base_response_collection_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/docs/BaseResponseCollectionSearchResponse.md b/docs/docs/BaseResponseCollectionSearchResponse.md new file mode 100644 index 0000000..c3d501b --- /dev/null +++ b/docs/docs/BaseResponseCollectionSearchResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCollectionSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CollectionSearchResponse**](CollectionSearchResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCollectionSearchResponse from a JSON string +base_response_collection_search_response_instance = BaseResponseCollectionSearchResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCollectionSearchResponse.to_json()) + +# convert the object into a dict +base_response_collection_search_response_dict = base_response_collection_search_response_instance.to_dict() +# create an instance of BaseResponseCollectionSearchResponse from a dict +base_response_collection_search_response_from_dict = BaseResponseCollectionSearchResponse.from_dict(base_response_collection_search_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/docs/BaseResponseCollectionTagsUpdateResponse.md b/docs/docs/BaseResponseCollectionTagsUpdateResponse.md new file mode 100644 index 0000000..deff6af --- /dev/null +++ b/docs/docs/BaseResponseCollectionTagsUpdateResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCollectionTagsUpdateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CollectionTagsUpdateResponse**](CollectionTagsUpdateResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCollectionTagsUpdateResponse from a JSON string +base_response_collection_tags_update_response_instance = BaseResponseCollectionTagsUpdateResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCollectionTagsUpdateResponse.to_json()) + +# convert the object into a dict +base_response_collection_tags_update_response_dict = base_response_collection_tags_update_response_instance.to_dict() +# create an instance of BaseResponseCollectionTagsUpdateResponse from a dict +base_response_collection_tags_update_response_from_dict = BaseResponseCollectionTagsUpdateResponse.from_dict(base_response_collection_tags_update_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/docs/BaseResponseCommentResponse.md b/docs/docs/BaseResponseCommentResponse.md new file mode 100644 index 0000000..03e1958 --- /dev/null +++ b/docs/docs/BaseResponseCommentResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCommentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CommentResponse**](CommentResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_comment_response import BaseResponseCommentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCommentResponse from a JSON string +base_response_comment_response_instance = BaseResponseCommentResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCommentResponse.to_json()) + +# convert the object into a dict +base_response_comment_response_dict = base_response_comment_response_instance.to_dict() +# create an instance of BaseResponseCommentResponse from a dict +base_response_comment_response_from_dict = BaseResponseCommentResponse.from_dict(base_response_comment_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/docs/BaseResponseCommunities.md b/docs/docs/BaseResponseCommunities.md new file mode 100644 index 0000000..4021629 --- /dev/null +++ b/docs/docs/BaseResponseCommunities.md @@ -0,0 +1,33 @@ +# BaseResponseCommunities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Communities**](Communities.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_communities import BaseResponseCommunities + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCommunities from a JSON string +base_response_communities_instance = BaseResponseCommunities.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCommunities.to_json()) + +# convert the object into a dict +base_response_communities_dict = base_response_communities_instance.to_dict() +# create an instance of BaseResponseCommunities from a dict +base_response_communities_from_dict = BaseResponseCommunities.from_dict(base_response_communities_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/docs/BaseResponseCreated.md b/docs/docs/BaseResponseCreated.md new file mode 100644 index 0000000..f6f19eb --- /dev/null +++ b/docs/docs/BaseResponseCreated.md @@ -0,0 +1,33 @@ +# BaseResponseCreated + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Created**](Created.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_created import BaseResponseCreated + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCreated from a JSON string +base_response_created_instance = BaseResponseCreated.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCreated.to_json()) + +# convert the object into a dict +base_response_created_dict = base_response_created_instance.to_dict() +# create an instance of BaseResponseCreated from a dict +base_response_created_from_dict = BaseResponseCreated.from_dict(base_response_created_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/docs/BaseResponseDecompilationResponse.md b/docs/docs/BaseResponseDecompilationResponse.md new file mode 100644 index 0000000..5c7d6b0 --- /dev/null +++ b/docs/docs/BaseResponseDecompilationResponse.md @@ -0,0 +1,33 @@ +# BaseResponseDecompilationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**DecompilationResponse**](DecompilationResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseDecompilationResponse from a JSON string +base_response_decompilation_response_instance = BaseResponseDecompilationResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseDecompilationResponse.to_json()) + +# convert the object into a dict +base_response_decompilation_response_dict = base_response_decompilation_response_instance.to_dict() +# create an instance of BaseResponseDecompilationResponse from a dict +base_response_decompilation_response_from_dict = BaseResponseDecompilationResponse.from_dict(base_response_decompilation_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/docs/BaseResponseDict.md b/docs/docs/BaseResponseDict.md new file mode 100644 index 0000000..a81c6de --- /dev/null +++ b/docs/docs/BaseResponseDict.md @@ -0,0 +1,33 @@ +# BaseResponseDict + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | **Dict[str, object]** | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_dict import BaseResponseDict + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseDict from a JSON string +base_response_dict_instance = BaseResponseDict.from_json(json) +# print the JSON string representation of the object +print(BaseResponseDict.to_json()) + +# convert the object into a dict +base_response_dict_dict = base_response_dict_instance.to_dict() +# create an instance of BaseResponseDict from a dict +base_response_dict_from_dict = BaseResponseDict.from_dict(base_response_dict_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/docs/BaseResponseDynamicExecutionStatus.md b/docs/docs/BaseResponseDynamicExecutionStatus.md new file mode 100644 index 0000000..50e6a09 --- /dev/null +++ b/docs/docs/BaseResponseDynamicExecutionStatus.md @@ -0,0 +1,33 @@ +# BaseResponseDynamicExecutionStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AppServicesDynamicExecutionSchemasDynamicExecutionStatus**](AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseDynamicExecutionStatus from a JSON string +base_response_dynamic_execution_status_instance = BaseResponseDynamicExecutionStatus.from_json(json) +# print the JSON string representation of the object +print(BaseResponseDynamicExecutionStatus.to_json()) + +# convert the object into a dict +base_response_dynamic_execution_status_dict = base_response_dynamic_execution_status_instance.to_dict() +# create an instance of BaseResponseDynamicExecutionStatus from a dict +base_response_dynamic_execution_status_from_dict = BaseResponseDynamicExecutionStatus.from_dict(base_response_dynamic_execution_status_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/docs/BaseResponseExternalResponse.md b/docs/docs/BaseResponseExternalResponse.md new file mode 100644 index 0000000..0e99a0c --- /dev/null +++ b/docs/docs/BaseResponseExternalResponse.md @@ -0,0 +1,33 @@ +# BaseResponseExternalResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ExternalResponse**](ExternalResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_external_response import BaseResponseExternalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseExternalResponse from a JSON string +base_response_external_response_instance = BaseResponseExternalResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseExternalResponse.to_json()) + +# convert the object into a dict +base_response_external_response_dict = base_response_external_response_instance.to_dict() +# create an instance of BaseResponseExternalResponse from a dict +base_response_external_response_from_dict = BaseResponseExternalResponse.from_dict(base_response_external_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/docs/BaseResponseFunctionAnalysisThreatScoreData.md b/docs/docs/BaseResponseFunctionAnalysisThreatScoreData.md new file mode 100644 index 0000000..be95889 --- /dev/null +++ b/docs/docs/BaseResponseFunctionAnalysisThreatScoreData.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionAnalysisThreatScoreData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionAnalysisThreatScoreData**](FunctionAnalysisThreatScoreData.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionAnalysisThreatScoreData from a JSON string +base_response_function_analysis_threat_score_data_instance = BaseResponseFunctionAnalysisThreatScoreData.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionAnalysisThreatScoreData.to_json()) + +# convert the object into a dict +base_response_function_analysis_threat_score_data_dict = base_response_function_analysis_threat_score_data_instance.to_dict() +# create an instance of BaseResponseFunctionAnalysisThreatScoreData from a dict +base_response_function_analysis_threat_score_data_from_dict = BaseResponseFunctionAnalysisThreatScoreData.from_dict(base_response_function_analysis_threat_score_data_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/docs/BaseResponseFunctionBlocksResponse.md b/docs/docs/BaseResponseFunctionBlocksResponse.md new file mode 100644 index 0000000..44bae60 --- /dev/null +++ b/docs/docs/BaseResponseFunctionBlocksResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionBlocksResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionBlocksResponse**](FunctionBlocksResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionBlocksResponse from a JSON string +base_response_function_blocks_response_instance = BaseResponseFunctionBlocksResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionBlocksResponse.to_json()) + +# convert the object into a dict +base_response_function_blocks_response_dict = base_response_function_blocks_response_instance.to_dict() +# create an instance of BaseResponseFunctionBlocksResponse from a dict +base_response_function_blocks_response_from_dict = BaseResponseFunctionBlocksResponse.from_dict(base_response_function_blocks_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/docs/BaseResponseFunctionCapabilityResponse.md b/docs/docs/BaseResponseFunctionCapabilityResponse.md new file mode 100644 index 0000000..fce8ac0 --- /dev/null +++ b/docs/docs/BaseResponseFunctionCapabilityResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionCapabilityResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionCapabilityResponse**](FunctionCapabilityResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionCapabilityResponse from a JSON string +base_response_function_capability_response_instance = BaseResponseFunctionCapabilityResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionCapabilityResponse.to_json()) + +# convert the object into a dict +base_response_function_capability_response_dict = base_response_function_capability_response_instance.to_dict() +# create an instance of BaseResponseFunctionCapabilityResponse from a dict +base_response_function_capability_response_from_dict = BaseResponseFunctionCapabilityResponse.from_dict(base_response_function_capability_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/docs/BaseResponseFunctionDataTypes.md b/docs/docs/BaseResponseFunctionDataTypes.md new file mode 100644 index 0000000..f0bc91e --- /dev/null +++ b/docs/docs/BaseResponseFunctionDataTypes.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionDataTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionDataTypes**](FunctionDataTypes.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionDataTypes from a JSON string +base_response_function_data_types_instance = BaseResponseFunctionDataTypes.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionDataTypes.to_json()) + +# convert the object into a dict +base_response_function_data_types_dict = base_response_function_data_types_instance.to_dict() +# create an instance of BaseResponseFunctionDataTypes from a dict +base_response_function_data_types_from_dict = BaseResponseFunctionDataTypes.from_dict(base_response_function_data_types_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/docs/BaseResponseFunctionDataTypesList.md b/docs/docs/BaseResponseFunctionDataTypesList.md new file mode 100644 index 0000000..b399140 --- /dev/null +++ b/docs/docs/BaseResponseFunctionDataTypesList.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionDataTypesList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionDataTypesList**](FunctionDataTypesList.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionDataTypesList from a JSON string +base_response_function_data_types_list_instance = BaseResponseFunctionDataTypesList.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionDataTypesList.to_json()) + +# convert the object into a dict +base_response_function_data_types_list_dict = base_response_function_data_types_list_instance.to_dict() +# create an instance of BaseResponseFunctionDataTypesList from a dict +base_response_function_data_types_list_from_dict = BaseResponseFunctionDataTypesList.from_dict(base_response_function_data_types_list_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/docs/BaseResponseFunctionSearchResponse.md b/docs/docs/BaseResponseFunctionSearchResponse.md new file mode 100644 index 0000000..c868a83 --- /dev/null +++ b/docs/docs/BaseResponseFunctionSearchResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionSearchResponse**](FunctionSearchResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionSearchResponse from a JSON string +base_response_function_search_response_instance = BaseResponseFunctionSearchResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionSearchResponse.to_json()) + +# convert the object into a dict +base_response_function_search_response_dict = base_response_function_search_response_instance.to_dict() +# create an instance of BaseResponseFunctionSearchResponse from a dict +base_response_function_search_response_from_dict = BaseResponseFunctionSearchResponse.from_dict(base_response_function_search_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/docs/BaseResponseFunctionStringsResponse.md b/docs/docs/BaseResponseFunctionStringsResponse.md new file mode 100644 index 0000000..c1ef50b --- /dev/null +++ b/docs/docs/BaseResponseFunctionStringsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionStringsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionStringsResponse**](FunctionStringsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionStringsResponse from a JSON string +base_response_function_strings_response_instance = BaseResponseFunctionStringsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionStringsResponse.to_json()) + +# convert the object into a dict +base_response_function_strings_response_dict = base_response_function_strings_response_instance.to_dict() +# create an instance of BaseResponseFunctionStringsResponse from a dict +base_response_function_strings_response_from_dict = BaseResponseFunctionStringsResponse.from_dict(base_response_function_strings_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/docs/BaseResponseFunctionTaskResponse.md b/docs/docs/BaseResponseFunctionTaskResponse.md new file mode 100644 index 0000000..72b78c2 --- /dev/null +++ b/docs/docs/BaseResponseFunctionTaskResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionTaskResponse**](FunctionTaskResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionTaskResponse from a JSON string +base_response_function_task_response_instance = BaseResponseFunctionTaskResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionTaskResponse.to_json()) + +# convert the object into a dict +base_response_function_task_response_dict = base_response_function_task_response_instance.to_dict() +# create an instance of BaseResponseFunctionTaskResponse from a dict +base_response_function_task_response_from_dict = BaseResponseFunctionTaskResponse.from_dict(base_response_function_task_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/docs/BaseResponseFunctionThreatScore.md b/docs/docs/BaseResponseFunctionThreatScore.md new file mode 100644 index 0000000..1c4ee34 --- /dev/null +++ b/docs/docs/BaseResponseFunctionThreatScore.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionThreatScore + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionThreatScore**](FunctionThreatScore.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionThreatScore from a JSON string +base_response_function_threat_score_instance = BaseResponseFunctionThreatScore.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionThreatScore.to_json()) + +# convert the object into a dict +base_response_function_threat_score_dict = base_response_function_threat_score_instance.to_dict() +# create an instance of BaseResponseFunctionThreatScore from a dict +base_response_function_threat_score_from_dict = BaseResponseFunctionThreatScore.from_dict(base_response_function_threat_score_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/docs/BaseResponseFunctionsDetailResponse.md b/docs/docs/BaseResponseFunctionsDetailResponse.md new file mode 100644 index 0000000..cdfae9a --- /dev/null +++ b/docs/docs/BaseResponseFunctionsDetailResponse.md @@ -0,0 +1,33 @@ +# BaseResponseFunctionsDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**FunctionsDetailResponse**](FunctionsDetailResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseFunctionsDetailResponse from a JSON string +base_response_functions_detail_response_instance = BaseResponseFunctionsDetailResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseFunctionsDetailResponse.to_json()) + +# convert the object into a dict +base_response_functions_detail_response_dict = base_response_functions_detail_response_instance.to_dict() +# create an instance of BaseResponseFunctionsDetailResponse from a dict +base_response_functions_detail_response_from_dict = BaseResponseFunctionsDetailResponse.from_dict(base_response_functions_detail_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/docs/BaseResponseGenerateFunctionDataTypes.md b/docs/docs/BaseResponseGenerateFunctionDataTypes.md new file mode 100644 index 0000000..2d74b8e --- /dev/null +++ b/docs/docs/BaseResponseGenerateFunctionDataTypes.md @@ -0,0 +1,33 @@ +# BaseResponseGenerateFunctionDataTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GenerateFunctionDataTypes**](GenerateFunctionDataTypes.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGenerateFunctionDataTypes from a JSON string +base_response_generate_function_data_types_instance = BaseResponseGenerateFunctionDataTypes.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGenerateFunctionDataTypes.to_json()) + +# convert the object into a dict +base_response_generate_function_data_types_dict = base_response_generate_function_data_types_instance.to_dict() +# create an instance of BaseResponseGenerateFunctionDataTypes from a dict +base_response_generate_function_data_types_from_dict = BaseResponseGenerateFunctionDataTypes.from_dict(base_response_generate_function_data_types_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/docs/BaseResponseGenerationStatusList.md b/docs/docs/BaseResponseGenerationStatusList.md new file mode 100644 index 0000000..d2e7600 --- /dev/null +++ b/docs/docs/BaseResponseGenerationStatusList.md @@ -0,0 +1,33 @@ +# BaseResponseGenerationStatusList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GenerationStatusList**](GenerationStatusList.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGenerationStatusList from a JSON string +base_response_generation_status_list_instance = BaseResponseGenerationStatusList.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGenerationStatusList.to_json()) + +# convert the object into a dict +base_response_generation_status_list_dict = base_response_generation_status_list_instance.to_dict() +# create an instance of BaseResponseGenerationStatusList from a dict +base_response_generation_status_list_from_dict = BaseResponseGenerationStatusList.from_dict(base_response_generation_status_list_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/docs/BaseResponseGetAiDecompilationRatingResponse.md b/docs/docs/BaseResponseGetAiDecompilationRatingResponse.md new file mode 100644 index 0000000..26e9f15 --- /dev/null +++ b/docs/docs/BaseResponseGetAiDecompilationRatingResponse.md @@ -0,0 +1,33 @@ +# BaseResponseGetAiDecompilationRatingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GetAiDecompilationRatingResponse**](GetAiDecompilationRatingResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGetAiDecompilationRatingResponse from a JSON string +base_response_get_ai_decompilation_rating_response_instance = BaseResponseGetAiDecompilationRatingResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGetAiDecompilationRatingResponse.to_json()) + +# convert the object into a dict +base_response_get_ai_decompilation_rating_response_dict = base_response_get_ai_decompilation_rating_response_instance.to_dict() +# create an instance of BaseResponseGetAiDecompilationRatingResponse from a dict +base_response_get_ai_decompilation_rating_response_from_dict = BaseResponseGetAiDecompilationRatingResponse.from_dict(base_response_get_ai_decompilation_rating_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/docs/BaseResponseGetAiDecompilationTask.md b/docs/docs/BaseResponseGetAiDecompilationTask.md new file mode 100644 index 0000000..ebd36f7 --- /dev/null +++ b/docs/docs/BaseResponseGetAiDecompilationTask.md @@ -0,0 +1,33 @@ +# BaseResponseGetAiDecompilationTask + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GetAiDecompilationTask**](GetAiDecompilationTask.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGetAiDecompilationTask from a JSON string +base_response_get_ai_decompilation_task_instance = BaseResponseGetAiDecompilationTask.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGetAiDecompilationTask.to_json()) + +# convert the object into a dict +base_response_get_ai_decompilation_task_dict = base_response_get_ai_decompilation_task_instance.to_dict() +# create an instance of BaseResponseGetAiDecompilationTask from a dict +base_response_get_ai_decompilation_task_from_dict = BaseResponseGetAiDecompilationTask.from_dict(base_response_get_ai_decompilation_task_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/docs/BaseResponseGetPublicUserResponse.md b/docs/docs/BaseResponseGetPublicUserResponse.md new file mode 100644 index 0000000..9eb3808 --- /dev/null +++ b/docs/docs/BaseResponseGetPublicUserResponse.md @@ -0,0 +1,33 @@ +# BaseResponseGetPublicUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GetPublicUserResponse**](GetPublicUserResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGetPublicUserResponse from a JSON string +base_response_get_public_user_response_instance = BaseResponseGetPublicUserResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGetPublicUserResponse.to_json()) + +# convert the object into a dict +base_response_get_public_user_response_dict = base_response_get_public_user_response_instance.to_dict() +# create an instance of BaseResponseGetPublicUserResponse from a dict +base_response_get_public_user_response_from_dict = BaseResponseGetPublicUserResponse.from_dict(base_response_get_public_user_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/docs/BaseResponseGetUserResponse.md b/docs/docs/BaseResponseGetUserResponse.md new file mode 100644 index 0000000..5f8ce01 --- /dev/null +++ b/docs/docs/BaseResponseGetUserResponse.md @@ -0,0 +1,33 @@ +# BaseResponseGetUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**GetUserResponse**](GetUserResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseGetUserResponse from a JSON string +base_response_get_user_response_instance = BaseResponseGetUserResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseGetUserResponse.to_json()) + +# convert the object into a dict +base_response_get_user_response_dict = base_response_get_user_response_instance.to_dict() +# create an instance of BaseResponseGetUserResponse from a dict +base_response_get_user_response_from_dict = BaseResponseGetUserResponse.from_dict(base_response_get_user_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/docs/BaseResponseListCollectionResults.md b/docs/docs/BaseResponseListCollectionResults.md new file mode 100644 index 0000000..ede746f --- /dev/null +++ b/docs/docs/BaseResponseListCollectionResults.md @@ -0,0 +1,33 @@ +# BaseResponseListCollectionResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ListCollectionResults**](ListCollectionResults.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListCollectionResults from a JSON string +base_response_list_collection_results_instance = BaseResponseListCollectionResults.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListCollectionResults.to_json()) + +# convert the object into a dict +base_response_list_collection_results_dict = base_response_list_collection_results_instance.to_dict() +# create an instance of BaseResponseListCollectionResults from a dict +base_response_list_collection_results_from_dict = BaseResponseListCollectionResults.from_dict(base_response_list_collection_results_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/docs/BaseResponseListCommentResponse.md b/docs/docs/BaseResponseListCommentResponse.md new file mode 100644 index 0000000..da2e08b --- /dev/null +++ b/docs/docs/BaseResponseListCommentResponse.md @@ -0,0 +1,33 @@ +# BaseResponseListCommentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[CommentResponse]**](CommentResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListCommentResponse from a JSON string +base_response_list_comment_response_instance = BaseResponseListCommentResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListCommentResponse.to_json()) + +# convert the object into a dict +base_response_list_comment_response_dict = base_response_list_comment_response_instance.to_dict() +# create an instance of BaseResponseListCommentResponse from a dict +base_response_list_comment_response_from_dict = BaseResponseListCommentResponse.from_dict(base_response_list_comment_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/docs/BaseResponseListDieMatch.md b/docs/docs/BaseResponseListDieMatch.md new file mode 100644 index 0000000..134de33 --- /dev/null +++ b/docs/docs/BaseResponseListDieMatch.md @@ -0,0 +1,33 @@ +# BaseResponseListDieMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[DieMatch]**](DieMatch.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListDieMatch from a JSON string +base_response_list_die_match_instance = BaseResponseListDieMatch.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListDieMatch.to_json()) + +# convert the object into a dict +base_response_list_die_match_dict = base_response_list_die_match_instance.to_dict() +# create an instance of BaseResponseListDieMatch from a dict +base_response_list_die_match_from_dict = BaseResponseListDieMatch.from_dict(base_response_list_die_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/docs/BaseResponseListFunctionBoxPlotConfidence.md b/docs/docs/BaseResponseListFunctionBoxPlotConfidence.md new file mode 100644 index 0000000..719da56 --- /dev/null +++ b/docs/docs/BaseResponseListFunctionBoxPlotConfidence.md @@ -0,0 +1,33 @@ +# BaseResponseListFunctionBoxPlotConfidence + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[FunctionBoxPlotConfidence]**](FunctionBoxPlotConfidence.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListFunctionBoxPlotConfidence from a JSON string +base_response_list_function_box_plot_confidence_instance = BaseResponseListFunctionBoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListFunctionBoxPlotConfidence.to_json()) + +# convert the object into a dict +base_response_list_function_box_plot_confidence_dict = base_response_list_function_box_plot_confidence_instance.to_dict() +# create an instance of BaseResponseListFunctionBoxPlotConfidence from a dict +base_response_list_function_box_plot_confidence_from_dict = BaseResponseListFunctionBoxPlotConfidence.from_dict(base_response_list_function_box_plot_confidence_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/docs/BaseResponseListFunctionNameHistory.md b/docs/docs/BaseResponseListFunctionNameHistory.md new file mode 100644 index 0000000..e79ba2c --- /dev/null +++ b/docs/docs/BaseResponseListFunctionNameHistory.md @@ -0,0 +1,33 @@ +# BaseResponseListFunctionNameHistory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[FunctionNameHistory]**](FunctionNameHistory.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListFunctionNameHistory from a JSON string +base_response_list_function_name_history_instance = BaseResponseListFunctionNameHistory.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListFunctionNameHistory.to_json()) + +# convert the object into a dict +base_response_list_function_name_history_dict = base_response_list_function_name_history_instance.to_dict() +# create an instance of BaseResponseListFunctionNameHistory from a dict +base_response_list_function_name_history_from_dict = BaseResponseListFunctionNameHistory.from_dict(base_response_list_function_name_history_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/docs/BaseResponseListSBOM.md b/docs/docs/BaseResponseListSBOM.md new file mode 100644 index 0000000..d210c5e --- /dev/null +++ b/docs/docs/BaseResponseListSBOM.md @@ -0,0 +1,33 @@ +# BaseResponseListSBOM + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[SBOM]**](SBOM.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_sbom import BaseResponseListSBOM + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListSBOM from a JSON string +base_response_list_sbom_instance = BaseResponseListSBOM.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListSBOM.to_json()) + +# convert the object into a dict +base_response_list_sbom_dict = base_response_list_sbom_instance.to_dict() +# create an instance of BaseResponseListSBOM from a dict +base_response_list_sbom_from_dict = BaseResponseListSBOM.from_dict(base_response_list_sbom_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/docs/BaseResponseListSimilarFunctionsResponse.md b/docs/docs/BaseResponseListSimilarFunctionsResponse.md new file mode 100644 index 0000000..06c0ddb --- /dev/null +++ b/docs/docs/BaseResponseListSimilarFunctionsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseListSimilarFunctionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[SimilarFunctionsResponse]**](SimilarFunctionsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListSimilarFunctionsResponse from a JSON string +base_response_list_similar_functions_response_instance = BaseResponseListSimilarFunctionsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListSimilarFunctionsResponse.to_json()) + +# convert the object into a dict +base_response_list_similar_functions_response_dict = base_response_list_similar_functions_response_instance.to_dict() +# create an instance of BaseResponseListSimilarFunctionsResponse from a dict +base_response_list_similar_functions_response_from_dict = BaseResponseListSimilarFunctionsResponse.from_dict(base_response_list_similar_functions_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/docs/BaseResponseListTagOriginBoxPlotConfidence.md b/docs/docs/BaseResponseListTagOriginBoxPlotConfidence.md new file mode 100644 index 0000000..933ec97 --- /dev/null +++ b/docs/docs/BaseResponseListTagOriginBoxPlotConfidence.md @@ -0,0 +1,33 @@ +# BaseResponseListTagOriginBoxPlotConfidence + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[TagOriginBoxPlotConfidence]**](TagOriginBoxPlotConfidence.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListTagOriginBoxPlotConfidence from a JSON string +base_response_list_tag_origin_box_plot_confidence_instance = BaseResponseListTagOriginBoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListTagOriginBoxPlotConfidence.to_json()) + +# convert the object into a dict +base_response_list_tag_origin_box_plot_confidence_dict = base_response_list_tag_origin_box_plot_confidence_instance.to_dict() +# create an instance of BaseResponseListTagOriginBoxPlotConfidence from a dict +base_response_list_tag_origin_box_plot_confidence_from_dict = BaseResponseListTagOriginBoxPlotConfidence.from_dict(base_response_list_tag_origin_box_plot_confidence_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/docs/BaseResponseListUserActivityResponse.md b/docs/docs/BaseResponseListUserActivityResponse.md new file mode 100644 index 0000000..a2846d2 --- /dev/null +++ b/docs/docs/BaseResponseListUserActivityResponse.md @@ -0,0 +1,33 @@ +# BaseResponseListUserActivityResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**List[UserActivityResponse]**](UserActivityResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseListUserActivityResponse from a JSON string +base_response_list_user_activity_response_instance = BaseResponseListUserActivityResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseListUserActivityResponse.to_json()) + +# convert the object into a dict +base_response_list_user_activity_response_dict = base_response_list_user_activity_response_instance.to_dict() +# create an instance of BaseResponseListUserActivityResponse from a dict +base_response_list_user_activity_response_from_dict = BaseResponseListUserActivityResponse.from_dict(base_response_list_user_activity_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/docs/BaseResponseLoginResponse.md b/docs/docs/BaseResponseLoginResponse.md new file mode 100644 index 0000000..bc053d2 --- /dev/null +++ b/docs/docs/BaseResponseLoginResponse.md @@ -0,0 +1,33 @@ +# BaseResponseLoginResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**LoginResponse**](LoginResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_login_response import BaseResponseLoginResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseLoginResponse from a JSON string +base_response_login_response_instance = BaseResponseLoginResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseLoginResponse.to_json()) + +# convert the object into a dict +base_response_login_response_dict = base_response_login_response_instance.to_dict() +# create an instance of BaseResponseLoginResponse from a dict +base_response_login_response_from_dict = BaseResponseLoginResponse.from_dict(base_response_login_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/docs/BaseResponseLogs.md b/docs/docs/BaseResponseLogs.md new file mode 100644 index 0000000..608297d --- /dev/null +++ b/docs/docs/BaseResponseLogs.md @@ -0,0 +1,33 @@ +# BaseResponseLogs + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Logs**](Logs.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_logs import BaseResponseLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseLogs from a JSON string +base_response_logs_instance = BaseResponseLogs.from_json(json) +# print the JSON string representation of the object +print(BaseResponseLogs.to_json()) + +# convert the object into a dict +base_response_logs_dict = base_response_logs_instance.to_dict() +# create an instance of BaseResponseLogs from a dict +base_response_logs_from_dict = BaseResponseLogs.from_dict(base_response_logs_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/docs/BaseResponseModelsResponse.md b/docs/docs/BaseResponseModelsResponse.md new file mode 100644 index 0000000..8d8a035 --- /dev/null +++ b/docs/docs/BaseResponseModelsResponse.md @@ -0,0 +1,33 @@ +# BaseResponseModelsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ModelsResponse**](ModelsResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_models_response import BaseResponseModelsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseModelsResponse from a JSON string +base_response_models_response_instance = BaseResponseModelsResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseModelsResponse.to_json()) + +# convert the object into a dict +base_response_models_response_dict = base_response_models_response_instance.to_dict() +# create an instance of BaseResponseModelsResponse from a dict +base_response_models_response_from_dict = BaseResponseModelsResponse.from_dict(base_response_models_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/docs/BaseResponseNearestNeighborAnalysis.md b/docs/docs/BaseResponseNearestNeighborAnalysis.md new file mode 100644 index 0000000..e31b0bd --- /dev/null +++ b/docs/docs/BaseResponseNearestNeighborAnalysis.md @@ -0,0 +1,33 @@ +# BaseResponseNearestNeighborAnalysis + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | **Dict[str, Dict[str, NearestNeighbor]]** | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseNearestNeighborAnalysis from a JSON string +base_response_nearest_neighbor_analysis_instance = BaseResponseNearestNeighborAnalysis.from_json(json) +# print the JSON string representation of the object +print(BaseResponseNearestNeighborAnalysis.to_json()) + +# convert the object into a dict +base_response_nearest_neighbor_analysis_dict = base_response_nearest_neighbor_analysis_instance.to_dict() +# create an instance of BaseResponseNearestNeighborAnalysis from a dict +base_response_nearest_neighbor_analysis_from_dict = BaseResponseNearestNeighborAnalysis.from_dict(base_response_nearest_neighbor_analysis_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/docs/BaseResponseNetworkOverviewResponse.md b/docs/docs/BaseResponseNetworkOverviewResponse.md new file mode 100644 index 0000000..e749d9b --- /dev/null +++ b/docs/docs/BaseResponseNetworkOverviewResponse.md @@ -0,0 +1,33 @@ +# BaseResponseNetworkOverviewResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**NetworkOverviewResponse**](NetworkOverviewResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseNetworkOverviewResponse from a JSON string +base_response_network_overview_response_instance = BaseResponseNetworkOverviewResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseNetworkOverviewResponse.to_json()) + +# convert the object into a dict +base_response_network_overview_response_dict = base_response_network_overview_response_instance.to_dict() +# create an instance of BaseResponseNetworkOverviewResponse from a dict +base_response_network_overview_response_from_dict = BaseResponseNetworkOverviewResponse.from_dict(base_response_network_overview_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/docs/BaseResponseParams.md b/docs/docs/BaseResponseParams.md new file mode 100644 index 0000000..9cc7db9 --- /dev/null +++ b/docs/docs/BaseResponseParams.md @@ -0,0 +1,33 @@ +# BaseResponseParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Params**](Params.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_params import BaseResponseParams + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseParams from a JSON string +base_response_params_instance = BaseResponseParams.from_json(json) +# print the JSON string representation of the object +print(BaseResponseParams.to_json()) + +# convert the object into a dict +base_response_params_dict = base_response_params_instance.to_dict() +# create an instance of BaseResponseParams from a dict +base_response_params_from_dict = BaseResponseParams.from_dict(base_response_params_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/docs/BaseResponseProcessDumps.md b/docs/docs/BaseResponseProcessDumps.md new file mode 100644 index 0000000..2e6257b --- /dev/null +++ b/docs/docs/BaseResponseProcessDumps.md @@ -0,0 +1,33 @@ +# BaseResponseProcessDumps + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ProcessDumps**](ProcessDumps.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseProcessDumps from a JSON string +base_response_process_dumps_instance = BaseResponseProcessDumps.from_json(json) +# print the JSON string representation of the object +print(BaseResponseProcessDumps.to_json()) + +# convert the object into a dict +base_response_process_dumps_dict = base_response_process_dumps_instance.to_dict() +# create an instance of BaseResponseProcessDumps from a dict +base_response_process_dumps_from_dict = BaseResponseProcessDumps.from_dict(base_response_process_dumps_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/docs/BaseResponseProcessRegistry.md b/docs/docs/BaseResponseProcessRegistry.md new file mode 100644 index 0000000..47975ab --- /dev/null +++ b/docs/docs/BaseResponseProcessRegistry.md @@ -0,0 +1,33 @@ +# BaseResponseProcessRegistry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ProcessRegistry**](ProcessRegistry.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseProcessRegistry from a JSON string +base_response_process_registry_instance = BaseResponseProcessRegistry.from_json(json) +# print the JSON string representation of the object +print(BaseResponseProcessRegistry.to_json()) + +# convert the object into a dict +base_response_process_registry_dict = base_response_process_registry_instance.to_dict() +# create an instance of BaseResponseProcessRegistry from a dict +base_response_process_registry_from_dict = BaseResponseProcessRegistry.from_dict(base_response_process_registry_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/docs/BaseResponseProcessTree.md b/docs/docs/BaseResponseProcessTree.md new file mode 100644 index 0000000..2c4e2eb --- /dev/null +++ b/docs/docs/BaseResponseProcessTree.md @@ -0,0 +1,33 @@ +# BaseResponseProcessTree + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ProcessTree**](ProcessTree.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_process_tree import BaseResponseProcessTree + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseProcessTree from a JSON string +base_response_process_tree_instance = BaseResponseProcessTree.from_json(json) +# print the JSON string representation of the object +print(BaseResponseProcessTree.to_json()) + +# convert the object into a dict +base_response_process_tree_dict = base_response_process_tree_instance.to_dict() +# create an instance of BaseResponseProcessTree from a dict +base_response_process_tree_from_dict = BaseResponseProcessTree.from_dict(base_response_process_tree_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/docs/BaseResponseQueuedSecurityChecksTaskResponse.md b/docs/docs/BaseResponseQueuedSecurityChecksTaskResponse.md new file mode 100644 index 0000000..d6419ee --- /dev/null +++ b/docs/docs/BaseResponseQueuedSecurityChecksTaskResponse.md @@ -0,0 +1,33 @@ +# BaseResponseQueuedSecurityChecksTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**QueuedSecurityChecksTaskResponse**](QueuedSecurityChecksTaskResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseQueuedSecurityChecksTaskResponse from a JSON string +base_response_queued_security_checks_task_response_instance = BaseResponseQueuedSecurityChecksTaskResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseQueuedSecurityChecksTaskResponse.to_json()) + +# convert the object into a dict +base_response_queued_security_checks_task_response_dict = base_response_queued_security_checks_task_response_instance.to_dict() +# create an instance of BaseResponseQueuedSecurityChecksTaskResponse from a dict +base_response_queued_security_checks_task_response_from_dict = BaseResponseQueuedSecurityChecksTaskResponse.from_dict(base_response_queued_security_checks_task_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/docs/BaseResponseRecent.md b/docs/docs/BaseResponseRecent.md new file mode 100644 index 0000000..8d0fb0e --- /dev/null +++ b/docs/docs/BaseResponseRecent.md @@ -0,0 +1,33 @@ +# BaseResponseRecent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Recent**](Recent.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_recent import BaseResponseRecent + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseRecent from a JSON string +base_response_recent_instance = BaseResponseRecent.from_json(json) +# print the JSON string representation of the object +print(BaseResponseRecent.to_json()) + +# convert the object into a dict +base_response_recent_dict = base_response_recent_instance.to_dict() +# create an instance of BaseResponseRecent from a dict +base_response_recent_from_dict = BaseResponseRecent.from_dict(base_response_recent_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/docs/BaseResponseSecurityChecksResponse.md b/docs/docs/BaseResponseSecurityChecksResponse.md new file mode 100644 index 0000000..99af4dc --- /dev/null +++ b/docs/docs/BaseResponseSecurityChecksResponse.md @@ -0,0 +1,33 @@ +# BaseResponseSecurityChecksResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**SecurityChecksResponse**](SecurityChecksResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseSecurityChecksResponse from a JSON string +base_response_security_checks_response_instance = BaseResponseSecurityChecksResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseSecurityChecksResponse.to_json()) + +# convert the object into a dict +base_response_security_checks_response_dict = base_response_security_checks_response_instance.to_dict() +# create an instance of BaseResponseSecurityChecksResponse from a dict +base_response_security_checks_response_from_dict = BaseResponseSecurityChecksResponse.from_dict(base_response_security_checks_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/docs/BaseResponseStatus.md b/docs/docs/BaseResponseStatus.md new file mode 100644 index 0000000..e1bc794 --- /dev/null +++ b/docs/docs/BaseResponseStatus.md @@ -0,0 +1,33 @@ +# BaseResponseStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**StatusOutput**](StatusOutput.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_status import BaseResponseStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseStatus from a JSON string +base_response_status_instance = BaseResponseStatus.from_json(json) +# print the JSON string representation of the object +print(BaseResponseStatus.to_json()) + +# convert the object into a dict +base_response_status_dict = base_response_status_instance.to_dict() +# create an instance of BaseResponseStatus from a dict +base_response_status_from_dict = BaseResponseStatus.from_dict(base_response_status_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/docs/BaseResponseStr.md b/docs/docs/BaseResponseStr.md new file mode 100644 index 0000000..746258b --- /dev/null +++ b/docs/docs/BaseResponseStr.md @@ -0,0 +1,33 @@ +# BaseResponseStr + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | **str** | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_str import BaseResponseStr + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseStr from a JSON string +base_response_str_instance = BaseResponseStr.from_json(json) +# print the JSON string representation of the object +print(BaseResponseStr.to_json()) + +# convert the object into a dict +base_response_str_dict = base_response_str_instance.to_dict() +# create an instance of BaseResponseStr from a dict +base_response_str_from_dict = BaseResponseStr.from_dict(base_response_str_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/docs/BaseResponseSymbolsInfo.md b/docs/docs/BaseResponseSymbolsInfo.md new file mode 100644 index 0000000..aad1f3f --- /dev/null +++ b/docs/docs/BaseResponseSymbolsInfo.md @@ -0,0 +1,33 @@ +# BaseResponseSymbolsInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**SymbolsInfo**](SymbolsInfo.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseSymbolsInfo from a JSON string +base_response_symbols_info_instance = BaseResponseSymbolsInfo.from_json(json) +# print the JSON string representation of the object +print(BaseResponseSymbolsInfo.to_json()) + +# convert the object into a dict +base_response_symbols_info_dict = base_response_symbols_info_instance.to_dict() +# create an instance of BaseResponseSymbolsInfo from a dict +base_response_symbols_info_from_dict = BaseResponseSymbolsInfo.from_dict(base_response_symbols_info_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/docs/BaseResponseTTPS.md b/docs/docs/BaseResponseTTPS.md new file mode 100644 index 0000000..584f6c8 --- /dev/null +++ b/docs/docs/BaseResponseTTPS.md @@ -0,0 +1,33 @@ +# BaseResponseTTPS + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**TTPS**](TTPS.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_ttps import BaseResponseTTPS + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseTTPS from a JSON string +base_response_ttps_instance = BaseResponseTTPS.from_json(json) +# print the JSON string representation of the object +print(BaseResponseTTPS.to_json()) + +# convert the object into a dict +base_response_ttps_dict = base_response_ttps_instance.to_dict() +# create an instance of BaseResponseTTPS from a dict +base_response_ttps_from_dict = BaseResponseTTPS.from_dict(base_response_ttps_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/docs/BaseResponseTagSearchResponse.md b/docs/docs/BaseResponseTagSearchResponse.md new file mode 100644 index 0000000..e93abbe --- /dev/null +++ b/docs/docs/BaseResponseTagSearchResponse.md @@ -0,0 +1,33 @@ +# BaseResponseTagSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**TagSearchResponse**](TagSearchResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseTagSearchResponse from a JSON string +base_response_tag_search_response_instance = BaseResponseTagSearchResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseTagSearchResponse.to_json()) + +# convert the object into a dict +base_response_tag_search_response_dict = base_response_tag_search_response_instance.to_dict() +# create an instance of BaseResponseTagSearchResponse from a dict +base_response_tag_search_response_from_dict = BaseResponseTagSearchResponse.from_dict(base_response_tag_search_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/docs/BaseResponseTaskResponse.md b/docs/docs/BaseResponseTaskResponse.md new file mode 100644 index 0000000..471dabc --- /dev/null +++ b/docs/docs/BaseResponseTaskResponse.md @@ -0,0 +1,33 @@ +# BaseResponseTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**TaskResponse**](TaskResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_task_response import BaseResponseTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseTaskResponse from a JSON string +base_response_task_response_instance = BaseResponseTaskResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseTaskResponse.to_json()) + +# convert the object into a dict +base_response_task_response_dict = base_response_task_response_instance.to_dict() +# create an instance of BaseResponseTaskResponse from a dict +base_response_task_response_from_dict = BaseResponseTaskResponse.from_dict(base_response_task_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/docs/BaseResponseUploadResponse.md b/docs/docs/BaseResponseUploadResponse.md new file mode 100644 index 0000000..1c53476 --- /dev/null +++ b/docs/docs/BaseResponseUploadResponse.md @@ -0,0 +1,33 @@ +# BaseResponseUploadResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**UploadResponse**](UploadResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_upload_response import BaseResponseUploadResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseUploadResponse from a JSON string +base_response_upload_response_instance = BaseResponseUploadResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseUploadResponse.to_json()) + +# convert the object into a dict +base_response_upload_response_dict = base_response_upload_response_instance.to_dict() +# create an instance of BaseResponseUploadResponse from a dict +base_response_upload_response_from_dict = BaseResponseUploadResponse.from_dict(base_response_upload_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/docs/BaseResponseVulnerabilities.md b/docs/docs/BaseResponseVulnerabilities.md new file mode 100644 index 0000000..2461c0c --- /dev/null +++ b/docs/docs/BaseResponseVulnerabilities.md @@ -0,0 +1,33 @@ +# BaseResponseVulnerabilities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**Vulnerabilities**](Vulnerabilities.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseVulnerabilities from a JSON string +base_response_vulnerabilities_instance = BaseResponseVulnerabilities.from_json(json) +# print the JSON string representation of the object +print(BaseResponseVulnerabilities.to_json()) + +# convert the object into a dict +base_response_vulnerabilities_dict = base_response_vulnerabilities_instance.to_dict() +# create an instance of BaseResponseVulnerabilities from a dict +base_response_vulnerabilities_from_dict = BaseResponseVulnerabilities.from_dict(base_response_vulnerabilities_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/docs/Basic.md b/docs/docs/Basic.md new file mode 100644 index 0000000..5744ac7 --- /dev/null +++ b/docs/docs/Basic.md @@ -0,0 +1,39 @@ +# Basic + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_name** | **str** | The name of the binary uploaded | +**binary_size** | **int** | The size of the binary uploaded (bytes) | +**creation** | **datetime** | When the binary was uploaded | +**sha_256_hash** | **str** | The hash of the binary uploaded | +**model_name** | **str** | The model name used for analysis | +**owner_username** | **str** | The name of the owner of the binary | +**analysis_scope** | **str** | The scope of the analysis | +**is_owner** | **bool** | Whether the current user is the owner | +**debug** | **bool** | Whether the current analysis was analysed with debug symbols | +**function_count** | **int** | The number of functions in the binary | +**is_advanced** | **bool** | Whether the analysis was advanced | + +## Example + +```python +from revengai.models.basic import Basic + +# TODO update the JSON string below +json = "{}" +# create an instance of Basic from a JSON string +basic_instance = Basic.from_json(json) +# print the JSON string representation of the object +print(Basic.to_json()) + +# convert the object into a dict +basic_dict = basic_instance.to_dict() +# create an instance of Basic from a dict +basic_from_dict = Basic.from_dict(basic_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/docs/BinariesApi.md b/docs/docs/BinariesApi.md new file mode 100644 index 0000000..d091646 --- /dev/null +++ b/docs/docs/BinariesApi.md @@ -0,0 +1,494 @@ +# revengai.BinariesApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**download_zipped_binary**](BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection +[**get_binary_additional_details**](BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary +[**get_binary_details**](BinariesApi.md#get_binary_details) | **GET** /v2/binaries/{binary_id}/details | Gets the details of a binary +[**get_binary_die_info**](BinariesApi.md#get_binary_die_info) | **GET** /v2/binaries/{binary_id}/die-info | Gets the die info of a binary +[**get_binary_externals**](BinariesApi.md#get_binary_externals) | **GET** /v2/binaries/{binary_id}/externals | Gets the external details of a binary +[**get_related_binaries**](BinariesApi.md#get_related_binaries) | **GET** /v2/binaries/{binary_id}/related | Gets the related binaries of a binary. + + +# **download_zipped_binary** +> object download_zipped_binary(binary_id, authorization=authorization) + +Downloads a zipped binary with password protection + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Downloads a zipped binary with password protection + api_response = api_instance.download_zipped_binary(binary_id, authorization=authorization) + print("The response of BinariesApi->download_zipped_binary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->download_zipped_binary: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_binary_additional_details** +> BaseResponseBinaryAdditionalResponse get_binary_additional_details(binary_id, authorization=authorization) + +Gets the additional details of a binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the additional details of a binary + api_response = api_instance.get_binary_additional_details(binary_id, authorization=authorization) + print("The response of BinariesApi->get_binary_additional_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_additional_details: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBinaryAdditionalResponse**](BaseResponseBinaryAdditionalResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_binary_details** +> BaseResponseBinaryDetailsResponse get_binary_details(binary_id, authorization=authorization) + +Gets the details of a binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the details of a binary + api_response = api_instance.get_binary_details(binary_id, authorization=authorization) + print("The response of BinariesApi->get_binary_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_details: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBinaryDetailsResponse**](BaseResponseBinaryDetailsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_binary_die_info** +> BaseResponseListDieMatch get_binary_die_info(binary_id, authorization=authorization) + +Gets the die info of a binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the die info of a binary + api_response = api_instance.get_binary_die_info(binary_id, authorization=authorization) + print("The response of BinariesApi->get_binary_die_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_die_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListDieMatch**](BaseResponseListDieMatch.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_binary_externals** +> BaseResponseBinaryExternalsResponse get_binary_externals(binary_id, authorization=authorization) + +Gets the external details of a binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the external details of a binary + api_response = api_instance.get_binary_externals(binary_id, authorization=authorization) + print("The response of BinariesApi->get_binary_externals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_externals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBinaryExternalsResponse**](BaseResponseBinaryExternalsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_related_binaries** +> BaseResponseChildBinariesResponse get_related_binaries(binary_id, authorization=authorization) + +Gets the related binaries of a binary. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse +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' + +# 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) + binary_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the related binaries of a binary. + api_response = api_instance.get_related_binaries(binary_id, authorization=authorization) + print("The response of BinariesApi->get_related_binaries:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_related_binaries: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseChildBinariesResponse**](BaseResponseChildBinariesResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**403** | Forbidden | - | + +[[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/docs/BinaryAdditionalDetailsDataResponse.md b/docs/docs/BinaryAdditionalDetailsDataResponse.md new file mode 100644 index 0000000..45d20fe --- /dev/null +++ b/docs/docs/BinaryAdditionalDetailsDataResponse.md @@ -0,0 +1,31 @@ +# BinaryAdditionalDetailsDataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**FileMetadata**](FileMetadata.md) | | +**pe** | [**PEModel**](PEModel.md) | | [optional] +**elf** | [**ELFModel**](ELFModel.md) | | [optional] + +## Example + +```python +from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryAdditionalDetailsDataResponse from a JSON string +binary_additional_details_data_response_instance = BinaryAdditionalDetailsDataResponse.from_json(json) +# print the JSON string representation of the object +print(BinaryAdditionalDetailsDataResponse.to_json()) + +# convert the object into a dict +binary_additional_details_data_response_dict = binary_additional_details_data_response_instance.to_dict() +# create an instance of BinaryAdditionalDetailsDataResponse from a dict +binary_additional_details_data_response_from_dict = BinaryAdditionalDetailsDataResponse.from_dict(binary_additional_details_data_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/docs/BinaryAdditionalResponse.md b/docs/docs/BinaryAdditionalResponse.md new file mode 100644 index 0000000..5439b2d --- /dev/null +++ b/docs/docs/BinaryAdditionalResponse.md @@ -0,0 +1,31 @@ +# BinaryAdditionalResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_id** | **int** | | +**details** | [**BinaryAdditionalDetailsDataResponse**](BinaryAdditionalDetailsDataResponse.md) | | +**creation** | **datetime** | | [optional] + +## Example + +```python +from revengai.models.binary_additional_response import BinaryAdditionalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryAdditionalResponse from a JSON string +binary_additional_response_instance = BinaryAdditionalResponse.from_json(json) +# print the JSON string representation of the object +print(BinaryAdditionalResponse.to_json()) + +# convert the object into a dict +binary_additional_response_dict = binary_additional_response_instance.to_dict() +# create an instance of BinaryAdditionalResponse from a dict +binary_additional_response_from_dict = BinaryAdditionalResponse.from_dict(binary_additional_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/docs/BinaryAnnForm.md b/docs/docs/BinaryAnnForm.md new file mode 100644 index 0000000..6892a8c --- /dev/null +++ b/docs/docs/BinaryAnnForm.md @@ -0,0 +1,32 @@ +# BinaryAnnForm + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**confidence** | **float** | Confidence of the annotation | [optional] [default to 0.0] +**nns** | **int** | Number of nearest neighbors | [optional] [default to 1] +**collection_ids** | **List[int]** | Collection IDs to search for nearest neighbors | [optional] +**binary_ids** | **List[int]** | Binary IDs to search for nearest neighbors | [optional] + +## Example + +```python +from revengai.models.binary_ann_form import BinaryAnnForm + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryAnnForm from a JSON string +binary_ann_form_instance = BinaryAnnForm.from_json(json) +# print the JSON string representation of the object +print(BinaryAnnForm.to_json()) + +# convert the object into a dict +binary_ann_form_dict = binary_ann_form_instance.to_dict() +# create an instance of BinaryAnnForm from a dict +binary_ann_form_from_dict = BinaryAnnForm.from_dict(binary_ann_form_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/docs/BinaryAnnListResponse.md b/docs/docs/BinaryAnnListResponse.md new file mode 100644 index 0000000..1035b10 --- /dev/null +++ b/docs/docs/BinaryAnnListResponse.md @@ -0,0 +1,29 @@ +# BinaryAnnListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**List[ExportedBinaryAnnResult]**](ExportedBinaryAnnResult.md) | | + +## Example + +```python +from revengai.models.binary_ann_list_response import BinaryAnnListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryAnnListResponse from a JSON string +binary_ann_list_response_instance = BinaryAnnListResponse.from_json(json) +# print the JSON string representation of the object +print(BinaryAnnListResponse.to_json()) + +# convert the object into a dict +binary_ann_list_response_dict = binary_ann_list_response_instance.to_dict() +# create an instance of BinaryAnnListResponse from a dict +binary_ann_list_response_from_dict = BinaryAnnListResponse.from_dict(binary_ann_list_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/docs/BinaryConfig.md b/docs/docs/BinaryConfig.md new file mode 100644 index 0000000..0a90a8b --- /dev/null +++ b/docs/docs/BinaryConfig.md @@ -0,0 +1,31 @@ +# BinaryConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**isa** | [**ISA**](ISA.md) | | [optional] +**platform** | [**Platform**](Platform.md) | | [optional] +**file_format** | [**FileFormat**](FileFormat.md) | | [optional] + +## Example + +```python +from revengai.models.binary_config import BinaryConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryConfig from a JSON string +binary_config_instance = BinaryConfig.from_json(json) +# print the JSON string representation of the object +print(BinaryConfig.to_json()) + +# convert the object into a dict +binary_config_dict = binary_config_instance.to_dict() +# create an instance of BinaryConfig from a dict +binary_config_from_dict = BinaryConfig.from_dict(binary_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/docs/BinaryDetailsResponse.md b/docs/docs/BinaryDetailsResponse.md new file mode 100644 index 0000000..3f27967 --- /dev/null +++ b/docs/docs/BinaryDetailsResponse.md @@ -0,0 +1,48 @@ +# BinaryDetailsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arch** | **str** | The architecture of the binary | +**bits** | **int** | The size of the binary in bits | +**crc32** | **str** | | +**var_class** | **str** | | +**entropy** | **float** | | +**file_size** | **int** | | +**language** | **str** | | +**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 | +**ssdeep** | **str** | | +**static** | **bool** | | +**stripped** | **bool** | | +**sub_sys** | **str** | | +**tlsh** | **str** | | +**type** | **str** | | +**debug** | **bool** | | +**first_seen** | **datetime** | | + +## Example + +```python +from revengai.models.binary_details_response import BinaryDetailsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryDetailsResponse from a JSON string +binary_details_response_instance = BinaryDetailsResponse.from_json(json) +# print the JSON string representation of the object +print(BinaryDetailsResponse.to_json()) + +# convert the object into a dict +binary_details_response_dict = binary_details_response_instance.to_dict() +# create an instance of BinaryDetailsResponse from a dict +binary_details_response_from_dict = BinaryDetailsResponse.from_dict(binary_details_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/docs/BinaryExternalsResponse.md b/docs/docs/BinaryExternalsResponse.md new file mode 100644 index 0000000..6eb0df6 --- /dev/null +++ b/docs/docs/BinaryExternalsResponse.md @@ -0,0 +1,33 @@ +# BinaryExternalsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha_256_hash** | **str** | SHA256 hash of the binary | +**vt** | **Dict[str, object]** | VirusTotal information | +**vt_last_updated** | **datetime** | VirusTotal last updated date | +**mb** | **Dict[str, object]** | MalwareBazaar information | +**mb_last_updated** | **datetime** | MalwareBazaar last updated date | + +## Example + +```python +from revengai.models.binary_externals_response import BinaryExternalsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinaryExternalsResponse from a JSON string +binary_externals_response_instance = BinaryExternalsResponse.from_json(json) +# print the JSON string representation of the object +print(BinaryExternalsResponse.to_json()) + +# convert the object into a dict +binary_externals_response_dict = binary_externals_response_instance.to_dict() +# create an instance of BinaryExternalsResponse from a dict +binary_externals_response_from_dict = BinaryExternalsResponse.from_dict(binary_externals_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/docs/BinarySearchResponse.md b/docs/docs/BinarySearchResponse.md new file mode 100644 index 0000000..1964286 --- /dev/null +++ b/docs/docs/BinarySearchResponse.md @@ -0,0 +1,29 @@ +# BinarySearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[BinarySearchResult]**](BinarySearchResult.md) | The results of the search | + +## Example + +```python +from revengai.models.binary_search_response import BinarySearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BinarySearchResponse from a JSON string +binary_search_response_instance = BinarySearchResponse.from_json(json) +# print the JSON string representation of the object +print(BinarySearchResponse.to_json()) + +# convert the object into a dict +binary_search_response_dict = binary_search_response_instance.to_dict() +# create an instance of BinarySearchResponse from a dict +binary_search_response_from_dict = BinarySearchResponse.from_dict(binary_search_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/docs/BinarySearchResult.md b/docs/docs/BinarySearchResult.md new file mode 100644 index 0000000..2804867 --- /dev/null +++ b/docs/docs/BinarySearchResult.md @@ -0,0 +1,37 @@ +# BinarySearchResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_id** | **int** | The binary ID | +**binary_name** | **str** | The name of the binary | +**analysis_id** | **int** | The analysis ID | +**sha_256_hash** | **str** | The SHA-256 hash of the binary | +**tags** | **List[str]** | | +**created_at** | **datetime** | The creation date of the binary | +**model_id** | **int** | The model ID of the binary | +**model_name** | **str** | The name of the model | +**owned_by** | **str** | The owner of the binary | + +## Example + +```python +from revengai.models.binary_search_result import BinarySearchResult + +# TODO update the JSON string below +json = "{}" +# create an instance of BinarySearchResult from a JSON string +binary_search_result_instance = BinarySearchResult.from_json(json) +# print the JSON string representation of the object +print(BinarySearchResult.to_json()) + +# convert the object into a dict +binary_search_result_dict = binary_search_result_instance.to_dict() +# create an instance of BinarySearchResult from a dict +binary_search_result_from_dict = BinarySearchResult.from_dict(binary_search_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/docs/BinaryTaskStatus.md b/docs/docs/BinaryTaskStatus.md new file mode 100644 index 0000000..77688a0 --- /dev/null +++ b/docs/docs/BinaryTaskStatus.md @@ -0,0 +1,18 @@ +# BinaryTaskStatus + + +## Enum + +* `UNINITIALISED` (value: `'UNINITIALISED'`) + +* `PENDING` (value: `'PENDING'`) + +* `RUNNING` (value: `'RUNNING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `FAILED` (value: `'FAILED'`) + +[[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/docs/Block.md b/docs/docs/Block.md new file mode 100644 index 0000000..8bd21ab --- /dev/null +++ b/docs/docs/Block.md @@ -0,0 +1,29 @@ +# Block + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**virtual_address** | **int** | | + +## Example + +```python +from revengai.models.block import Block + +# TODO update the JSON string below +json = "{}" +# create an instance of Block from a JSON string +block_instance = Block.from_json(json) +# print the JSON string representation of the object +print(Block.to_json()) + +# convert the object into a dict +block_dict = block_instance.to_dict() +# create an instance of Block from a dict +block_from_dict = Block.from_dict(block_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/docs/BlockCommentsGenerationForFunctionResponse.md b/docs/docs/BlockCommentsGenerationForFunctionResponse.md new file mode 100644 index 0000000..01bdbe4 --- /dev/null +++ b/docs/docs/BlockCommentsGenerationForFunctionResponse.md @@ -0,0 +1,29 @@ +# BlockCommentsGenerationForFunctionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**updated_blocks** | **int** | | + +## Example + +```python +from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockCommentsGenerationForFunctionResponse from a JSON string +block_comments_generation_for_function_response_instance = BlockCommentsGenerationForFunctionResponse.from_json(json) +# print the JSON string representation of the object +print(BlockCommentsGenerationForFunctionResponse.to_json()) + +# convert the object into a dict +block_comments_generation_for_function_response_dict = block_comments_generation_for_function_response_instance.to_dict() +# create an instance of BlockCommentsGenerationForFunctionResponse from a dict +block_comments_generation_for_function_response_from_dict = BlockCommentsGenerationForFunctionResponse.from_dict(block_comments_generation_for_function_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/docs/Boundary.md b/docs/docs/Boundary.md new file mode 100644 index 0000000..ca48b6c --- /dev/null +++ b/docs/docs/Boundary.md @@ -0,0 +1,31 @@ +# Boundary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_addr** | **int** | Start address of the function boundary | +**end_addr** | **int** | End address of the function boundary | +**name** | **str** | Name of the function | + +## Example + +```python +from revengai.models.boundary import Boundary + +# TODO update the JSON string below +json = "{}" +# create an instance of Boundary from a JSON string +boundary_instance = Boundary.from_json(json) +# print the JSON string representation of the object +print(Boundary.to_json()) + +# convert the object into a dict +boundary_dict = boundary_instance.to_dict() +# create an instance of Boundary from a dict +boundary_from_dict = Boundary.from_dict(boundary_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/docs/BoxPlotConfidence.md b/docs/docs/BoxPlotConfidence.md new file mode 100644 index 0000000..46d0933 --- /dev/null +++ b/docs/docs/BoxPlotConfidence.md @@ -0,0 +1,36 @@ +# BoxPlotConfidence + +Format for confidence - returned in the box plot format + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min** | **float** | | +**max** | **float** | | +**average** | **float** | | +**upper_quartile** | **float** | | +**lower_quartile** | **float** | | +**positive_count** | **int** | | +**negative_count** | **int** | | + +## Example + +```python +from revengai.models.box_plot_confidence import BoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of BoxPlotConfidence from a JSON string +box_plot_confidence_instance = BoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(BoxPlotConfidence.to_json()) + +# convert the object into a dict +box_plot_confidence_dict = box_plot_confidence_instance.to_dict() +# create an instance of BoxPlotConfidence from a dict +box_plot_confidence_from_dict = BoxPlotConfidence.from_dict(box_plot_confidence_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/docs/CalleeFunctionInfo.md b/docs/docs/CalleeFunctionInfo.md new file mode 100644 index 0000000..299bbd0 --- /dev/null +++ b/docs/docs/CalleeFunctionInfo.md @@ -0,0 +1,34 @@ +# CalleeFunctionInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**matched_function_id** | **int** | | +**dashboard_url** | **str** | | +**is_external** | **bool** | Indicates if the function is external | [optional] [default to False] +**callee_name** | **str** | Name of the called function | +**callee_vaddr** | **str** | Virtual address of the called function | + +## Example + +```python +from revengai.models.callee_function_info import CalleeFunctionInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CalleeFunctionInfo from a JSON string +callee_function_info_instance = CalleeFunctionInfo.from_json(json) +# print the JSON string representation of the object +print(CalleeFunctionInfo.to_json()) + +# convert the object into a dict +callee_function_info_dict = callee_function_info_instance.to_dict() +# create an instance of CalleeFunctionInfo from a dict +callee_function_info_from_dict = CalleeFunctionInfo.from_dict(callee_function_info_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/docs/CalleesCallerFunctionsResponse.md b/docs/docs/CalleesCallerFunctionsResponse.md new file mode 100644 index 0000000..1e08a68 --- /dev/null +++ b/docs/docs/CalleesCallerFunctionsResponse.md @@ -0,0 +1,31 @@ +# CalleesCallerFunctionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_address** | **int** | Base address of the binary | [optional] [default to 0] +**callees** | [**List[CalleeFunctionInfo]**](CalleeFunctionInfo.md) | List of functions called by the target function | +**callers** | [**List[CallerFunctionInfo]**](CallerFunctionInfo.md) | List of functions that call the target function | + +## Example + +```python +from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CalleesCallerFunctionsResponse from a JSON string +callees_caller_functions_response_instance = CalleesCallerFunctionsResponse.from_json(json) +# print the JSON string representation of the object +print(CalleesCallerFunctionsResponse.to_json()) + +# convert the object into a dict +callees_caller_functions_response_dict = callees_caller_functions_response_instance.to_dict() +# create an instance of CalleesCallerFunctionsResponse from a dict +callees_caller_functions_response_from_dict = CalleesCallerFunctionsResponse.from_dict(callees_caller_functions_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/docs/CallerFunctionInfo.md b/docs/docs/CallerFunctionInfo.md new file mode 100644 index 0000000..7e32630 --- /dev/null +++ b/docs/docs/CallerFunctionInfo.md @@ -0,0 +1,34 @@ +# CallerFunctionInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**matched_function_id** | **int** | | +**dashboard_url** | **str** | | +**is_external** | **bool** | Indicates if the function is external | [optional] [default to False] +**caller_name** | **str** | Name of the calling function | +**caller_vaddr** | **str** | Virtual address of the calling function | + +## Example + +```python +from revengai.models.caller_function_info import CallerFunctionInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CallerFunctionInfo from a JSON string +caller_function_info_instance = CallerFunctionInfo.from_json(json) +# print the JSON string representation of the object +print(CallerFunctionInfo.to_json()) + +# convert the object into a dict +caller_function_info_dict = caller_function_info_instance.to_dict() +# create an instance of CallerFunctionInfo from a dict +caller_function_info_from_dict = CallerFunctionInfo.from_dict(caller_function_info_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/docs/Capabilities.md b/docs/docs/Capabilities.md new file mode 100644 index 0000000..d4ed9a3 --- /dev/null +++ b/docs/docs/Capabilities.md @@ -0,0 +1,29 @@ +# Capabilities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capabilities** | [**List[Capability]**](Capability.md) | List of capabilities for a given analysis | + +## Example + +```python +from revengai.models.capabilities import Capabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of Capabilities from a JSON string +capabilities_instance = Capabilities.from_json(json) +# print the JSON string representation of the object +print(Capabilities.to_json()) + +# convert the object into a dict +capabilities_dict = capabilities_instance.to_dict() +# create an instance of Capabilities from a dict +capabilities_from_dict = Capabilities.from_dict(capabilities_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/docs/Capability.md b/docs/docs/Capability.md new file mode 100644 index 0000000..dd222ff --- /dev/null +++ b/docs/docs/Capability.md @@ -0,0 +1,31 @@ +# Capability + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_name** | **str** | The name of the function with a capability | +**function_vaddr** | **int** | The virtual address of the function where the capability comes from | +**capabilities** | **List[str]** | The list of capabilities associated with the function | + +## 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/docs/CheckSecurityChecksTaskResponse.md b/docs/docs/CheckSecurityChecksTaskResponse.md new file mode 100644 index 0000000..fa742ff --- /dev/null +++ b/docs/docs/CheckSecurityChecksTaskResponse.md @@ -0,0 +1,29 @@ +# CheckSecurityChecksTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**BinaryTaskStatus**](BinaryTaskStatus.md) | | + +## Example + +```python +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckSecurityChecksTaskResponse from a JSON string +check_security_checks_task_response_instance = CheckSecurityChecksTaskResponse.from_json(json) +# print the JSON string representation of the object +print(CheckSecurityChecksTaskResponse.to_json()) + +# convert the object into a dict +check_security_checks_task_response_dict = check_security_checks_task_response_instance.to_dict() +# create an instance of CheckSecurityChecksTaskResponse from a dict +check_security_checks_task_response_from_dict = CheckSecurityChecksTaskResponse.from_dict(check_security_checks_task_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/docs/ChildBinariesResponse.md b/docs/docs/ChildBinariesResponse.md new file mode 100644 index 0000000..0e25161 --- /dev/null +++ b/docs/docs/ChildBinariesResponse.md @@ -0,0 +1,30 @@ +# ChildBinariesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**children** | [**List[RelativeBinaryResponse]**](RelativeBinaryResponse.md) | List of child binaries associated with the parent binary | +**parent** | [**RelativeBinaryResponse**](RelativeBinaryResponse.md) | | [optional] + +## Example + +```python +from revengai.models.child_binaries_response import ChildBinariesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChildBinariesResponse from a JSON string +child_binaries_response_instance = ChildBinariesResponse.from_json(json) +# print the JSON string representation of the object +print(ChildBinariesResponse.to_json()) + +# convert the object into a dict +child_binaries_response_dict = child_binaries_response_instance.to_dict() +# create an instance of ChildBinariesResponse from a dict +child_binaries_response_from_dict = ChildBinariesResponse.from_dict(child_binaries_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/docs/CodeSignatureModel.md b/docs/docs/CodeSignatureModel.md new file mode 100644 index 0000000..778d585 --- /dev/null +++ b/docs/docs/CodeSignatureModel.md @@ -0,0 +1,31 @@ +# CodeSignatureModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signed** | **bool** | | +**valid_signature** | **bool** | | +**signatures** | [**List[SingleCodeSignatureModel]**](SingleCodeSignatureModel.md) | | + +## Example + +```python +from revengai.models.code_signature_model import CodeSignatureModel + +# TODO update the JSON string below +json = "{}" +# create an instance of CodeSignatureModel from a JSON string +code_signature_model_instance = CodeSignatureModel.from_json(json) +# print the JSON string representation of the object +print(CodeSignatureModel.to_json()) + +# convert the object into a dict +code_signature_model_dict = code_signature_model_instance.to_dict() +# create an instance of CodeSignatureModel from a dict +code_signature_model_from_dict = CodeSignatureModel.from_dict(code_signature_model_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/docs/CollectionBinariesUpdateRequest.md b/docs/docs/CollectionBinariesUpdateRequest.md new file mode 100644 index 0000000..c102893 --- /dev/null +++ b/docs/docs/CollectionBinariesUpdateRequest.md @@ -0,0 +1,29 @@ +# CollectionBinariesUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binaries** | **List[int]** | | + +## Example + +```python +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionBinariesUpdateRequest from a JSON string +collection_binaries_update_request_instance = CollectionBinariesUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(CollectionBinariesUpdateRequest.to_json()) + +# convert the object into a dict +collection_binaries_update_request_dict = collection_binaries_update_request_instance.to_dict() +# create an instance of CollectionBinariesUpdateRequest from a dict +collection_binaries_update_request_from_dict = CollectionBinariesUpdateRequest.from_dict(collection_binaries_update_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/docs/CollectionBinariesUpdateResponse.md b/docs/docs/CollectionBinariesUpdateResponse.md new file mode 100644 index 0000000..1f5960d --- /dev/null +++ b/docs/docs/CollectionBinariesUpdateResponse.md @@ -0,0 +1,29 @@ +# CollectionBinariesUpdateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binaries** | [**List[CollectionBinaryResponse]**](CollectionBinaryResponse.md) | Collection binaries | + +## Example + +```python +from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionBinariesUpdateResponse from a JSON string +collection_binaries_update_response_instance = CollectionBinariesUpdateResponse.from_json(json) +# print the JSON string representation of the object +print(CollectionBinariesUpdateResponse.to_json()) + +# convert the object into a dict +collection_binaries_update_response_dict = collection_binaries_update_response_instance.to_dict() +# create an instance of CollectionBinariesUpdateResponse from a dict +collection_binaries_update_response_from_dict = CollectionBinariesUpdateResponse.from_dict(collection_binaries_update_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/docs/CollectionBinaryResponse.md b/docs/docs/CollectionBinaryResponse.md new file mode 100644 index 0000000..6d9379e --- /dev/null +++ b/docs/docs/CollectionBinaryResponse.md @@ -0,0 +1,34 @@ +# CollectionBinaryResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis ID | +**binary_id** | **int** | Binary ID | +**binary_name** | **str** | Binary name | +**owner_id** | **int** | Binary owner | +**sha_256_hash** | **str** | Binary SHA-256 hash | +**created_at** | **datetime** | Binary creation date | + +## Example + +```python +from revengai.models.collection_binary_response import CollectionBinaryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionBinaryResponse from a JSON string +collection_binary_response_instance = CollectionBinaryResponse.from_json(json) +# print the JSON string representation of the object +print(CollectionBinaryResponse.to_json()) + +# convert the object into a dict +collection_binary_response_dict = collection_binary_response_instance.to_dict() +# create an instance of CollectionBinaryResponse from a dict +collection_binary_response_from_dict = CollectionBinaryResponse.from_dict(collection_binary_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/docs/CollectionCreateRequest.md b/docs/docs/CollectionCreateRequest.md new file mode 100644 index 0000000..b2f2d67 --- /dev/null +++ b/docs/docs/CollectionCreateRequest.md @@ -0,0 +1,34 @@ +# CollectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection_name** | **str** | | +**description** | **str** | | +**collection_scope** | [**CollectionScope**](CollectionScope.md) | | [optional] +**tags** | **List[str]** | | [optional] +**binaries** | **List[int]** | | [optional] +**model_id** | **int** | | + +## Example + +```python +from revengai.models.collection_create_request import CollectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionCreateRequest from a JSON string +collection_create_request_instance = CollectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(CollectionCreateRequest.to_json()) + +# convert the object into a dict +collection_create_request_dict = collection_create_request_instance.to_dict() +# create an instance of CollectionCreateRequest from a dict +collection_create_request_from_dict = CollectionCreateRequest.from_dict(collection_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/docs/CollectionListItem.md b/docs/docs/CollectionListItem.md new file mode 100644 index 0000000..01fa826 --- /dev/null +++ b/docs/docs/CollectionListItem.md @@ -0,0 +1,39 @@ +# CollectionListItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection_name** | **str** | The name of the collection | +**description** | **str** | The description of the collection | +**collection_scope** | **str** | The scope of the collection | +**collection_owner** | **str** | The owner of the collection | +**official_collection** | **bool** | Whether the collection is maintained by RevEng.AI | +**collection_tags** | **List[str]** | The tags of the collection | [optional] [default to []] +**collection_size** | **int** | The size of the collection | +**collection_id** | **int** | The ID of the collection | +**creation** | **datetime** | The current status of analysis | +**model_name** | **str** | The model being used for the collection | +**team_id** | **int** | | [optional] + +## Example + +```python +from revengai.models.collection_list_item import CollectionListItem + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionListItem from a JSON string +collection_list_item_instance = CollectionListItem.from_json(json) +# print the JSON string representation of the object +print(CollectionListItem.to_json()) + +# convert the object into a dict +collection_list_item_dict = collection_list_item_instance.to_dict() +# create an instance of CollectionListItem from a dict +collection_list_item_from_dict = CollectionListItem.from_dict(collection_list_item_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/docs/CollectionResponse.md b/docs/docs/CollectionResponse.md new file mode 100644 index 0000000..4d22410 --- /dev/null +++ b/docs/docs/CollectionResponse.md @@ -0,0 +1,39 @@ +# CollectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection_id** | **int** | Collection ID | +**collection_name** | **str** | Collection name | +**description** | **str** | Collection description | +**model_id** | **int** | Collection model ID | +**user_id** | **int** | Collection user ID | +**team_id** | **int** | | [optional] +**collection_scope** | [**CollectionScope**](CollectionScope.md) | Collection public status | +**created_at** | **datetime** | Collection creation date | +**updated_at** | **datetime** | Collection last update date | +**tags** | **List[str]** | | [optional] +**binaries** | [**List[CollectionResponseBinariesInner]**](CollectionResponseBinariesInner.md) | | [optional] + +## Example + +```python +from revengai.models.collection_response import CollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionResponse from a JSON string +collection_response_instance = CollectionResponse.from_json(json) +# print the JSON string representation of the object +print(CollectionResponse.to_json()) + +# convert the object into a dict +collection_response_dict = collection_response_instance.to_dict() +# create an instance of CollectionResponse from a dict +collection_response_from_dict = CollectionResponse.from_dict(collection_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/docs/CollectionResponseBinariesInner.md b/docs/docs/CollectionResponseBinariesInner.md new file mode 100644 index 0000000..b19ee7d --- /dev/null +++ b/docs/docs/CollectionResponseBinariesInner.md @@ -0,0 +1,34 @@ +# CollectionResponseBinariesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | Analysis ID | +**binary_id** | **int** | Binary ID | +**binary_name** | **str** | Binary name | +**owner_id** | **int** | Binary owner | +**sha_256_hash** | **str** | Binary SHA-256 hash | +**created_at** | **datetime** | Binary creation date | + +## Example + +```python +from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionResponseBinariesInner from a JSON string +collection_response_binaries_inner_instance = CollectionResponseBinariesInner.from_json(json) +# print the JSON string representation of the object +print(CollectionResponseBinariesInner.to_json()) + +# convert the object into a dict +collection_response_binaries_inner_dict = collection_response_binaries_inner_instance.to_dict() +# create an instance of CollectionResponseBinariesInner from a dict +collection_response_binaries_inner_from_dict = CollectionResponseBinariesInner.from_dict(collection_response_binaries_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/docs/CollectionScope.md b/docs/docs/CollectionScope.md new file mode 100644 index 0000000..e6b307b --- /dev/null +++ b/docs/docs/CollectionScope.md @@ -0,0 +1,16 @@ +# CollectionScope + + +## Enum + +* `PRIVATE` (value: `'PRIVATE'`) + +* `PUBLIC` (value: `'PUBLIC'`) + +* `PROTECTED` (value: `'PROTECTED'`) + +* `TEAM` (value: `'TEAM'`) + +[[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/docs/CollectionSearchResponse.md b/docs/docs/CollectionSearchResponse.md new file mode 100644 index 0000000..f80de73 --- /dev/null +++ b/docs/docs/CollectionSearchResponse.md @@ -0,0 +1,29 @@ +# CollectionSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[CollectionSearchResult]**](CollectionSearchResult.md) | The results of the search | + +## Example + +```python +from revengai.models.collection_search_response import CollectionSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionSearchResponse from a JSON string +collection_search_response_instance = CollectionSearchResponse.from_json(json) +# print the JSON string representation of the object +print(CollectionSearchResponse.to_json()) + +# convert the object into a dict +collection_search_response_dict = collection_search_response_instance.to_dict() +# create an instance of CollectionSearchResponse from a dict +collection_search_response_from_dict = CollectionSearchResponse.from_dict(collection_search_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/docs/CollectionSearchResult.md b/docs/docs/CollectionSearchResult.md new file mode 100644 index 0000000..7d990dc --- /dev/null +++ b/docs/docs/CollectionSearchResult.md @@ -0,0 +1,40 @@ +# CollectionSearchResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection_id** | **int** | The ID of the collection | +**collection_name** | **str** | The name of the collection | +**scope** | **str** | The scope of the collection | +**last_updated_at** | **datetime** | The last update date of the collection | +**created_at** | **datetime** | The creation date of the collection | +**model_id** | **int** | The model ID of the binary | +**model_name** | **str** | The name of the model | +**owned_by** | **str** | The owner of the collection | +**tags** | **List[str]** | | [optional] +**size** | **int** | | [optional] +**description** | **str** | The description of the collection | +**team_id** | **int** | | [optional] + +## Example + +```python +from revengai.models.collection_search_result import CollectionSearchResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionSearchResult from a JSON string +collection_search_result_instance = CollectionSearchResult.from_json(json) +# print the JSON string representation of the object +print(CollectionSearchResult.to_json()) + +# convert the object into a dict +collection_search_result_dict = collection_search_result_instance.to_dict() +# create an instance of CollectionSearchResult from a dict +collection_search_result_from_dict = CollectionSearchResult.from_dict(collection_search_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/docs/CollectionTagsUpdateRequest.md b/docs/docs/CollectionTagsUpdateRequest.md new file mode 100644 index 0000000..3c8f721 --- /dev/null +++ b/docs/docs/CollectionTagsUpdateRequest.md @@ -0,0 +1,29 @@ +# CollectionTagsUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **List[str]** | | + +## Example + +```python +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionTagsUpdateRequest from a JSON string +collection_tags_update_request_instance = CollectionTagsUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(CollectionTagsUpdateRequest.to_json()) + +# convert the object into a dict +collection_tags_update_request_dict = collection_tags_update_request_instance.to_dict() +# create an instance of CollectionTagsUpdateRequest from a dict +collection_tags_update_request_from_dict = CollectionTagsUpdateRequest.from_dict(collection_tags_update_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/docs/CollectionTagsUpdateResponse.md b/docs/docs/CollectionTagsUpdateResponse.md new file mode 100644 index 0000000..2be5f9f --- /dev/null +++ b/docs/docs/CollectionTagsUpdateResponse.md @@ -0,0 +1,29 @@ +# CollectionTagsUpdateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **List[str]** | Collection tags | + +## Example + +```python +from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionTagsUpdateResponse from a JSON string +collection_tags_update_response_instance = CollectionTagsUpdateResponse.from_json(json) +# print the JSON string representation of the object +print(CollectionTagsUpdateResponse.to_json()) + +# convert the object into a dict +collection_tags_update_response_dict = collection_tags_update_response_instance.to_dict() +# create an instance of CollectionTagsUpdateResponse from a dict +collection_tags_update_response_from_dict = CollectionTagsUpdateResponse.from_dict(collection_tags_update_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/docs/CollectionUpdateRequest.md b/docs/docs/CollectionUpdateRequest.md new file mode 100644 index 0000000..6339c99 --- /dev/null +++ b/docs/docs/CollectionUpdateRequest.md @@ -0,0 +1,31 @@ +# CollectionUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection_name** | **str** | | [optional] +**description** | **str** | | [optional] +**collection_scope** | [**CollectionScope**](CollectionScope.md) | | [optional] + +## Example + +```python +from revengai.models.collection_update_request import CollectionUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionUpdateRequest from a JSON string +collection_update_request_instance = CollectionUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(CollectionUpdateRequest.to_json()) + +# convert the object into a dict +collection_update_request_dict = collection_update_request_instance.to_dict() +# create an instance of CollectionUpdateRequest from a dict +collection_update_request_from_dict = CollectionUpdateRequest.from_dict(collection_update_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/docs/CollectionsApi.md b/docs/docs/CollectionsApi.md new file mode 100644 index 0000000..6e83a7f --- /dev/null +++ b/docs/docs/CollectionsApi.md @@ -0,0 +1,616 @@ +# revengai.CollectionsApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_collection**](CollectionsApi.md#create_collection) | **POST** /v2/collections | Creates new collection information +[**delete_collection**](CollectionsApi.md#delete_collection) | **DELETE** /v2/collections/{collection_id} | Deletes a collection +[**get_collection**](CollectionsApi.md#get_collection) | **GET** /v2/collections/{collection_id} | Returns a collection +[**list_collections**](CollectionsApi.md#list_collections) | **GET** /v2/collections | Gets basic collections information +[**update_collection**](CollectionsApi.md#update_collection) | **PATCH** /v2/collections/{collection_id} | Updates a collection +[**update_collection_binaries**](CollectionsApi.md#update_collection_binaries) | **PATCH** /v2/collections/{collection_id}/binaries | Updates a collection binaries +[**update_collection_tags**](CollectionsApi.md#update_collection_tags) | **PATCH** /v2/collections/{collection_id}/tags | Updates a collection tags + + +# **create_collection** +> BaseResponseCollectionResponse create_collection(collection_create_request, authorization=authorization) + +Creates new collection information + +A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse +from revengai.models.collection_create_request import CollectionCreateRequest +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' + +# 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.CollectionsApi(api_client) + collection_create_request = revengai.CollectionCreateRequest() # CollectionCreateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Creates new collection information + api_response = api_instance.create_collection(collection_create_request, authorization=authorization) + print("The response of CollectionsApi->create_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->create_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_create_request** | [**CollectionCreateRequest**](CollectionCreateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionResponse**](BaseResponseCollectionResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **delete_collection** +> BaseResponseBool delete_collection(collection_id, authorization=authorization) + +Deletes a collection + +Deletes a collection + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_bool import BaseResponseBool +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' + +# 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.CollectionsApi(api_client) + collection_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Deletes a collection + api_response = api_instance.delete_collection(collection_id, authorization=authorization) + print("The response of CollectionsApi->delete_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->delete_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBool**](BaseResponseBool.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_collection** +> BaseResponseCollectionResponse get_collection(collection_id, include_tags=include_tags, include_binaries=include_binaries, authorization=authorization) + +Returns a collection + +Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse +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' + +# 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.CollectionsApi(api_client) + collection_id = 56 # int | + include_tags = False # bool | (optional) (default to False) + include_binaries = False # bool | (optional) (default to False) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Returns a collection + api_response = api_instance.get_collection(collection_id, include_tags=include_tags, include_binaries=include_binaries, authorization=authorization) + print("The response of CollectionsApi->get_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->get_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **int**| | + **include_tags** | **bool**| | [optional] [default to False] + **include_binaries** | **bool**| | [optional] [default to False] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionResponse**](BaseResponseCollectionResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **list_collections** +> BaseResponseListCollectionResults list_collections(search_term=search_term, filters=filters, limit=limit, offset=offset, order_by=order_by, order=order, authorization=authorization) + +Gets basic collections information + +Returns a list of collections + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults +from revengai.models.filters import Filters +from revengai.models.order import Order +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' + +# 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.CollectionsApi(api_client) + search_term = '' # str | (optional) (default to '') + filters = [] # List[Filters] | (optional) (default to []) + limit = 20 # int | (optional) (default to 20) + offset = 0 # int | (optional) (default to 0) + order_by = revengai.AppApiRestV2CollectionsEnumsOrderBy() # AppApiRestV2CollectionsEnumsOrderBy | (optional) + order = revengai.Order() # Order | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets basic collections information + api_response = api_instance.list_collections(search_term=search_term, filters=filters, limit=limit, offset=offset, order_by=order_by, order=order, authorization=authorization) + print("The response of CollectionsApi->list_collections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->list_collections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search_term** | **str**| | [optional] [default to ''] + **filters** | [**List[Filters]**](Filters.md)| | [optional] [default to []] + **limit** | **int**| | [optional] [default to 20] + **offset** | **int**| | [optional] [default to 0] + **order_by** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| | [optional] + **order** | [**Order**](.md)| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListCollectionResults**](BaseResponseListCollectionResults.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **update_collection** +> BaseResponseCollectionResponse update_collection(collection_id, collection_update_request, authorization=authorization) + +Updates a collection + +Updates a collection, you can update the collection name, description, and scope + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse +from revengai.models.collection_update_request import CollectionUpdateRequest +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' + +# 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.CollectionsApi(api_client) + collection_id = 56 # int | + collection_update_request = revengai.CollectionUpdateRequest() # CollectionUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Updates a collection + api_response = api_instance.update_collection(collection_id, collection_update_request, authorization=authorization) + print("The response of CollectionsApi->update_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->update_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **int**| | + **collection_update_request** | [**CollectionUpdateRequest**](CollectionUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionResponse**](BaseResponseCollectionResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **update_collection_binaries** +> BaseResponseCollectionBinariesUpdateResponse update_collection_binaries(collection_id, collection_binaries_update_request, authorization=authorization) + +Updates a collection binaries + +Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest +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' + +# 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.CollectionsApi(api_client) + collection_id = 56 # int | + collection_binaries_update_request = revengai.CollectionBinariesUpdateRequest() # CollectionBinariesUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Updates a collection binaries + api_response = api_instance.update_collection_binaries(collection_id, collection_binaries_update_request, authorization=authorization) + print("The response of CollectionsApi->update_collection_binaries:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->update_collection_binaries: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **int**| | + **collection_binaries_update_request** | [**CollectionBinariesUpdateRequest**](CollectionBinariesUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionBinariesUpdateResponse**](BaseResponseCollectionBinariesUpdateResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **update_collection_tags** +> BaseResponseCollectionTagsUpdateResponse update_collection_tags(collection_id, collection_tags_update_request, authorization=authorization) + +Updates a collection tags + +Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest +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' + +# 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.CollectionsApi(api_client) + collection_id = 56 # int | + collection_tags_update_request = revengai.CollectionTagsUpdateRequest() # CollectionTagsUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Updates a collection tags + api_response = api_instance.update_collection_tags(collection_id, collection_tags_update_request, authorization=authorization) + print("The response of CollectionsApi->update_collection_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CollectionsApi->update_collection_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **int**| | + **collection_tags_update_request** | [**CollectionTagsUpdateRequest**](CollectionTagsUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionTagsUpdateResponse**](BaseResponseCollectionTagsUpdateResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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/docs/CommentBase.md b/docs/docs/CommentBase.md new file mode 100644 index 0000000..cbca850 --- /dev/null +++ b/docs/docs/CommentBase.md @@ -0,0 +1,29 @@ +# CommentBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | Comment text content | + +## Example + +```python +from revengai.models.comment_base import CommentBase + +# TODO update the JSON string below +json = "{}" +# create an instance of CommentBase from a JSON string +comment_base_instance = CommentBase.from_json(json) +# print the JSON string representation of the object +print(CommentBase.to_json()) + +# convert the object into a dict +comment_base_dict = comment_base_instance.to_dict() +# create an instance of CommentBase from a dict +comment_base_from_dict = CommentBase.from_dict(comment_base_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/docs/CommentResponse.md b/docs/docs/CommentResponse.md new file mode 100644 index 0000000..46c926d --- /dev/null +++ b/docs/docs/CommentResponse.md @@ -0,0 +1,36 @@ +# CommentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | Comment text content | +**id** | **int** | | +**user_id** | **int** | | +**resource_type** | **str** | | +**resource_id** | **str** | | +**context** | [**Context**](Context.md) | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +## Example + +```python +from revengai.models.comment_response import CommentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CommentResponse from a JSON string +comment_response_instance = CommentResponse.from_json(json) +# print the JSON string representation of the object +print(CommentResponse.to_json()) + +# convert the object into a dict +comment_response_dict = comment_response_instance.to_dict() +# create an instance of CommentResponse from a dict +comment_response_from_dict = CommentResponse.from_dict(comment_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/docs/CommentUpdateRequest.md b/docs/docs/CommentUpdateRequest.md new file mode 100644 index 0000000..208da3a --- /dev/null +++ b/docs/docs/CommentUpdateRequest.md @@ -0,0 +1,29 @@ +# CommentUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | Updated comment text | + +## Example + +```python +from revengai.models.comment_update_request import CommentUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CommentUpdateRequest from a JSON string +comment_update_request_instance = CommentUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(CommentUpdateRequest.to_json()) + +# convert the object into a dict +comment_update_request_dict = comment_update_request_instance.to_dict() +# create an instance of CommentUpdateRequest from a dict +comment_update_request_from_dict = CommentUpdateRequest.from_dict(comment_update_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/docs/Communities.md b/docs/docs/Communities.md new file mode 100644 index 0000000..530ba5a --- /dev/null +++ b/docs/docs/Communities.md @@ -0,0 +1,32 @@ +# Communities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_functions** | **int** | The total number of matched community functions | +**total_matched_functions** | **int** | The total number of functions in the binary | +**direct_community_match_percentages** | [**List[CommunityMatchPercentages]**](CommunityMatchPercentages.md) | The list of directly matched communities | +**top_components** | **List[Dict[str, object]]** | The top components of the binary | + +## Example + +```python +from revengai.models.communities import Communities + +# TODO update the JSON string below +json = "{}" +# create an instance of Communities from a JSON string +communities_instance = Communities.from_json(json) +# print the JSON string representation of the object +print(Communities.to_json()) + +# convert the object into a dict +communities_dict = communities_instance.to_dict() +# create an instance of Communities from a dict +communities_from_dict = Communities.from_dict(communities_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/docs/CommunityMatchPercentages.md b/docs/docs/CommunityMatchPercentages.md new file mode 100644 index 0000000..dbef60d --- /dev/null +++ b/docs/docs/CommunityMatchPercentages.md @@ -0,0 +1,32 @@ +# CommunityMatchPercentages + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_name** | **str** | | +**binary_id** | **int** | | +**matched_communities_percent** | **float** | | +**unmatched_communities_percent** | **float** | | + +## Example + +```python +from revengai.models.community_match_percentages import CommunityMatchPercentages + +# TODO update the JSON string below +json = "{}" +# create an instance of CommunityMatchPercentages from a JSON string +community_match_percentages_instance = CommunityMatchPercentages.from_json(json) +# print the JSON string representation of the object +print(CommunityMatchPercentages.to_json()) + +# convert the object into a dict +community_match_percentages_dict = community_match_percentages_instance.to_dict() +# create an instance of CommunityMatchPercentages from a dict +community_match_percentages_from_dict = CommunityMatchPercentages.from_dict(community_match_percentages_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/docs/ConfidenceApi.md b/docs/docs/ConfidenceApi.md new file mode 100644 index 0000000..cacd68c --- /dev/null +++ b/docs/docs/ConfidenceApi.md @@ -0,0 +1,345 @@ +# revengai.ConfidenceApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_analysis_tag_score**](ConfidenceApi.md#get_analysis_tag_score) | **POST** /v2/confidence/analysis/{analysis_id}/tag_score | Calculate Tag Confidence Score for an Analysis +[**get_analysis_threat_score**](ConfidenceApi.md#get_analysis_threat_score) | **GET** /v2/confidence/analysis/{analysis_id}/threat_score | Calculate Threat Score for Binary +[**get_functions_name_score**](ConfidenceApi.md#get_functions_name_score) | **POST** /v2/confidence/functions/name_score | Calculate function name confidence for a set of Functions +[**get_functions_threat_score**](ConfidenceApi.md#get_functions_threat_score) | **POST** /v2/confidence/functions/threat_score | Calculate Threat Score for a set of Functions + + +# **get_analysis_tag_score** +> BaseResponseListTagOriginBoxPlotConfidence get_analysis_tag_score(analysis_id, tag_confidence_body, authorization=authorization) + +Calculate Tag Confidence Score for an Analysis + +Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence +from revengai.models.tag_confidence_body import TagConfidenceBody +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' + +# 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.ConfidenceApi(api_client) + analysis_id = 56 # int | The analysis to calculate the tag scores for + tag_confidence_body = revengai.TagConfidenceBody() # TagConfidenceBody | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Calculate Tag Confidence Score for an Analysis + api_response = api_instance.get_analysis_tag_score(analysis_id, tag_confidence_body, authorization=authorization) + print("The response of ConfidenceApi->get_analysis_tag_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfidenceApi->get_analysis_tag_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| The analysis to calculate the tag scores for | + **tag_confidence_body** | [**TagConfidenceBody**](TagConfidenceBody.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListTagOriginBoxPlotConfidence**](BaseResponseListTagOriginBoxPlotConfidence.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_analysis_threat_score** +> BaseResponseBoxPlotConfidence get_analysis_threat_score(analysis_id, authorization=authorization) + +Calculate Threat Score for Binary + +Accepts a binary ID and returns the threat score for that binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence +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' + +# 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.ConfidenceApi(api_client) + analysis_id = 56 # int | The analysis to calculate the threat score for + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Calculate Threat Score for Binary + api_response = api_instance.get_analysis_threat_score(analysis_id, authorization=authorization) + print("The response of ConfidenceApi->get_analysis_threat_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfidenceApi->get_analysis_threat_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| The analysis to calculate the threat score for | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBoxPlotConfidence**](BaseResponseBoxPlotConfidence.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_functions_name_score** +> BaseResponseListFunctionBoxPlotConfidence get_functions_name_score(function_name_confidence_body, authorization=authorization) + +Calculate function name confidence for a set of Functions + +Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody +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' + +# 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.ConfidenceApi(api_client) + function_name_confidence_body = revengai.FunctionNameConfidenceBody() # FunctionNameConfidenceBody | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Calculate function name confidence for a set of Functions + api_response = api_instance.get_functions_name_score(function_name_confidence_body, authorization=authorization) + print("The response of ConfidenceApi->get_functions_name_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfidenceApi->get_functions_name_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_name_confidence_body** | [**FunctionNameConfidenceBody**](FunctionNameConfidenceBody.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_functions_threat_score** +> BaseResponseListFunctionBoxPlotConfidence get_functions_threat_score(threat_score_function_body, authorization=authorization) + +Calculate Threat Score for a set of Functions + +Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody +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' + +# 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.ConfidenceApi(api_client) + threat_score_function_body = revengai.ThreatScoreFunctionBody() # ThreatScoreFunctionBody | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Calculate Threat Score for a set of Functions + api_response = api_instance.get_functions_threat_score(threat_score_function_body, authorization=authorization) + print("The response of ConfidenceApi->get_functions_threat_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfidenceApi->get_functions_threat_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **threat_score_function_body** | [**ThreatScoreFunctionBody**](ThreatScoreFunctionBody.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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/docs/ConfidenceType.md b/docs/docs/ConfidenceType.md new file mode 100644 index 0000000..596ce94 --- /dev/null +++ b/docs/docs/ConfidenceType.md @@ -0,0 +1,18 @@ +# ConfidenceType + + +## Enum + +* `FALSE_POSITIVE` (value: `'FALSE_POSITIVE'`) + +* `SIGNATURE` (value: `'SIGNATURE'`) + +* `HEURISTIC` (value: `'HEURISTIC'`) + +* `LIKELY_VULNERABLE` (value: `'LIKELY_VULNERABLE'`) + +* `VULNERABLE` (value: `'VULNERABLE'`) + +[[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/docs/Context.md b/docs/docs/Context.md new file mode 100644 index 0000000..e2cb61f --- /dev/null +++ b/docs/docs/Context.md @@ -0,0 +1,30 @@ +# Context + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_line** | **int** | | +**end_line** | **int** | | + +## Example + +```python +from revengai.models.context import Context + +# TODO update the JSON string below +json = "{}" +# create an instance of Context from a JSON string +context_instance = Context.from_json(json) +# print the JSON string representation of the object +print(Context.to_json()) + +# convert the object into a dict +context_dict = context_instance.to_dict() +# create an instance of Context from a dict +context_from_dict = Context.from_dict(context_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/docs/Created.md b/docs/docs/Created.md new file mode 100644 index 0000000..054cea3 --- /dev/null +++ b/docs/docs/Created.md @@ -0,0 +1,31 @@ +# Created + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | The ID corresponding to the newly created analysis | +**binary_id** | **int** | The ID corresponding to the binary that was created | +**reference** | **str** | Deprecated will always be empty string | + +## Example + +```python +from revengai.models.created import Created + +# TODO update the JSON string below +json = "{}" +# create an instance of Created from a JSON string +created_instance = Created.from_json(json) +# print the JSON string representation of the object +print(Created.to_json()) + +# convert the object into a dict +created_dict = created_instance.to_dict() +# create an instance of Created from a dict +created_from_dict = Created.from_dict(created_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/docs/DecompilationCommentContext.md b/docs/docs/DecompilationCommentContext.md new file mode 100644 index 0000000..7088247 --- /dev/null +++ b/docs/docs/DecompilationCommentContext.md @@ -0,0 +1,30 @@ +# DecompilationCommentContext + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_line** | **int** | | +**end_line** | **int** | | + +## Example + +```python +from revengai.models.decompilation_comment_context import DecompilationCommentContext + +# TODO update the JSON string below +json = "{}" +# create an instance of DecompilationCommentContext from a JSON string +decompilation_comment_context_instance = DecompilationCommentContext.from_json(json) +# print the JSON string representation of the object +print(DecompilationCommentContext.to_json()) + +# convert the object into a dict +decompilation_comment_context_dict = decompilation_comment_context_instance.to_dict() +# create an instance of DecompilationCommentContext from a dict +decompilation_comment_context_from_dict = DecompilationCommentContext.from_dict(decompilation_comment_context_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/docs/DecompilationResponse.md b/docs/docs/DecompilationResponse.md new file mode 100644 index 0000000..4932307 --- /dev/null +++ b/docs/docs/DecompilationResponse.md @@ -0,0 +1,31 @@ +# DecompilationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**decompilation** | **str** | | +**calling_convention** | **str** | | + +## Example + +```python +from revengai.models.decompilation_response import DecompilationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DecompilationResponse from a JSON string +decompilation_response_instance = DecompilationResponse.from_json(json) +# print the JSON string representation of the object +print(DecompilationResponse.to_json()) + +# convert the object into a dict +decompilation_response_dict = decompilation_response_instance.to_dict() +# create an instance of DecompilationResponse from a dict +decompilation_response_from_dict = DecompilationResponse.from_dict(decompilation_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/docs/DieMatch.md b/docs/docs/DieMatch.md new file mode 100644 index 0000000..eb88b3c --- /dev/null +++ b/docs/docs/DieMatch.md @@ -0,0 +1,32 @@ +# DieMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Canonical name of the matched signature/technology (e.g., 'UPX', 'GCC', 'MSVC'). | +**type** | **str** | Category assigned by DIE for the match (e.g., 'compiler', 'packer', 'file'). | +**display** | **str** | Human-readable description from DIE's 'string' field; suitable for UI/logs, not for parsing. | +**version** | **str** | Extracted version string when available; may be empty/None if unknown. | + +## Example + +```python +from revengai.models.die_match import DieMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of DieMatch from a JSON string +die_match_instance = DieMatch.from_json(json) +# print the JSON string representation of the object +print(DieMatch.to_json()) + +# convert the object into a dict +die_match_dict = die_match_instance.to_dict() +# create an instance of DieMatch from a dict +die_match_from_dict = DieMatch.from_dict(die_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/docs/DynamicExecutionStatusInput.md b/docs/docs/DynamicExecutionStatusInput.md new file mode 100644 index 0000000..b3c70aa --- /dev/null +++ b/docs/docs/DynamicExecutionStatusInput.md @@ -0,0 +1,17 @@ +# DynamicExecutionStatusInput + +Custom enum for the dynamic execution status + +## Enum + +* `PENDING` (value: `'PENDING'`) + +* `ERROR` (value: `'ERROR'`) + +* `SUCCESS` (value: `'SUCCESS'`) + +* `ALL` (value: `'ALL'`) + +[[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/docs/ELFImportModel.md b/docs/docs/ELFImportModel.md new file mode 100644 index 0000000..9ac0957 --- /dev/null +++ b/docs/docs/ELFImportModel.md @@ -0,0 +1,30 @@ +# ELFImportModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_imports** | **int** | | +**imports** | **List[str]** | | + +## Example + +```python +from revengai.models.elf_import_model import ELFImportModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFImportModel from a JSON string +elf_import_model_instance = ELFImportModel.from_json(json) +# print the JSON string representation of the object +print(ELFImportModel.to_json()) + +# convert the object into a dict +elf_import_model_dict = elf_import_model_instance.to_dict() +# create an instance of ELFImportModel from a dict +elf_import_model_from_dict = ELFImportModel.from_dict(elf_import_model_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/docs/ELFModel.md b/docs/docs/ELFModel.md new file mode 100644 index 0000000..d899a07 --- /dev/null +++ b/docs/docs/ELFModel.md @@ -0,0 +1,48 @@ +# ELFModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_type** | **str** | | +**architecture** | **str** | | +**endianness** | **str** | | +**entry_point** | **int** | | +**entry_point_bytes** | **str** | | +**import_hash** | **str** | | +**export_hash** | **str** | | +**build_id** | **str** | | +**security** | [**ELFSecurity**](ELFSecurity.md) | | +**sections** | [**List[ELFSection]**](ELFSection.md) | | +**segments** | [**List[ELFSegment]**](ELFSegment.md) | | +**symbols** | [**List[ELFSymbol]**](ELFSymbol.md) | | +**dynamic_symbols** | [**List[ELFSymbol]**](ELFSymbol.md) | | +**relocations** | [**List[ELFRelocation]**](ELFRelocation.md) | | +**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]** | | + +## Example + +```python +from revengai.models.elf_model import ELFModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFModel from a JSON string +elf_model_instance = ELFModel.from_json(json) +# print the JSON string representation of the object +print(ELFModel.to_json()) + +# convert the object into a dict +elf_model_dict = elf_model_instance.to_dict() +# create an instance of ELFModel from a dict +elf_model_from_dict = ELFModel.from_dict(elf_model_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/docs/ELFRelocation.md b/docs/docs/ELFRelocation.md new file mode 100644 index 0000000..146cc64 --- /dev/null +++ b/docs/docs/ELFRelocation.md @@ -0,0 +1,35 @@ +# ELFRelocation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **int** | | +**type** | **int** | | +**size** | **int** | | +**addend** | **int** | | +**symbol_name** | **str** | | +**is_dynamic** | **bool** | | +**is_pltgot** | **bool** | | + +## Example + +```python +from revengai.models.elf_relocation import ELFRelocation + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFRelocation from a JSON string +elf_relocation_instance = ELFRelocation.from_json(json) +# print the JSON string representation of the object +print(ELFRelocation.to_json()) + +# convert the object into a dict +elf_relocation_dict = elf_relocation_instance.to_dict() +# create an instance of ELFRelocation from a dict +elf_relocation_from_dict = ELFRelocation.from_dict(elf_relocation_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/docs/ELFSection.md b/docs/docs/ELFSection.md new file mode 100644 index 0000000..8229193 --- /dev/null +++ b/docs/docs/ELFSection.md @@ -0,0 +1,38 @@ +# ELFSection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | +**virtual_address** | **int** | | +**virtual_size** | **int** | | +**raw_size** | **int** | | +**file_offset** | **int** | | +**flags** | **str** | | +**flags_raw** | **int** | | +**entropy** | **float** | | +**alignment** | **int** | | + +## Example + +```python +from revengai.models.elf_section import ELFSection + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFSection from a JSON string +elf_section_instance = ELFSection.from_json(json) +# print the JSON string representation of the object +print(ELFSection.to_json()) + +# convert the object into a dict +elf_section_dict = elf_section_instance.to_dict() +# create an instance of ELFSection from a dict +elf_section_from_dict = ELFSection.from_dict(elf_section_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/docs/ELFSecurity.md b/docs/docs/ELFSecurity.md new file mode 100644 index 0000000..38e4d9b --- /dev/null +++ b/docs/docs/ELFSecurity.md @@ -0,0 +1,33 @@ +# ELFSecurity + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pie** | **bool** | | +**stripped** | **bool** | | +**canary** | **bool** | | +**nx** | **bool** | | +**relo** | **bool** | | + +## Example + +```python +from revengai.models.elf_security import ELFSecurity + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFSecurity from a JSON string +elf_security_instance = ELFSecurity.from_json(json) +# print the JSON string representation of the object +print(ELFSecurity.to_json()) + +# convert the object into a dict +elf_security_dict = elf_security_instance.to_dict() +# create an instance of ELFSecurity from a dict +elf_security_from_dict = ELFSecurity.from_dict(elf_security_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/docs/ELFSegment.md b/docs/docs/ELFSegment.md new file mode 100644 index 0000000..5773c6c --- /dev/null +++ b/docs/docs/ELFSegment.md @@ -0,0 +1,37 @@ +# ELFSegment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**virtual_address** | **int** | | +**virtual_size** | **int** | | +**physical_address** | **int** | | +**physical_size** | **int** | | +**file_offset** | **int** | | +**flags** | **str** | | +**flags_raw** | **int** | | +**alignment** | **int** | | + +## Example + +```python +from revengai.models.elf_segment import ELFSegment + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFSegment from a JSON string +elf_segment_instance = ELFSegment.from_json(json) +# print the JSON string representation of the object +print(ELFSegment.to_json()) + +# convert the object into a dict +elf_segment_dict = elf_segment_instance.to_dict() +# create an instance of ELFSegment from a dict +elf_segment_from_dict = ELFSegment.from_dict(elf_segment_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/docs/ELFSymbol.md b/docs/docs/ELFSymbol.md new file mode 100644 index 0000000..8fb9168 --- /dev/null +++ b/docs/docs/ELFSymbol.md @@ -0,0 +1,35 @@ +# ELFSymbol + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **int** | | +**size** | **int** | | +**type** | **str** | | +**binding** | **str** | | +**visibility** | **str** | | +**section_index** | **int** | | + +## Example + +```python +from revengai.models.elf_symbol import ELFSymbol + +# TODO update the JSON string below +json = "{}" +# create an instance of ELFSymbol from a JSON string +elf_symbol_instance = ELFSymbol.from_json(json) +# print the JSON string representation of the object +print(ELFSymbol.to_json()) + +# convert the object into a dict +elf_symbol_dict = elf_symbol_instance.to_dict() +# create an instance of ELFSymbol from a dict +elf_symbol_from_dict = ELFSymbol.from_dict(elf_symbol_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/docs/ElfDynamicEntry.md b/docs/docs/ElfDynamicEntry.md new file mode 100644 index 0000000..c5481de --- /dev/null +++ b/docs/docs/ElfDynamicEntry.md @@ -0,0 +1,30 @@ +# ElfDynamicEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **str** | | +**value** | **int** | | + +## Example + +```python +from revengai.models.elf_dynamic_entry import ElfDynamicEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ElfDynamicEntry from a JSON string +elf_dynamic_entry_instance = ElfDynamicEntry.from_json(json) +# print the JSON string representation of the object +print(ElfDynamicEntry.to_json()) + +# convert the object into a dict +elf_dynamic_entry_dict = elf_dynamic_entry_instance.to_dict() +# create an instance of ElfDynamicEntry from a dict +elf_dynamic_entry_from_dict = ElfDynamicEntry.from_dict(elf_dynamic_entry_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/docs/EntrypointModel.md b/docs/docs/EntrypointModel.md new file mode 100644 index 0000000..546b0cb --- /dev/null +++ b/docs/docs/EntrypointModel.md @@ -0,0 +1,30 @@ +# EntrypointModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **int** | | +**first_bytes** | **str** | | + +## Example + +```python +from revengai.models.entrypoint_model import EntrypointModel + +# TODO update the JSON string below +json = "{}" +# create an instance of EntrypointModel from a JSON string +entrypoint_model_instance = EntrypointModel.from_json(json) +# print the JSON string representation of the object +print(EntrypointModel.to_json()) + +# convert the object into a dict +entrypoint_model_dict = entrypoint_model_instance.to_dict() +# create an instance of EntrypointModel from a dict +entrypoint_model_from_dict = EntrypointModel.from_dict(entrypoint_model_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/docs/Enumeration.md b/docs/docs/Enumeration.md new file mode 100644 index 0000000..6a9d022 --- /dev/null +++ b/docs/docs/Enumeration.md @@ -0,0 +1,32 @@ +# Enumeration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the enumeration | +**members** | **Dict[str, int]** | Dictionary of enumeration members and their values | +**artifact_type** | **str** | Type of artifact that the enumeration is associated with | [optional] + +## Example + +```python +from revengai.models.enumeration import Enumeration + +# TODO update the JSON string below +json = "{}" +# create an instance of Enumeration from a JSON string +enumeration_instance = Enumeration.from_json(json) +# print the JSON string representation of the object +print(Enumeration.to_json()) + +# convert the object into a dict +enumeration_dict = enumeration_instance.to_dict() +# create an instance of Enumeration from a dict +enumeration_from_dict = Enumeration.from_dict(enumeration_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/docs/ErrorModel.md b/docs/docs/ErrorModel.md new file mode 100644 index 0000000..e7c8f92 --- /dev/null +++ b/docs/docs/ErrorModel.md @@ -0,0 +1,30 @@ +# ErrorModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | + +## Example + +```python +from revengai.models.error_model import ErrorModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ErrorModel from a JSON string +error_model_instance = ErrorModel.from_json(json) +# print the JSON string representation of the object +print(ErrorModel.to_json()) + +# convert the object into a dict +error_model_dict = error_model_instance.to_dict() +# create an instance of ErrorModel from a dict +error_model_from_dict = ErrorModel.from_dict(error_model_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/docs/ExportModel.md b/docs/docs/ExportModel.md new file mode 100644 index 0000000..2b157d1 --- /dev/null +++ b/docs/docs/ExportModel.md @@ -0,0 +1,30 @@ +# ExportModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_exports** | **int** | | +**exports** | **List[Dict[str, int]]** | | + +## Example + +```python +from revengai.models.export_model import ExportModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportModel from a JSON string +export_model_instance = ExportModel.from_json(json) +# print the JSON string representation of the object +print(ExportModel.to_json()) + +# convert the object into a dict +export_model_dict = export_model_instance.to_dict() +# create an instance of ExportModel from a dict +export_model_from_dict = ExportModel.from_dict(export_model_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/docs/ExportedBinaryAnnResult.md b/docs/docs/ExportedBinaryAnnResult.md new file mode 100644 index 0000000..979fc99 --- /dev/null +++ b/docs/docs/ExportedBinaryAnnResult.md @@ -0,0 +1,37 @@ +# ExportedBinaryAnnResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | | +**binary_id** | **int** | | +**binary_name** | **str** | | +**sha_256_hash** | **str** | | +**analysis_scope** | **str** | | +**embedding_3d** | **List[float]** | | +**embedding_1d** | **List[float]** | | +**confidence** | **float** | | +**tags** | [**List[AppServicesBinaryAnnSchemaTagItem]**](AppServicesBinaryAnnSchemaTagItem.md) | | [optional] + +## Example + +```python +from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportedBinaryAnnResult from a JSON string +exported_binary_ann_result_instance = ExportedBinaryAnnResult.from_json(json) +# print the JSON string representation of the object +print(ExportedBinaryAnnResult.to_json()) + +# convert the object into a dict +exported_binary_ann_result_dict = exported_binary_ann_result_instance.to_dict() +# create an instance of ExportedBinaryAnnResult from a dict +exported_binary_ann_result_from_dict = ExportedBinaryAnnResult.from_dict(exported_binary_ann_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/docs/ExternalResponse.md b/docs/docs/ExternalResponse.md new file mode 100644 index 0000000..20de996 --- /dev/null +++ b/docs/docs/ExternalResponse.md @@ -0,0 +1,31 @@ +# ExternalResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha_256_hash** | **str** | | +**data** | **Dict[str, object]** | | +**last_updated** | **datetime** | | + +## Example + +```python +from revengai.models.external_response import ExternalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExternalResponse from a JSON string +external_response_instance = ExternalResponse.from_json(json) +# print the JSON string representation of the object +print(ExternalResponse.to_json()) + +# convert the object into a dict +external_response_dict = external_response_instance.to_dict() +# create an instance of ExternalResponse from a dict +external_response_from_dict = ExternalResponse.from_dict(external_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/docs/ExternalSourcesApi.md b/docs/docs/ExternalSourcesApi.md new file mode 100644 index 0000000..48e0a71 --- /dev/null +++ b/docs/docs/ExternalSourcesApi.md @@ -0,0 +1,498 @@ +# revengai.ExternalSourcesApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_external_task_mb**](ExternalSourcesApi.md#create_external_task_mb) | **POST** /v2/analysis/{analysis_id}/external/mb | Pulls data from VirusTotal +[**create_external_task_vt**](ExternalSourcesApi.md#create_external_task_vt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal +[**get_mb_data**](ExternalSourcesApi.md#get_mb_data) | **GET** /v2/analysis/{analysis_id}/external/mb | Get MalwareBazaar data +[**get_mb_task_status**](ExternalSourcesApi.md#get_mb_task_status) | **GET** /v2/analysis/{analysis_id}/external/mb/status | Check the status of MalwareBazaar data retrieval +[**get_vt_data**](ExternalSourcesApi.md#get_vt_data) | **GET** /v2/analysis/{analysis_id}/external/vt | Get VirusTotal data +[**get_vt_task_status**](ExternalSourcesApi.md#get_vt_task_status) | **GET** /v2/analysis/{analysis_id}/external/vt/status | Check the status of VirusTotal data retrieval + + +# **create_external_task_mb** +> BaseResponseStr create_external_task_mb(analysis_id, authorization=authorization) + +Pulls data from VirusTotal + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_str import BaseResponseStr +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Pulls data from VirusTotal + api_response = api_instance.create_external_task_mb(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->create_external_task_mb:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->create_external_task_mb: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseStr**](BaseResponseStr.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**409** | Request already queued | - | + +[[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_external_task_vt** +> BaseResponseStr create_external_task_vt(analysis_id, authorization=authorization) + +Pulls data from VirusTotal + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_str import BaseResponseStr +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Pulls data from VirusTotal + api_response = api_instance.create_external_task_vt(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->create_external_task_vt:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->create_external_task_vt: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseStr**](BaseResponseStr.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**409** | Request already queued | - | + +[[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_mb_data** +> BaseResponseExternalResponse get_mb_data(analysis_id, authorization=authorization) + +Get MalwareBazaar data + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_external_response import BaseResponseExternalResponse +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get MalwareBazaar data + api_response = api_instance.get_mb_data(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->get_mb_data:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->get_mb_data: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseExternalResponse**](BaseResponseExternalResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | No data retrieved from MalwareBazaar for the given analysis_id | - | + +[[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_mb_task_status** +> BaseResponseTaskResponse get_mb_task_status(analysis_id, authorization=authorization) + +Check the status of MalwareBazaar data retrieval + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_task_response import BaseResponseTaskResponse +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Check the status of MalwareBazaar data retrieval + api_response = api_instance.get_mb_task_status(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->get_mb_task_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->get_mb_task_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseTaskResponse**](BaseResponseTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_vt_data** +> BaseResponseExternalResponse get_vt_data(analysis_id, authorization=authorization) + +Get VirusTotal data + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_external_response import BaseResponseExternalResponse +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get VirusTotal data + api_response = api_instance.get_vt_data(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->get_vt_data:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->get_vt_data: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseExternalResponse**](BaseResponseExternalResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | No data retrieved from VirusTotal for the given analysis_id | - | + +[[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_vt_task_status** +> BaseResponseTaskResponse get_vt_task_status(analysis_id, authorization=authorization) + +Check the status of VirusTotal data retrieval + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_task_response import BaseResponseTaskResponse +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' + +# 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.ExternalSourcesApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Check the status of VirusTotal data retrieval + api_response = api_instance.get_vt_task_status(analysis_id, authorization=authorization) + print("The response of ExternalSourcesApi->get_vt_task_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->get_vt_task_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseTaskResponse**](BaseResponseTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/FileFormat.md b/docs/docs/FileFormat.md new file mode 100644 index 0000000..342767f --- /dev/null +++ b/docs/docs/FileFormat.md @@ -0,0 +1,14 @@ +# FileFormat + + +## Enum + +* `PE` (value: `'pe'`) + +* `ELF` (value: `'elf'`) + +* `BLOB` (value: `'blob'`) + +[[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/docs/FileHashes.md b/docs/docs/FileHashes.md new file mode 100644 index 0000000..95e2ae1 --- /dev/null +++ b/docs/docs/FileHashes.md @@ -0,0 +1,36 @@ +# FileHashes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**md5** | **str** | | +**sha1** | **str** | | +**sha256** | **str** | | +**sha512** | **str** | | +**sha3_224** | **str** | | +**sha3_256** | **str** | | +**sha3_384** | **str** | | +**sha3_512** | **str** | | + +## Example + +```python +from revengai.models.file_hashes import FileHashes + +# TODO update the JSON string below +json = "{}" +# create an instance of FileHashes from a JSON string +file_hashes_instance = FileHashes.from_json(json) +# print the JSON string representation of the object +print(FileHashes.to_json()) + +# convert the object into a dict +file_hashes_dict = file_hashes_instance.to_dict() +# create an instance of FileHashes from a dict +file_hashes_from_dict = FileHashes.from_dict(file_hashes_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/docs/FileMetadata.md b/docs/docs/FileMetadata.md new file mode 100644 index 0000000..474856f --- /dev/null +++ b/docs/docs/FileMetadata.md @@ -0,0 +1,32 @@ +# FileMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | | +**friendly_size** | **str** | | +**entropy** | **float** | | +**hashes** | [**FileHashes**](FileHashes.md) | | + +## Example + +```python +from revengai.models.file_metadata import FileMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of FileMetadata from a JSON string +file_metadata_instance = FileMetadata.from_json(json) +# print the JSON string representation of the object +print(FileMetadata.to_json()) + +# convert the object into a dict +file_metadata_dict = file_metadata_instance.to_dict() +# create an instance of FileMetadata from a dict +file_metadata_from_dict = FileMetadata.from_dict(file_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/docs/Filters.md b/docs/docs/Filters.md new file mode 100644 index 0000000..4d12313 --- /dev/null +++ b/docs/docs/Filters.md @@ -0,0 +1,18 @@ +# Filters + + +## Enum + +* `OFFICIAL_ONLY` (value: `'official_only'`) + +* `USER_ONLY` (value: `'user_only'`) + +* `TEAM_ONLY` (value: `'team_only'`) + +* `PUBLIC_ONLY` (value: `'public_only'`) + +* `HIDE_EMPTY` (value: `'hide_empty'`) + +[[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/docs/FirmwareApi.md b/docs/docs/FirmwareApi.md new file mode 100644 index 0000000..48e49bd --- /dev/null +++ b/docs/docs/FirmwareApi.md @@ -0,0 +1,174 @@ +# revengai.FirmwareApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_binaries_for_firmware_task**](FirmwareApi.md#get_binaries_for_firmware_task) | **GET** /v2/firmware/get-binaries/{task_id} | Upload firmware for unpacking +[**upload_firmware**](FirmwareApi.md#upload_firmware) | **POST** /v2/firmware | Upload firmware for unpacking + + +# **get_binaries_for_firmware_task** +> object get_binaries_for_firmware_task(task_id, authorization=authorization) + +Upload firmware for unpacking + +Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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.FirmwareApi(api_client) + task_id = 'task_id_example' # str | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Upload firmware for unpacking + api_response = api_instance.get_binaries_for_firmware_task(task_id, authorization=authorization) + print("The response of FirmwareApi->get_binaries_for_firmware_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareApi->get_binaries_for_firmware_task: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **upload_firmware** +> object upload_firmware(file, authorization=authorization, password=password) + +Upload firmware for unpacking + +Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + +### Example + +* Api Key Authentication (APIKey): + +```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' + +# 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.FirmwareApi(api_client) + file = None # bytearray | + authorization = 'authorization_example' # str | API Key bearer token (optional) + password = 'password_example' # str | (optional) + + try: + # Upload firmware for unpacking + api_response = api_instance.upload_firmware(file, authorization=authorization, password=password) + print("The response of FirmwareApi->upload_firmware:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareApi->upload_firmware: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **bytearray**| | + **authorization** | **str**| API Key bearer token | [optional] + **password** | **str**| | [optional] + +### Return type + +**object** + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 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) + diff --git a/docs/docs/FunctionAnalysisThreatScoreData.md b/docs/docs/FunctionAnalysisThreatScoreData.md new file mode 100644 index 0000000..165b4d4 --- /dev/null +++ b/docs/docs/FunctionAnalysisThreatScoreData.md @@ -0,0 +1,35 @@ +# FunctionAnalysisThreatScoreData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min** | **float** | The minimum value for the analysis score | +**max** | **float** | The maximum value for the analysis score | +**average** | **float** | The average value for the analysis score | +**upper** | **float** | The upper limit for the analysis score | +**lower** | **float** | The lower limit for the analysis score | +**malware_count** | **int** | Number of malware binaries used in threat score calculation | +**benign_count** | **int** | Number of benign binaries used in threat score calculation | + +## Example + +```python +from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionAnalysisThreatScoreData from a JSON string +function_analysis_threat_score_data_instance = FunctionAnalysisThreatScoreData.from_json(json) +# print the JSON string representation of the object +print(FunctionAnalysisThreatScoreData.to_json()) + +# convert the object into a dict +function_analysis_threat_score_data_dict = function_analysis_threat_score_data_instance.to_dict() +# create an instance of FunctionAnalysisThreatScoreData from a dict +function_analysis_threat_score_data_from_dict = FunctionAnalysisThreatScoreData.from_dict(function_analysis_threat_score_data_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/docs/FunctionBlockDestinationResponse.md b/docs/docs/FunctionBlockDestinationResponse.md new file mode 100644 index 0000000..7953005 --- /dev/null +++ b/docs/docs/FunctionBlockDestinationResponse.md @@ -0,0 +1,31 @@ +# FunctionBlockDestinationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination_block_id** | **int** | | +**flowtype** | **str** | The type of execution flow between chunks | +**vaddr** | **str** | The vaddr of the destination where the execution flow continues from | + +## Example + +```python +from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionBlockDestinationResponse from a JSON string +function_block_destination_response_instance = FunctionBlockDestinationResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionBlockDestinationResponse.to_json()) + +# convert the object into a dict +function_block_destination_response_dict = function_block_destination_response_instance.to_dict() +# create an instance of FunctionBlockDestinationResponse from a dict +function_block_destination_response_from_dict = FunctionBlockDestinationResponse.from_dict(function_block_destination_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/docs/FunctionBlockResponse.md b/docs/docs/FunctionBlockResponse.md new file mode 100644 index 0000000..685704d --- /dev/null +++ b/docs/docs/FunctionBlockResponse.md @@ -0,0 +1,34 @@ +# FunctionBlockResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asm** | **List[str]** | The ordered assembly strings for this chunk | +**id** | **int** | ID of the block | +**min_addr** | **int** | The minimum vaddr of the block | +**max_addr** | **int** | The maximum vaddr of the block | +**destinations** | [**List[FunctionBlockDestinationResponse]**](FunctionBlockDestinationResponse.md) | The potential execution flow destinations from this block | +**comment** | **str** | | [optional] + +## Example + +```python +from revengai.models.function_block_response import FunctionBlockResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionBlockResponse from a JSON string +function_block_response_instance = FunctionBlockResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionBlockResponse.to_json()) + +# convert the object into a dict +function_block_response_dict = function_block_response_instance.to_dict() +# create an instance of FunctionBlockResponse from a dict +function_block_response_from_dict = FunctionBlockResponse.from_dict(function_block_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/docs/FunctionBlocksResponse.md b/docs/docs/FunctionBlocksResponse.md new file mode 100644 index 0000000..f22b327 --- /dev/null +++ b/docs/docs/FunctionBlocksResponse.md @@ -0,0 +1,33 @@ +# FunctionBlocksResponse + +Response for returning disassembly of a function. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blocks** | [**List[FunctionBlockResponse]**](FunctionBlockResponse.md) | Disassembly is broken into control flow blocks | +**local_variables** | [**List[FunctionLocalVariableResponse]**](FunctionLocalVariableResponse.md) | Local variables associated with this function | +**params** | [**List[FunctionParamResponse]**](FunctionParamResponse.md) | Params associated with this function | +**overview_comment** | **str** | | + +## Example + +```python +from revengai.models.function_blocks_response import FunctionBlocksResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionBlocksResponse from a JSON string +function_blocks_response_instance = FunctionBlocksResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionBlocksResponse.to_json()) + +# convert the object into a dict +function_blocks_response_dict = function_blocks_response_instance.to_dict() +# create an instance of FunctionBlocksResponse from a dict +function_blocks_response_from_dict = FunctionBlocksResponse.from_dict(function_blocks_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/docs/FunctionBoundary.md b/docs/docs/FunctionBoundary.md new file mode 100644 index 0000000..e686a13 --- /dev/null +++ b/docs/docs/FunctionBoundary.md @@ -0,0 +1,31 @@ +# FunctionBoundary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**start_address** | **int** | | +**end_address** | **int** | | + +## Example + +```python +from revengai.models.function_boundary import FunctionBoundary + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionBoundary from a JSON string +function_boundary_instance = FunctionBoundary.from_json(json) +# print the JSON string representation of the object +print(FunctionBoundary.to_json()) + +# convert the object into a dict +function_boundary_dict = function_boundary_instance.to_dict() +# create an instance of FunctionBoundary from a dict +function_boundary_from_dict = FunctionBoundary.from_dict(function_boundary_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/docs/FunctionBoxPlotConfidence.md b/docs/docs/FunctionBoxPlotConfidence.md new file mode 100644 index 0000000..9eeebf0 --- /dev/null +++ b/docs/docs/FunctionBoxPlotConfidence.md @@ -0,0 +1,30 @@ +# FunctionBoxPlotConfidence + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**box_plot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | + +## Example + +```python +from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionBoxPlotConfidence from a JSON string +function_box_plot_confidence_instance = FunctionBoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(FunctionBoxPlotConfidence.to_json()) + +# convert the object into a dict +function_box_plot_confidence_dict = function_box_plot_confidence_instance.to_dict() +# create an instance of FunctionBoxPlotConfidence from a dict +function_box_plot_confidence_from_dict = FunctionBoxPlotConfidence.from_dict(function_box_plot_confidence_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/docs/FunctionCapabilityResponse.md b/docs/docs/FunctionCapabilityResponse.md new file mode 100644 index 0000000..ce3ec8e --- /dev/null +++ b/docs/docs/FunctionCapabilityResponse.md @@ -0,0 +1,29 @@ +# FunctionCapabilityResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capabilities** | **List[str]** | The capabilities of the function | + +## Example + +```python +from revengai.models.function_capability_response import FunctionCapabilityResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionCapabilityResponse from a JSON string +function_capability_response_instance = FunctionCapabilityResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionCapabilityResponse.to_json()) + +# convert the object into a dict +function_capability_response_dict = function_capability_response_instance.to_dict() +# create an instance of FunctionCapabilityResponse from a dict +function_capability_response_from_dict = FunctionCapabilityResponse.from_dict(function_capability_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/docs/FunctionCommentCreateRequest.md b/docs/docs/FunctionCommentCreateRequest.md new file mode 100644 index 0000000..b96d148 --- /dev/null +++ b/docs/docs/FunctionCommentCreateRequest.md @@ -0,0 +1,30 @@ +# FunctionCommentCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | Comment text content | +**context** | [**DecompilationCommentContext**](DecompilationCommentContext.md) | Comment context for a function decompilation | [optional] + +## Example + +```python +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionCommentCreateRequest from a JSON string +function_comment_create_request_instance = FunctionCommentCreateRequest.from_json(json) +# print the JSON string representation of the object +print(FunctionCommentCreateRequest.to_json()) + +# convert the object into a dict +function_comment_create_request_dict = function_comment_create_request_instance.to_dict() +# create an instance of FunctionCommentCreateRequest from a dict +function_comment_create_request_from_dict = FunctionCommentCreateRequest.from_dict(function_comment_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/docs/FunctionDataTypes.md b/docs/docs/FunctionDataTypes.md new file mode 100644 index 0000000..146896e --- /dev/null +++ b/docs/docs/FunctionDataTypes.md @@ -0,0 +1,32 @@ +# FunctionDataTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completed** | **bool** | Whether the service has completed data types generation | +**status** | **str** | The current status of the data types service | +**data_types** | [**FunctionInfoOutput**](FunctionInfoOutput.md) | | [optional] +**data_types_version** | **int** | | [optional] + +## Example + +```python +from revengai.models.function_data_types import FunctionDataTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionDataTypes from a JSON string +function_data_types_instance = FunctionDataTypes.from_json(json) +# print the JSON string representation of the object +print(FunctionDataTypes.to_json()) + +# convert the object into a dict +function_data_types_dict = function_data_types_instance.to_dict() +# create an instance of FunctionDataTypes from a dict +function_data_types_from_dict = FunctionDataTypes.from_dict(function_data_types_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/docs/FunctionDataTypesList.md b/docs/docs/FunctionDataTypesList.md new file mode 100644 index 0000000..3153511 --- /dev/null +++ b/docs/docs/FunctionDataTypesList.md @@ -0,0 +1,31 @@ +# FunctionDataTypesList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | **int** | Total number of functions in analysis | [optional] [default to 0] +**total_data_types_count** | **int** | Total number of functions with data types | [optional] [default to 0] +**items** | [**List[FunctionDataTypesListItem]**](FunctionDataTypesListItem.md) | List of function data types information | + +## Example + +```python +from revengai.models.function_data_types_list import FunctionDataTypesList + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionDataTypesList from a JSON string +function_data_types_list_instance = FunctionDataTypesList.from_json(json) +# print the JSON string representation of the object +print(FunctionDataTypesList.to_json()) + +# convert the object into a dict +function_data_types_list_dict = function_data_types_list_instance.to_dict() +# create an instance of FunctionDataTypesList from a dict +function_data_types_list_from_dict = FunctionDataTypesList.from_dict(function_data_types_list_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/docs/FunctionDataTypesListItem.md b/docs/docs/FunctionDataTypesListItem.md new file mode 100644 index 0000000..9daf757 --- /dev/null +++ b/docs/docs/FunctionDataTypesListItem.md @@ -0,0 +1,33 @@ +# FunctionDataTypesListItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completed** | **bool** | Whether the service has completed data types generation | +**status** | **str** | The current status of the data types service | +**data_types** | [**FunctionInfoOutput**](FunctionInfoOutput.md) | | [optional] +**data_types_version** | **int** | | [optional] +**function_id** | **int** | Function id | + +## Example + +```python +from revengai.models.function_data_types_list_item import FunctionDataTypesListItem + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionDataTypesListItem from a JSON string +function_data_types_list_item_instance = FunctionDataTypesListItem.from_json(json) +# print the JSON string representation of the object +print(FunctionDataTypesListItem.to_json()) + +# convert the object into a dict +function_data_types_list_item_dict = function_data_types_list_item_instance.to_dict() +# create an instance of FunctionDataTypesListItem from a dict +function_data_types_list_item_from_dict = FunctionDataTypesListItem.from_dict(function_data_types_list_item_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/docs/FunctionDataTypesParams.md b/docs/docs/FunctionDataTypesParams.md new file mode 100644 index 0000000..d400fe7 --- /dev/null +++ b/docs/docs/FunctionDataTypesParams.md @@ -0,0 +1,29 @@ +# FunctionDataTypesParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_ids** | **List[int]** | The function ID's to generate/get data types for | + +## Example + +```python +from revengai.models.function_data_types_params import FunctionDataTypesParams + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionDataTypesParams from a JSON string +function_data_types_params_instance = FunctionDataTypesParams.from_json(json) +# print the JSON string representation of the object +print(FunctionDataTypesParams.to_json()) + +# convert the object into a dict +function_data_types_params_dict = function_data_types_params_instance.to_dict() +# create an instance of FunctionDataTypesParams from a dict +function_data_types_params_from_dict = FunctionDataTypesParams.from_dict(function_data_types_params_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/docs/FunctionDataTypesStatus.md b/docs/docs/FunctionDataTypesStatus.md new file mode 100644 index 0000000..c296426 --- /dev/null +++ b/docs/docs/FunctionDataTypesStatus.md @@ -0,0 +1,31 @@ +# FunctionDataTypesStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | Function id | +**completed** | **bool** | Whether the service has completed data types generation | +**status** | **str** | The current status of the data types service | + +## Example + +```python +from revengai.models.function_data_types_status import FunctionDataTypesStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionDataTypesStatus from a JSON string +function_data_types_status_instance = FunctionDataTypesStatus.from_json(json) +# print the JSON string representation of the object +print(FunctionDataTypesStatus.to_json()) + +# convert the object into a dict +function_data_types_status_dict = function_data_types_status_instance.to_dict() +# create an instance of FunctionDataTypesStatus from a dict +function_data_types_status_from_dict = FunctionDataTypesStatus.from_dict(function_data_types_status_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/docs/FunctionHeader.md b/docs/docs/FunctionHeader.md new file mode 100644 index 0000000..e0f364e --- /dev/null +++ b/docs/docs/FunctionHeader.md @@ -0,0 +1,33 @@ +# FunctionHeader + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the function | +**addr** | **int** | Memory address of the function | +**type** | **str** | Return type of the function | +**args** | [**Dict[str, Argument]**](Argument.md) | Dictionary of function arguments | + +## Example + +```python +from revengai.models.function_header import FunctionHeader + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionHeader from a JSON string +function_header_instance = FunctionHeader.from_json(json) +# print the JSON string representation of the object +print(FunctionHeader.to_json()) + +# convert the object into a dict +function_header_dict = function_header_instance.to_dict() +# create an instance of FunctionHeader from a dict +function_header_from_dict = FunctionHeader.from_dict(function_header_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/docs/FunctionInfoInput.md b/docs/docs/FunctionInfoInput.md new file mode 100644 index 0000000..0b4e882 --- /dev/null +++ b/docs/docs/FunctionInfoInput.md @@ -0,0 +1,30 @@ +# FunctionInfoInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**func_types** | [**FunctionTypeInput**](FunctionTypeInput.md) | | [optional] +**func_deps** | [**List[FunctionInfoInputFuncDepsInner]**](FunctionInfoInputFuncDepsInner.md) | List of function dependencies | + +## Example + +```python +from revengai.models.function_info_input import FunctionInfoInput + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionInfoInput from a JSON string +function_info_input_instance = FunctionInfoInput.from_json(json) +# print the JSON string representation of the object +print(FunctionInfoInput.to_json()) + +# convert the object into a dict +function_info_input_dict = function_info_input_instance.to_dict() +# create an instance of FunctionInfoInput from a dict +function_info_input_from_dict = FunctionInfoInput.from_dict(function_info_input_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/docs/FunctionInfoInputFuncDepsInner.md b/docs/docs/FunctionInfoInputFuncDepsInner.md new file mode 100644 index 0000000..7a431f1 --- /dev/null +++ b/docs/docs/FunctionInfoInputFuncDepsInner.md @@ -0,0 +1,35 @@ +# FunctionInfoInputFuncDepsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the global variable | +**size** | **int** | Size of the global variable in bytes | +**members** | **Dict[str, int]** | Dictionary of enumeration members and their values | +**artifact_type** | **str** | Type of artifact that the global variable is associated with | [optional] +**type** | **str** | Data type of the global variable | +**addr** | **int** | Memory address of the global variable | + +## Example + +```python +from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionInfoInputFuncDepsInner from a JSON string +function_info_input_func_deps_inner_instance = FunctionInfoInputFuncDepsInner.from_json(json) +# print the JSON string representation of the object +print(FunctionInfoInputFuncDepsInner.to_json()) + +# convert the object into a dict +function_info_input_func_deps_inner_dict = function_info_input_func_deps_inner_instance.to_dict() +# create an instance of FunctionInfoInputFuncDepsInner from a dict +function_info_input_func_deps_inner_from_dict = FunctionInfoInputFuncDepsInner.from_dict(function_info_input_func_deps_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/docs/FunctionInfoOutput.md b/docs/docs/FunctionInfoOutput.md new file mode 100644 index 0000000..4e73bb8 --- /dev/null +++ b/docs/docs/FunctionInfoOutput.md @@ -0,0 +1,30 @@ +# FunctionInfoOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**func_types** | [**FunctionTypeOutput**](FunctionTypeOutput.md) | | [optional] +**func_deps** | [**List[FunctionInfoInputFuncDepsInner]**](FunctionInfoInputFuncDepsInner.md) | List of function dependencies | + +## Example + +```python +from revengai.models.function_info_output import FunctionInfoOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionInfoOutput from a JSON string +function_info_output_instance = FunctionInfoOutput.from_json(json) +# print the JSON string representation of the object +print(FunctionInfoOutput.to_json()) + +# convert the object into a dict +function_info_output_dict = function_info_output_instance.to_dict() +# create an instance of FunctionInfoOutput from a dict +function_info_output_from_dict = FunctionInfoOutput.from_dict(function_info_output_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/docs/FunctionLocalVariableResponse.md b/docs/docs/FunctionLocalVariableResponse.md new file mode 100644 index 0000000..9a967bd --- /dev/null +++ b/docs/docs/FunctionLocalVariableResponse.md @@ -0,0 +1,33 @@ +# FunctionLocalVariableResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**d_type** | **str** | | +**size** | **int** | | +**loc** | **str** | | +**name** | **str** | | + +## Example + +```python +from revengai.models.function_local_variable_response import FunctionLocalVariableResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionLocalVariableResponse from a JSON string +function_local_variable_response_instance = FunctionLocalVariableResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionLocalVariableResponse.to_json()) + +# convert the object into a dict +function_local_variable_response_dict = function_local_variable_response_instance.to_dict() +# create an instance of FunctionLocalVariableResponse from a dict +function_local_variable_response_from_dict = FunctionLocalVariableResponse.from_dict(function_local_variable_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/docs/FunctionMappingFull.md b/docs/docs/FunctionMappingFull.md new file mode 100644 index 0000000..f068fc2 --- /dev/null +++ b/docs/docs/FunctionMappingFull.md @@ -0,0 +1,39 @@ +# FunctionMappingFull + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inverse_string_map** | [**Dict[str, InverseStringMapItem]**](InverseStringMapItem.md) | | +**inverse_function_map** | [**Dict[str, InverseFunctionMapItem]**](InverseFunctionMapItem.md) | | +**unmatched_functions** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_external_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_custom_types** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_strings** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_go_to_labels** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_custom_function_pointers** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**unmatched_variadic_lists** | [**Dict[str, InverseValue]**](InverseValue.md) | | +**fields** | **Dict[str, Dict[str, InverseValue]]** | | + +## Example + +```python +from revengai.models.function_mapping_full import FunctionMappingFull + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionMappingFull from a JSON string +function_mapping_full_instance = FunctionMappingFull.from_json(json) +# print the JSON string representation of the object +print(FunctionMappingFull.to_json()) + +# convert the object into a dict +function_mapping_full_dict = function_mapping_full_instance.to_dict() +# create an instance of FunctionMappingFull from a dict +function_mapping_full_from_dict = FunctionMappingFull.from_dict(function_mapping_full_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/docs/FunctionNameConfidenceBody.md b/docs/docs/FunctionNameConfidenceBody.md new file mode 100644 index 0000000..e93a6ac --- /dev/null +++ b/docs/docs/FunctionNameConfidenceBody.md @@ -0,0 +1,30 @@ +# FunctionNameConfidenceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**functions** | [**List[FunctionNameInput]**](FunctionNameInput.md) | List of function ids and the function names they want to check confidence for | [optional] +**is_debug** | **bool** | Flag to match only to a debug function | [optional] [default to False] + +## Example + +```python +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionNameConfidenceBody from a JSON string +function_name_confidence_body_instance = FunctionNameConfidenceBody.from_json(json) +# print the JSON string representation of the object +print(FunctionNameConfidenceBody.to_json()) + +# convert the object into a dict +function_name_confidence_body_dict = function_name_confidence_body_instance.to_dict() +# create an instance of FunctionNameConfidenceBody from a dict +function_name_confidence_body_from_dict = FunctionNameConfidenceBody.from_dict(function_name_confidence_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/docs/FunctionNameHistory.md b/docs/docs/FunctionNameHistory.md new file mode 100644 index 0000000..cb9c9d3 --- /dev/null +++ b/docs/docs/FunctionNameHistory.md @@ -0,0 +1,34 @@ +# FunctionNameHistory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**history_id** | **int** | The ID of the history record | +**change_made_by** | **str** | The user who made the change | +**function_name** | **str** | The name of the function | +**is_debug** | **bool** | Whether the function is debugged | +**source_type** | **str** | The source type of the function | +**created_at** | **str** | The timestamp when the function name was created | + +## Example + +```python +from revengai.models.function_name_history import FunctionNameHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionNameHistory from a JSON string +function_name_history_instance = FunctionNameHistory.from_json(json) +# print the JSON string representation of the object +print(FunctionNameHistory.to_json()) + +# convert the object into a dict +function_name_history_dict = function_name_history_instance.to_dict() +# create an instance of FunctionNameHistory from a dict +function_name_history_from_dict = FunctionNameHistory.from_dict(function_name_history_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/docs/FunctionNameInput.md b/docs/docs/FunctionNameInput.md new file mode 100644 index 0000000..79f3893 --- /dev/null +++ b/docs/docs/FunctionNameInput.md @@ -0,0 +1,30 @@ +# FunctionNameInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**function_name** | **str** | | + +## Example + +```python +from revengai.models.function_name_input import FunctionNameInput + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionNameInput from a JSON string +function_name_input_instance = FunctionNameInput.from_json(json) +# print the JSON string representation of the object +print(FunctionNameInput.to_json()) + +# convert the object into a dict +function_name_input_dict = function_name_input_instance.to_dict() +# create an instance of FunctionNameInput from a dict +function_name_input_from_dict = FunctionNameInput.from_dict(function_name_input_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/docs/FunctionParamResponse.md b/docs/docs/FunctionParamResponse.md new file mode 100644 index 0000000..2a156bb --- /dev/null +++ b/docs/docs/FunctionParamResponse.md @@ -0,0 +1,33 @@ +# FunctionParamResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**d_type** | **str** | | +**loc** | **str** | | +**addr** | **str** | | +**length** | **int** | | +**name** | **str** | | + +## Example + +```python +from revengai.models.function_param_response import FunctionParamResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionParamResponse from a JSON string +function_param_response_instance = FunctionParamResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionParamResponse.to_json()) + +# convert the object into a dict +function_param_response_dict = function_param_response_instance.to_dict() +# create an instance of FunctionParamResponse from a dict +function_param_response_from_dict = FunctionParamResponse.from_dict(function_param_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/docs/FunctionRename.md b/docs/docs/FunctionRename.md new file mode 100644 index 0000000..3a9a021 --- /dev/null +++ b/docs/docs/FunctionRename.md @@ -0,0 +1,30 @@ +# FunctionRename + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_name** | **str** | The new name for the function | [optional] [default to ''] +**new_mangled_name** | **str** | | [optional] + +## Example + +```python +from revengai.models.function_rename import FunctionRename + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionRename from a JSON string +function_rename_instance = FunctionRename.from_json(json) +# print the JSON string representation of the object +print(FunctionRename.to_json()) + +# convert the object into a dict +function_rename_dict = function_rename_instance.to_dict() +# create an instance of FunctionRename from a dict +function_rename_from_dict = FunctionRename.from_dict(function_rename_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/docs/FunctionRenameMap.md b/docs/docs/FunctionRenameMap.md new file mode 100644 index 0000000..3355c02 --- /dev/null +++ b/docs/docs/FunctionRenameMap.md @@ -0,0 +1,31 @@ +# FunctionRenameMap + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | The ID of the function to rename | +**new_name** | **str** | The new name for the function | [optional] [default to ''] +**new_mangled_name** | **str** | | [optional] + +## Example + +```python +from revengai.models.function_rename_map import FunctionRenameMap + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionRenameMap from a JSON string +function_rename_map_instance = FunctionRenameMap.from_json(json) +# print the JSON string representation of the object +print(FunctionRenameMap.to_json()) + +# convert the object into a dict +function_rename_map_dict = function_rename_map_instance.to_dict() +# create an instance of FunctionRenameMap from a dict +function_rename_map_from_dict = FunctionRenameMap.from_dict(function_rename_map_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/docs/FunctionSearchResponse.md b/docs/docs/FunctionSearchResponse.md new file mode 100644 index 0000000..f9f379f --- /dev/null +++ b/docs/docs/FunctionSearchResponse.md @@ -0,0 +1,29 @@ +# FunctionSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[FunctionSearchResult]**](FunctionSearchResult.md) | The results of the search | + +## Example + +```python +from revengai.models.function_search_response import FunctionSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionSearchResponse from a JSON string +function_search_response_instance = FunctionSearchResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionSearchResponse.to_json()) + +# convert the object into a dict +function_search_response_dict = function_search_response_instance.to_dict() +# create an instance of FunctionSearchResponse from a dict +function_search_response_from_dict = FunctionSearchResponse.from_dict(function_search_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/docs/FunctionSearchResult.md b/docs/docs/FunctionSearchResult.md new file mode 100644 index 0000000..92432f6 --- /dev/null +++ b/docs/docs/FunctionSearchResult.md @@ -0,0 +1,35 @@ +# FunctionSearchResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | The function ID | +**function_name** | **str** | The name of the function | +**binary_name** | **str** | The name of the binary the function belongs to | +**created_at** | **datetime** | The creation date of the function | +**model_id** | **int** | The model ID used to analyze the binary the function belongs to | +**model_name** | **str** | The name of the model used to analyze the binary the function belongs to | +**owned_by** | **str** | The owner of the binary the function belongs to | + +## Example + +```python +from revengai.models.function_search_result import FunctionSearchResult + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionSearchResult from a JSON string +function_search_result_instance = FunctionSearchResult.from_json(json) +# print the JSON string representation of the object +print(FunctionSearchResult.to_json()) + +# convert the object into a dict +function_search_result_dict = function_search_result_instance.to_dict() +# create an instance of FunctionSearchResult from a dict +function_search_result_from_dict = FunctionSearchResult.from_dict(function_search_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/docs/FunctionString.md b/docs/docs/FunctionString.md new file mode 100644 index 0000000..43384de --- /dev/null +++ b/docs/docs/FunctionString.md @@ -0,0 +1,30 @@ +# FunctionString + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The value of the string literal | +**vaddr** | **int** | The vaddr of the string value | + +## Example + +```python +from revengai.models.function_string import FunctionString + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionString from a JSON string +function_string_instance = FunctionString.from_json(json) +# print the JSON string representation of the object +print(FunctionString.to_json()) + +# convert the object into a dict +function_string_dict = function_string_instance.to_dict() +# create an instance of FunctionString from a dict +function_string_from_dict = FunctionString.from_dict(function_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/docs/FunctionStringsResponse.md b/docs/docs/FunctionStringsResponse.md new file mode 100644 index 0000000..bf9061c --- /dev/null +++ b/docs/docs/FunctionStringsResponse.md @@ -0,0 +1,31 @@ +# FunctionStringsResponse + +Response for listing all the strings of a function. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strings** | [**List[FunctionString]**](FunctionString.md) | The strings associated with this function | +**total_strings** | **int** | The total number of strings associated with this function | + +## Example + +```python +from revengai.models.function_strings_response import FunctionStringsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionStringsResponse from a JSON string +function_strings_response_instance = FunctionStringsResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionStringsResponse.to_json()) + +# convert the object into a dict +function_strings_response_dict = function_strings_response_instance.to_dict() +# create an instance of FunctionStringsResponse from a dict +function_strings_response_from_dict = FunctionStringsResponse.from_dict(function_strings_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/docs/FunctionTaskResponse.md b/docs/docs/FunctionTaskResponse.md new file mode 100644 index 0000000..f063cf6 --- /dev/null +++ b/docs/docs/FunctionTaskResponse.md @@ -0,0 +1,30 @@ +# FunctionTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**FunctionTaskStatus**](FunctionTaskStatus.md) | | [optional] +**error_message** | **str** | | [optional] + +## Example + +```python +from revengai.models.function_task_response import FunctionTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionTaskResponse from a JSON string +function_task_response_instance = FunctionTaskResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionTaskResponse.to_json()) + +# convert the object into a dict +function_task_response_dict = function_task_response_instance.to_dict() +# create an instance of FunctionTaskResponse from a dict +function_task_response_from_dict = FunctionTaskResponse.from_dict(function_task_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/docs/FunctionTaskStatus.md b/docs/docs/FunctionTaskStatus.md new file mode 100644 index 0000000..fdeb02a --- /dev/null +++ b/docs/docs/FunctionTaskStatus.md @@ -0,0 +1,18 @@ +# FunctionTaskStatus + + +## Enum + +* `UNINITIALISED` (value: `'UNINITIALISED'`) + +* `PENDING` (value: `'PENDING'`) + +* `RUNNING` (value: `'RUNNING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `FAILED` (value: `'FAILED'`) + +[[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/docs/FunctionThreatScore.md b/docs/docs/FunctionThreatScore.md new file mode 100644 index 0000000..add105e --- /dev/null +++ b/docs/docs/FunctionThreatScore.md @@ -0,0 +1,29 @@ +# FunctionThreatScore + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**Dict[str, FunctionAnalysisThreatScoreData]**](FunctionAnalysisThreatScoreData.md) | The results of the function threat | + +## Example + +```python +from revengai.models.function_threat_score import FunctionThreatScore + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionThreatScore from a JSON string +function_threat_score_instance = FunctionThreatScore.from_json(json) +# print the JSON string representation of the object +print(FunctionThreatScore.to_json()) + +# convert the object into a dict +function_threat_score_dict = function_threat_score_instance.to_dict() +# create an instance of FunctionThreatScore from a dict +function_threat_score_from_dict = FunctionThreatScore.from_dict(function_threat_score_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/docs/FunctionTypeInput.md b/docs/docs/FunctionTypeInput.md new file mode 100644 index 0000000..d3c937e --- /dev/null +++ b/docs/docs/FunctionTypeInput.md @@ -0,0 +1,36 @@ +# FunctionTypeInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**addr** | **int** | Memory address of the function | +**size** | **int** | Size of the function in bytes | +**header** | [**FunctionHeader**](FunctionHeader.md) | Function header information | +**stack_vars** | [**Dict[str, StackVariable]**](StackVariable.md) | | [optional] +**name** | **str** | Name of the function | +**type** | **str** | Return type of the function | +**artifact_type** | **str** | Type of artifact that the structure is associated with | [optional] [default to 'Function'] + +## Example + +```python +from revengai.models.function_type_input import FunctionTypeInput + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionTypeInput from a JSON string +function_type_input_instance = FunctionTypeInput.from_json(json) +# print the JSON string representation of the object +print(FunctionTypeInput.to_json()) + +# convert the object into a dict +function_type_input_dict = function_type_input_instance.to_dict() +# create an instance of FunctionTypeInput from a dict +function_type_input_from_dict = FunctionTypeInput.from_dict(function_type_input_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/docs/FunctionTypeOutput.md b/docs/docs/FunctionTypeOutput.md new file mode 100644 index 0000000..26a7039 --- /dev/null +++ b/docs/docs/FunctionTypeOutput.md @@ -0,0 +1,36 @@ +# FunctionTypeOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**addr** | **int** | Memory address of the function | +**size** | **int** | Size of the function in bytes | +**header** | [**FunctionHeader**](FunctionHeader.md) | Function header information | +**stack_vars** | [**Dict[str, StackVariable]**](StackVariable.md) | | [optional] +**name** | **str** | Name of the function | +**type** | **str** | Return type of the function | +**artifact_type** | **str** | Type of artifact that the structure is associated with | [optional] [default to 'Function'] + +## Example + +```python +from revengai.models.function_type_output import FunctionTypeOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionTypeOutput from a JSON string +function_type_output_instance = FunctionTypeOutput.from_json(json) +# print the JSON string representation of the object +print(FunctionTypeOutput.to_json()) + +# convert the object into a dict +function_type_output_dict = function_type_output_instance.to_dict() +# create an instance of FunctionTypeOutput from a dict +function_type_output_from_dict = FunctionTypeOutput.from_dict(function_type_output_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/docs/FunctionsAIDecompilationApi.md b/docs/docs/FunctionsAIDecompilationApi.md new file mode 100644 index 0000000..1b24886 --- /dev/null +++ b/docs/docs/FunctionsAIDecompilationApi.md @@ -0,0 +1,776 @@ +# revengai.FunctionsAIDecompilationApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#create_ai_decompilation_comment) | **POST** /v2/functions/{function_id}/ai-decompilation/comments | Create a comment for this function +[**create_ai_decompilation_task**](FunctionsAIDecompilationApi.md#create_ai_decompilation_task) | **POST** /v2/functions/{function_id}/ai-decompilation | Begins AI Decompilation Process +[**delete_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#delete_ai_decompilation_comment) | **DELETE** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Delete a comment +[**get_ai_decompilation_comments**](FunctionsAIDecompilationApi.md#get_ai_decompilation_comments) | **GET** /v2/functions/{function_id}/ai-decompilation/comments | Get comments for this function +[**get_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#get_ai_decompilation_rating) | **GET** /v2/functions/{function_id}/ai-decompilation/rating | Get rating for AI decompilation +[**get_ai_decompilation_task_result**](FunctionsAIDecompilationApi.md#get_ai_decompilation_task_result) | **GET** /v2/functions/{function_id}/ai-decompilation | Polls AI Decompilation Process +[**get_ai_decompilation_task_status**](FunctionsAIDecompilationApi.md#get_ai_decompilation_task_status) | **GET** /v2/functions/{function_id}/ai-decompilation/status | Check the status of a function ai decompilation +[**update_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#update_ai_decompilation_comment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment +[**upsert_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#upsert_ai_decompilation_rating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation + + +# **create_ai_decompilation_comment** +> BaseResponseCommentResponse create_ai_decompilation_comment(function_id, function_comment_create_request, authorization=authorization) + +Create a comment for this function + +Creates a comment associated with a specified function). + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + function_comment_create_request = revengai.FunctionCommentCreateRequest() # FunctionCommentCreateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Create a comment for this function + api_response = api_instance.create_ai_decompilation_comment(function_id, function_comment_create_request, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->create_ai_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->create_ai_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **function_comment_create_request** | [**FunctionCommentCreateRequest**](FunctionCommentCreateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**400** | Bad Request | - | + +[[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_ai_decompilation_task** +> BaseResponse create_ai_decompilation_task(function_id, authorization=authorization) + +Begins AI Decompilation Process + +Begins the AI Decompilation Process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Begins AI Decompilation Process + api_response = api_instance.create_ai_decompilation_task(function_id, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->create_ai_decompilation_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->create_ai_decompilation_task: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**403** | Forbidden | - | +**402** | Payment Required | - | +**409** | Conflict | - | +**400** | Bad Request | - | + +[[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) + +# **delete_ai_decompilation_comment** +> BaseResponseBool delete_ai_decompilation_comment(comment_id, function_id, authorization=authorization) + +Delete a comment + +Deletes an existing comment. Users can only delete their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_bool import BaseResponseBool +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' + +# 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.FunctionsAIDecompilationApi(api_client) + comment_id = 56 # int | + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Delete a comment + api_response = api_instance.delete_ai_decompilation_comment(comment_id, function_id, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->delete_ai_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->delete_ai_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBool**](BaseResponseBool.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**403** | You can only delete your own comments | - | +**400** | Bad Request | - | + +[[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_ai_decompilation_comments** +> BaseResponseListCommentResponse get_ai_decompilation_comments(function_id, authorization=authorization) + +Get comments for this function + +Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get comments for this function + api_response = api_instance.get_ai_decompilation_comments(function_id, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_comments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_comments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_ai_decompilation_rating** +> BaseResponseGetAiDecompilationRatingResponse get_ai_decompilation_rating(function_id, authorization=authorization) + +Get rating for AI decompilation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get rating for AI decompilation + api_response = api_instance.get_ai_decompilation_rating(function_id, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_rating:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_rating: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGetAiDecompilationRatingResponse**](BaseResponseGetAiDecompilationRatingResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_ai_decompilation_task_result** +> BaseResponseGetAiDecompilationTask get_ai_decompilation_task_result(function_id, summarise=summarise, generate_inline_comments=generate_inline_comments, authorization=authorization) + +Polls AI Decompilation Process + +Polls the AI Decompilation Process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + summarise = True # bool | Generate a summary for the decompilation (optional) (default to True) + generate_inline_comments = True # bool | Generate inline comments for the decompilation (only works if summarise is enabled) (optional) (default to True) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Polls AI Decompilation Process + api_response = api_instance.get_ai_decompilation_task_result(function_id, summarise=summarise, generate_inline_comments=generate_inline_comments, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_task_result:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_task_result: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **summarise** | **bool**| Generate a summary for the decompilation | [optional] [default to True] + **generate_inline_comments** | **bool**| Generate inline comments for the decompilation (only works if summarise is enabled) | [optional] [default to True] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGetAiDecompilationTask**](BaseResponseGetAiDecompilationTask.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**403** | Forbidden | - | + +[[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_ai_decompilation_task_status** +> BaseResponseFunctionTaskResponse get_ai_decompilation_task_status(function_id, authorization=authorization) + +Check the status of a function ai decompilation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Check the status of a function ai decompilation + api_response = api_instance.get_ai_decompilation_task_status(function_id, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_task_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_task_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionTaskResponse**](BaseResponseFunctionTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **update_ai_decompilation_comment** +> BaseResponseCommentResponse update_ai_decompilation_comment(comment_id, function_id, comment_update_request, authorization=authorization) + +Update a comment + +Updates the content of an existing comment. Users can only update their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest +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' + +# 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.FunctionsAIDecompilationApi(api_client) + comment_id = 56 # int | + function_id = 56 # int | + comment_update_request = revengai.CommentUpdateRequest() # CommentUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update a comment + api_response = api_instance.update_ai_decompilation_comment(comment_id, function_id, comment_update_request, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->update_ai_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->update_ai_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **function_id** | **int**| | + **comment_update_request** | [**CommentUpdateRequest**](CommentUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | +**403** | You can only update your own comments | - | +**400** | Bad Request | - | + +[[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) + +# **upsert_ai_decompilation_rating** +> BaseResponse upsert_ai_decompilation_rating(function_id, upsert_ai_decomplation_rating_request, authorization=authorization) + +Upsert rating for AI decompilation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest +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' + +# 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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | + upsert_ai_decomplation_rating_request = revengai.UpsertAiDecomplationRatingRequest() # UpsertAiDecomplationRatingRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Upsert rating for AI decompilation + api_response = api_instance.upsert_ai_decompilation_rating(function_id, upsert_ai_decomplation_rating_request, authorization=authorization) + print("The response of FunctionsAIDecompilationApi->upsert_ai_decompilation_rating:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->upsert_ai_decompilation_rating: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **upsert_ai_decomplation_rating_request** | [**UpsertAiDecomplationRatingRequest**](UpsertAiDecomplationRatingRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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/docs/FunctionsBlockCommentsApi.md b/docs/docs/FunctionsBlockCommentsApi.md new file mode 100644 index 0000000..bfea4f0 --- /dev/null +++ b/docs/docs/FunctionsBlockCommentsApi.md @@ -0,0 +1,254 @@ +# revengai.FunctionsBlockCommentsApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**generate_block_comments_for_block_in_function**](FunctionsBlockCommentsApi.md#generate_block_comments_for_block_in_function) | **POST** /v2/functions/{function_id}/block-comments/single | Generate block comments for a specific block in a function +[**generate_block_comments_for_function**](FunctionsBlockCommentsApi.md#generate_block_comments_for_function) | **POST** /v2/functions/{function_id}/block-comments | Generate block comments for a function +[**generate_overview_comment_for_function**](FunctionsBlockCommentsApi.md#generate_overview_comment_for_function) | **POST** /v2/functions/{function_id}/block-comments/overview | Generate overview comment for a function + + +# **generate_block_comments_for_block_in_function** +> BaseResponseBlockCommentsGenerationForFunctionResponse generate_block_comments_for_block_in_function(function_id, block, authorization=authorization) + +Generate block comments for a specific block in a function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse +from revengai.models.block import Block +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' + +# 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.FunctionsBlockCommentsApi(api_client) + function_id = 56 # int | + block = revengai.Block() # Block | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Generate block comments for a specific block in a function + api_response = api_instance.generate_block_comments_for_block_in_function(function_id, block, authorization=authorization) + print("The response of FunctionsBlockCommentsApi->generate_block_comments_for_block_in_function:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsBlockCommentsApi->generate_block_comments_for_block_in_function: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **block** | [**Block**](Block.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBlockCommentsGenerationForFunctionResponse**](BaseResponseBlockCommentsGenerationForFunctionResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **generate_block_comments_for_function** +> BaseResponseBlockCommentsGenerationForFunctionResponse generate_block_comments_for_function(function_id, authorization=authorization) + +Generate block comments for a function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse +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' + +# 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.FunctionsBlockCommentsApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Generate block comments for a function + api_response = api_instance.generate_block_comments_for_function(function_id, authorization=authorization) + print("The response of FunctionsBlockCommentsApi->generate_block_comments_for_function:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsBlockCommentsApi->generate_block_comments_for_function: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBlockCommentsGenerationForFunctionResponse**](BaseResponseBlockCommentsGenerationForFunctionResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **generate_overview_comment_for_function** +> BaseResponseBlockCommentsOverviewGenerationResponse generate_overview_comment_for_function(function_id, authorization=authorization) + +Generate overview comment for a function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse +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' + +# 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.FunctionsBlockCommentsApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Generate overview comment for a function + api_response = api_instance.generate_overview_comment_for_function(function_id, authorization=authorization) + print("The response of FunctionsBlockCommentsApi->generate_overview_comment_for_function:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsBlockCommentsApi->generate_overview_comment_for_function: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBlockCommentsOverviewGenerationResponse**](BaseResponseBlockCommentsOverviewGenerationResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/FunctionsCoreApi.md b/docs/docs/FunctionsCoreApi.md new file mode 100644 index 0000000..2a77ee5 --- /dev/null +++ b/docs/docs/FunctionsCoreApi.md @@ -0,0 +1,1033 @@ +# revengai.FunctionsCoreApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ai_unstrip**](FunctionsCoreApi.md#ai_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/ai-unstrip | Performs matching and auto-unstrip for an analysis and its functions +[**auto_unstrip**](FunctionsCoreApi.md#auto_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/auto-unstrip | Performs matching and auto-unstrip for an analysis and its functions +[**cancel_ai_unstrip**](FunctionsCoreApi.md#cancel_ai_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel | Cancels a running ai-unstrip +[**cancel_auto_unstrip**](FunctionsCoreApi.md#cancel_auto_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/unstrip/cancel | Cancels a running auto-unstrip +[**get_analysis_strings**](FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis +[**get_function_blocks**](FunctionsCoreApi.md#get_function_blocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function +[**get_function_callees_callers**](FunctionsCoreApi.md#get_function_callees_callers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function +[**get_function_capabilities**](FunctionsCoreApi.md#get_function_capabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities +[**get_function_details**](FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details +[**get_function_strings**](FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function +[**get_similar_functions**](FunctionsCoreApi.md#get_similar_functions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions +[**unstrip**](FunctionsCoreApi.md#unstrip) | **POST** /v2/analyses/{analysis_id}/functions/unstrip | Performs matching and auto-unstrip for an analysis and its functions + + +# **ai_unstrip** +> AutoUnstripResponse ai_unstrip(analysis_id, ai_unstrip_request, authorization=authorization) + +Performs matching and auto-unstrip for an analysis and its functions + +Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.ai_unstrip_request import AiUnstripRequest +from revengai.models.auto_unstrip_response import AutoUnstripResponse +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + ai_unstrip_request = revengai.AiUnstripRequest() # AiUnstripRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Performs matching and auto-unstrip for an analysis and its functions + api_response = api_instance.ai_unstrip(analysis_id, ai_unstrip_request, authorization=authorization) + print("The response of FunctionsCoreApi->ai_unstrip:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->ai_unstrip: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **ai_unstrip_request** | [**AiUnstripRequest**](AiUnstripRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**AutoUnstripResponse**](AutoUnstripResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **auto_unstrip** +> AutoUnstripResponse auto_unstrip(analysis_id, auto_unstrip_request, authorization=authorization) + +Performs matching and auto-unstrip for an analysis and its functions + +Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.auto_unstrip_request import AutoUnstripRequest +from revengai.models.auto_unstrip_response import AutoUnstripResponse +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + auto_unstrip_request = revengai.AutoUnstripRequest() # AutoUnstripRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Performs matching and auto-unstrip for an analysis and its functions + api_response = api_instance.auto_unstrip(analysis_id, auto_unstrip_request, authorization=authorization) + print("The response of FunctionsCoreApi->auto_unstrip:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->auto_unstrip: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **auto_unstrip_request** | [**AutoUnstripRequest**](AutoUnstripRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**AutoUnstripResponse**](AutoUnstripResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **cancel_ai_unstrip** +> AutoUnstripResponse cancel_ai_unstrip(analysis_id, authorization=authorization) + +Cancels a running ai-unstrip + +Takes in the analysis ID and cancels a running ai-unstrip operation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.auto_unstrip_response import AutoUnstripResponse +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Cancels a running ai-unstrip + api_response = api_instance.cancel_ai_unstrip(analysis_id, authorization=authorization) + print("The response of FunctionsCoreApi->cancel_ai_unstrip:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->cancel_ai_unstrip: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**AutoUnstripResponse**](AutoUnstripResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **cancel_auto_unstrip** +> AutoUnstripResponse cancel_auto_unstrip(analysis_id, authorization=authorization) + +Cancels a running auto-unstrip + +Takes in the analysis ID and cancels a running auto-unstrip operation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.auto_unstrip_response import AutoUnstripResponse +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Cancels a running auto-unstrip + api_response = api_instance.cancel_auto_unstrip(analysis_id, authorization=authorization) + print("The response of FunctionsCoreApi->cancel_auto_unstrip:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->cancel_auto_unstrip: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**AutoUnstripResponse**](AutoUnstripResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_analysis_strings** +> BaseResponseAnalysisStringsResponse get_analysis_strings(analysis_id, page=page, page_size=page_size, search=search, function_search=function_search, authorization=authorization) + +Get string information found in the Analysis + +Get string information found in the analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 100 # int | Number of items per page. (optional) (default to 100) + search = 'search_example' # str | Search is applied to string value (optional) + function_search = 'function_search_example' # str | Search is applied to function names (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get string information found in the Analysis + api_response = api_instance.get_analysis_strings(analysis_id, page=page, page_size=page_size, search=search, function_search=function_search, authorization=authorization) + print("The response of FunctionsCoreApi->get_analysis_strings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_analysis_strings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 100] + **search** | **str**| Search is applied to string value | [optional] + **function_search** | **str**| Search is applied to function names | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseAnalysisStringsResponse**](BaseResponseAnalysisStringsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_function_blocks** +> BaseResponseFunctionBlocksResponse get_function_blocks(function_id, authorization=authorization) + +Get disassembly blocks related to the function + +Get disassembly blocks related to the function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get disassembly blocks related to the function + api_response = api_instance.get_function_blocks(function_id, authorization=authorization) + print("The response of FunctionsCoreApi->get_function_blocks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_function_blocks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionBlocksResponse**](BaseResponseFunctionBlocksResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | Not Found | - | + +[[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_function_callees_callers** +> BaseResponseCalleesCallerFunctionsResponse get_function_callees_callers(function_id, authorization=authorization) + +Get list of functions that call or are called by the specified function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get list of functions that call or are called by the specified function + api_response = api_instance.get_function_callees_callers(function_id, authorization=authorization) + print("The response of FunctionsCoreApi->get_function_callees_callers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_function_callees_callers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCalleesCallerFunctionsResponse**](BaseResponseCalleesCallerFunctionsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_function_capabilities** +> BaseResponseFunctionCapabilityResponse get_function_capabilities(function_id, authorization=authorization) + +Retrieve a functions capabilities + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Retrieve a functions capabilities + api_response = api_instance.get_function_capabilities(function_id, authorization=authorization) + print("The response of FunctionsCoreApi->get_function_capabilities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_function_capabilities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionCapabilityResponse**](BaseResponseFunctionCapabilityResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | Not Found | - | + +[[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_function_details** +> BaseResponseFunctionsDetailResponse get_function_details(function_id, authorization=authorization) + +Get function details + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get function details + api_response = api_instance.get_function_details(function_id, authorization=authorization) + print("The response of FunctionsCoreApi->get_function_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_function_details: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionsDetailResponse**](BaseResponseFunctionsDetailResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_function_strings** +> BaseResponseFunctionStringsResponse get_function_strings(function_id, page=page, page_size=page_size, search=search, authorization=authorization) + +Get string information found in the function + +Get string information found in the function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 100 # int | Number of items per page. (optional) (default to 100) + search = 'search_example' # str | Search is applied to string value (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get string information found in the function + api_response = api_instance.get_function_strings(function_id, page=page, page_size=page_size, search=search, authorization=authorization) + print("The response of FunctionsCoreApi->get_function_strings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_function_strings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 100] + **search** | **str**| Search is applied to string value | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionStringsResponse**](BaseResponseFunctionStringsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_similar_functions** +> BaseResponseListSimilarFunctionsResponse get_similar_functions(function_id, limit=limit, distance=distance, collection_ids=collection_ids, debug=debug, debug_types=debug_types, binary_ids=binary_ids, authorization=authorization) + +Get list of similar functions + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse +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' + +# 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.FunctionsCoreApi(api_client) + function_id = 56 # int | + limit = 20 # int | Number of similar functions to return (optional) (default to 20) + distance = 1.0 # float | Maximum cosine distance (optional) (default to 1.0) + collection_ids = [] # List[int] | Collection filtering by IDs (optional) (default to []) + debug = False # bool | Only return matching debug functions (optional) (default to False) + debug_types = ["SYSTEM"] # List[str] | If limiting results to functions with debug names, which type of debug names to include? (optional) (default to ["SYSTEM"]) + binary_ids = [] # List[int] | Limit similar functions to specific binaries (optional) (default to []) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get list of similar functions + api_response = api_instance.get_similar_functions(function_id, limit=limit, distance=distance, collection_ids=collection_ids, debug=debug, debug_types=debug_types, binary_ids=binary_ids, authorization=authorization) + print("The response of FunctionsCoreApi->get_similar_functions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->get_similar_functions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **limit** | **int**| Number of similar functions to return | [optional] [default to 20] + **distance** | **float**| Maximum cosine distance | [optional] [default to 1.0] + **collection_ids** | [**List[int]**](int.md)| Collection filtering by IDs | [optional] [default to []] + **debug** | **bool**| Only return matching debug functions | [optional] [default to False] + **debug_types** | [**List[str]**](str.md)| If limiting results to functions with debug names, which type of debug names to include? | [optional] [default to ["SYSTEM"]] + **binary_ids** | [**List[int]**](int.md)| Limit similar functions to specific binaries | [optional] [default to []] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListSimilarFunctionsResponse**](BaseResponseListSimilarFunctionsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **unstrip** +> AutoUnstripByGroupResponse unstrip(analysis_id, unstrip_request, authorization=authorization) + +Performs matching and auto-unstrip for an analysis and its functions + +Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse +from revengai.models.unstrip_request import UnstripRequest +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' + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | + unstrip_request = revengai.UnstripRequest() # UnstripRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Performs matching and auto-unstrip for an analysis and its functions + api_response = api_instance.unstrip(analysis_id, unstrip_request, authorization=authorization) + print("The response of FunctionsCoreApi->unstrip:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->unstrip: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **unstrip_request** | [**UnstripRequest**](UnstripRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**AutoUnstripByGroupResponse**](AutoUnstripByGroupResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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/docs/FunctionsDataTypesApi.md b/docs/docs/FunctionsDataTypesApi.md new file mode 100644 index 0000000..c194002 --- /dev/null +++ b/docs/docs/FunctionsDataTypesApi.md @@ -0,0 +1,519 @@ +# revengai.FunctionsDataTypesApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**generate_function_data_types_for_analysis**](FunctionsDataTypesApi.md#generate_function_data_types_for_analysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types +[**generate_function_data_types_for_functions**](FunctionsDataTypesApi.md#generate_function_data_types_for_functions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions +[**get_function_data_types**](FunctionsDataTypesApi.md#get_function_data_types) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types +[**list_function_data_types_for_analysis**](FunctionsDataTypesApi.md#list_function_data_types_for_analysis) | **GET** /v2/analyses/{analysis_id}/functions/data_types | List Function Data Types +[**list_function_data_types_for_functions**](FunctionsDataTypesApi.md#list_function_data_types_for_functions) | **GET** /v2/functions/data_types | List Function Data Types +[**update_function_data_types**](FunctionsDataTypesApi.md#update_function_data_types) | **PUT** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Update Function Data Types + + +# **generate_function_data_types_for_analysis** +> BaseResponseGenerateFunctionDataTypes generate_function_data_types_for_analysis(analysis_id, function_data_types_params, authorization=authorization) + +Generate Function Data Types + +Submits a request to generate the function data types + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes +from revengai.models.function_data_types_params import FunctionDataTypesParams +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' + +# 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.FunctionsDataTypesApi(api_client) + analysis_id = 56 # int | + function_data_types_params = revengai.FunctionDataTypesParams() # FunctionDataTypesParams | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Generate Function Data Types + api_response = api_instance.generate_function_data_types_for_analysis(analysis_id, function_data_types_params, authorization=authorization) + print("The response of FunctionsDataTypesApi->generate_function_data_types_for_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->generate_function_data_types_for_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **function_data_types_params** | [**FunctionDataTypesParams**](FunctionDataTypesParams.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGenerateFunctionDataTypes**](BaseResponseGenerateFunctionDataTypes.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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) + +# **generate_function_data_types_for_functions** +> BaseResponseGenerationStatusList generate_function_data_types_for_functions(function_data_types_params, authorization=authorization) + +Generate Function Data Types for an arbitrary list of functions + +Submits a request to generate the function data types + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList +from revengai.models.function_data_types_params import FunctionDataTypesParams +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' + +# 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.FunctionsDataTypesApi(api_client) + function_data_types_params = revengai.FunctionDataTypesParams() # FunctionDataTypesParams | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Generate Function Data Types for an arbitrary list of functions + api_response = api_instance.generate_function_data_types_for_functions(function_data_types_params, authorization=authorization) + print("The response of FunctionsDataTypesApi->generate_function_data_types_for_functions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->generate_function_data_types_for_functions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_data_types_params** | [**FunctionDataTypesParams**](FunctionDataTypesParams.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseGenerationStatusList**](BaseResponseGenerationStatusList.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_function_data_types** +> BaseResponseFunctionDataTypes get_function_data_types(analysis_id, function_id, authorization=authorization) + +Get Function Data Types + +Polling endpoint which returns the current status of function generation and once completed the data type information + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes +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' + +# 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.FunctionsDataTypesApi(api_client) + analysis_id = 56 # int | + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get Function Data Types + api_response = api_instance.get_function_data_types(analysis_id, function_id, authorization=authorization) + print("The response of FunctionsDataTypesApi->get_function_data_types:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->get_function_data_types: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionDataTypes**](BaseResponseFunctionDataTypes.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **list_function_data_types_for_analysis** +> BaseResponseFunctionDataTypesList list_function_data_types_for_analysis(analysis_id, function_ids=function_ids, authorization=authorization) + +List Function Data Types + +Returns data types for multiple functions with optional function ID filtering + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList +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' + +# 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.FunctionsDataTypesApi(api_client) + analysis_id = 56 # int | + function_ids = [56] # List[int] | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # List Function Data Types + api_response = api_instance.list_function_data_types_for_analysis(analysis_id, function_ids=function_ids, authorization=authorization) + print("The response of FunctionsDataTypesApi->list_function_data_types_for_analysis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->list_function_data_types_for_analysis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **function_ids** | [**List[int]**](int.md)| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionDataTypesList**](BaseResponseFunctionDataTypesList.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **list_function_data_types_for_functions** +> BaseResponseFunctionDataTypesList list_function_data_types_for_functions(function_ids=function_ids, authorization=authorization) + +List Function Data Types + +Returns data types for multiple function IDs + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList +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' + +# 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.FunctionsDataTypesApi(api_client) + function_ids = [56] # List[int] | (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # List Function Data Types + api_response = api_instance.list_function_data_types_for_functions(function_ids=function_ids, authorization=authorization) + print("The response of FunctionsDataTypesApi->list_function_data_types_for_functions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->list_function_data_types_for_functions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_ids** | [**List[int]**](int.md)| | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionDataTypesList**](BaseResponseFunctionDataTypesList.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **update_function_data_types** +> BaseResponseFunctionDataTypes update_function_data_types(analysis_id, function_id, update_function_data_types, authorization=authorization) + +Update Function Data Types + +Updates the function data types for a given function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes +from revengai.models.update_function_data_types import UpdateFunctionDataTypes +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' + +# 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.FunctionsDataTypesApi(api_client) + analysis_id = 56 # int | + function_id = 56 # int | + update_function_data_types = revengai.UpdateFunctionDataTypes() # UpdateFunctionDataTypes | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update Function Data Types + api_response = api_instance.update_function_data_types(analysis_id, function_id, update_function_data_types, authorization=authorization) + print("The response of FunctionsDataTypesApi->update_function_data_types:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDataTypesApi->update_function_data_types: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **function_id** | **int**| | + **update_function_data_types** | [**UpdateFunctionDataTypes**](UpdateFunctionDataTypes.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionDataTypes**](BaseResponseFunctionDataTypes.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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/docs/FunctionsDecompilationApi.md b/docs/docs/FunctionsDecompilationApi.md new file mode 100644 index 0000000..84e215d --- /dev/null +++ b/docs/docs/FunctionsDecompilationApi.md @@ -0,0 +1,600 @@ +# revengai.FunctionsDecompilationApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**check_function_decompilation_task**](FunctionsDecompilationApi.md#check_function_decompilation_task) | **GET** /v2/functions/{function_id}/decompilation/status | Check the status of a function decompilation +[**create_decompilation_comment**](FunctionsDecompilationApi.md#create_decompilation_comment) | **POST** /v2/functions/{function_id}/decompilation/comments | Create a comment for this function +[**create_function_decompilation_task**](FunctionsDecompilationApi.md#create_function_decompilation_task) | **POST** /v2/functions/{function_id}/decompilation | Queues a function decompilation +[**delete_decompilation_comment**](FunctionsDecompilationApi.md#delete_decompilation_comment) | **DELETE** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Delete a comment +[**get_decompilation_comments**](FunctionsDecompilationApi.md#get_decompilation_comments) | **GET** /v2/functions/{function_id}/decompilation/comments | Get comments for this function +[**get_function_decompilation**](FunctionsDecompilationApi.md#get_function_decompilation) | **GET** /v2/functions/{function_id}/decompilation | Get decompilation result +[**update_decompilation_comment**](FunctionsDecompilationApi.md#update_decompilation_comment) | **PATCH** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Update a comment + + +# **check_function_decompilation_task** +> BaseResponseFunctionTaskResponse check_function_decompilation_task(function_id, authorization=authorization) + +Check the status of a function decompilation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse +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' + +# 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.FunctionsDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Check the status of a function decompilation + api_response = api_instance.check_function_decompilation_task(function_id, authorization=authorization) + print("The response of FunctionsDecompilationApi->check_function_decompilation_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->check_function_decompilation_task: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionTaskResponse**](BaseResponseFunctionTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **create_decompilation_comment** +> BaseResponseCommentResponse create_decompilation_comment(function_id, function_comment_create_request, authorization=authorization) + +Create a comment for this function + +Creates a comment associated with a specified function). + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest +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' + +# 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.FunctionsDecompilationApi(api_client) + function_id = 56 # int | + function_comment_create_request = revengai.FunctionCommentCreateRequest() # FunctionCommentCreateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Create a comment for this function + api_response = api_instance.create_decompilation_comment(function_id, function_comment_create_request, authorization=authorization) + print("The response of FunctionsDecompilationApi->create_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->create_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **function_comment_create_request** | [**FunctionCommentCreateRequest**](FunctionCommentCreateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Successful Response | - | +**422** | Invalid request parameters | - | +**400** | Bad Request | - | + +[[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_function_decompilation_task** +> BaseResponseStr create_function_decompilation_task(function_id, authorization=authorization) + +Queues a function decompilation + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_str import BaseResponseStr +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' + +# 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.FunctionsDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Queues a function decompilation + api_response = api_instance.create_function_decompilation_task(function_id, authorization=authorization) + print("The response of FunctionsDecompilationApi->create_function_decompilation_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->create_function_decompilation_task: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseStr**](BaseResponseStr.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**409** | Security checks already extracted or queued | - | + +[[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) + +# **delete_decompilation_comment** +> BaseResponseBool delete_decompilation_comment(comment_id, function_id, authorization=authorization) + +Delete a comment + +Deletes an existing comment. Users can only delete their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_bool import BaseResponseBool +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' + +# 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.FunctionsDecompilationApi(api_client) + comment_id = 56 # int | + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Delete a comment + api_response = api_instance.delete_decompilation_comment(comment_id, function_id, authorization=authorization) + print("The response of FunctionsDecompilationApi->delete_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->delete_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBool**](BaseResponseBool.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**403** | You can only delete your own comments | - | +**400** | Bad Request | - | + +[[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_decompilation_comments** +> BaseResponseListCommentResponse get_decompilation_comments(function_id, authorization=authorization) + +Get comments for this function + +Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +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' + +# 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.FunctionsDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get comments for this function + api_response = api_instance.get_decompilation_comments(function_id, authorization=authorization) + print("The response of FunctionsDecompilationApi->get_decompilation_comments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->get_decompilation_comments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_function_decompilation** +> BaseResponseDecompilationResponse get_function_decompilation(function_id, authorization=authorization) + +Get decompilation result + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse +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' + +# 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.FunctionsDecompilationApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get decompilation result + api_response = api_instance.get_function_decompilation(function_id, authorization=authorization) + print("The response of FunctionsDecompilationApi->get_function_decompilation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->get_function_decompilation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseDecompilationResponse**](BaseResponseDecompilationResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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 | - | +**404** | Unable to find a decompilation for the function_id given | - | + +[[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) + +# **update_decompilation_comment** +> BaseResponseCommentResponse update_decompilation_comment(comment_id, function_id, comment_update_request, authorization=authorization) + +Update a comment + +Updates the content of an existing comment. Users can only update their own comments. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest +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' + +# 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.FunctionsDecompilationApi(api_client) + comment_id = 56 # int | + function_id = 56 # int | + comment_update_request = revengai.CommentUpdateRequest() # CommentUpdateRequest | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Update a comment + api_response = api_instance.update_decompilation_comment(comment_id, function_id, comment_update_request, authorization=authorization) + print("The response of FunctionsDecompilationApi->update_decompilation_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsDecompilationApi->update_decompilation_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comment_id** | **int**| | + **function_id** | **int**| | + **comment_update_request** | [**CommentUpdateRequest**](CommentUpdateRequest.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | +**403** | You can only update your own comments | - | +**400** | Bad Request | - | + +[[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/docs/FunctionsDetailResponse.md b/docs/docs/FunctionsDetailResponse.md new file mode 100644 index 0000000..7b1213b --- /dev/null +++ b/docs/docs/FunctionsDetailResponse.md @@ -0,0 +1,39 @@ +# FunctionsDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**function_name** | **str** | | +**function_vaddr** | **int** | | +**function_size** | **int** | | +**analysis_id** | **int** | | +**binary_id** | **int** | | +**binary_name** | **str** | | +**sha_256_hash** | **str** | | +**debug_hash** | **str** | | +**embedding_3d** | **List[float]** | | [optional] +**embedding_1d** | **List[float]** | | [optional] + +## Example + +```python +from revengai.models.functions_detail_response import FunctionsDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionsDetailResponse from a JSON string +functions_detail_response_instance = FunctionsDetailResponse.from_json(json) +# print the JSON string representation of the object +print(FunctionsDetailResponse.to_json()) + +# convert the object into a dict +functions_detail_response_dict = functions_detail_response_instance.to_dict() +# create an instance of FunctionsDetailResponse from a dict +functions_detail_response_from_dict = FunctionsDetailResponse.from_dict(functions_detail_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/docs/FunctionsListRename.md b/docs/docs/FunctionsListRename.md new file mode 100644 index 0000000..454aa36 --- /dev/null +++ b/docs/docs/FunctionsListRename.md @@ -0,0 +1,29 @@ +# FunctionsListRename + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**functions** | [**List[FunctionRenameMap]**](FunctionRenameMap.md) | A list of functions to rename | + +## Example + +```python +from revengai.models.functions_list_rename import FunctionsListRename + +# TODO update the JSON string below +json = "{}" +# create an instance of FunctionsListRename from a JSON string +functions_list_rename_instance = FunctionsListRename.from_json(json) +# print the JSON string representation of the object +print(FunctionsListRename.to_json()) + +# convert the object into a dict +functions_list_rename_dict = functions_list_rename_instance.to_dict() +# create an instance of FunctionsListRename from a dict +functions_list_rename_from_dict = FunctionsListRename.from_dict(functions_list_rename_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/docs/FunctionsRenamingHistoryApi.md b/docs/docs/FunctionsRenamingHistoryApi.md new file mode 100644 index 0000000..5d22948 --- /dev/null +++ b/docs/docs/FunctionsRenamingHistoryApi.md @@ -0,0 +1,348 @@ +# revengai.FunctionsRenamingHistoryApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_rename_function**](FunctionsRenamingHistoryApi.md#batch_rename_function) | **POST** /v2/functions/rename/batch | Batch Rename Functions +[**get_function_name_history**](FunctionsRenamingHistoryApi.md#get_function_name_history) | **GET** /v2/functions/history/{function_id} | Get Function Name History +[**rename_function_id**](FunctionsRenamingHistoryApi.md#rename_function_id) | **POST** /v2/functions/rename/{function_id} | Rename Function +[**revert_function_name**](FunctionsRenamingHistoryApi.md#revert_function_name) | **POST** /v2/functions/history/{function_id}/{history_id} | Revert the function name + + +# **batch_rename_function** +> BaseResponse batch_rename_function(functions_list_rename, authorization=authorization) + +Batch Rename Functions + +Renames a list of functions using the function IDs + Will record name changes in history + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +from revengai.models.functions_list_rename import FunctionsListRename +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' + +# 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.FunctionsRenamingHistoryApi(api_client) + functions_list_rename = revengai.FunctionsListRename() # FunctionsListRename | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Batch Rename Functions + api_response = api_instance.batch_rename_function(functions_list_rename, authorization=authorization) + print("The response of FunctionsRenamingHistoryApi->batch_rename_function:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsRenamingHistoryApi->batch_rename_function: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **functions_list_rename** | [**FunctionsListRename**](FunctionsListRename.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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_function_name_history** +> BaseResponseListFunctionNameHistory get_function_name_history(function_id, authorization=authorization) + +Get Function Name History + +Gets the name history of a function using the function ID + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory +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' + +# 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.FunctionsRenamingHistoryApi(api_client) + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Get Function Name History + api_response = api_instance.get_function_name_history(function_id, authorization=authorization) + print("The response of FunctionsRenamingHistoryApi->get_function_name_history:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsRenamingHistoryApi->get_function_name_history: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseListFunctionNameHistory**](BaseResponseListFunctionNameHistory.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + +# **rename_function_id** +> BaseResponse rename_function_id(function_id, function_rename, authorization=authorization) + +Rename Function + +Renames a function using the function ID + Will record name change history + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +from revengai.models.function_rename import FunctionRename +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' + +# 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.FunctionsRenamingHistoryApi(api_client) + function_id = 56 # int | + function_rename = revengai.FunctionRename() # FunctionRename | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Rename Function + api_response = api_instance.rename_function_id(function_id, function_rename, authorization=authorization) + print("The response of FunctionsRenamingHistoryApi->rename_function_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsRenamingHistoryApi->rename_function_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **function_rename** | [**FunctionRename**](FunctionRename.md)| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[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** +> BaseResponse revert_function_name(function_id, history_id, authorization=authorization) + +Revert the function name + +Reverts the function name to a previous name using the function ID and history ID + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +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' + +# 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.FunctionsRenamingHistoryApi(api_client) + function_id = 56 # int | + history_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Revert the function name + api_response = api_instance.revert_function_name(function_id, history_id, authorization=authorization) + print("The response of FunctionsRenamingHistoryApi->revert_function_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsRenamingHistoryApi->revert_function_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| | + **history_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/FunctionsThreatScoreApi.md b/docs/docs/FunctionsThreatScoreApi.md new file mode 100644 index 0000000..4d93e58 --- /dev/null +++ b/docs/docs/FunctionsThreatScoreApi.md @@ -0,0 +1,174 @@ +# revengai.FunctionsThreatScoreApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_function_threat_scores**](FunctionsThreatScoreApi.md#get_all_function_threat_scores) | **GET** /v2/analyses/{analysis_id}/functions/threat_score | Gets the threat score for all functions +[**get_individual_function_threat_score**](FunctionsThreatScoreApi.md#get_individual_function_threat_score) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/threat_score | Gets the threat score analysis + + +# **get_all_function_threat_scores** +> BaseResponseFunctionThreatScore get_all_function_threat_scores(analysis_id, authorization=authorization) + +Gets the threat score for all functions + +Calculates the threat score for all functions inside of an analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore +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' + +# 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.FunctionsThreatScoreApi(api_client) + analysis_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the threat score for all functions + api_response = api_instance.get_all_function_threat_scores(analysis_id, authorization=authorization) + print("The response of FunctionsThreatScoreApi->get_all_function_threat_scores:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsThreatScoreApi->get_all_function_threat_scores: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionThreatScore**](BaseResponseFunctionThreatScore.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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_individual_function_threat_score** +> BaseResponseFunctionAnalysisThreatScoreData get_individual_function_threat_score(analysis_id, function_id, authorization=authorization) + +Gets the threat score analysis + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData +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' + +# 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.FunctionsThreatScoreApi(api_client) + analysis_id = 56 # int | + function_id = 56 # int | + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets the threat score analysis + api_response = api_instance.get_individual_function_threat_score(analysis_id, function_id, authorization=authorization) + print("The response of FunctionsThreatScoreApi->get_individual_function_threat_score:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsThreatScoreApi->get_individual_function_threat_score: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **function_id** | **int**| | + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionAnalysisThreatScoreData**](BaseResponseFunctionAnalysisThreatScoreData.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/GenerateFunctionDataTypes.md b/docs/docs/GenerateFunctionDataTypes.md new file mode 100644 index 0000000..9917d9a --- /dev/null +++ b/docs/docs/GenerateFunctionDataTypes.md @@ -0,0 +1,31 @@ +# GenerateFunctionDataTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**queued** | **bool** | [DEPRECATED] This value has been replaced with the `data_types_list` field | +**reference** | **str** | [DEPRECATED] This value has been replaced with the `data_types_list` field | +**data_types_list** | [**GenerationStatusList**](GenerationStatusList.md) | List of function data types information that are either already generated, or now queued for generation | + +## Example + +```python +from revengai.models.generate_function_data_types import GenerateFunctionDataTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of GenerateFunctionDataTypes from a JSON string +generate_function_data_types_instance = GenerateFunctionDataTypes.from_json(json) +# print the JSON string representation of the object +print(GenerateFunctionDataTypes.to_json()) + +# convert the object into a dict +generate_function_data_types_dict = generate_function_data_types_instance.to_dict() +# create an instance of GenerateFunctionDataTypes from a dict +generate_function_data_types_from_dict = GenerateFunctionDataTypes.from_dict(generate_function_data_types_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/docs/GenerationStatusList.md b/docs/docs/GenerationStatusList.md new file mode 100644 index 0000000..93266aa --- /dev/null +++ b/docs/docs/GenerationStatusList.md @@ -0,0 +1,31 @@ +# GenerationStatusList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | **int** | Total number of functions in analysis | [optional] [default to 0] +**total_data_types_count** | **int** | Total number of functions with data types | [optional] [default to 0] +**items** | [**List[FunctionDataTypesStatus]**](FunctionDataTypesStatus.md) | List of function data types information | + +## Example + +```python +from revengai.models.generation_status_list import GenerationStatusList + +# TODO update the JSON string below +json = "{}" +# create an instance of GenerationStatusList from a JSON string +generation_status_list_instance = GenerationStatusList.from_json(json) +# print the JSON string representation of the object +print(GenerationStatusList.to_json()) + +# convert the object into a dict +generation_status_list_dict = generation_status_list_instance.to_dict() +# create an instance of GenerationStatusList from a dict +generation_status_list_from_dict = GenerationStatusList.from_dict(generation_status_list_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/docs/GetAiDecompilationRatingResponse.md b/docs/docs/GetAiDecompilationRatingResponse.md new file mode 100644 index 0000000..29f84f0 --- /dev/null +++ b/docs/docs/GetAiDecompilationRatingResponse.md @@ -0,0 +1,29 @@ +# GetAiDecompilationRatingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rating** | [**AiDecompilationRating**](AiDecompilationRating.md) | The rating the user has given to the AI decompilation response | + +## Example + +```python +from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAiDecompilationRatingResponse from a JSON string +get_ai_decompilation_rating_response_instance = GetAiDecompilationRatingResponse.from_json(json) +# print the JSON string representation of the object +print(GetAiDecompilationRatingResponse.to_json()) + +# convert the object into a dict +get_ai_decompilation_rating_response_dict = get_ai_decompilation_rating_response_instance.to_dict() +# create an instance of GetAiDecompilationRatingResponse from a dict +get_ai_decompilation_rating_response_from_dict = GetAiDecompilationRatingResponse.from_dict(get_ai_decompilation_rating_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/docs/GetAiDecompilationTask.md b/docs/docs/GetAiDecompilationTask.md new file mode 100644 index 0000000..039ebfd --- /dev/null +++ b/docs/docs/GetAiDecompilationTask.md @@ -0,0 +1,36 @@ +# GetAiDecompilationTask + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**decompilation** | **str** | | +**raw_decompilation** | **str** | | +**function_mapping** | [**Dict[str, InverseFunctionMapItem]**](InverseFunctionMapItem.md) | | +**function_mapping_full** | [**FunctionMappingFull**](FunctionMappingFull.md) | | +**summary** | **str** | | [optional] +**ai_summary** | **str** | | [optional] +**raw_ai_summary** | **str** | | [optional] + +## Example + +```python +from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAiDecompilationTask from a JSON string +get_ai_decompilation_task_instance = GetAiDecompilationTask.from_json(json) +# print the JSON string representation of the object +print(GetAiDecompilationTask.to_json()) + +# convert the object into a dict +get_ai_decompilation_task_dict = get_ai_decompilation_task_instance.to_dict() +# create an instance of GetAiDecompilationTask from a dict +get_ai_decompilation_task_from_dict = GetAiDecompilationTask.from_dict(get_ai_decompilation_task_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/docs/GetPublicUserResponse.md b/docs/docs/GetPublicUserResponse.md new file mode 100644 index 0000000..f20ba1c --- /dev/null +++ b/docs/docs/GetPublicUserResponse.md @@ -0,0 +1,30 @@ +# GetPublicUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**user_id** | **int** | | + +## Example + +```python +from revengai.models.get_public_user_response import GetPublicUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPublicUserResponse from a JSON string +get_public_user_response_instance = GetPublicUserResponse.from_json(json) +# print the JSON string representation of the object +print(GetPublicUserResponse.to_json()) + +# convert the object into a dict +get_public_user_response_dict = get_public_user_response_instance.to_dict() +# create an instance of GetPublicUserResponse from a dict +get_public_user_response_from_dict = GetPublicUserResponse.from_dict(get_public_user_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/docs/GetUserResponse.md b/docs/docs/GetUserResponse.md new file mode 100644 index 0000000..f2546bd --- /dev/null +++ b/docs/docs/GetUserResponse.md @@ -0,0 +1,35 @@ +# GetUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**user_id** | **int** | | +**first_name** | **str** | | +**last_name** | **str** | | +**email** | **str** | | +**creation** | **datetime** | | +**tutorial_seen** | **bool** | | + +## Example + +```python +from revengai.models.get_user_response import GetUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetUserResponse from a JSON string +get_user_response_instance = GetUserResponse.from_json(json) +# print the JSON string representation of the object +print(GetUserResponse.to_json()) + +# convert the object into a dict +get_user_response_dict = get_user_response_instance.to_dict() +# create an instance of GetUserResponse from a dict +get_user_response_from_dict = GetUserResponse.from_dict(get_user_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/docs/GlobalVariable.md b/docs/docs/GlobalVariable.md new file mode 100644 index 0000000..4330569 --- /dev/null +++ b/docs/docs/GlobalVariable.md @@ -0,0 +1,34 @@ +# GlobalVariable + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**addr** | **int** | Memory address of the global variable | +**name** | **str** | Name of the global variable | +**type** | **str** | Data type of the global variable | +**size** | **int** | Size of the global variable in bytes | +**artifact_type** | **str** | Type of artifact that the global variable is associated with | [optional] + +## Example + +```python +from revengai.models.global_variable import GlobalVariable + +# TODO update the JSON string below +json = "{}" +# create an instance of GlobalVariable from a JSON string +global_variable_instance = GlobalVariable.from_json(json) +# print the JSON string representation of the object +print(GlobalVariable.to_json()) + +# convert the object into a dict +global_variable_dict = global_variable_instance.to_dict() +# create an instance of GlobalVariable from a dict +global_variable_from_dict = GlobalVariable.from_dict(global_variable_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/docs/ISA.md b/docs/docs/ISA.md new file mode 100644 index 0000000..8e6483f --- /dev/null +++ b/docs/docs/ISA.md @@ -0,0 +1,14 @@ +# ISA + + +## Enum + +* `X86` (value: `'x86'`) + +* `X86_64` (value: `'x86_64'`) + +* `ARM` (value: `'arm'`) + +[[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/docs/IconModel.md b/docs/docs/IconModel.md new file mode 100644 index 0000000..498b67b --- /dev/null +++ b/docs/docs/IconModel.md @@ -0,0 +1,29 @@ +# IconModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | + +## Example + +```python +from revengai.models.icon_model import IconModel + +# TODO update the JSON string below +json = "{}" +# create an instance of IconModel from a JSON string +icon_model_instance = IconModel.from_json(json) +# print the JSON string representation of the object +print(IconModel.to_json()) + +# convert the object into a dict +icon_model_dict = icon_model_instance.to_dict() +# create an instance of IconModel from a dict +icon_model_from_dict = IconModel.from_dict(icon_model_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/docs/ImportModel.md b/docs/docs/ImportModel.md new file mode 100644 index 0000000..38df16c --- /dev/null +++ b/docs/docs/ImportModel.md @@ -0,0 +1,30 @@ +# ImportModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_imports** | **int** | | +**imports** | **List[Dict[str, Dict[str, int]]]** | | + +## Example + +```python +from revengai.models.import_model import ImportModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportModel from a JSON string +import_model_instance = ImportModel.from_json(json) +# print the JSON string representation of the object +print(ImportModel.to_json()) + +# convert the object into a dict +import_model_dict = import_model_instance.to_dict() +# create an instance of ImportModel from a dict +import_model_from_dict = ImportModel.from_dict(import_model_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/docs/InverseFunctionMapItem.md b/docs/docs/InverseFunctionMapItem.md new file mode 100644 index 0000000..7a8e212 --- /dev/null +++ b/docs/docs/InverseFunctionMapItem.md @@ -0,0 +1,31 @@ +# InverseFunctionMapItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**addr** | [**Addr**](Addr.md) | | +**is_external** | **bool** | | [optional] [default to False] + +## Example + +```python +from revengai.models.inverse_function_map_item import InverseFunctionMapItem + +# TODO update the JSON string below +json = "{}" +# create an instance of InverseFunctionMapItem from a JSON string +inverse_function_map_item_instance = InverseFunctionMapItem.from_json(json) +# print the JSON string representation of the object +print(InverseFunctionMapItem.to_json()) + +# convert the object into a dict +inverse_function_map_item_dict = inverse_function_map_item_instance.to_dict() +# create an instance of InverseFunctionMapItem from a dict +inverse_function_map_item_from_dict = InverseFunctionMapItem.from_dict(inverse_function_map_item_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/docs/InverseStringMapItem.md b/docs/docs/InverseStringMapItem.md new file mode 100644 index 0000000..83e3b47 --- /dev/null +++ b/docs/docs/InverseStringMapItem.md @@ -0,0 +1,30 @@ +# InverseStringMapItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | **str** | | +**addr** | **int** | | + +## Example + +```python +from revengai.models.inverse_string_map_item import InverseStringMapItem + +# TODO update the JSON string below +json = "{}" +# create an instance of InverseStringMapItem from a JSON string +inverse_string_map_item_instance = InverseStringMapItem.from_json(json) +# print the JSON string representation of the object +print(InverseStringMapItem.to_json()) + +# convert the object into a dict +inverse_string_map_item_dict = inverse_string_map_item_instance.to_dict() +# create an instance of InverseStringMapItem from a dict +inverse_string_map_item_from_dict = InverseStringMapItem.from_dict(inverse_string_map_item_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/docs/InverseValue.md b/docs/docs/InverseValue.md new file mode 100644 index 0000000..976173d --- /dev/null +++ b/docs/docs/InverseValue.md @@ -0,0 +1,29 @@ +# InverseValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | + +## Example + +```python +from revengai.models.inverse_value import InverseValue + +# TODO update the JSON string below +json = "{}" +# create an instance of InverseValue from a JSON string +inverse_value_instance = InverseValue.from_json(json) +# print the JSON string representation of the object +print(InverseValue.to_json()) + +# convert the object into a dict +inverse_value_dict = inverse_value_instance.to_dict() +# create an instance of InverseValue from a dict +inverse_value_from_dict = InverseValue.from_dict(inverse_value_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/docs/ListCollectionResults.md b/docs/docs/ListCollectionResults.md new file mode 100644 index 0000000..d22cfb8 --- /dev/null +++ b/docs/docs/ListCollectionResults.md @@ -0,0 +1,29 @@ +# ListCollectionResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[CollectionListItem]**](CollectionListItem.md) | Page containing the results of the collections search | + +## Example + +```python +from revengai.models.list_collection_results import ListCollectionResults + +# TODO update the JSON string below +json = "{}" +# create an instance of ListCollectionResults from a JSON string +list_collection_results_instance = ListCollectionResults.from_json(json) +# print the JSON string representation of the object +print(ListCollectionResults.to_json()) + +# convert the object into a dict +list_collection_results_dict = list_collection_results_instance.to_dict() +# create an instance of ListCollectionResults from a dict +list_collection_results_from_dict = ListCollectionResults.from_dict(list_collection_results_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/docs/LoginRequest.md b/docs/docs/LoginRequest.md new file mode 100644 index 0000000..978ddc5 --- /dev/null +++ b/docs/docs/LoginRequest.md @@ -0,0 +1,30 @@ +# LoginRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | User's username | +**password** | **str** | User's password | + +## Example + +```python +from revengai.models.login_request import LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginRequest from a JSON string +login_request_instance = LoginRequest.from_json(json) +# print the JSON string representation of the object +print(LoginRequest.to_json()) + +# convert the object into a dict +login_request_dict = login_request_instance.to_dict() +# create an instance of LoginRequest from a dict +login_request_from_dict = LoginRequest.from_dict(login_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/docs/LoginResponse.md b/docs/docs/LoginResponse.md new file mode 100644 index 0000000..f2989cc --- /dev/null +++ b/docs/docs/LoginResponse.md @@ -0,0 +1,29 @@ +# LoginResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Authentication token for subsequent requests | + +## Example + +```python +from revengai.models.login_response import LoginResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResponse from a JSON string +login_response_instance = LoginResponse.from_json(json) +# print the JSON string representation of the object +print(LoginResponse.to_json()) + +# convert the object into a dict +login_response_dict = login_response_instance.to_dict() +# create an instance of LoginResponse from a dict +login_response_from_dict = LoginResponse.from_dict(login_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/docs/Logs.md b/docs/docs/Logs.md new file mode 100644 index 0000000..cfe6e5c --- /dev/null +++ b/docs/docs/Logs.md @@ -0,0 +1,29 @@ +# Logs + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**logs** | **str** | Full logs of an analysis of an analysis_id | + +## Example + +```python +from revengai.models.logs import Logs + +# TODO update the JSON string below +json = "{}" +# create an instance of Logs from a JSON string +logs_instance = Logs.from_json(json) +# print the JSON string representation of the object +print(Logs.to_json()) + +# convert the object into a dict +logs_dict = logs_instance.to_dict() +# create an instance of Logs from a dict +logs_from_dict = Logs.from_dict(logs_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/docs/MatchedFunctionGroup.md b/docs/docs/MatchedFunctionGroup.md new file mode 100644 index 0000000..7659291 --- /dev/null +++ b/docs/docs/MatchedFunctionGroup.md @@ -0,0 +1,30 @@ +# MatchedFunctionGroup + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_group_name** | **str** | Name of the function group that contains the matched functions | +**similarity** | **float** | Similarity score of the match | + +## Example + +```python +from revengai.models.matched_function_group import MatchedFunctionGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of MatchedFunctionGroup from a JSON string +matched_function_group_instance = MatchedFunctionGroup.from_json(json) +# print the JSON string representation of the object +print(MatchedFunctionGroup.to_json()) + +# convert the object into a dict +matched_function_group_dict = matched_function_group_instance.to_dict() +# create an instance of MatchedFunctionGroup from a dict +matched_function_group_from_dict = MatchedFunctionGroup.from_dict(matched_function_group_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/docs/MatchedFunctionSuggestion.md b/docs/docs/MatchedFunctionSuggestion.md new file mode 100644 index 0000000..087cf92 --- /dev/null +++ b/docs/docs/MatchedFunctionSuggestion.md @@ -0,0 +1,31 @@ +# MatchedFunctionSuggestion + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | Unique identifier of the matched function | +**function_vaddr** | **int** | | +**suggested_name** | **str** | Name of the function group that contains the matched functions | + +## Example + +```python +from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion + +# TODO update the JSON string below +json = "{}" +# create an instance of MatchedFunctionSuggestion from a JSON string +matched_function_suggestion_instance = MatchedFunctionSuggestion.from_json(json) +# print the JSON string representation of the object +print(MatchedFunctionSuggestion.to_json()) + +# convert the object into a dict +matched_function_suggestion_dict = matched_function_suggestion_instance.to_dict() +# create an instance of MatchedFunctionSuggestion from a dict +matched_function_suggestion_from_dict = MatchedFunctionSuggestion.from_dict(matched_function_suggestion_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/docs/MetaModel.md b/docs/docs/MetaModel.md new file mode 100644 index 0000000..0baca22 --- /dev/null +++ b/docs/docs/MetaModel.md @@ -0,0 +1,29 @@ +# MetaModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationModel**](PaginationModel.md) | | [optional] + +## Example + +```python +from revengai.models.meta_model import MetaModel + +# TODO update the JSON string below +json = "{}" +# create an instance of MetaModel from a JSON string +meta_model_instance = MetaModel.from_json(json) +# print the JSON string representation of the object +print(MetaModel.to_json()) + +# convert the object into a dict +meta_model_dict = meta_model_instance.to_dict() +# create an instance of MetaModel from a dict +meta_model_from_dict = MetaModel.from_dict(meta_model_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/docs/ModelName.md b/docs/docs/ModelName.md new file mode 100644 index 0000000..aaa0718 --- /dev/null +++ b/docs/docs/ModelName.md @@ -0,0 +1,25 @@ +# ModelName + +Custom enum for the model name + +## Enum + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_WINDOWS` (value: `'binnet-0.5-x86-windows'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_LINUX` (value: `'binnet-0.5-x86-linux'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_MACOS` (value: `'binnet-0.5-x86-macos'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_ANDROID` (value: `'binnet-0.5-x86-android'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_WINDOWS` (value: `'binnet-0.5-x86-32-windows'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_LINUX` (value: `'binnet-0.5-x86-32-linux'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_WINDOWS` (value: `'binnet-0.5-arm-64-windows'`) + +* `BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_LINUX` (value: `'binnet-0.5-arm-64-linux'`) + +[[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/docs/ModelsApi.md b/docs/docs/ModelsApi.md new file mode 100644 index 0000000..efd2714 --- /dev/null +++ b/docs/docs/ModelsApi.md @@ -0,0 +1,89 @@ +# revengai.ModelsApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_models**](ModelsApi.md#get_models) | **GET** /v2/models | Gets models + + +# **get_models** +> BaseResponseModelsResponse get_models(authorization=authorization) + +Gets models + +Gets active models available for analysis. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_models_response import BaseResponseModelsResponse +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' + +# 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.ModelsApi(api_client) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Gets models + api_response = api_instance.get_models(authorization=authorization) + print("The response of ModelsApi->get_models:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ModelsApi->get_models: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseModelsResponse**](BaseResponseModelsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### 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) + diff --git a/docs/docs/ModelsResponse.md b/docs/docs/ModelsResponse.md new file mode 100644 index 0000000..292d395 --- /dev/null +++ b/docs/docs/ModelsResponse.md @@ -0,0 +1,29 @@ +# ModelsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**models** | **List[str]** | List of active models available analysis. | + +## Example + +```python +from revengai.models.models_response import ModelsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelsResponse from a JSON string +models_response_instance = ModelsResponse.from_json(json) +# print the JSON string representation of the object +print(ModelsResponse.to_json()) + +# convert the object into a dict +models_response_dict = models_response_instance.to_dict() +# create an instance of ModelsResponse from a dict +models_response_from_dict = ModelsResponse.from_dict(models_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/docs/NearestNeighbor.md b/docs/docs/NearestNeighbor.md new file mode 100644 index 0000000..abb7b0f --- /dev/null +++ b/docs/docs/NearestNeighbor.md @@ -0,0 +1,36 @@ +# NearestNeighbor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**distance** | **float** | | +**nearest_neighbor_analysis_id** | **int** | | +**nearest_neighbor_analysis_name** | **str** | | +**nearest_neighbor_function_name** | **str** | | +**nearest_neighbor_function_name_mangled** | **str** | | +**nearest_neighbor_binary_id** | **int** | | +**nearest_neighbor_sha_256_hash** | **str** | | +**nearest_neighbor_debug** | **bool** | | + +## Example + +```python +from revengai.models.nearest_neighbor import NearestNeighbor + +# TODO update the JSON string below +json = "{}" +# create an instance of NearestNeighbor from a JSON string +nearest_neighbor_instance = NearestNeighbor.from_json(json) +# print the JSON string representation of the object +print(NearestNeighbor.to_json()) + +# convert the object into a dict +nearest_neighbor_dict = nearest_neighbor_instance.to_dict() +# create an instance of NearestNeighbor from a dict +nearest_neighbor_from_dict = NearestNeighbor.from_dict(nearest_neighbor_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/docs/NetworkOverviewDns.md b/docs/docs/NetworkOverviewDns.md new file mode 100644 index 0000000..cb2cc83 --- /dev/null +++ b/docs/docs/NetworkOverviewDns.md @@ -0,0 +1,31 @@ +# NetworkOverviewDns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host** | **str** | | +**type** | **str** | | +**answers** | [**List[NetworkOverviewDnsAnswer]**](NetworkOverviewDnsAnswer.md) | | + +## Example + +```python +from revengai.models.network_overview_dns import NetworkOverviewDns + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkOverviewDns from a JSON string +network_overview_dns_instance = NetworkOverviewDns.from_json(json) +# print the JSON string representation of the object +print(NetworkOverviewDns.to_json()) + +# convert the object into a dict +network_overview_dns_dict = network_overview_dns_instance.to_dict() +# create an instance of NetworkOverviewDns from a dict +network_overview_dns_from_dict = NetworkOverviewDns.from_dict(network_overview_dns_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/docs/NetworkOverviewDnsAnswer.md b/docs/docs/NetworkOverviewDnsAnswer.md new file mode 100644 index 0000000..77a4835 --- /dev/null +++ b/docs/docs/NetworkOverviewDnsAnswer.md @@ -0,0 +1,30 @@ +# NetworkOverviewDnsAnswer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**data** | **str** | | + +## Example + +```python +from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkOverviewDnsAnswer from a JSON string +network_overview_dns_answer_instance = NetworkOverviewDnsAnswer.from_json(json) +# print the JSON string representation of the object +print(NetworkOverviewDnsAnswer.to_json()) + +# convert the object into a dict +network_overview_dns_answer_dict = network_overview_dns_answer_instance.to_dict() +# create an instance of NetworkOverviewDnsAnswer from a dict +network_overview_dns_answer_from_dict = NetworkOverviewDnsAnswer.from_dict(network_overview_dns_answer_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/docs/NetworkOverviewMetadata.md b/docs/docs/NetworkOverviewMetadata.md new file mode 100644 index 0000000..91fbfd1 --- /dev/null +++ b/docs/docs/NetworkOverviewMetadata.md @@ -0,0 +1,32 @@ +# NetworkOverviewMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host** | **str** | | +**country_code** | **str** | | +**asn** | **str** | | +**type** | **str** | | + +## Example + +```python +from revengai.models.network_overview_metadata import NetworkOverviewMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkOverviewMetadata from a JSON string +network_overview_metadata_instance = NetworkOverviewMetadata.from_json(json) +# print the JSON string representation of the object +print(NetworkOverviewMetadata.to_json()) + +# convert the object into a dict +network_overview_metadata_dict = network_overview_metadata_instance.to_dict() +# create an instance of NetworkOverviewMetadata from a dict +network_overview_metadata_from_dict = NetworkOverviewMetadata.from_dict(network_overview_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/docs/NetworkOverviewResponse.md b/docs/docs/NetworkOverviewResponse.md new file mode 100644 index 0000000..8712b5a --- /dev/null +++ b/docs/docs/NetworkOverviewResponse.md @@ -0,0 +1,30 @@ +# NetworkOverviewResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns** | [**List[NetworkOverviewDns]**](NetworkOverviewDns.md) | | +**metadata** | [**List[NetworkOverviewMetadata]**](NetworkOverviewMetadata.md) | | + +## Example + +```python +from revengai.models.network_overview_response import NetworkOverviewResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkOverviewResponse from a JSON string +network_overview_response_instance = NetworkOverviewResponse.from_json(json) +# print the JSON string representation of the object +print(NetworkOverviewResponse.to_json()) + +# convert the object into a dict +network_overview_response_dict = network_overview_response_instance.to_dict() +# create an instance of NetworkOverviewResponse from a dict +network_overview_response_from_dict = NetworkOverviewResponse.from_dict(network_overview_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/docs/Order.md b/docs/docs/Order.md new file mode 100644 index 0000000..2ad102d --- /dev/null +++ b/docs/docs/Order.md @@ -0,0 +1,12 @@ +# Order + + +## Enum + +* `ASC` (value: `'ASC'`) + +* `DESC` (value: `'DESC'`) + +[[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/docs/Origin.md b/docs/docs/Origin.md new file mode 100644 index 0000000..e067563 --- /dev/null +++ b/docs/docs/Origin.md @@ -0,0 +1,24 @@ +# Origin + + +## Enum + +* `REV_ENG_MINUS_MALWARE` (value: `'RevEng-Malware'`) + +* `REV_ENG_MINUS_LIBRARY` (value: `'RevEng-Library'`) + +* `REV_ENG_MINUS_BENIGN` (value: `'RevEng-Benign'`) + +* `REVENG` (value: `'RevEng'`) + +* `REV_ENG_MINUS_HEURISTIC` (value: `'RevEng-Heuristic'`) + +* `REV_ENG_MINUS_UNKNOWN` (value: `'RevEng-Unknown'`) + +* `VIRUSTOTAL` (value: `'VirusTotal'`) + +* `MALWAREBAZAAR` (value: `'MalwareBazaar'`) + +[[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/docs/PDBDebugModel.md b/docs/docs/PDBDebugModel.md new file mode 100644 index 0000000..6d0d373 --- /dev/null +++ b/docs/docs/PDBDebugModel.md @@ -0,0 +1,29 @@ +# PDBDebugModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**debug_entries** | [**List[SinglePDBEntryModel]**](SinglePDBEntryModel.md) | | + +## Example + +```python +from revengai.models.pdb_debug_model import PDBDebugModel + +# TODO update the JSON string below +json = "{}" +# create an instance of PDBDebugModel from a JSON string +pdb_debug_model_instance = PDBDebugModel.from_json(json) +# print the JSON string representation of the object +print(PDBDebugModel.to_json()) + +# convert the object into a dict +pdb_debug_model_dict = pdb_debug_model_instance.to_dict() +# create an instance of PDBDebugModel from a dict +pdb_debug_model_from_dict = PDBDebugModel.from_dict(pdb_debug_model_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/docs/PEModel.md b/docs/docs/PEModel.md new file mode 100644 index 0000000..33032c6 --- /dev/null +++ b/docs/docs/PEModel.md @@ -0,0 +1,48 @@ +# PEModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**timestamps** | [**TimestampModel**](TimestampModel.md) | | +**architecture** | **str** | | +**checksum** | **int** | | +**image_base** | **int** | | +**security** | [**SecurityModel**](SecurityModel.md) | | +**version_info** | **Dict[str, object]** | | +**debug_info** | [**PDBDebugModel**](PDBDebugModel.md) | | +**number_of_resources** | **int** | | +**entry_point** | [**EntrypointModel**](EntrypointModel.md) | | +**signature** | [**CodeSignatureModel**](CodeSignatureModel.md) | | +**dotnet** | **bool** | | +**debug_stripped** | **bool** | | +**import_hash** | **str** | | +**export_hash** | **str** | | +**rich_header_hash** | **str** | | +**sections** | [**SectionModel**](SectionModel.md) | | +**imports** | [**ImportModel**](ImportModel.md) | | +**exports** | [**ExportModel**](ExportModel.md) | | +**icon_data** | [**IconModel**](IconModel.md) | | + +## Example + +```python +from revengai.models.pe_model import PEModel + +# TODO update the JSON string below +json = "{}" +# create an instance of PEModel from a JSON string +pe_model_instance = PEModel.from_json(json) +# print the JSON string representation of the object +print(PEModel.to_json()) + +# convert the object into a dict +pe_model_dict = pe_model_instance.to_dict() +# create an instance of PEModel from a dict +pe_model_from_dict = PEModel.from_dict(pe_model_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/docs/PaginationModel.md b/docs/docs/PaginationModel.md new file mode 100644 index 0000000..81b1f74 --- /dev/null +++ b/docs/docs/PaginationModel.md @@ -0,0 +1,31 @@ +# PaginationModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page_size** | **int** | | +**page_number** | **int** | | +**has_next_page** | **bool** | | + +## Example + +```python +from revengai.models.pagination_model import PaginationModel + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationModel from a JSON string +pagination_model_instance = PaginationModel.from_json(json) +# print the JSON string representation of the object +print(PaginationModel.to_json()) + +# convert the object into a dict +pagination_model_dict = pagination_model_instance.to_dict() +# create an instance of PaginationModel from a dict +pagination_model_from_dict = PaginationModel.from_dict(pagination_model_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/docs/Params.md b/docs/docs/Params.md new file mode 100644 index 0000000..a24a867 --- /dev/null +++ b/docs/docs/Params.md @@ -0,0 +1,35 @@ +# Params + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**debug_hash** | **str** | | +**binary_size** | **int** | The size of the binary data | +**architecture** | **str** | The architecture of the binary data | +**binary_type** | **str** | The type of binary data | +**binary_format** | **str** | The format of the binary data | +**binary_dynamic** | **bool** | Whether the binary data is dynamic | +**model_name** | **str** | The name of the model | + +## Example + +```python +from revengai.models.params import Params + +# TODO update the JSON string below +json = "{}" +# create an instance of Params from a JSON string +params_instance = Params.from_json(json) +# print the JSON string representation of the object +print(Params.to_json()) + +# convert the object into a dict +params_dict = params_instance.to_dict() +# create an instance of Params from a dict +params_from_dict = Params.from_dict(params_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/docs/Platform.md b/docs/docs/Platform.md new file mode 100644 index 0000000..ec9a706 --- /dev/null +++ b/docs/docs/Platform.md @@ -0,0 +1,12 @@ +# Platform + + +## Enum + +* `LINUX` (value: `'linux'`) + +* `WINDOWS` (value: `'windows'`) + +[[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/docs/Process.md b/docs/docs/Process.md new file mode 100644 index 0000000..a782602 --- /dev/null +++ b/docs/docs/Process.md @@ -0,0 +1,35 @@ +# Process + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pid** | **int** | | +**procname** | **str** | | +**executable_name** | **str** | | +**args** | **List[str]** | | +**ts_from** | **float** | | +**ts_to** | **float** | | +**children** | **List[object]** | | + +## Example + +```python +from revengai.models.process import Process + +# TODO update the JSON string below +json = "{}" +# create an instance of Process from a JSON string +process_instance = Process.from_json(json) +# print the JSON string representation of the object +print(Process.to_json()) + +# convert the object into a dict +process_dict = process_instance.to_dict() +# create an instance of Process from a dict +process_from_dict = Process.from_dict(process_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/docs/ProcessDump.md b/docs/docs/ProcessDump.md new file mode 100644 index 0000000..d2d62bd --- /dev/null +++ b/docs/docs/ProcessDump.md @@ -0,0 +1,32 @@ +# ProcessDump + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_address** | **int** | | +**actual_filename** | **str** | | +**filename_friendly** | **str** | | +**extended_metadata** | [**ProcessDumpMetadata**](ProcessDumpMetadata.md) | | + +## Example + +```python +from revengai.models.process_dump import ProcessDump + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessDump from a JSON string +process_dump_instance = ProcessDump.from_json(json) +# print the JSON string representation of the object +print(ProcessDump.to_json()) + +# convert the object into a dict +process_dump_dict = process_dump_instance.to_dict() +# create an instance of ProcessDump from a dict +process_dump_from_dict = ProcessDump.from_dict(process_dump_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/docs/ProcessDumpMetadata.md b/docs/docs/ProcessDumpMetadata.md new file mode 100644 index 0000000..03a610c --- /dev/null +++ b/docs/docs/ProcessDumpMetadata.md @@ -0,0 +1,31 @@ +# ProcessDumpMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha256** | **str** | | +**type** | **str** | | +**size** | **int** | | + +## Example + +```python +from revengai.models.process_dump_metadata import ProcessDumpMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessDumpMetadata from a JSON string +process_dump_metadata_instance = ProcessDumpMetadata.from_json(json) +# print the JSON string representation of the object +print(ProcessDumpMetadata.to_json()) + +# convert the object into a dict +process_dump_metadata_dict = process_dump_metadata_instance.to_dict() +# create an instance of ProcessDumpMetadata from a dict +process_dump_metadata_from_dict = ProcessDumpMetadata.from_dict(process_dump_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/docs/ProcessDumps.md b/docs/docs/ProcessDumps.md new file mode 100644 index 0000000..c1413dc --- /dev/null +++ b/docs/docs/ProcessDumps.md @@ -0,0 +1,30 @@ +# ProcessDumps + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**data** | [**ProcessDumpsData**](ProcessDumpsData.md) | | + +## Example + +```python +from revengai.models.process_dumps import ProcessDumps + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessDumps from a JSON string +process_dumps_instance = ProcessDumps.from_json(json) +# print the JSON string representation of the object +print(ProcessDumps.to_json()) + +# convert the object into a dict +process_dumps_dict = process_dumps_instance.to_dict() +# create an instance of ProcessDumps from a dict +process_dumps_from_dict = ProcessDumps.from_dict(process_dumps_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/docs/ProcessDumpsData.md b/docs/docs/ProcessDumpsData.md new file mode 100644 index 0000000..424091e --- /dev/null +++ b/docs/docs/ProcessDumpsData.md @@ -0,0 +1,30 @@ +# ProcessDumpsData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**dumps** | [**List[ProcessDump]**](ProcessDump.md) | | + +## Example + +```python +from revengai.models.process_dumps_data import ProcessDumpsData + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessDumpsData from a JSON string +process_dumps_data_instance = ProcessDumpsData.from_json(json) +# print the JSON string representation of the object +print(ProcessDumpsData.to_json()) + +# convert the object into a dict +process_dumps_data_dict = process_dumps_data_instance.to_dict() +# create an instance of ProcessDumpsData from a dict +process_dumps_data_from_dict = ProcessDumpsData.from_dict(process_dumps_data_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/docs/ProcessRegistry.md b/docs/docs/ProcessRegistry.md new file mode 100644 index 0000000..af0cf3b --- /dev/null +++ b/docs/docs/ProcessRegistry.md @@ -0,0 +1,30 @@ +# ProcessRegistry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**data** | **Dict[str, List[Registry]]** | | + +## Example + +```python +from revengai.models.process_registry import ProcessRegistry + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessRegistry from a JSON string +process_registry_instance = ProcessRegistry.from_json(json) +# print the JSON string representation of the object +print(ProcessRegistry.to_json()) + +# convert the object into a dict +process_registry_dict = process_registry_instance.to_dict() +# create an instance of ProcessRegistry from a dict +process_registry_from_dict = ProcessRegistry.from_dict(process_registry_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/docs/ProcessTree.md b/docs/docs/ProcessTree.md new file mode 100644 index 0000000..b7c2b1f --- /dev/null +++ b/docs/docs/ProcessTree.md @@ -0,0 +1,30 @@ +# ProcessTree + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**data** | [**List[Process]**](Process.md) | | + +## Example + +```python +from revengai.models.process_tree import ProcessTree + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessTree from a JSON string +process_tree_instance = ProcessTree.from_json(json) +# print the JSON string representation of the object +print(ProcessTree.to_json()) + +# convert the object into a dict +process_tree_dict = process_tree_instance.to_dict() +# create an instance of ProcessTree from a dict +process_tree_from_dict = ProcessTree.from_dict(process_tree_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/docs/QueuedSecurityChecksTaskResponse.md b/docs/docs/QueuedSecurityChecksTaskResponse.md new file mode 100644 index 0000000..2599588 --- /dev/null +++ b/docs/docs/QueuedSecurityChecksTaskResponse.md @@ -0,0 +1,29 @@ +# QueuedSecurityChecksTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_id** | **str** | | + +## Example + +```python +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of QueuedSecurityChecksTaskResponse from a JSON string +queued_security_checks_task_response_instance = QueuedSecurityChecksTaskResponse.from_json(json) +# print the JSON string representation of the object +print(QueuedSecurityChecksTaskResponse.to_json()) + +# convert the object into a dict +queued_security_checks_task_response_dict = queued_security_checks_task_response_instance.to_dict() +# create an instance of QueuedSecurityChecksTaskResponse from a dict +queued_security_checks_task_response_from_dict = QueuedSecurityChecksTaskResponse.from_dict(queued_security_checks_task_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/docs/ReAnalysisForm.md b/docs/docs/ReAnalysisForm.md new file mode 100644 index 0000000..e6999f1 --- /dev/null +++ b/docs/docs/ReAnalysisForm.md @@ -0,0 +1,35 @@ +# ReAnalysisForm + +Form Model for receiving the analysis request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **List[str]** | Tags associated with the analysis | [optional] [default to []] +**command_line_args** | **str** | Command line arguments for dynamic execution | [optional] [default to ''] +**priority** | **int** | Priority of the analysis | [optional] [default to 0] +**essential** | **bool** | Only runs essential parts of the analysis, skips tags/sbom/cves etc. | [optional] [default to True] +**model_name** | **str** | | [optional] +**no_cache** | **bool** | When enabled, skips using cached data within the processing. | [optional] [default to False] + +## Example + +```python +from revengai.models.re_analysis_form import ReAnalysisForm + +# TODO update the JSON string below +json = "{}" +# create an instance of ReAnalysisForm from a JSON string +re_analysis_form_instance = ReAnalysisForm.from_json(json) +# print the JSON string representation of the object +print(ReAnalysisForm.to_json()) + +# convert the object into a dict +re_analysis_form_dict = re_analysis_form_instance.to_dict() +# create an instance of ReAnalysisForm from a dict +re_analysis_form_from_dict = ReAnalysisForm.from_dict(re_analysis_form_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/docs/Recent.md b/docs/docs/Recent.md new file mode 100644 index 0000000..274b5bc --- /dev/null +++ b/docs/docs/Recent.md @@ -0,0 +1,29 @@ +# Recent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[AnalysisRecord]**](AnalysisRecord.md) | 2D List containing the results of the analysis | + +## Example + +```python +from revengai.models.recent import Recent + +# TODO update the JSON string below +json = "{}" +# create an instance of Recent from a JSON string +recent_instance = Recent.from_json(json) +# print the JSON string representation of the object +print(Recent.to_json()) + +# convert the object into a dict +recent_dict = recent_instance.to_dict() +# create an instance of Recent from a dict +recent_from_dict = Recent.from_dict(recent_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/docs/Registry.md b/docs/docs/Registry.md new file mode 100644 index 0000000..9c53505 --- /dev/null +++ b/docs/docs/Registry.md @@ -0,0 +1,32 @@ +# Registry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | **str** | | +**key** | **str** | | +**value_name** | **str** | | +**value** | **str** | | + +## Example + +```python +from revengai.models.registry import Registry + +# TODO update the JSON string below +json = "{}" +# create an instance of Registry from a JSON string +registry_instance = Registry.from_json(json) +# print the JSON string representation of the object +print(Registry.to_json()) + +# convert the object into a dict +registry_dict = registry_instance.to_dict() +# create an instance of Registry from a dict +registry_from_dict = Registry.from_dict(registry_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/docs/RelativeBinaryResponse.md b/docs/docs/RelativeBinaryResponse.md new file mode 100644 index 0000000..b2e75a0 --- /dev/null +++ b/docs/docs/RelativeBinaryResponse.md @@ -0,0 +1,31 @@ +# RelativeBinaryResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_id** | **int** | ID of the relative binary | +**name** | **str** | Name of the relative binary | +**sha256** | **str** | SHA256 hash of the relative binary | + +## Example + +```python +from revengai.models.relative_binary_response import RelativeBinaryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RelativeBinaryResponse from a JSON string +relative_binary_response_instance = RelativeBinaryResponse.from_json(json) +# print the JSON string representation of the object +print(RelativeBinaryResponse.to_json()) + +# convert the object into a dict +relative_binary_response_dict = relative_binary_response_instance.to_dict() +# create an instance of RelativeBinaryResponse from a dict +relative_binary_response_from_dict = RelativeBinaryResponse.from_dict(relative_binary_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/docs/SBOM.md b/docs/docs/SBOM.md new file mode 100644 index 0000000..0bb79a3 --- /dev/null +++ b/docs/docs/SBOM.md @@ -0,0 +1,30 @@ +# SBOM + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**packages** | [**List[SBOMPackage]**](SBOMPackage.md) | The packages found | +**imported_libs** | **List[str]** | The import libraries found | + +## Example + +```python +from revengai.models.sbom import SBOM + +# TODO update the JSON string below +json = "{}" +# create an instance of SBOM from a JSON string +sbom_instance = SBOM.from_json(json) +# print the JSON string representation of the object +print(SBOM.to_json()) + +# convert the object into a dict +sbom_dict = sbom_instance.to_dict() +# create an instance of SBOM from a dict +sbom_from_dict = SBOM.from_dict(sbom_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/docs/SBOMPackage.md b/docs/docs/SBOMPackage.md new file mode 100644 index 0000000..e340474 --- /dev/null +++ b/docs/docs/SBOMPackage.md @@ -0,0 +1,30 @@ +# SBOMPackage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the package | +**version** | **str** | The version of the package | + +## Example + +```python +from revengai.models.sbom_package import SBOMPackage + +# TODO update the JSON string below +json = "{}" +# create an instance of SBOMPackage from a JSON string +sbom_package_instance = SBOMPackage.from_json(json) +# print the JSON string representation of the object +print(SBOMPackage.to_json()) + +# convert the object into a dict +sbom_package_dict = sbom_package_instance.to_dict() +# create an instance of SBOMPackage from a dict +sbom_package_from_dict = SBOMPackage.from_dict(sbom_package_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/docs/SandboxOptions.md b/docs/docs/SandboxOptions.md new file mode 100644 index 0000000..0b79823 --- /dev/null +++ b/docs/docs/SandboxOptions.md @@ -0,0 +1,30 @@ +# SandboxOptions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | | [optional] [default to False] +**command_line_args** | **str** | The command line parameters to pass to the dynamic execution sandbox. Requires `sandbox` to be True. | [optional] [default to ''] + +## Example + +```python +from revengai.models.sandbox_options import SandboxOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of SandboxOptions from a JSON string +sandbox_options_instance = SandboxOptions.from_json(json) +# print the JSON string representation of the object +print(SandboxOptions.to_json()) + +# convert the object into a dict +sandbox_options_dict = sandbox_options_instance.to_dict() +# create an instance of SandboxOptions from a dict +sandbox_options_from_dict = SandboxOptions.from_dict(sandbox_options_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/docs/ScrapeThirdPartyConfig.md b/docs/docs/ScrapeThirdPartyConfig.md new file mode 100644 index 0000000..e207517 --- /dev/null +++ b/docs/docs/ScrapeThirdPartyConfig.md @@ -0,0 +1,29 @@ +# ScrapeThirdPartyConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | | [optional] [default to False] + +## Example + +```python +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ScrapeThirdPartyConfig from a JSON string +scrape_third_party_config_instance = ScrapeThirdPartyConfig.from_json(json) +# print the JSON string representation of the object +print(ScrapeThirdPartyConfig.to_json()) + +# convert the object into a dict +scrape_third_party_config_dict = scrape_third_party_config_instance.to_dict() +# create an instance of ScrapeThirdPartyConfig from a dict +scrape_third_party_config_from_dict = ScrapeThirdPartyConfig.from_dict(scrape_third_party_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/docs/SearchApi.md b/docs/docs/SearchApi.md new file mode 100644 index 0000000..2e67c08 --- /dev/null +++ b/docs/docs/SearchApi.md @@ -0,0 +1,382 @@ +# revengai.SearchApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**search_binaries**](SearchApi.md#search_binaries) | **GET** /v2/search/binaries | Binaries search +[**search_collections**](SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search +[**search_functions**](SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search +[**search_tags**](SearchApi.md#search_tags) | **GET** /v2/search/tags | Tags search + + +# **search_binaries** +> BaseResponseBinarySearchResponse search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, authorization=authorization) + +Binaries search + +Searches for a specific binary + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse +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' + +# 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.SearchApi(api_client) + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 10 # int | Number of items per page. (optional) (default to 10) + partial_name = 'partial_name_example' # str | The partial or full name of the binary being searched (optional) + partial_sha256 = 'partial_sha256_example' # str | The partial or full sha256 of the binary being searched (optional) + tags = ['tags_example'] # List[str] | The tags to be searched for (optional) + model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional) + user_files_only = False # bool | Whether to only search user's uploaded files (optional) (default to False) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Binaries search + api_response = api_instance.search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, authorization=authorization) + print("The response of SearchApi->search_binaries:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->search_binaries: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 10] + **partial_name** | **str**| The partial or full name of the binary being searched | [optional] + **partial_sha256** | **str**| The partial or full sha256 of the binary being searched | [optional] + **tags** | [**List[str]**](str.md)| The tags to be searched for | [optional] + **model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional] + **user_files_only** | **bool**| Whether to only search user's uploaded files | [optional] [default to False] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseBinarySearchResponse**](BaseResponseBinarySearchResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | You must provide at least one of the filters; partial_name, partial_sha256, tags or model_name to search | - | + +[[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) + +# **search_collections** +> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, model_name=model_name, filters=filters, order_by=order_by, order_by_direction=order_by_direction, authorization=authorization) + +Collections search + +Searches for a specific collection + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse +from revengai.models.filters import Filters +from revengai.models.order import Order +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' + +# 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.SearchApi(api_client) + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 10 # int | Number of items per page. (optional) (default to 10) + partial_collection_name = 'partial_collection_name_example' # str | The partial or full name of the collection being searched (optional) + partial_binary_name = 'partial_binary_name_example' # str | The partial or full name of the binary belonging to the collection (optional) + partial_binary_sha256 = 'partial_binary_sha256_example' # str | The partial or full sha256 of the binary belonging to the collection (optional) + tags = ['tags_example'] # List[str] | The tags to be searched for (optional) + model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional) + filters = [revengai.Filters()] # List[Filters] | The filters to be used for the search (optional) + order_by = revengai.AppApiRestV2CollectionsEnumsOrderBy() # AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results (optional) + order_by_direction = revengai.Order() # Order | The order direction in which to return results (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Collections search + api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, model_name=model_name, filters=filters, order_by=order_by, order_by_direction=order_by_direction, authorization=authorization) + print("The response of SearchApi->search_collections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->search_collections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 10] + **partial_collection_name** | **str**| The partial or full name of the collection being searched | [optional] + **partial_binary_name** | **str**| The partial or full name of the binary belonging to the collection | [optional] + **partial_binary_sha256** | **str**| The partial or full sha256 of the binary belonging to the collection | [optional] + **tags** | [**List[str]**](str.md)| The tags to be searched for | [optional] + **model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional] + **filters** | [**List[Filters]**](Filters.md)| The filters to be used for the search | [optional] + **order_by** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional] + **order_by_direction** | [**Order**](.md)| The order direction in which to return results | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseCollectionSearchResponse**](BaseResponseCollectionSearchResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search | - | +**404** | The model name provided does not exist | - | + +[[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) + +# **search_functions** +> BaseResponseFunctionSearchResponse search_functions(page=page, page_size=page_size, partial_name=partial_name, model_name=model_name, authorization=authorization) + +Functions search + +Searches for a specific function + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse +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' + +# 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.SearchApi(api_client) + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 10 # int | Number of items per page. (optional) (default to 10) + partial_name = 'partial_name_example' # str | The partial or full name of the function being searched (optional) + model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional) + authorization = 'authorization_example' # str | API Key bearer token (optional) + + try: + # Functions search + api_response = api_instance.search_functions(page=page, page_size=page_size, partial_name=partial_name, model_name=model_name, authorization=authorization) + print("The response of SearchApi->search_functions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->search_functions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 10] + **partial_name** | **str**| The partial or full name of the function being searched | [optional] + **model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional] + **authorization** | **str**| API Key bearer token | [optional] + +### Return type + +[**BaseResponseFunctionSearchResponse**](BaseResponseFunctionSearchResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | You must provide at least one of the filters; partial_name, or model_name to search | - | + +[[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) + +# **search_tags** +> BaseResponseTagSearchResponse search_tags(partial_name, page=page, page_size=page_size) + +Tags search + +Searches for tags by there name + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse +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' + +# 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.SearchApi(api_client) + partial_name = 'partial_name_example' # str | The partial or full name of the tag to search for + page = 1 # int | The page number to retrieve. (optional) (default to 1) + page_size = 10 # int | Number of items per page. (optional) (default to 10) + + try: + # Tags search + api_response = api_instance.search_tags(partial_name, page=page, page_size=page_size) + print("The response of SearchApi->search_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->search_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **partial_name** | **str**| The partial or full name of the tag to search for | + **page** | **int**| The page number to retrieve. | [optional] [default to 1] + **page_size** | **int**| Number of items per page. | [optional] [default to 10] + +### Return type + +[**BaseResponseTagSearchResponse**](BaseResponseTagSearchResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | You must provide a partial_name to search and it must be greater than 3 characters | - | + +[[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/docs/SearchBinaryIds.md b/docs/docs/SearchBinaryIds.md new file mode 100644 index 0000000..0d11c43 --- /dev/null +++ b/docs/docs/SearchBinaryIds.md @@ -0,0 +1,29 @@ +# SearchBinaryIds + +Optionally perform the search on matching functions from binaries in this list + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from revengai.models.search_binary_ids import SearchBinaryIds + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchBinaryIds from a JSON string +search_binary_ids_instance = SearchBinaryIds.from_json(json) +# print the JSON string representation of the object +print(SearchBinaryIds.to_json()) + +# convert the object into a dict +search_binary_ids_dict = search_binary_ids_instance.to_dict() +# create an instance of SearchBinaryIds from a dict +search_binary_ids_from_dict = SearchBinaryIds.from_dict(search_binary_ids_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/docs/SearchFunctionIds.md b/docs/docs/SearchFunctionIds.md new file mode 100644 index 0000000..e674112 --- /dev/null +++ b/docs/docs/SearchFunctionIds.md @@ -0,0 +1,29 @@ +# SearchFunctionIds + +Optionally perform the search on matching functions within this list of functions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from revengai.models.search_function_ids import SearchFunctionIds + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchFunctionIds from a JSON string +search_function_ids_instance = SearchFunctionIds.from_json(json) +# print the JSON string representation of the object +print(SearchFunctionIds.to_json()) + +# convert the object into a dict +search_function_ids_dict = search_function_ids_instance.to_dict() +# create an instance of SearchFunctionIds from a dict +search_function_ids_from_dict = SearchFunctionIds.from_dict(search_function_ids_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/docs/SectionModel.md b/docs/docs/SectionModel.md new file mode 100644 index 0000000..3b9ab28 --- /dev/null +++ b/docs/docs/SectionModel.md @@ -0,0 +1,30 @@ +# SectionModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_sections** | **int** | | +**sections** | [**List[SingleSectionModel]**](SingleSectionModel.md) | | + +## Example + +```python +from revengai.models.section_model import SectionModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SectionModel from a JSON string +section_model_instance = SectionModel.from_json(json) +# print the JSON string representation of the object +print(SectionModel.to_json()) + +# convert the object into a dict +section_model_dict = section_model_instance.to_dict() +# create an instance of SectionModel from a dict +section_model_from_dict = SectionModel.from_dict(section_model_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/docs/SecurityChecksResponse.md b/docs/docs/SecurityChecksResponse.md new file mode 100644 index 0000000..3a47e4e --- /dev/null +++ b/docs/docs/SecurityChecksResponse.md @@ -0,0 +1,31 @@ +# SecurityChecksResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_id** | **int** | | +**total_results** | **int** | | +**results** | [**List[SecurityChecksResult]**](SecurityChecksResult.md) | | + +## Example + +```python +from revengai.models.security_checks_response import SecurityChecksResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SecurityChecksResponse from a JSON string +security_checks_response_instance = SecurityChecksResponse.from_json(json) +# print the JSON string representation of the object +print(SecurityChecksResponse.to_json()) + +# convert the object into a dict +security_checks_response_dict = security_checks_response_instance.to_dict() +# create an instance of SecurityChecksResponse from a dict +security_checks_response_from_dict = SecurityChecksResponse.from_dict(security_checks_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/docs/SecurityChecksResult.md b/docs/docs/SecurityChecksResult.md new file mode 100644 index 0000000..7db22a3 --- /dev/null +++ b/docs/docs/SecurityChecksResult.md @@ -0,0 +1,36 @@ +# SecurityChecksResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**function_name** | **str** | | +**name** | **str** | | +**vuln_class** | [**VulnerabilityType**](VulnerabilityType.md) | | +**description** | **str** | | +**remediation** | **str** | | +**confidence** | [**ConfidenceType**](ConfidenceType.md) | | +**severity** | [**SeverityType**](SeverityType.md) | | + +## Example + +```python +from revengai.models.security_checks_result import SecurityChecksResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SecurityChecksResult from a JSON string +security_checks_result_instance = SecurityChecksResult.from_json(json) +# print the JSON string representation of the object +print(SecurityChecksResult.to_json()) + +# convert the object into a dict +security_checks_result_dict = security_checks_result_instance.to_dict() +# create an instance of SecurityChecksResult from a dict +security_checks_result_from_dict = SecurityChecksResult.from_dict(security_checks_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/docs/SecurityModel.md b/docs/docs/SecurityModel.md new file mode 100644 index 0000000..742bf98 --- /dev/null +++ b/docs/docs/SecurityModel.md @@ -0,0 +1,39 @@ +# SecurityModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aslr** | **bool** | | +**dep** | **bool** | | +**cfg** | **bool** | | +**driver_model** | **bool** | | +**app_container** | **bool** | | +**terminal_server_aware** | **bool** | | +**image_isolation** | **bool** | | +**code_integrity** | **bool** | | +**high_entropy** | **bool** | | +**seh** | **bool** | | +**bound_image** | **bool** | | + +## Example + +```python +from revengai.models.security_model import SecurityModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SecurityModel from a JSON string +security_model_instance = SecurityModel.from_json(json) +# print the JSON string representation of the object +print(SecurityModel.to_json()) + +# convert the object into a dict +security_model_dict = security_model_instance.to_dict() +# create an instance of SecurityModel from a dict +security_model_from_dict = SecurityModel.from_dict(security_model_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/docs/SeverityType.md b/docs/docs/SeverityType.md new file mode 100644 index 0000000..9f6fb69 --- /dev/null +++ b/docs/docs/SeverityType.md @@ -0,0 +1,20 @@ +# SeverityType + + +## Enum + +* `CRITICAL` (value: `'CRITICAL'`) + +* `HIGH` (value: `'HIGH'`) + +* `MEDIUM` (value: `'MEDIUM'`) + +* `LOW` (value: `'LOW'`) + +* `INFO` (value: `'INFO'`) + +* `NONE` (value: `'NONE'`) + +[[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/docs/SimilarFunctionsResponse.md b/docs/docs/SimilarFunctionsResponse.md new file mode 100644 index 0000000..dd3c2e7 --- /dev/null +++ b/docs/docs/SimilarFunctionsResponse.md @@ -0,0 +1,36 @@ +# SimilarFunctionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_id** | **int** | | +**function_name** | **str** | | +**binary_id** | **int** | | +**binary_name** | **str** | | +**distance** | **float** | | +**embedding_3d** | **List[float]** | | +**embedding_1d** | **List[float]** | | +**sha_256_hash** | **str** | | + +## Example + +```python +from revengai.models.similar_functions_response import SimilarFunctionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SimilarFunctionsResponse from a JSON string +similar_functions_response_instance = SimilarFunctionsResponse.from_json(json) +# print the JSON string representation of the object +print(SimilarFunctionsResponse.to_json()) + +# convert the object into a dict +similar_functions_response_dict = similar_functions_response_instance.to_dict() +# create an instance of SimilarFunctionsResponse from a dict +similar_functions_response_from_dict = SimilarFunctionsResponse.from_dict(similar_functions_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/docs/SingleCodeCertificateModel.md b/docs/docs/SingleCodeCertificateModel.md new file mode 100644 index 0000000..4999931 --- /dev/null +++ b/docs/docs/SingleCodeCertificateModel.md @@ -0,0 +1,34 @@ +# SingleCodeCertificateModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **int** | | +**issued_on** | **str** | | +**expires_on** | **str** | | +**issuer_name** | **str** | | +**serial_number** | **str** | | +**subject_name** | **str** | | + +## Example + +```python +from revengai.models.single_code_certificate_model import SingleCodeCertificateModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleCodeCertificateModel from a JSON string +single_code_certificate_model_instance = SingleCodeCertificateModel.from_json(json) +# print the JSON string representation of the object +print(SingleCodeCertificateModel.to_json()) + +# convert the object into a dict +single_code_certificate_model_dict = single_code_certificate_model_instance.to_dict() +# create an instance of SingleCodeCertificateModel from a dict +single_code_certificate_model_from_dict = SingleCodeCertificateModel.from_dict(single_code_certificate_model_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/docs/SingleCodeSignatureModel.md b/docs/docs/SingleCodeSignatureModel.md new file mode 100644 index 0000000..4c81a22 --- /dev/null +++ b/docs/docs/SingleCodeSignatureModel.md @@ -0,0 +1,30 @@ +# SingleCodeSignatureModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**certificates** | [**List[SingleCodeCertificateModel]**](SingleCodeCertificateModel.md) | | +**authenticode_digest** | **str** | | + +## Example + +```python +from revengai.models.single_code_signature_model import SingleCodeSignatureModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleCodeSignatureModel from a JSON string +single_code_signature_model_instance = SingleCodeSignatureModel.from_json(json) +# print the JSON string representation of the object +print(SingleCodeSignatureModel.to_json()) + +# convert the object into a dict +single_code_signature_model_dict = single_code_signature_model_instance.to_dict() +# create an instance of SingleCodeSignatureModel from a dict +single_code_signature_model_from_dict = SingleCodeSignatureModel.from_dict(single_code_signature_model_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/docs/SinglePDBEntryModel.md b/docs/docs/SinglePDBEntryModel.md new file mode 100644 index 0000000..d453362 --- /dev/null +++ b/docs/docs/SinglePDBEntryModel.md @@ -0,0 +1,31 @@ +# SinglePDBEntryModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guid** | **str** | | +**age** | **int** | | +**path** | **str** | | + +## Example + +```python +from revengai.models.single_pdb_entry_model import SinglePDBEntryModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SinglePDBEntryModel from a JSON string +single_pdb_entry_model_instance = SinglePDBEntryModel.from_json(json) +# print the JSON string representation of the object +print(SinglePDBEntryModel.to_json()) + +# convert the object into a dict +single_pdb_entry_model_dict = single_pdb_entry_model_instance.to_dict() +# create an instance of SinglePDBEntryModel from a dict +single_pdb_entry_model_from_dict = SinglePDBEntryModel.from_dict(single_pdb_entry_model_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/docs/SingleSectionModel.md b/docs/docs/SingleSectionModel.md new file mode 100644 index 0000000..f8c82da --- /dev/null +++ b/docs/docs/SingleSectionModel.md @@ -0,0 +1,35 @@ +# SingleSectionModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**virtual_address** | **int** | | +**virtual_size** | **int** | | +**characteristics** | **str** | | +**raw_size** | **int** | | +**entropy** | **float** | | +**sha3_256** | **str** | | + +## Example + +```python +from revengai.models.single_section_model import SingleSectionModel + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleSectionModel from a JSON string +single_section_model_instance = SingleSectionModel.from_json(json) +# print the JSON string representation of the object +print(SingleSectionModel.to_json()) + +# convert the object into a dict +single_section_model_dict = single_section_model_instance.to_dict() +# create an instance of SingleSectionModel from a dict +single_section_model_from_dict = SingleSectionModel.from_dict(single_section_model_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/docs/StackVariable.md b/docs/docs/StackVariable.md new file mode 100644 index 0000000..4d78f8e --- /dev/null +++ b/docs/docs/StackVariable.md @@ -0,0 +1,34 @@ +# StackVariable + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**offset** | **int** | Offset of the stack variable | +**name** | **str** | Name of the stack variable | +**type** | **str** | Data type of the stack variable | +**size** | **int** | Size of the stack variable in bytes | +**addr** | **int** | Memory address of the stack variable | + +## Example + +```python +from revengai.models.stack_variable import StackVariable + +# TODO update the JSON string below +json = "{}" +# create an instance of StackVariable from a JSON string +stack_variable_instance = StackVariable.from_json(json) +# print the JSON string representation of the object +print(StackVariable.to_json()) + +# convert the object into a dict +stack_variable_dict = stack_variable_instance.to_dict() +# create an instance of StackVariable from a dict +stack_variable_from_dict = StackVariable.from_dict(stack_variable_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/docs/StatusInput.md b/docs/docs/StatusInput.md new file mode 100644 index 0000000..a51d87c --- /dev/null +++ b/docs/docs/StatusInput.md @@ -0,0 +1,21 @@ +# StatusInput + +Custom enum for the analysis status + +## Enum + +* `UPLOADED` (value: `'Uploaded'`) + +* `QUEUED` (value: `'Queued'`) + +* `COMPLETE` (value: `'Complete'`) + +* `ERROR` (value: `'Error'`) + +* `PROCESSING` (value: `'Processing'`) + +* `ALL` (value: `'All'`) + +[[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/docs/StatusOutput.md b/docs/docs/StatusOutput.md new file mode 100644 index 0000000..97ca585 --- /dev/null +++ b/docs/docs/StatusOutput.md @@ -0,0 +1,30 @@ +# StatusOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_id** | **int** | The ID corresponding to the checked status | +**analysis_status** | **str** | The status of the checked analysis | + +## Example + +```python +from revengai.models.status_output import StatusOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of StatusOutput from a JSON string +status_output_instance = StatusOutput.from_json(json) +# print the JSON string representation of the object +print(StatusOutput.to_json()) + +# convert the object into a dict +status_output_dict = status_output_instance.to_dict() +# create an instance of StatusOutput from a dict +status_output_from_dict = StatusOutput.from_dict(status_output_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/docs/StringFunctions.md b/docs/docs/StringFunctions.md new file mode 100644 index 0000000..04fc697 --- /dev/null +++ b/docs/docs/StringFunctions.md @@ -0,0 +1,31 @@ +# StringFunctions + +This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The value of the string literal | +**functions** | [**List[AppApiRestV2FunctionsResponsesFunction]**](AppApiRestV2FunctionsResponsesFunction.md) | The function ids the string literal was found within | + +## Example + +```python +from revengai.models.string_functions import StringFunctions + +# TODO update the JSON string below +json = "{}" +# create an instance of StringFunctions from a JSON string +string_functions_instance = StringFunctions.from_json(json) +# print the JSON string representation of the object +print(StringFunctions.to_json()) + +# convert the object into a dict +string_functions_dict = string_functions_instance.to_dict() +# create an instance of StringFunctions from a dict +string_functions_from_dict = StringFunctions.from_dict(string_functions_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/docs/Structure.md b/docs/docs/Structure.md new file mode 100644 index 0000000..faf87db --- /dev/null +++ b/docs/docs/Structure.md @@ -0,0 +1,33 @@ +# Structure + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the structure | +**size** | **int** | | [optional] +**members** | [**Dict[str, StructureMember]**](StructureMember.md) | Dictionary of structure members | +**artifact_type** | **str** | Type of artifact that the structure is associated with | [optional] + +## Example + +```python +from revengai.models.structure import Structure + +# TODO update the JSON string below +json = "{}" +# create an instance of Structure from a JSON string +structure_instance = Structure.from_json(json) +# print the JSON string representation of the object +print(Structure.to_json()) + +# convert the object into a dict +structure_dict = structure_instance.to_dict() +# create an instance of Structure from a dict +structure_from_dict = Structure.from_dict(structure_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/docs/StructureMember.md b/docs/docs/StructureMember.md new file mode 100644 index 0000000..ff94d50 --- /dev/null +++ b/docs/docs/StructureMember.md @@ -0,0 +1,33 @@ +# StructureMember + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the structure member | +**offset** | **int** | Offset of the member within the structure | +**type** | **str** | Data type of the structure member | +**size** | **int** | Size of the structure member in bytes | + +## Example + +```python +from revengai.models.structure_member import StructureMember + +# TODO update the JSON string below +json = "{}" +# create an instance of StructureMember from a JSON string +structure_member_instance = StructureMember.from_json(json) +# print the JSON string representation of the object +print(StructureMember.to_json()) + +# convert the object into a dict +structure_member_dict = structure_member_instance.to_dict() +# create an instance of StructureMember from a dict +structure_member_from_dict = StructureMember.from_dict(structure_member_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/docs/Symbols.md b/docs/docs/Symbols.md new file mode 100644 index 0000000..db33c87 --- /dev/null +++ b/docs/docs/Symbols.md @@ -0,0 +1,30 @@ +# Symbols + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_address** | **int** | The starting address of the execution | [optional] [default to 0] +**function_boundaries** | [**List[FunctionBoundary]**](FunctionBoundary.md) | List of user defined function boundaries | [optional] [default to []] + +## Example + +```python +from revengai.models.symbols import Symbols + +# TODO update the JSON string below +json = "{}" +# create an instance of Symbols from a JSON string +symbols_instance = Symbols.from_json(json) +# print the JSON string representation of the object +print(Symbols.to_json()) + +# convert the object into a dict +symbols_dict = symbols_instance.to_dict() +# create an instance of Symbols from a dict +symbols_from_dict = Symbols.from_dict(symbols_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/docs/SymbolsInfo.md b/docs/docs/SymbolsInfo.md new file mode 100644 index 0000000..8cd9c4c --- /dev/null +++ b/docs/docs/SymbolsInfo.md @@ -0,0 +1,30 @@ +# SymbolsInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_addr** | **int** | | [optional] +**provided_boundaries** | [**Boundary**](Boundary.md) | | [optional] + +## Example + +```python +from revengai.models.symbols_info import SymbolsInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SymbolsInfo from a JSON string +symbols_info_instance = SymbolsInfo.from_json(json) +# print the JSON string representation of the object +print(SymbolsInfo.to_json()) + +# convert the object into a dict +symbols_info_dict = symbols_info_instance.to_dict() +# create an instance of SymbolsInfo from a dict +symbols_info_from_dict = SymbolsInfo.from_dict(symbols_info_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/docs/TTPS.md b/docs/docs/TTPS.md new file mode 100644 index 0000000..9fa74b9 --- /dev/null +++ b/docs/docs/TTPS.md @@ -0,0 +1,30 @@ +# TTPS + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**data** | [**TTPSData**](TTPSData.md) | | + +## Example + +```python +from revengai.models.ttps import TTPS + +# TODO update the JSON string below +json = "{}" +# create an instance of TTPS from a JSON string +ttps_instance = TTPS.from_json(json) +# print the JSON string representation of the object +print(TTPS.to_json()) + +# convert the object into a dict +ttps_dict = ttps_instance.to_dict() +# create an instance of TTPS from a dict +ttps_from_dict = TTPS.from_dict(ttps_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/docs/TTPSAttack.md b/docs/docs/TTPSAttack.md new file mode 100644 index 0000000..2d6b4f7 --- /dev/null +++ b/docs/docs/TTPSAttack.md @@ -0,0 +1,30 @@ +# TTPSAttack + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | + +## Example + +```python +from revengai.models.ttps_attack import TTPSAttack + +# TODO update the JSON string below +json = "{}" +# create an instance of TTPSAttack from a JSON string +ttps_attack_instance = TTPSAttack.from_json(json) +# print the JSON string representation of the object +print(TTPSAttack.to_json()) + +# convert the object into a dict +ttps_attack_dict = ttps_attack_instance.to_dict() +# create an instance of TTPSAttack from a dict +ttps_attack_from_dict = TTPSAttack.from_dict(ttps_attack_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/docs/TTPSData.md b/docs/docs/TTPSData.md new file mode 100644 index 0000000..089bc80 --- /dev/null +++ b/docs/docs/TTPSData.md @@ -0,0 +1,30 @@ +# TTPSData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **int** | | +**ttps** | [**List[TTPSElement]**](TTPSElement.md) | | + +## Example + +```python +from revengai.models.ttps_data import TTPSData + +# TODO update the JSON string below +json = "{}" +# create an instance of TTPSData from a JSON string +ttps_data_instance = TTPSData.from_json(json) +# print the JSON string representation of the object +print(TTPSData.to_json()) + +# convert the object into a dict +ttps_data_dict = ttps_data_instance.to_dict() +# create an instance of TTPSData from a dict +ttps_data_from_dict = TTPSData.from_dict(ttps_data_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/docs/TTPSElement.md b/docs/docs/TTPSElement.md new file mode 100644 index 0000000..12c160c --- /dev/null +++ b/docs/docs/TTPSElement.md @@ -0,0 +1,32 @@ +# TTPSElement + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**attack** | [**List[TTPSAttack]**](TTPSAttack.md) | | +**occurrences** | [**List[TTPSOccurance]**](TTPSOccurance.md) | | +**score** | **int** | | + +## Example + +```python +from revengai.models.ttps_element import TTPSElement + +# TODO update the JSON string below +json = "{}" +# create an instance of TTPSElement from a JSON string +ttps_element_instance = TTPSElement.from_json(json) +# print the JSON string representation of the object +print(TTPSElement.to_json()) + +# convert the object into a dict +ttps_element_dict = ttps_element_instance.to_dict() +# create an instance of TTPSElement from a dict +ttps_element_from_dict = TTPSElement.from_dict(ttps_element_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/docs/TTPSOccurance.md b/docs/docs/TTPSOccurance.md new file mode 100644 index 0000000..8ba44be --- /dev/null +++ b/docs/docs/TTPSOccurance.md @@ -0,0 +1,30 @@ +# TTPSOccurance + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ppid** | **int** | | +**pid** | **int** | | + +## Example + +```python +from revengai.models.ttps_occurance import TTPSOccurance + +# TODO update the JSON string below +json = "{}" +# create an instance of TTPSOccurance from a JSON string +ttps_occurance_instance = TTPSOccurance.from_json(json) +# print the JSON string representation of the object +print(TTPSOccurance.to_json()) + +# convert the object into a dict +ttps_occurance_dict = ttps_occurance_instance.to_dict() +# create an instance of TTPSOccurance from a dict +ttps_occurance_from_dict = TTPSOccurance.from_dict(ttps_occurance_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/docs/Tag.md b/docs/docs/Tag.md new file mode 100644 index 0000000..b5606bd --- /dev/null +++ b/docs/docs/Tag.md @@ -0,0 +1,29 @@ +# Tag + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from revengai.models.tag import Tag + +# TODO update the JSON string below +json = "{}" +# create an instance of Tag from a JSON string +tag_instance = Tag.from_json(json) +# print the JSON string representation of the object +print(Tag.to_json()) + +# convert the object into a dict +tag_dict = tag_instance.to_dict() +# create an instance of Tag from a dict +tag_from_dict = Tag.from_dict(tag_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/docs/TagConfidenceBody.md b/docs/docs/TagConfidenceBody.md new file mode 100644 index 0000000..ee5d2fe --- /dev/null +++ b/docs/docs/TagConfidenceBody.md @@ -0,0 +1,29 @@ +# TagConfidenceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[Tags]**](Tags.md) | | + +## Example + +```python +from revengai.models.tag_confidence_body import TagConfidenceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TagConfidenceBody from a JSON string +tag_confidence_body_instance = TagConfidenceBody.from_json(json) +# print the JSON string representation of the object +print(TagConfidenceBody.to_json()) + +# convert the object into a dict +tag_confidence_body_dict = tag_confidence_body_instance.to_dict() +# create an instance of TagConfidenceBody from a dict +tag_confidence_body_from_dict = TagConfidenceBody.from_dict(tag_confidence_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/docs/TagOriginBoxPlotConfidence.md b/docs/docs/TagOriginBoxPlotConfidence.md new file mode 100644 index 0000000..3fb5dcb --- /dev/null +++ b/docs/docs/TagOriginBoxPlotConfidence.md @@ -0,0 +1,30 @@ +# TagOriginBoxPlotConfidence + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | [**Tags**](Tags.md) | | +**box_plot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | + +## Example + +```python +from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence + +# TODO update the JSON string below +json = "{}" +# create an instance of TagOriginBoxPlotConfidence from a JSON string +tag_origin_box_plot_confidence_instance = TagOriginBoxPlotConfidence.from_json(json) +# print the JSON string representation of the object +print(TagOriginBoxPlotConfidence.to_json()) + +# convert the object into a dict +tag_origin_box_plot_confidence_dict = tag_origin_box_plot_confidence_instance.to_dict() +# create an instance of TagOriginBoxPlotConfidence from a dict +tag_origin_box_plot_confidence_from_dict = TagOriginBoxPlotConfidence.from_dict(tag_origin_box_plot_confidence_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/docs/TagResponse.md b/docs/docs/TagResponse.md new file mode 100644 index 0000000..526622f --- /dev/null +++ b/docs/docs/TagResponse.md @@ -0,0 +1,30 @@ +# TagResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the tag | +**origin** | **str** | Origin of tag | + +## Example + +```python +from revengai.models.tag_response import TagResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TagResponse from a JSON string +tag_response_instance = TagResponse.from_json(json) +# print the JSON string representation of the object +print(TagResponse.to_json()) + +# convert the object into a dict +tag_response_dict = tag_response_instance.to_dict() +# create an instance of TagResponse from a dict +tag_response_from_dict = TagResponse.from_dict(tag_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/docs/TagSearchResponse.md b/docs/docs/TagSearchResponse.md new file mode 100644 index 0000000..3630b6b --- /dev/null +++ b/docs/docs/TagSearchResponse.md @@ -0,0 +1,29 @@ +# TagSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[TagSearchResult]**](TagSearchResult.md) | The results of the search | + +## Example + +```python +from revengai.models.tag_search_response import TagSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TagSearchResponse from a JSON string +tag_search_response_instance = TagSearchResponse.from_json(json) +# print the JSON string representation of the object +print(TagSearchResponse.to_json()) + +# convert the object into a dict +tag_search_response_dict = tag_search_response_instance.to_dict() +# create an instance of TagSearchResponse from a dict +tag_search_response_from_dict = TagSearchResponse.from_dict(tag_search_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/docs/TagSearchResult.md b/docs/docs/TagSearchResult.md new file mode 100644 index 0000000..4fdb824 --- /dev/null +++ b/docs/docs/TagSearchResult.md @@ -0,0 +1,30 @@ +# TagSearchResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag_id** | **int** | The ID of the tag | +**tag** | **str** | The name of the tag | + +## Example + +```python +from revengai.models.tag_search_result import TagSearchResult + +# TODO update the JSON string below +json = "{}" +# create an instance of TagSearchResult from a JSON string +tag_search_result_instance = TagSearchResult.from_json(json) +# print the JSON string representation of the object +print(TagSearchResult.to_json()) + +# convert the object into a dict +tag_search_result_dict = tag_search_result_instance.to_dict() +# create an instance of TagSearchResult from a dict +tag_search_result_from_dict = TagSearchResult.from_dict(tag_search_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/docs/Tags.md b/docs/docs/Tags.md new file mode 100644 index 0000000..5cd630b --- /dev/null +++ b/docs/docs/Tags.md @@ -0,0 +1,30 @@ +# Tags + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **str** | The tag name | +**origin** | [**Origin**](Origin.md) | The origin of the tag | + +## Example + +```python +from revengai.models.tags import Tags + +# TODO update the JSON string below +json = "{}" +# create an instance of Tags from a JSON string +tags_instance = Tags.from_json(json) +# print the JSON string representation of the object +print(Tags.to_json()) + +# convert the object into a dict +tags_dict = tags_instance.to_dict() +# create an instance of Tags from a dict +tags_from_dict = Tags.from_dict(tags_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/docs/TaskResponse.md b/docs/docs/TaskResponse.md new file mode 100644 index 0000000..e9612fd --- /dev/null +++ b/docs/docs/TaskResponse.md @@ -0,0 +1,30 @@ +# TaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**TaskStatus**](TaskStatus.md) | | [optional] +**error_message** | **str** | | [optional] + +## Example + +```python +from revengai.models.task_response import TaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskResponse from a JSON string +task_response_instance = TaskResponse.from_json(json) +# print the JSON string representation of the object +print(TaskResponse.to_json()) + +# convert the object into a dict +task_response_dict = task_response_instance.to_dict() +# create an instance of TaskResponse from a dict +task_response_from_dict = TaskResponse.from_dict(task_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/docs/TaskStatus.md b/docs/docs/TaskStatus.md new file mode 100644 index 0000000..9b698d3 --- /dev/null +++ b/docs/docs/TaskStatus.md @@ -0,0 +1,18 @@ +# TaskStatus + + +## Enum + +* `UNINITIALISED` (value: `'UNINITIALISED'`) + +* `PENDING` (value: `'PENDING'`) + +* `RUNNING` (value: `'RUNNING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `FAILED` (value: `'FAILED'`) + +[[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/docs/ThreatScoreFunctionBody.md b/docs/docs/ThreatScoreFunctionBody.md new file mode 100644 index 0000000..7bd1989 --- /dev/null +++ b/docs/docs/ThreatScoreFunctionBody.md @@ -0,0 +1,29 @@ +# ThreatScoreFunctionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_ids** | **List[int]** | List of function IDs to calculate threat score for | [optional] + +## Example + +```python +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreatScoreFunctionBody from a JSON string +threat_score_function_body_instance = ThreatScoreFunctionBody.from_json(json) +# print the JSON string representation of the object +print(ThreatScoreFunctionBody.to_json()) + +# convert the object into a dict +threat_score_function_body_dict = threat_score_function_body_instance.to_dict() +# create an instance of ThreatScoreFunctionBody from a dict +threat_score_function_body_from_dict = ThreatScoreFunctionBody.from_dict(threat_score_function_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/docs/TimestampModel.md b/docs/docs/TimestampModel.md new file mode 100644 index 0000000..f0ed185 --- /dev/null +++ b/docs/docs/TimestampModel.md @@ -0,0 +1,31 @@ +# TimestampModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pe_timestamp** | **int** | | +**export_timestamp** | **int** | | +**debug_timestamp** | **int** | | + +## Example + +```python +from revengai.models.timestamp_model import TimestampModel + +# TODO update the JSON string below +json = "{}" +# create an instance of TimestampModel from a JSON string +timestamp_model_instance = TimestampModel.from_json(json) +# print the JSON string representation of the object +print(TimestampModel.to_json()) + +# convert the object into a dict +timestamp_model_dict = timestamp_model_instance.to_dict() +# create an instance of TimestampModel from a dict +timestamp_model_from_dict = TimestampModel.from_dict(timestamp_model_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/docs/TypeDefinition.md b/docs/docs/TypeDefinition.md new file mode 100644 index 0000000..d64f983 --- /dev/null +++ b/docs/docs/TypeDefinition.md @@ -0,0 +1,32 @@ +# TypeDefinition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_change** | **str** | | [optional] +**name** | **str** | Name of the type definition | +**type** | **str** | Underlying type of the type definition | +**artifact_type** | **str** | Type of artifact the type definition is associated with | [optional] + +## Example + +```python +from revengai.models.type_definition import TypeDefinition + +# TODO update the JSON string below +json = "{}" +# create an instance of TypeDefinition from a JSON string +type_definition_instance = TypeDefinition.from_json(json) +# print the JSON string representation of the object +print(TypeDefinition.to_json()) + +# convert the object into a dict +type_definition_dict = type_definition_instance.to_dict() +# create an instance of TypeDefinition from a dict +type_definition_from_dict = TypeDefinition.from_dict(type_definition_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/docs/UnstripRequest.md b/docs/docs/UnstripRequest.md new file mode 100644 index 0000000..93eaf1d --- /dev/null +++ b/docs/docs/UnstripRequest.md @@ -0,0 +1,31 @@ +# UnstripRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_similarity** | **float** | Minimum similarity expected for a match, default is 0.9 | [optional] [default to 0.9] +**limit** | **int** | Maximum number of matches to return, default is 1, maximum is 10 | [optional] [default to 1] +**apply** | **bool** | Whether to apply the matched function names to the target binary, default is False | [optional] [default to False] + +## Example + +```python +from revengai.models.unstrip_request import UnstripRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnstripRequest from a JSON string +unstrip_request_instance = UnstripRequest.from_json(json) +# print the JSON string representation of the object +print(UnstripRequest.to_json()) + +# convert the object into a dict +unstrip_request_dict = unstrip_request_instance.to_dict() +# create an instance of UnstripRequest from a dict +unstrip_request_from_dict = UnstripRequest.from_dict(unstrip_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/docs/UpdateFunctionDataTypes.md b/docs/docs/UpdateFunctionDataTypes.md new file mode 100644 index 0000000..97dcf0e --- /dev/null +++ b/docs/docs/UpdateFunctionDataTypes.md @@ -0,0 +1,30 @@ +# UpdateFunctionDataTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_types_version** | **int** | Version of the function data types, used to check this update is not overwriting a newer one | +**data_types** | [**FunctionInfoInput**](FunctionInfoInput.md) | Function data types information to update | + +## Example + +```python +from revengai.models.update_function_data_types import UpdateFunctionDataTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFunctionDataTypes from a JSON string +update_function_data_types_instance = UpdateFunctionDataTypes.from_json(json) +# print the JSON string representation of the object +print(UpdateFunctionDataTypes.to_json()) + +# convert the object into a dict +update_function_data_types_dict = update_function_data_types_instance.to_dict() +# create an instance of UpdateFunctionDataTypes from a dict +update_function_data_types_from_dict = UpdateFunctionDataTypes.from_dict(update_function_data_types_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/docs/UploadFileType.md b/docs/docs/UploadFileType.md new file mode 100644 index 0000000..5b60136 --- /dev/null +++ b/docs/docs/UploadFileType.md @@ -0,0 +1,16 @@ +# UploadFileType + + +## Enum + +* `BINARY` (value: `'BINARY'`) + +* `DEBUG` (value: `'DEBUG'`) + +* `PACKED` (value: `'PACKED'`) + +* `FIRMWARE` (value: `'FIRMWARE'`) + +[[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/docs/UploadResponse.md b/docs/docs/UploadResponse.md new file mode 100644 index 0000000..db62cd8 --- /dev/null +++ b/docs/docs/UploadResponse.md @@ -0,0 +1,31 @@ +# UploadResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha_256_hash** | **str** | | +**file_type** | [**UploadFileType**](UploadFileType.md) | | +**filename** | **str** | | + +## Example + +```python +from revengai.models.upload_response import UploadResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UploadResponse from a JSON string +upload_response_instance = UploadResponse.from_json(json) +# print the JSON string representation of the object +print(UploadResponse.to_json()) + +# convert the object into a dict +upload_response_dict = upload_response_instance.to_dict() +# create an instance of UploadResponse from a dict +upload_response_from_dict = UploadResponse.from_dict(upload_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/docs/UpsertAiDecomplationRatingRequest.md b/docs/docs/UpsertAiDecomplationRatingRequest.md new file mode 100644 index 0000000..b0ca16b --- /dev/null +++ b/docs/docs/UpsertAiDecomplationRatingRequest.md @@ -0,0 +1,29 @@ +# UpsertAiDecomplationRatingRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rating** | [**AiDecompilationRating**](AiDecompilationRating.md) | The rating for the AI decompilation response | + +## Example + +```python +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpsertAiDecomplationRatingRequest from a JSON string +upsert_ai_decomplation_rating_request_instance = UpsertAiDecomplationRatingRequest.from_json(json) +# print the JSON string representation of the object +print(UpsertAiDecomplationRatingRequest.to_json()) + +# convert the object into a dict +upsert_ai_decomplation_rating_request_dict = upsert_ai_decomplation_rating_request_instance.to_dict() +# create an instance of UpsertAiDecomplationRatingRequest from a dict +upsert_ai_decomplation_rating_request_from_dict = UpsertAiDecomplationRatingRequest.from_dict(upsert_ai_decomplation_rating_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/docs/UserActivityResponse.md b/docs/docs/UserActivityResponse.md new file mode 100644 index 0000000..02eb3ff --- /dev/null +++ b/docs/docs/UserActivityResponse.md @@ -0,0 +1,34 @@ +# UserActivityResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | **str** | | +**activity_scope** | **str** | | +**creation** | **datetime** | | +**message** | **str** | | +**sources** | **str** | | +**username** | **str** | | + +## Example + +```python +from revengai.models.user_activity_response import UserActivityResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserActivityResponse from a JSON string +user_activity_response_instance = UserActivityResponse.from_json(json) +# print the JSON string representation of the object +print(UserActivityResponse.to_json()) + +# convert the object into a dict +user_activity_response_dict = user_activity_response_instance.to_dict() +# create an instance of UserActivityResponse from a dict +user_activity_response_from_dict = UserActivityResponse.from_dict(user_activity_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/docs/Vulnerabilities.md b/docs/docs/Vulnerabilities.md new file mode 100644 index 0000000..cb439f4 --- /dev/null +++ b/docs/docs/Vulnerabilities.md @@ -0,0 +1,29 @@ +# Vulnerabilities + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vulnerabilities** | [**List[Vulnerability]**](Vulnerability.md) | | + +## Example + +```python +from revengai.models.vulnerabilities import Vulnerabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of Vulnerabilities from a JSON string +vulnerabilities_instance = Vulnerabilities.from_json(json) +# print the JSON string representation of the object +print(Vulnerabilities.to_json()) + +# convert the object into a dict +vulnerabilities_dict = vulnerabilities_instance.to_dict() +# create an instance of Vulnerabilities from a dict +vulnerabilities_from_dict = Vulnerabilities.from_dict(vulnerabilities_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/docs/Vulnerability.md b/docs/docs/Vulnerability.md new file mode 100644 index 0000000..c7cab31 --- /dev/null +++ b/docs/docs/Vulnerability.md @@ -0,0 +1,39 @@ +# Vulnerability + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vendor** | **str** | | +**product** | **str** | | +**version** | **str** | | +**cve_number** | **str** | | +**severity** | **str** | | +**source** | **str** | | +**cvss_version** | **str** | | +**cvss_vector** | **str** | | +**remarks** | **str** | | +**score** | **float** | | +**is_unknown** | **bool** | | [optional] [default to False] + +## Example + +```python +from revengai.models.vulnerability import Vulnerability + +# TODO update the JSON string below +json = "{}" +# create an instance of Vulnerability from a JSON string +vulnerability_instance = Vulnerability.from_json(json) +# print the JSON string representation of the object +print(Vulnerability.to_json()) + +# convert the object into a dict +vulnerability_dict = vulnerability_instance.to_dict() +# create an instance of Vulnerability from a dict +vulnerability_from_dict = Vulnerability.from_dict(vulnerability_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/docs/VulnerabilityType.md b/docs/docs/VulnerabilityType.md new file mode 100644 index 0000000..010d957 --- /dev/null +++ b/docs/docs/VulnerabilityType.md @@ -0,0 +1,20 @@ +# VulnerabilityType + + +## Enum + +* `UNSAFE_FUNCTIONS` (value: `'UNSAFE_FUNCTIONS'`) + +* `MEMORY_CORRUPTION` (value: `'MEMORY_CORRUPTION'`) + +* `INJECTION_ATTACK` (value: `'INJECTION_ATTACK'`) + +* `MISCONFIGURATION` (value: `'MISCONFIGURATION'`) + +* `DEBUG` (value: `'DEBUG'`) + +* `HARDCODED_SECRET` (value: `'HARDCODED_SECRET'`) + +[[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/docs/Workspace.md b/docs/docs/Workspace.md new file mode 100644 index 0000000..fc7b882 --- /dev/null +++ b/docs/docs/Workspace.md @@ -0,0 +1,14 @@ +# Workspace + + +## Enum + +* `PERSONAL` (value: `'personal'`) + +* `TEAM` (value: `'team'`) + +* `PUBLIC` (value: `'public'`) + +[[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/python-client/.github/workflows/python.yml b/python-client/.github/workflows/python.yml new file mode 100644 index 0000000..171a547 --- /dev/null +++ b/python-client/.github/workflows/python.yml @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: revengai Python package + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov=revengai diff --git a/python-client/.gitignore b/python-client/.gitignore new file mode 100644 index 0000000..65b06b9 --- /dev/null +++ b/python-client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Ipython Notebook +.ipynb_checkpoints diff --git a/python-client/.gitlab-ci.yml b/python-client/.gitlab-ci.yml new file mode 100644 index 0000000..05b4ba0 --- /dev/null +++ b/python-client/.gitlab-ci.yml @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml + +stages: + - test + +.pytest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=revengai + +pytest-3.9: + extends: .pytest + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine +pytest-3.13: + extends: .pytest + image: python:3.13-alpine diff --git a/python-client/.openapi-generator-ignore b/python-client/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/python-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/python-client/.travis.yml b/python-client/.travis.yml new file mode 100644 index 0000000..1259961 --- /dev/null +++ b/python-client/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + # uncomment the following if needed + #- "3.13-dev" # 3.13 development branch + #- "nightly" # nightly build +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=revengai diff --git a/python-client/git_push.sh b/python-client/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/python-client/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/python-client/pyproject.toml b/python-client/pyproject.toml new file mode 100644 index 0000000..1743eb5 --- /dev/null +++ b/python-client/pyproject.toml @@ -0,0 +1,95 @@ +[project] +name = "revengai" +version = "v1.72.0" +description = "RevEng.AI API" +authors = [ + {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, +] +readme = "README.md" +keywords = ["OpenAPI", "OpenAPI-Generator", "RevEng.AI API"] +requires-python = ">=3.9" + +dependencies = [ + "urllib3 (>=2.1.0,<3.0.0)", + "python-dateutil (>=2.8.2)", + "pydantic (>=2)", + "typing-extensions (>=4.7.1)", + "lazy-imports (>=1,<2)" +] + +[project.urls] +Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" + +[tool.poetry] +requires-poetry = ">=2.0" + +[tool.poetry.group.dev.dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "revengai", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "revengai.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/python-client/requirements.txt b/python-client/requirements.txt new file mode 100644 index 0000000..867a449 --- /dev/null +++ b/python-client/requirements.txt @@ -0,0 +1,5 @@ +urllib3 >= 2.1.0, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 +lazy-imports >= 1, < 2 diff --git a/python-client/setup.cfg b/python-client/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/python-client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/python-client/setup.py b/python-client/setup.py new file mode 100644 index 0000000..6bd166b --- /dev/null +++ b/python-client/setup.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "revengai" +VERSION = "v1.72.0" +PYTHON_REQUIRES = ">= 3.9" +REQUIRES = [ + "urllib3 >= 2.1.0, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", + "lazy-imports >= 1, < 2", +] + +setup( + name=NAME, + version=VERSION, + description="RevEng.AI API", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="https://github.com/RevEngAI/revengai-python", + keywords=["OpenAPI", "OpenAPI-Generator", "RevEng.AI API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + RevEng.AI is Similarity Search Engine for executable binaries + """, # noqa: E501 + package_data={"revengai": ["py.typed"]}, +) \ No newline at end of file diff --git a/python-client/test-requirements.txt b/python-client/test-requirements.txt new file mode 100644 index 0000000..e98555c --- /dev/null +++ b/python-client/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/python-client/tox.ini b/python-client/tox.ini new file mode 100644 index 0000000..e3b90b4 --- /dev/null +++ b/python-client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=revengai diff --git a/revengai/revengai/__init__.py b/revengai/revengai/__init__.py new file mode 100644 index 0000000..3328404 --- /dev/null +++ b/revengai/revengai/__init__.py @@ -0,0 +1,1056 @@ +# coding: utf-8 + +# flake8: noqa + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "v1.72.0" + +# Define package exports +__all__ = [ + "AnalysesCommentsApi", + "AnalysesCoreApi", + "AnalysesDynamicExecutionApi", + "AnalysesResultsMetadataApi", + "AnalysesSecurityChecksApi", + "AuthenticationUsersApi", + "BinariesApi", + "CollectionsApi", + "ConfidenceApi", + "ExternalSourcesApi", + "FirmwareApi", + "FunctionsAIDecompilationApi", + "FunctionsBlockCommentsApi", + "FunctionsCoreApi", + "FunctionsDataTypesApi", + "FunctionsDecompilationApi", + "FunctionsRenamingHistoryApi", + "FunctionsThreatScoreApi", + "ModelsApi", + "SearchApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ANNFunction", + "Addr", + "AiDecompilationRating", + "AiUnstripRequest", + "AnalysisAccessInfo", + "AnalysisConfig", + "AnalysisCreateRequest", + "AnalysisCreateResponse", + "AnalysisDetailResponse", + "AnalysisFunctions", + "AnalysisRecord", + "AnalysisScope", + "AnalysisStringsResponse", + "AnalysisTags", + "AnalysisThreatScoreData", + "AnalysisUpdateRequest", + "AnalysisUpdateTagsRequest", + "AnalysisUpdateTagsResponse", + "AppApiRestV2AnalysesEnumsDynamicExecutionStatus", + "AppApiRestV2AnalysesEnumsOrderBy", + "AppApiRestV2AnalysesResponsesTagItem", + "AppApiRestV2CollectionsEnumsOrderBy", + "AppApiRestV2FunctionsResponsesFunction", + "AppApiRestV2FunctionsTypesFunction", + "AppServicesBinaryAnnSchemaTagItem", + "AppServicesDynamicExecutionSchemasDynamicExecutionStatus", + "Argument", + "AutoUnstripByGroupResponse", + "AutoUnstripRequest", + "AutoUnstripResponse", + "BaseResponse", + "BaseResponseAnalysisCreateResponse", + "BaseResponseAnalysisDetailResponse", + "BaseResponseAnalysisFunctions", + "BaseResponseAnalysisStringsResponse", + "BaseResponseAnalysisTags", + "BaseResponseAnalysisThreatScoreData", + "BaseResponseAnalysisUpdateTagsResponse", + "BaseResponseBasic", + "BaseResponseBinaryAdditionalResponse", + "BaseResponseBinaryAnnListResponse", + "BaseResponseBinaryDetailsResponse", + "BaseResponseBinaryExternalsResponse", + "BaseResponseBinarySearchResponse", + "BaseResponseBlockCommentsGenerationForFunctionResponse", + "BaseResponseBlockCommentsOverviewGenerationResponse", + "BaseResponseBool", + "BaseResponseBoxPlotConfidence", + "BaseResponseCalleesCallerFunctionsResponse", + "BaseResponseCapabilities", + "BaseResponseCheckSecurityChecksTaskResponse", + "BaseResponseChildBinariesResponse", + "BaseResponseCollectionBinariesUpdateResponse", + "BaseResponseCollectionResponse", + "BaseResponseCollectionSearchResponse", + "BaseResponseCollectionTagsUpdateResponse", + "BaseResponseCommentResponse", + "BaseResponseCommunities", + "BaseResponseCreated", + "BaseResponseDecompilationResponse", + "BaseResponseDict", + "BaseResponseDynamicExecutionStatus", + "BaseResponseExternalResponse", + "BaseResponseFunctionAnalysisThreatScoreData", + "BaseResponseFunctionBlocksResponse", + "BaseResponseFunctionCapabilityResponse", + "BaseResponseFunctionDataTypes", + "BaseResponseFunctionDataTypesList", + "BaseResponseFunctionSearchResponse", + "BaseResponseFunctionStringsResponse", + "BaseResponseFunctionTaskResponse", + "BaseResponseFunctionThreatScore", + "BaseResponseFunctionsDetailResponse", + "BaseResponseGenerateFunctionDataTypes", + "BaseResponseGenerationStatusList", + "BaseResponseGetAiDecompilationRatingResponse", + "BaseResponseGetAiDecompilationTask", + "BaseResponseGetPublicUserResponse", + "BaseResponseGetUserResponse", + "BaseResponseListCollectionResults", + "BaseResponseListCommentResponse", + "BaseResponseListDieMatch", + "BaseResponseListFunctionBoxPlotConfidence", + "BaseResponseListFunctionNameHistory", + "BaseResponseListSBOM", + "BaseResponseListSimilarFunctionsResponse", + "BaseResponseListTagOriginBoxPlotConfidence", + "BaseResponseListUserActivityResponse", + "BaseResponseLoginResponse", + "BaseResponseLogs", + "BaseResponseModelsResponse", + "BaseResponseNearestNeighborAnalysis", + "BaseResponseNetworkOverviewResponse", + "BaseResponseParams", + "BaseResponseProcessDumps", + "BaseResponseProcessRegistry", + "BaseResponseProcessTree", + "BaseResponseQueuedSecurityChecksTaskResponse", + "BaseResponseRecent", + "BaseResponseSecurityChecksResponse", + "BaseResponseStatus", + "BaseResponseStr", + "BaseResponseSymbolsInfo", + "BaseResponseTTPS", + "BaseResponseTagSearchResponse", + "BaseResponseTaskResponse", + "BaseResponseUploadResponse", + "BaseResponseVulnerabilities", + "Basic", + "BinaryAdditionalDetailsDataResponse", + "BinaryAdditionalResponse", + "BinaryAnnForm", + "BinaryAnnListResponse", + "BinaryConfig", + "BinaryDetailsResponse", + "BinaryExternalsResponse", + "BinarySearchResponse", + "BinarySearchResult", + "BinaryTaskStatus", + "Block", + "BlockCommentsGenerationForFunctionResponse", + "Boundary", + "BoxPlotConfidence", + "CalleeFunctionInfo", + "CalleesCallerFunctionsResponse", + "CallerFunctionInfo", + "Capabilities", + "Capability", + "CheckSecurityChecksTaskResponse", + "ChildBinariesResponse", + "CodeSignatureModel", + "CollectionBinariesUpdateRequest", + "CollectionBinariesUpdateResponse", + "CollectionBinaryResponse", + "CollectionCreateRequest", + "CollectionListItem", + "CollectionResponse", + "CollectionResponseBinariesInner", + "CollectionScope", + "CollectionSearchResponse", + "CollectionSearchResult", + "CollectionTagsUpdateRequest", + "CollectionTagsUpdateResponse", + "CollectionUpdateRequest", + "CommentBase", + "CommentResponse", + "CommentUpdateRequest", + "Communities", + "CommunityMatchPercentages", + "ConfidenceType", + "Context", + "Created", + "DecompilationCommentContext", + "DecompilationResponse", + "DieMatch", + "DynamicExecutionStatusInput", + "ELFImportModel", + "ELFModel", + "ELFRelocation", + "ELFSection", + "ELFSecurity", + "ELFSegment", + "ELFSymbol", + "ElfDynamicEntry", + "EntrypointModel", + "Enumeration", + "ErrorModel", + "ExportModel", + "ExportedBinaryAnnResult", + "ExternalResponse", + "FileFormat", + "FileHashes", + "FileMetadata", + "Filters", + "FunctionAnalysisThreatScoreData", + "FunctionBlockDestinationResponse", + "FunctionBlockResponse", + "FunctionBlocksResponse", + "FunctionBoundary", + "FunctionBoxPlotConfidence", + "FunctionCapabilityResponse", + "FunctionCommentCreateRequest", + "FunctionDataTypes", + "FunctionDataTypesList", + "FunctionDataTypesListItem", + "FunctionDataTypesParams", + "FunctionDataTypesStatus", + "FunctionHeader", + "FunctionInfoInput", + "FunctionInfoInputFuncDepsInner", + "FunctionInfoOutput", + "FunctionLocalVariableResponse", + "FunctionMappingFull", + "FunctionNameConfidenceBody", + "FunctionNameHistory", + "FunctionNameInput", + "FunctionParamResponse", + "FunctionRename", + "FunctionRenameMap", + "FunctionSearchResponse", + "FunctionSearchResult", + "FunctionString", + "FunctionStringsResponse", + "FunctionTaskResponse", + "FunctionTaskStatus", + "FunctionThreatScore", + "FunctionTypeInput", + "FunctionTypeOutput", + "FunctionsDetailResponse", + "FunctionsListRename", + "GenerateFunctionDataTypes", + "GenerationStatusList", + "GetAiDecompilationRatingResponse", + "GetAiDecompilationTask", + "GetPublicUserResponse", + "GetUserResponse", + "GlobalVariable", + "ISA", + "IconModel", + "ImportModel", + "InverseFunctionMapItem", + "InverseStringMapItem", + "InverseValue", + "ListCollectionResults", + "LoginRequest", + "LoginResponse", + "Logs", + "MatchedFunctionGroup", + "MatchedFunctionSuggestion", + "MetaModel", + "ModelName", + "ModelsResponse", + "NearestNeighbor", + "NetworkOverviewDns", + "NetworkOverviewDnsAnswer", + "NetworkOverviewMetadata", + "NetworkOverviewResponse", + "Order", + "Origin", + "PDBDebugModel", + "PEModel", + "PaginationModel", + "Params", + "Platform", + "Process", + "ProcessDump", + "ProcessDumpMetadata", + "ProcessDumps", + "ProcessDumpsData", + "ProcessRegistry", + "ProcessTree", + "QueuedSecurityChecksTaskResponse", + "ReAnalysisForm", + "Recent", + "Registry", + "RelativeBinaryResponse", + "SBOM", + "SBOMPackage", + "SandboxOptions", + "ScrapeThirdPartyConfig", + "SearchBinaryIds", + "SearchFunctionIds", + "SectionModel", + "SecurityChecksResponse", + "SecurityChecksResult", + "SecurityModel", + "SeverityType", + "SimilarFunctionsResponse", + "SingleCodeCertificateModel", + "SingleCodeSignatureModel", + "SinglePDBEntryModel", + "SingleSectionModel", + "StackVariable", + "StatusInput", + "StatusOutput", + "StringFunctions", + "Structure", + "StructureMember", + "Symbols", + "SymbolsInfo", + "TTPS", + "TTPSAttack", + "TTPSData", + "TTPSElement", + "TTPSOccurance", + "Tag", + "TagConfidenceBody", + "TagOriginBoxPlotConfidence", + "TagResponse", + "TagSearchResponse", + "TagSearchResult", + "Tags", + "TaskResponse", + "TaskStatus", + "ThreatScoreFunctionBody", + "TimestampModel", + "TypeDefinition", + "UnstripRequest", + "UpdateFunctionDataTypes", + "UploadFileType", + "UploadResponse", + "UpsertAiDecomplationRatingRequest", + "UserActivityResponse", + "Vulnerabilities", + "Vulnerability", + "VulnerabilityType", + "Workspace", +] + +if __import__("typing").TYPE_CHECKING: + # import apis into sdk package + from revengai.api.analyses_comments_api import AnalysesCommentsApi as AnalysesCommentsApi + from revengai.api.analyses_core_api import AnalysesCoreApi as AnalysesCoreApi + from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi as AnalysesDynamicExecutionApi + from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi as AnalysesResultsMetadataApi + from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi as AnalysesSecurityChecksApi + from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi + from revengai.api.binaries_api import BinariesApi as BinariesApi + from revengai.api.collections_api import CollectionsApi as CollectionsApi + from revengai.api.confidence_api import ConfidenceApi as ConfidenceApi + from revengai.api.external_sources_api import ExternalSourcesApi as ExternalSourcesApi + from revengai.api.firmware_api import FirmwareApi as FirmwareApi + from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi as FunctionsAIDecompilationApi + from revengai.api.functions_block_comments_api import FunctionsBlockCommentsApi as FunctionsBlockCommentsApi + from revengai.api.functions_core_api import FunctionsCoreApi as FunctionsCoreApi + from revengai.api.functions_data_types_api import FunctionsDataTypesApi as FunctionsDataTypesApi + from revengai.api.functions_decompilation_api import FunctionsDecompilationApi as FunctionsDecompilationApi + from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi as FunctionsRenamingHistoryApi + from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi as FunctionsThreatScoreApi + from revengai.api.models_api import ModelsApi as ModelsApi + from revengai.api.search_api import SearchApi as SearchApi + + # import ApiClient + from revengai.api_response import ApiResponse as ApiResponse + from revengai.api_client import ApiClient as ApiClient + from revengai.configuration import Configuration as Configuration + from revengai.exceptions import OpenApiException as OpenApiException + from revengai.exceptions import ApiTypeError as ApiTypeError + from revengai.exceptions import ApiValueError as ApiValueError + from revengai.exceptions import ApiKeyError as ApiKeyError + from revengai.exceptions import ApiAttributeError as ApiAttributeError + from revengai.exceptions import ApiException as ApiException + + # import models into sdk package + from revengai.models.ann_function import ANNFunction as ANNFunction + from revengai.models.addr import Addr as Addr + from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating + from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest + from revengai.models.analysis_access_info import AnalysisAccessInfo as AnalysisAccessInfo + from revengai.models.analysis_config import AnalysisConfig as AnalysisConfig + from revengai.models.analysis_create_request import AnalysisCreateRequest as AnalysisCreateRequest + from revengai.models.analysis_create_response import AnalysisCreateResponse as AnalysisCreateResponse + from revengai.models.analysis_detail_response import AnalysisDetailResponse as AnalysisDetailResponse + from revengai.models.analysis_functions import AnalysisFunctions as AnalysisFunctions + from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord + from revengai.models.analysis_scope import AnalysisScope as AnalysisScope + from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse + from revengai.models.analysis_tags import AnalysisTags as AnalysisTags + from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData as AnalysisThreatScoreData + from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest + 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.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus as AppApiRestV2AnalysesEnumsDynamicExecutionStatus + from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy + from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem as AppApiRestV2AnalysesResponsesTagItem + from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy + from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction + from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction + from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem as AppServicesBinaryAnnSchemaTagItem + from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus + from revengai.models.argument import Argument as Argument + from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse as AutoUnstripByGroupResponse + from revengai.models.auto_unstrip_request import AutoUnstripRequest as AutoUnstripRequest + from revengai.models.auto_unstrip_response import AutoUnstripResponse as AutoUnstripResponse + from revengai.models.base_response import BaseResponse as BaseResponse + from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse as BaseResponseAnalysisCreateResponse + from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse as BaseResponseAnalysisDetailResponse + from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions + from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse + from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags + from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData as BaseResponseAnalysisThreatScoreData + from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse as BaseResponseAnalysisUpdateTagsResponse + from revengai.models.base_response_basic import BaseResponseBasic as BaseResponseBasic + from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse as BaseResponseBinaryAdditionalResponse + from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse as BaseResponseBinaryAnnListResponse + from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse as BaseResponseBinaryDetailsResponse + from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse as BaseResponseBinaryExternalsResponse + from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse as BaseResponseBinarySearchResponse + from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse as BaseResponseBlockCommentsGenerationForFunctionResponse + from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse as BaseResponseBlockCommentsOverviewGenerationResponse + from revengai.models.base_response_bool import BaseResponseBool as BaseResponseBool + from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence as BaseResponseBoxPlotConfidence + from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse as BaseResponseCalleesCallerFunctionsResponse + from revengai.models.base_response_capabilities import BaseResponseCapabilities as BaseResponseCapabilities + from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse as BaseResponseCheckSecurityChecksTaskResponse + from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse as BaseResponseChildBinariesResponse + from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse as BaseResponseCollectionBinariesUpdateResponse + from revengai.models.base_response_collection_response import BaseResponseCollectionResponse as BaseResponseCollectionResponse + from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse as BaseResponseCollectionSearchResponse + from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse as BaseResponseCollectionTagsUpdateResponse + from revengai.models.base_response_comment_response import BaseResponseCommentResponse as BaseResponseCommentResponse + from revengai.models.base_response_communities import BaseResponseCommunities as BaseResponseCommunities + from revengai.models.base_response_created import BaseResponseCreated as BaseResponseCreated + from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse as BaseResponseDecompilationResponse + from revengai.models.base_response_dict import BaseResponseDict as BaseResponseDict + from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus as BaseResponseDynamicExecutionStatus + from revengai.models.base_response_external_response import BaseResponseExternalResponse as BaseResponseExternalResponse + from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData as BaseResponseFunctionAnalysisThreatScoreData + from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse as BaseResponseFunctionBlocksResponse + from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse as BaseResponseFunctionCapabilityResponse + from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes as BaseResponseFunctionDataTypes + from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList as BaseResponseFunctionDataTypesList + from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse as BaseResponseFunctionSearchResponse + from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse as BaseResponseFunctionStringsResponse + from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse as BaseResponseFunctionTaskResponse + from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore as BaseResponseFunctionThreatScore + from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse as BaseResponseFunctionsDetailResponse + from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes as BaseResponseGenerateFunctionDataTypes + from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList as BaseResponseGenerationStatusList + from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse as BaseResponseGetAiDecompilationRatingResponse + from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask as BaseResponseGetAiDecompilationTask + from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse as BaseResponseGetPublicUserResponse + from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse as BaseResponseGetUserResponse + from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults as BaseResponseListCollectionResults + from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse as BaseResponseListCommentResponse + from revengai.models.base_response_list_die_match import BaseResponseListDieMatch as BaseResponseListDieMatch + from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence as BaseResponseListFunctionBoxPlotConfidence + from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory + from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM + from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse as BaseResponseListSimilarFunctionsResponse + from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence as BaseResponseListTagOriginBoxPlotConfidence + from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse + from revengai.models.base_response_login_response import BaseResponseLoginResponse as BaseResponseLoginResponse + 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_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis as BaseResponseNearestNeighborAnalysis + from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse + from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams + from revengai.models.base_response_process_dumps import BaseResponseProcessDumps as BaseResponseProcessDumps + from revengai.models.base_response_process_registry import BaseResponseProcessRegistry as BaseResponseProcessRegistry + from revengai.models.base_response_process_tree import BaseResponseProcessTree as BaseResponseProcessTree + from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse as BaseResponseQueuedSecurityChecksTaskResponse + from revengai.models.base_response_recent import BaseResponseRecent as BaseResponseRecent + from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse as BaseResponseSecurityChecksResponse + 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_symbols_info import BaseResponseSymbolsInfo as BaseResponseSymbolsInfo + from revengai.models.base_response_ttps import BaseResponseTTPS as BaseResponseTTPS + from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse as BaseResponseTagSearchResponse + from revengai.models.base_response_task_response import BaseResponseTaskResponse as BaseResponseTaskResponse + from revengai.models.base_response_upload_response import BaseResponseUploadResponse as BaseResponseUploadResponse + from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities as BaseResponseVulnerabilities + from revengai.models.basic import Basic as Basic + from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse as BinaryAdditionalDetailsDataResponse + from revengai.models.binary_additional_response import BinaryAdditionalResponse as BinaryAdditionalResponse + from revengai.models.binary_ann_form import BinaryAnnForm as BinaryAnnForm + from revengai.models.binary_ann_list_response import BinaryAnnListResponse as BinaryAnnListResponse + from revengai.models.binary_config import BinaryConfig as BinaryConfig + from revengai.models.binary_details_response import BinaryDetailsResponse as BinaryDetailsResponse + from revengai.models.binary_externals_response import BinaryExternalsResponse as BinaryExternalsResponse + from revengai.models.binary_search_response import BinarySearchResponse as BinarySearchResponse + from revengai.models.binary_search_result import BinarySearchResult as BinarySearchResult + from revengai.models.binary_task_status import BinaryTaskStatus as BinaryTaskStatus + from revengai.models.block import Block as Block + from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse as BlockCommentsGenerationForFunctionResponse + from revengai.models.boundary import Boundary as Boundary + from revengai.models.box_plot_confidence import BoxPlotConfidence as BoxPlotConfidence + from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo + from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse as CalleesCallerFunctionsResponse + from revengai.models.caller_function_info import CallerFunctionInfo as CallerFunctionInfo + from revengai.models.capabilities import Capabilities as Capabilities + from revengai.models.capability import Capability as Capability + from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse as CheckSecurityChecksTaskResponse + from revengai.models.child_binaries_response import ChildBinariesResponse as ChildBinariesResponse + from revengai.models.code_signature_model import CodeSignatureModel as CodeSignatureModel + from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest as CollectionBinariesUpdateRequest + from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse as CollectionBinariesUpdateResponse + from revengai.models.collection_binary_response import CollectionBinaryResponse as CollectionBinaryResponse + from revengai.models.collection_create_request import CollectionCreateRequest as CollectionCreateRequest + from revengai.models.collection_list_item import CollectionListItem as CollectionListItem + from revengai.models.collection_response import CollectionResponse as CollectionResponse + from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner as CollectionResponseBinariesInner + from revengai.models.collection_scope import CollectionScope as CollectionScope + from revengai.models.collection_search_response import CollectionSearchResponse as CollectionSearchResponse + from revengai.models.collection_search_result import CollectionSearchResult as CollectionSearchResult + from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest as CollectionTagsUpdateRequest + from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse as CollectionTagsUpdateResponse + from revengai.models.collection_update_request import CollectionUpdateRequest as CollectionUpdateRequest + from revengai.models.comment_base import CommentBase as CommentBase + from revengai.models.comment_response import CommentResponse as CommentResponse + from revengai.models.comment_update_request import CommentUpdateRequest as CommentUpdateRequest + from revengai.models.communities import Communities as Communities + from revengai.models.community_match_percentages import CommunityMatchPercentages as CommunityMatchPercentages + from revengai.models.confidence_type import ConfidenceType as ConfidenceType + from revengai.models.context import Context as Context + from revengai.models.created import Created as Created + from revengai.models.decompilation_comment_context import DecompilationCommentContext as DecompilationCommentContext + from revengai.models.decompilation_response import DecompilationResponse as DecompilationResponse + from revengai.models.die_match import DieMatch as DieMatch + from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput as DynamicExecutionStatusInput + from revengai.models.elf_import_model import ELFImportModel as ELFImportModel + from revengai.models.elf_model import ELFModel as ELFModel + from revengai.models.elf_relocation import ELFRelocation as ELFRelocation + from revengai.models.elf_section import ELFSection as ELFSection + from revengai.models.elf_security import ELFSecurity as ELFSecurity + 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.entrypoint_model import EntrypointModel as EntrypointModel + from revengai.models.enumeration import Enumeration as Enumeration + from revengai.models.error_model import ErrorModel as ErrorModel + from revengai.models.export_model import ExportModel as ExportModel + from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult as ExportedBinaryAnnResult + from revengai.models.external_response import ExternalResponse as ExternalResponse + 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.filters import Filters as Filters + from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData as FunctionAnalysisThreatScoreData + from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse + from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse + from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse + from revengai.models.function_boundary import FunctionBoundary as FunctionBoundary + from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence as FunctionBoxPlotConfidence + from revengai.models.function_capability_response import FunctionCapabilityResponse as FunctionCapabilityResponse + from revengai.models.function_comment_create_request import FunctionCommentCreateRequest as FunctionCommentCreateRequest + from revengai.models.function_data_types import FunctionDataTypes as FunctionDataTypes + from revengai.models.function_data_types_list import FunctionDataTypesList as FunctionDataTypesList + from revengai.models.function_data_types_list_item import FunctionDataTypesListItem as FunctionDataTypesListItem + from revengai.models.function_data_types_params import FunctionDataTypesParams as FunctionDataTypesParams + from revengai.models.function_data_types_status import FunctionDataTypesStatus as FunctionDataTypesStatus + from revengai.models.function_header import FunctionHeader as FunctionHeader + from revengai.models.function_info_input import FunctionInfoInput as FunctionInfoInput + from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner as FunctionInfoInputFuncDepsInner + from revengai.models.function_info_output import FunctionInfoOutput as FunctionInfoOutput + from revengai.models.function_local_variable_response import FunctionLocalVariableResponse as FunctionLocalVariableResponse + from revengai.models.function_mapping_full import FunctionMappingFull as FunctionMappingFull + from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody + from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory + from revengai.models.function_name_input import FunctionNameInput as FunctionNameInput + from revengai.models.function_param_response import FunctionParamResponse as FunctionParamResponse + from revengai.models.function_rename import FunctionRename as FunctionRename + from revengai.models.function_rename_map import FunctionRenameMap as FunctionRenameMap + from revengai.models.function_search_response import FunctionSearchResponse as FunctionSearchResponse + from revengai.models.function_search_result import FunctionSearchResult as FunctionSearchResult + from revengai.models.function_string import FunctionString as FunctionString + from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse + from revengai.models.function_task_response import FunctionTaskResponse as FunctionTaskResponse + from revengai.models.function_task_status import FunctionTaskStatus as FunctionTaskStatus + from revengai.models.function_threat_score import FunctionThreatScore as FunctionThreatScore + from revengai.models.function_type_input import FunctionTypeInput as FunctionTypeInput + from revengai.models.function_type_output import FunctionTypeOutput as FunctionTypeOutput + from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse + from revengai.models.functions_list_rename import FunctionsListRename as FunctionsListRename + from revengai.models.generate_function_data_types import GenerateFunctionDataTypes as GenerateFunctionDataTypes + from revengai.models.generation_status_list import GenerationStatusList as GenerationStatusList + from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse as GetAiDecompilationRatingResponse + from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask as GetAiDecompilationTask + from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse + from revengai.models.get_user_response import GetUserResponse as GetUserResponse + from revengai.models.global_variable import GlobalVariable as GlobalVariable + 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.inverse_function_map_item import InverseFunctionMapItem as InverseFunctionMapItem + from revengai.models.inverse_string_map_item import InverseStringMapItem as InverseStringMapItem + from revengai.models.inverse_value import InverseValue as InverseValue + from revengai.models.list_collection_results import ListCollectionResults as ListCollectionResults + from revengai.models.login_request import LoginRequest as LoginRequest + from revengai.models.login_response import LoginResponse as LoginResponse + from revengai.models.logs import Logs as Logs + from revengai.models.matched_function_group import MatchedFunctionGroup as MatchedFunctionGroup + from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion as MatchedFunctionSuggestion + from revengai.models.meta_model import MetaModel as MetaModel + from revengai.models.model_name import ModelName as ModelName + from revengai.models.models_response import ModelsResponse as ModelsResponse + from revengai.models.nearest_neighbor import NearestNeighbor as NearestNeighbor + from revengai.models.network_overview_dns import NetworkOverviewDns as NetworkOverviewDns + from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer as NetworkOverviewDnsAnswer + from revengai.models.network_overview_metadata import NetworkOverviewMetadata as NetworkOverviewMetadata + from revengai.models.network_overview_response import NetworkOverviewResponse as NetworkOverviewResponse + from revengai.models.order import Order as Order + from revengai.models.origin import Origin as Origin + from revengai.models.pdb_debug_model import PDBDebugModel as PDBDebugModel + from revengai.models.pe_model import PEModel as PEModel + from revengai.models.pagination_model import PaginationModel as PaginationModel + from revengai.models.params import Params as Params + from revengai.models.platform import Platform as Platform + from revengai.models.process import Process as Process + from revengai.models.process_dump import ProcessDump as ProcessDump + from revengai.models.process_dump_metadata import ProcessDumpMetadata as ProcessDumpMetadata + from revengai.models.process_dumps import ProcessDumps as ProcessDumps + from revengai.models.process_dumps_data import ProcessDumpsData as ProcessDumpsData + from revengai.models.process_registry import ProcessRegistry as ProcessRegistry + from revengai.models.process_tree import ProcessTree as ProcessTree + from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse as QueuedSecurityChecksTaskResponse + from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm + from revengai.models.recent import Recent as Recent + from revengai.models.registry import Registry as Registry + from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse + from revengai.models.sbom import SBOM as SBOM + from revengai.models.sbom_package import SBOMPackage as SBOMPackage + from revengai.models.sandbox_options import SandboxOptions as SandboxOptions + from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig as ScrapeThirdPartyConfig + from revengai.models.search_binary_ids import SearchBinaryIds as SearchBinaryIds + from revengai.models.search_function_ids import SearchFunctionIds as SearchFunctionIds + from revengai.models.section_model import SectionModel as SectionModel + from revengai.models.security_checks_response import SecurityChecksResponse as SecurityChecksResponse + from revengai.models.security_checks_result import SecurityChecksResult as SecurityChecksResult + from revengai.models.security_model import SecurityModel as SecurityModel + from revengai.models.severity_type import SeverityType as SeverityType + from revengai.models.similar_functions_response import SimilarFunctionsResponse as SimilarFunctionsResponse + from revengai.models.single_code_certificate_model import SingleCodeCertificateModel as SingleCodeCertificateModel + from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel + from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel + from revengai.models.single_section_model import SingleSectionModel as SingleSectionModel + from revengai.models.stack_variable import StackVariable as StackVariable + from revengai.models.status_input import StatusInput as StatusInput + from revengai.models.status_output import StatusOutput as StatusOutput + from revengai.models.string_functions import StringFunctions as StringFunctions + from revengai.models.structure import Structure as Structure + from revengai.models.structure_member import StructureMember as StructureMember + from revengai.models.symbols import Symbols as Symbols + from revengai.models.symbols_info import SymbolsInfo as SymbolsInfo + from revengai.models.ttps import TTPS as TTPS + from revengai.models.ttps_attack import TTPSAttack as TTPSAttack + from revengai.models.ttps_data import TTPSData as TTPSData + from revengai.models.ttps_element import TTPSElement as TTPSElement + from revengai.models.ttps_occurance import TTPSOccurance as TTPSOccurance + from revengai.models.tag import Tag as Tag + from revengai.models.tag_confidence_body import TagConfidenceBody as TagConfidenceBody + from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence as TagOriginBoxPlotConfidence + from revengai.models.tag_response import TagResponse as TagResponse + from revengai.models.tag_search_response import TagSearchResponse as TagSearchResponse + from revengai.models.tag_search_result import TagSearchResult as TagSearchResult + from revengai.models.tags import Tags as Tags + from revengai.models.task_response import TaskResponse as TaskResponse + from revengai.models.task_status import TaskStatus as TaskStatus + from revengai.models.threat_score_function_body import ThreatScoreFunctionBody as ThreatScoreFunctionBody + from revengai.models.timestamp_model import TimestampModel as TimestampModel + from revengai.models.type_definition import TypeDefinition as TypeDefinition + from revengai.models.unstrip_request import UnstripRequest as UnstripRequest + from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes + from revengai.models.upload_file_type import UploadFileType as UploadFileType + from revengai.models.upload_response import UploadResponse as UploadResponse + from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest as UpsertAiDecomplationRatingRequest + from revengai.models.user_activity_response import UserActivityResponse as UserActivityResponse + from revengai.models.vulnerabilities import Vulnerabilities as Vulnerabilities + from revengai.models.vulnerability import Vulnerability as Vulnerability + from revengai.models.vulnerability_type import VulnerabilityType as VulnerabilityType + from revengai.models.workspace import Workspace as Workspace + +else: + from lazy_imports import LazyModule, as_package, load + + load( + LazyModule( + *as_package(__file__), + ("__version__", __version__), + ("__all__", __all__), + """# import apis into sdk package +from revengai.api.analyses_comments_api import AnalysesCommentsApi as AnalysesCommentsApi +from revengai.api.analyses_core_api import AnalysesCoreApi as AnalysesCoreApi +from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi as AnalysesDynamicExecutionApi +from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi as AnalysesResultsMetadataApi +from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi as AnalysesSecurityChecksApi +from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi +from revengai.api.binaries_api import BinariesApi as BinariesApi +from revengai.api.collections_api import CollectionsApi as CollectionsApi +from revengai.api.confidence_api import ConfidenceApi as ConfidenceApi +from revengai.api.external_sources_api import ExternalSourcesApi as ExternalSourcesApi +from revengai.api.firmware_api import FirmwareApi as FirmwareApi +from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi as FunctionsAIDecompilationApi +from revengai.api.functions_block_comments_api import FunctionsBlockCommentsApi as FunctionsBlockCommentsApi +from revengai.api.functions_core_api import FunctionsCoreApi as FunctionsCoreApi +from revengai.api.functions_data_types_api import FunctionsDataTypesApi as FunctionsDataTypesApi +from revengai.api.functions_decompilation_api import FunctionsDecompilationApi as FunctionsDecompilationApi +from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi as FunctionsRenamingHistoryApi +from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi as FunctionsThreatScoreApi +from revengai.api.models_api import ModelsApi as ModelsApi +from revengai.api.search_api import SearchApi as SearchApi + +# import ApiClient +from revengai.api_response import ApiResponse as ApiResponse +from revengai.api_client import ApiClient as ApiClient +from revengai.configuration import Configuration as Configuration +from revengai.exceptions import OpenApiException as OpenApiException +from revengai.exceptions import ApiTypeError as ApiTypeError +from revengai.exceptions import ApiValueError as ApiValueError +from revengai.exceptions import ApiKeyError as ApiKeyError +from revengai.exceptions import ApiAttributeError as ApiAttributeError +from revengai.exceptions import ApiException as ApiException + +# import models into sdk package +from revengai.models.ann_function import ANNFunction as ANNFunction +from revengai.models.addr import Addr as Addr +from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating +from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest +from revengai.models.analysis_access_info import AnalysisAccessInfo as AnalysisAccessInfo +from revengai.models.analysis_config import AnalysisConfig as AnalysisConfig +from revengai.models.analysis_create_request import AnalysisCreateRequest as AnalysisCreateRequest +from revengai.models.analysis_create_response import AnalysisCreateResponse as AnalysisCreateResponse +from revengai.models.analysis_detail_response import AnalysisDetailResponse as AnalysisDetailResponse +from revengai.models.analysis_functions import AnalysisFunctions as AnalysisFunctions +from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord +from revengai.models.analysis_scope import AnalysisScope as AnalysisScope +from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse +from revengai.models.analysis_tags import AnalysisTags as AnalysisTags +from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData as AnalysisThreatScoreData +from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest +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.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus as AppApiRestV2AnalysesEnumsDynamicExecutionStatus +from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy +from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem as AppApiRestV2AnalysesResponsesTagItem +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction +from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction +from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem as AppServicesBinaryAnnSchemaTagItem +from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus +from revengai.models.argument import Argument as Argument +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse as AutoUnstripByGroupResponse +from revengai.models.auto_unstrip_request import AutoUnstripRequest as AutoUnstripRequest +from revengai.models.auto_unstrip_response import AutoUnstripResponse as AutoUnstripResponse +from revengai.models.base_response import BaseResponse as BaseResponse +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse as BaseResponseAnalysisCreateResponse +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse as BaseResponseAnalysisDetailResponse +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData as BaseResponseAnalysisThreatScoreData +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse as BaseResponseAnalysisUpdateTagsResponse +from revengai.models.base_response_basic import BaseResponseBasic as BaseResponseBasic +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse as BaseResponseBinaryAdditionalResponse +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse as BaseResponseBinaryAnnListResponse +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse as BaseResponseBinaryDetailsResponse +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse as BaseResponseBinaryExternalsResponse +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse as BaseResponseBinarySearchResponse +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse as BaseResponseBlockCommentsGenerationForFunctionResponse +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse as BaseResponseBlockCommentsOverviewGenerationResponse +from revengai.models.base_response_bool import BaseResponseBool as BaseResponseBool +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence as BaseResponseBoxPlotConfidence +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse as BaseResponseCalleesCallerFunctionsResponse +from revengai.models.base_response_capabilities import BaseResponseCapabilities as BaseResponseCapabilities +from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse as BaseResponseCheckSecurityChecksTaskResponse +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse as BaseResponseChildBinariesResponse +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse as BaseResponseCollectionBinariesUpdateResponse +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse as BaseResponseCollectionResponse +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse as BaseResponseCollectionSearchResponse +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse as BaseResponseCollectionTagsUpdateResponse +from revengai.models.base_response_comment_response import BaseResponseCommentResponse as BaseResponseCommentResponse +from revengai.models.base_response_communities import BaseResponseCommunities as BaseResponseCommunities +from revengai.models.base_response_created import BaseResponseCreated as BaseResponseCreated +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse as BaseResponseDecompilationResponse +from revengai.models.base_response_dict import BaseResponseDict as BaseResponseDict +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus as BaseResponseDynamicExecutionStatus +from revengai.models.base_response_external_response import BaseResponseExternalResponse as BaseResponseExternalResponse +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData as BaseResponseFunctionAnalysisThreatScoreData +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse as BaseResponseFunctionBlocksResponse +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse as BaseResponseFunctionCapabilityResponse +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes as BaseResponseFunctionDataTypes +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList as BaseResponseFunctionDataTypesList +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse as BaseResponseFunctionSearchResponse +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse as BaseResponseFunctionStringsResponse +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse as BaseResponseFunctionTaskResponse +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore as BaseResponseFunctionThreatScore +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse as BaseResponseFunctionsDetailResponse +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes as BaseResponseGenerateFunctionDataTypes +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList as BaseResponseGenerationStatusList +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse as BaseResponseGetAiDecompilationRatingResponse +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask as BaseResponseGetAiDecompilationTask +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse as BaseResponseGetPublicUserResponse +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse as BaseResponseGetUserResponse +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults as BaseResponseListCollectionResults +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse as BaseResponseListCommentResponse +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch as BaseResponseListDieMatch +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence as BaseResponseListFunctionBoxPlotConfidence +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory +from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse as BaseResponseListSimilarFunctionsResponse +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence as BaseResponseListTagOriginBoxPlotConfidence +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse +from revengai.models.base_response_login_response import BaseResponseLoginResponse as BaseResponseLoginResponse +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_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis as BaseResponseNearestNeighborAnalysis +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse +from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps as BaseResponseProcessDumps +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry as BaseResponseProcessRegistry +from revengai.models.base_response_process_tree import BaseResponseProcessTree as BaseResponseProcessTree +from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse as BaseResponseQueuedSecurityChecksTaskResponse +from revengai.models.base_response_recent import BaseResponseRecent as BaseResponseRecent +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse as BaseResponseSecurityChecksResponse +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_symbols_info import BaseResponseSymbolsInfo as BaseResponseSymbolsInfo +from revengai.models.base_response_ttps import BaseResponseTTPS as BaseResponseTTPS +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse as BaseResponseTagSearchResponse +from revengai.models.base_response_task_response import BaseResponseTaskResponse as BaseResponseTaskResponse +from revengai.models.base_response_upload_response import BaseResponseUploadResponse as BaseResponseUploadResponse +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities as BaseResponseVulnerabilities +from revengai.models.basic import Basic as Basic +from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse as BinaryAdditionalDetailsDataResponse +from revengai.models.binary_additional_response import BinaryAdditionalResponse as BinaryAdditionalResponse +from revengai.models.binary_ann_form import BinaryAnnForm as BinaryAnnForm +from revengai.models.binary_ann_list_response import BinaryAnnListResponse as BinaryAnnListResponse +from revengai.models.binary_config import BinaryConfig as BinaryConfig +from revengai.models.binary_details_response import BinaryDetailsResponse as BinaryDetailsResponse +from revengai.models.binary_externals_response import BinaryExternalsResponse as BinaryExternalsResponse +from revengai.models.binary_search_response import BinarySearchResponse as BinarySearchResponse +from revengai.models.binary_search_result import BinarySearchResult as BinarySearchResult +from revengai.models.binary_task_status import BinaryTaskStatus as BinaryTaskStatus +from revengai.models.block import Block as Block +from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse as BlockCommentsGenerationForFunctionResponse +from revengai.models.boundary import Boundary as Boundary +from revengai.models.box_plot_confidence import BoxPlotConfidence as BoxPlotConfidence +from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo +from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse as CalleesCallerFunctionsResponse +from revengai.models.caller_function_info import CallerFunctionInfo as CallerFunctionInfo +from revengai.models.capabilities import Capabilities as Capabilities +from revengai.models.capability import Capability as Capability +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse as CheckSecurityChecksTaskResponse +from revengai.models.child_binaries_response import ChildBinariesResponse as ChildBinariesResponse +from revengai.models.code_signature_model import CodeSignatureModel as CodeSignatureModel +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest as CollectionBinariesUpdateRequest +from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse as CollectionBinariesUpdateResponse +from revengai.models.collection_binary_response import CollectionBinaryResponse as CollectionBinaryResponse +from revengai.models.collection_create_request import CollectionCreateRequest as CollectionCreateRequest +from revengai.models.collection_list_item import CollectionListItem as CollectionListItem +from revengai.models.collection_response import CollectionResponse as CollectionResponse +from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner as CollectionResponseBinariesInner +from revengai.models.collection_scope import CollectionScope as CollectionScope +from revengai.models.collection_search_response import CollectionSearchResponse as CollectionSearchResponse +from revengai.models.collection_search_result import CollectionSearchResult as CollectionSearchResult +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest as CollectionTagsUpdateRequest +from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse as CollectionTagsUpdateResponse +from revengai.models.collection_update_request import CollectionUpdateRequest as CollectionUpdateRequest +from revengai.models.comment_base import CommentBase as CommentBase +from revengai.models.comment_response import CommentResponse as CommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest as CommentUpdateRequest +from revengai.models.communities import Communities as Communities +from revengai.models.community_match_percentages import CommunityMatchPercentages as CommunityMatchPercentages +from revengai.models.confidence_type import ConfidenceType as ConfidenceType +from revengai.models.context import Context as Context +from revengai.models.created import Created as Created +from revengai.models.decompilation_comment_context import DecompilationCommentContext as DecompilationCommentContext +from revengai.models.decompilation_response import DecompilationResponse as DecompilationResponse +from revengai.models.die_match import DieMatch as DieMatch +from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput as DynamicExecutionStatusInput +from revengai.models.elf_import_model import ELFImportModel as ELFImportModel +from revengai.models.elf_model import ELFModel as ELFModel +from revengai.models.elf_relocation import ELFRelocation as ELFRelocation +from revengai.models.elf_section import ELFSection as ELFSection +from revengai.models.elf_security import ELFSecurity as ELFSecurity +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.entrypoint_model import EntrypointModel as EntrypointModel +from revengai.models.enumeration import Enumeration as Enumeration +from revengai.models.error_model import ErrorModel as ErrorModel +from revengai.models.export_model import ExportModel as ExportModel +from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult as ExportedBinaryAnnResult +from revengai.models.external_response import ExternalResponse as ExternalResponse +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.filters import Filters as Filters +from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData as FunctionAnalysisThreatScoreData +from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse +from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse +from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse +from revengai.models.function_boundary import FunctionBoundary as FunctionBoundary +from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence as FunctionBoxPlotConfidence +from revengai.models.function_capability_response import FunctionCapabilityResponse as FunctionCapabilityResponse +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest as FunctionCommentCreateRequest +from revengai.models.function_data_types import FunctionDataTypes as FunctionDataTypes +from revengai.models.function_data_types_list import FunctionDataTypesList as FunctionDataTypesList +from revengai.models.function_data_types_list_item import FunctionDataTypesListItem as FunctionDataTypesListItem +from revengai.models.function_data_types_params import FunctionDataTypesParams as FunctionDataTypesParams +from revengai.models.function_data_types_status import FunctionDataTypesStatus as FunctionDataTypesStatus +from revengai.models.function_header import FunctionHeader as FunctionHeader +from revengai.models.function_info_input import FunctionInfoInput as FunctionInfoInput +from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner as FunctionInfoInputFuncDepsInner +from revengai.models.function_info_output import FunctionInfoOutput as FunctionInfoOutput +from revengai.models.function_local_variable_response import FunctionLocalVariableResponse as FunctionLocalVariableResponse +from revengai.models.function_mapping_full import FunctionMappingFull as FunctionMappingFull +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody +from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory +from revengai.models.function_name_input import FunctionNameInput as FunctionNameInput +from revengai.models.function_param_response import FunctionParamResponse as FunctionParamResponse +from revengai.models.function_rename import FunctionRename as FunctionRename +from revengai.models.function_rename_map import FunctionRenameMap as FunctionRenameMap +from revengai.models.function_search_response import FunctionSearchResponse as FunctionSearchResponse +from revengai.models.function_search_result import FunctionSearchResult as FunctionSearchResult +from revengai.models.function_string import FunctionString as FunctionString +from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse +from revengai.models.function_task_response import FunctionTaskResponse as FunctionTaskResponse +from revengai.models.function_task_status import FunctionTaskStatus as FunctionTaskStatus +from revengai.models.function_threat_score import FunctionThreatScore as FunctionThreatScore +from revengai.models.function_type_input import FunctionTypeInput as FunctionTypeInput +from revengai.models.function_type_output import FunctionTypeOutput as FunctionTypeOutput +from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse +from revengai.models.functions_list_rename import FunctionsListRename as FunctionsListRename +from revengai.models.generate_function_data_types import GenerateFunctionDataTypes as GenerateFunctionDataTypes +from revengai.models.generation_status_list import GenerationStatusList as GenerationStatusList +from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse as GetAiDecompilationRatingResponse +from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask as GetAiDecompilationTask +from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse +from revengai.models.get_user_response import GetUserResponse as GetUserResponse +from revengai.models.global_variable import GlobalVariable as GlobalVariable +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.inverse_function_map_item import InverseFunctionMapItem as InverseFunctionMapItem +from revengai.models.inverse_string_map_item import InverseStringMapItem as InverseStringMapItem +from revengai.models.inverse_value import InverseValue as InverseValue +from revengai.models.list_collection_results import ListCollectionResults as ListCollectionResults +from revengai.models.login_request import LoginRequest as LoginRequest +from revengai.models.login_response import LoginResponse as LoginResponse +from revengai.models.logs import Logs as Logs +from revengai.models.matched_function_group import MatchedFunctionGroup as MatchedFunctionGroup +from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion as MatchedFunctionSuggestion +from revengai.models.meta_model import MetaModel as MetaModel +from revengai.models.model_name import ModelName as ModelName +from revengai.models.models_response import ModelsResponse as ModelsResponse +from revengai.models.nearest_neighbor import NearestNeighbor as NearestNeighbor +from revengai.models.network_overview_dns import NetworkOverviewDns as NetworkOverviewDns +from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer as NetworkOverviewDnsAnswer +from revengai.models.network_overview_metadata import NetworkOverviewMetadata as NetworkOverviewMetadata +from revengai.models.network_overview_response import NetworkOverviewResponse as NetworkOverviewResponse +from revengai.models.order import Order as Order +from revengai.models.origin import Origin as Origin +from revengai.models.pdb_debug_model import PDBDebugModel as PDBDebugModel +from revengai.models.pe_model import PEModel as PEModel +from revengai.models.pagination_model import PaginationModel as PaginationModel +from revengai.models.params import Params as Params +from revengai.models.platform import Platform as Platform +from revengai.models.process import Process as Process +from revengai.models.process_dump import ProcessDump as ProcessDump +from revengai.models.process_dump_metadata import ProcessDumpMetadata as ProcessDumpMetadata +from revengai.models.process_dumps import ProcessDumps as ProcessDumps +from revengai.models.process_dumps_data import ProcessDumpsData as ProcessDumpsData +from revengai.models.process_registry import ProcessRegistry as ProcessRegistry +from revengai.models.process_tree import ProcessTree as ProcessTree +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse as QueuedSecurityChecksTaskResponse +from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm +from revengai.models.recent import Recent as Recent +from revengai.models.registry import Registry as Registry +from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse +from revengai.models.sbom import SBOM as SBOM +from revengai.models.sbom_package import SBOMPackage as SBOMPackage +from revengai.models.sandbox_options import SandboxOptions as SandboxOptions +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig as ScrapeThirdPartyConfig +from revengai.models.search_binary_ids import SearchBinaryIds as SearchBinaryIds +from revengai.models.search_function_ids import SearchFunctionIds as SearchFunctionIds +from revengai.models.section_model import SectionModel as SectionModel +from revengai.models.security_checks_response import SecurityChecksResponse as SecurityChecksResponse +from revengai.models.security_checks_result import SecurityChecksResult as SecurityChecksResult +from revengai.models.security_model import SecurityModel as SecurityModel +from revengai.models.severity_type import SeverityType as SeverityType +from revengai.models.similar_functions_response import SimilarFunctionsResponse as SimilarFunctionsResponse +from revengai.models.single_code_certificate_model import SingleCodeCertificateModel as SingleCodeCertificateModel +from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel +from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel +from revengai.models.single_section_model import SingleSectionModel as SingleSectionModel +from revengai.models.stack_variable import StackVariable as StackVariable +from revengai.models.status_input import StatusInput as StatusInput +from revengai.models.status_output import StatusOutput as StatusOutput +from revengai.models.string_functions import StringFunctions as StringFunctions +from revengai.models.structure import Structure as Structure +from revengai.models.structure_member import StructureMember as StructureMember +from revengai.models.symbols import Symbols as Symbols +from revengai.models.symbols_info import SymbolsInfo as SymbolsInfo +from revengai.models.ttps import TTPS as TTPS +from revengai.models.ttps_attack import TTPSAttack as TTPSAttack +from revengai.models.ttps_data import TTPSData as TTPSData +from revengai.models.ttps_element import TTPSElement as TTPSElement +from revengai.models.ttps_occurance import TTPSOccurance as TTPSOccurance +from revengai.models.tag import Tag as Tag +from revengai.models.tag_confidence_body import TagConfidenceBody as TagConfidenceBody +from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence as TagOriginBoxPlotConfidence +from revengai.models.tag_response import TagResponse as TagResponse +from revengai.models.tag_search_response import TagSearchResponse as TagSearchResponse +from revengai.models.tag_search_result import TagSearchResult as TagSearchResult +from revengai.models.tags import Tags as Tags +from revengai.models.task_response import TaskResponse as TaskResponse +from revengai.models.task_status import TaskStatus as TaskStatus +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody as ThreatScoreFunctionBody +from revengai.models.timestamp_model import TimestampModel as TimestampModel +from revengai.models.type_definition import TypeDefinition as TypeDefinition +from revengai.models.unstrip_request import UnstripRequest as UnstripRequest +from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes +from revengai.models.upload_file_type import UploadFileType as UploadFileType +from revengai.models.upload_response import UploadResponse as UploadResponse +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest as UpsertAiDecomplationRatingRequest +from revengai.models.user_activity_response import UserActivityResponse as UserActivityResponse +from revengai.models.vulnerabilities import Vulnerabilities as Vulnerabilities +from revengai.models.vulnerability import Vulnerability as Vulnerability +from revengai.models.vulnerability_type import VulnerabilityType as VulnerabilityType +from revengai.models.workspace import Workspace as Workspace + +""", + name=__name__, + doc=__doc__, + ) + ) diff --git a/revengai/revengai/api/__init__.py b/revengai/revengai/api/__init__.py new file mode 100644 index 0000000..fe263b4 --- /dev/null +++ b/revengai/revengai/api/__init__.py @@ -0,0 +1,58 @@ +# flake8: noqa + +if __import__("typing").TYPE_CHECKING: + # import apis into api package + from revengai.api.analyses_comments_api import AnalysesCommentsApi + from revengai.api.analyses_core_api import AnalysesCoreApi + from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi + from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi + from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi + from revengai.api.authentication_users_api import AuthenticationUsersApi + from revengai.api.binaries_api import BinariesApi + from revengai.api.collections_api import CollectionsApi + from revengai.api.confidence_api import ConfidenceApi + from revengai.api.external_sources_api import ExternalSourcesApi + from revengai.api.firmware_api import FirmwareApi + from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi + from revengai.api.functions_block_comments_api import FunctionsBlockCommentsApi + from revengai.api.functions_core_api import FunctionsCoreApi + from revengai.api.functions_data_types_api import FunctionsDataTypesApi + from revengai.api.functions_decompilation_api import FunctionsDecompilationApi + from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi + from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi + from revengai.api.models_api import ModelsApi + from revengai.api.search_api import SearchApi + +else: + from lazy_imports import LazyModule, as_package, load + + load( + LazyModule( + *as_package(__file__), + """# import apis into api package +from revengai.api.analyses_comments_api import AnalysesCommentsApi +from revengai.api.analyses_core_api import AnalysesCoreApi +from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi +from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi +from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi +from revengai.api.authentication_users_api import AuthenticationUsersApi +from revengai.api.binaries_api import BinariesApi +from revengai.api.collections_api import CollectionsApi +from revengai.api.confidence_api import ConfidenceApi +from revengai.api.external_sources_api import ExternalSourcesApi +from revengai.api.firmware_api import FirmwareApi +from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi +from revengai.api.functions_block_comments_api import FunctionsBlockCommentsApi +from revengai.api.functions_core_api import FunctionsCoreApi +from revengai.api.functions_data_types_api import FunctionsDataTypesApi +from revengai.api.functions_decompilation_api import FunctionsDecompilationApi +from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi +from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi +from revengai.api.models_api import ModelsApi +from revengai.api.search_api import SearchApi + +""", + name=__name__, + doc=__doc__, + ) + ) diff --git a/revengai/revengai/api/analyses_comments_api.py b/revengai/revengai/api/analyses_comments_api.py new file mode 100644 index 0000000..ad6d91e --- /dev/null +++ b/revengai/revengai/api/analyses_comments_api.py @@ -0,0 +1,1260 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_bool import BaseResponseBool +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +from revengai.models.comment_base import CommentBase +from revengai.models.comment_update_request import CommentUpdateRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesCommentsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_analysis_comment( + self, + analysis_id: StrictInt, + comment_base: CommentBase, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Create a comment for this analysis + + Creates a comment associated with a specified analysis). + + :param analysis_id: (required) + :type analysis_id: int + :param comment_base: (required) + :type comment_base: CommentBase + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_comment_serialize( + analysis_id=analysis_id, + comment_base=comment_base, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_analysis_comment_with_http_info( + self, + analysis_id: StrictInt, + comment_base: CommentBase, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Create a comment for this analysis + + Creates a comment associated with a specified analysis). + + :param analysis_id: (required) + :type analysis_id: int + :param comment_base: (required) + :type comment_base: CommentBase + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_comment_serialize( + analysis_id=analysis_id, + comment_base=comment_base, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_analysis_comment_without_preload_content( + self, + analysis_id: StrictInt, + comment_base: CommentBase, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Create a comment for this analysis + + Creates a comment associated with a specified analysis). + + :param analysis_id: (required) + :type analysis_id: int + :param comment_base: (required) + :type comment_base: CommentBase + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_comment_serialize( + analysis_id=analysis_id, + comment_base=comment_base, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_analysis_comment_serialize( + self, + analysis_id, + comment_base, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if comment_base is not None: + _body_params = comment_base + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/comments', + 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 delete_analysis_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBool: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_analysis_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBool]: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_analysis_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_analysis_comment_serialize( + self, + comment_id, + analysis_id, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/analyses/{analysis_id}/comments/{comment_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 get_analysis_comments( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListCommentResponse: + """Get comments for this analysis + + Retrieves all comments created for a specific analysis. Only returns comments for resources the requesting user has access to. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_comments_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_analysis_comments_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListCommentResponse]: + """Get comments for this analysis + + Retrieves all comments created for a specific analysis. Only returns comments for resources the requesting user has access to. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_comments_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_analysis_comments_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get comments for this analysis + + Retrieves all comments created for a specific analysis. Only returns comments for resources the requesting user has access to. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_comments_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_comments_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/comments', + 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 update_analysis_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_analysis_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_analysis_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + analysis_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param analysis_id: (required) + :type analysis_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_comment_serialize( + comment_id=comment_id, + analysis_id=analysis_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_analysis_comment_serialize( + self, + comment_id, + analysis_id, + comment_update_request, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if comment_update_request is not None: + _body_params = comment_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/analyses/{analysis_id}/comments/{comment_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 + ) + + diff --git a/revengai/revengai/api/analyses_core_api.py b/revengai/revengai/api/analyses_core_api.py new file mode 100644 index 0000000..38d7b9a --- /dev/null +++ b/revengai/revengai/api/analyses_core_api.py @@ -0,0 +1,4643 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr +from typing import Any, List, Optional, Tuple, Union +from typing_extensions import Annotated +from revengai.models.ann_function import ANNFunction +from revengai.models.analysis_create_request import AnalysisCreateRequest +from revengai.models.analysis_update_request import AnalysisUpdateRequest +from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest +from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse +from revengai.models.base_response_basic import BaseResponseBasic +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse +from revengai.models.base_response_created import BaseResponseCreated +from revengai.models.base_response_dict import BaseResponseDict +from revengai.models.base_response_logs import BaseResponseLogs +from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis +from revengai.models.base_response_params import BaseResponseParams +from revengai.models.base_response_recent import BaseResponseRecent +from revengai.models.base_response_status import BaseResponseStatus +from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo +from revengai.models.base_response_upload_response import BaseResponseUploadResponse +from revengai.models.binary_ann_form import BinaryAnnForm +from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput +from revengai.models.model_name import ModelName +from revengai.models.order import Order +from revengai.models.re_analysis_form import ReAnalysisForm +from revengai.models.status_input import StatusInput +from revengai.models.upload_file_type import UploadFileType +from revengai.models.workspace import Workspace + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesCoreApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_analysis( + self, + analysis_create_request: AnalysisCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisCreateResponse: + """Create Analysis + + Begins an analysis + + :param analysis_create_request: (required) + :type analysis_create_request: AnalysisCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_serialize( + analysis_create_request=analysis_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseAnalysisCreateResponse", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "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 create_analysis_with_http_info( + self, + analysis_create_request: AnalysisCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisCreateResponse]: + """Create Analysis + + Begins an analysis + + :param analysis_create_request: (required) + :type analysis_create_request: AnalysisCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_serialize( + analysis_create_request=analysis_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseAnalysisCreateResponse", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "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 create_analysis_without_preload_content( + self, + analysis_create_request: AnalysisCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Create Analysis + + Begins an analysis + + :param analysis_create_request: (required) + :type analysis_create_request: AnalysisCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_analysis_serialize( + analysis_create_request=analysis_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseAnalysisCreateResponse", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_analysis_serialize( + self, + analysis_create_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if analysis_create_request is not None: + _body_params = analysis_create_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses', + 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 delete_analysis( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseDict: + """Delete Analysis + + Deletes an analysis based on the provided analysis ID. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "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 delete_analysis_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseDict]: + """Delete Analysis + + Deletes an analysis based on the provided analysis ID. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "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 delete_analysis_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Delete Analysis + + Deletes an analysis based on the provided analysis ID. + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_analysis_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_analysis_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/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 find_similar_functions_batch( + self, + analysis_id: StrictInt, + ann_function: ANNFunction, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseNearestNeighborAnalysis: + """Batch Symbol ANN using Analysis ID + + Takes a analysis ID and returns the nearest functions within the database that match those functions + + :param analysis_id: (required) + :type analysis_id: int + :param ann_function: (required) + :type ann_function: ANNFunction + :param authorization: API Key bearer token + :type authorization: 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._find_similar_functions_batch_serialize( + analysis_id=analysis_id, + ann_function=ann_function, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNearestNeighborAnalysis", + '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 find_similar_functions_batch_with_http_info( + self, + analysis_id: StrictInt, + ann_function: ANNFunction, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseNearestNeighborAnalysis]: + """Batch Symbol ANN using Analysis ID + + Takes a analysis ID and returns the nearest functions within the database that match those functions + + :param analysis_id: (required) + :type analysis_id: int + :param ann_function: (required) + :type ann_function: ANNFunction + :param authorization: API Key bearer token + :type authorization: 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._find_similar_functions_batch_serialize( + analysis_id=analysis_id, + ann_function=ann_function, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNearestNeighborAnalysis", + '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 find_similar_functions_batch_without_preload_content( + self, + analysis_id: StrictInt, + ann_function: ANNFunction, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Batch Symbol ANN using Analysis ID + + Takes a analysis ID and returns the nearest functions within the database that match those functions + + :param analysis_id: (required) + :type analysis_id: int + :param ann_function: (required) + :type ann_function: ANNFunction + :param authorization: API Key bearer token + :type authorization: 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._find_similar_functions_batch_serialize( + analysis_id=analysis_id, + ann_function=ann_function, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNearestNeighborAnalysis", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _find_similar_functions_batch_serialize( + self, + analysis_id, + ann_function, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if ann_function is not None: + _body_params = ann_function + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/similarity/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 get_analysis_basic_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBasic: + """Gets basic analysis information + + Just a random placeholder for now + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_basic_info_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBasic", + '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_analysis_basic_info_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBasic]: + """Gets basic analysis information + + Just a random placeholder for now + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_basic_info_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBasic", + '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_analysis_basic_info_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets basic analysis information + + Just a random placeholder for now + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_basic_info_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBasic", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_basic_info_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/basic', + 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_analysis_logs( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseLogs: + """Gets the logs of an analysis + + Given an analysis ID gets the current logs of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_logs_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLogs", + '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_analysis_logs_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseLogs]: + """Gets the logs of an analysis + + Given an analysis ID gets the current logs of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_logs_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLogs", + '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_analysis_logs_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the logs of an analysis + + Given an analysis ID gets the current logs of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_logs_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLogs", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_logs_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/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 get_analysis_params( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseParams: + """Gets analysis param information + + Gets the params that the analysis was run with + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_params_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseParams", + '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_analysis_params_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseParams]: + """Gets analysis param information + + Gets the params that the analysis was run with + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_params_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseParams", + '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_analysis_params_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets analysis param information + + Gets the params that the analysis was run with + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_params_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseParams", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_params_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/params', + 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_analysis_status( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseStatus: + """Gets the status of an analysis + + Given an analysis ID gets the current status of the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseStatus", + '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_analysis_status_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseStatus]: + """Gets the status of an analysis + + Given an analysis ID gets the current status of the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseStatus", + '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_analysis_status_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the status of an analysis + + Given an analysis ID gets the current status of the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseStatus", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_status_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/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 get_binary_ann( + self, + analysis_id: StrictInt, + binary_ann_form: BinaryAnnForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBinaryAnnListResponse: + """Binary Ann + + Binary Ann + + :param analysis_id: (required) + :type analysis_id: int + :param binary_ann_form: (required) + :type binary_ann_form: BinaryAnnForm + :param authorization: API Key bearer token + :type authorization: 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._get_binary_ann_serialize( + analysis_id=analysis_id, + binary_ann_form=binary_ann_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAnnListResponse", + '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_binary_ann_with_http_info( + self, + analysis_id: StrictInt, + binary_ann_form: BinaryAnnForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBinaryAnnListResponse]: + """Binary Ann + + Binary Ann + + :param analysis_id: (required) + :type analysis_id: int + :param binary_ann_form: (required) + :type binary_ann_form: BinaryAnnForm + :param authorization: API Key bearer token + :type authorization: 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._get_binary_ann_serialize( + analysis_id=analysis_id, + binary_ann_form=binary_ann_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAnnListResponse", + '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_binary_ann_without_preload_content( + self, + analysis_id: StrictInt, + binary_ann_form: BinaryAnnForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Binary Ann + + Binary Ann + + :param analysis_id: (required) + :type analysis_id: int + :param binary_ann_form: (required) + :type binary_ann_form: BinaryAnnForm + :param authorization: API Key bearer token + :type authorization: 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._get_binary_ann_serialize( + analysis_id=analysis_id, + binary_ann_form=binary_ann_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAnnListResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_ann_serialize( + self, + analysis_id, + binary_ann_form, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if binary_ann_form is not None: + _body_params = binary_ann_form + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/binary_ann/{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 get_symbol_info_for_binary( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseSymbolsInfo: + """Gets the symbol information of a binary + + Given a binary ID gets the symbol information of the binary + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_symbol_info_for_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSymbolsInfo", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "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_symbol_info_for_binary_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseSymbolsInfo]: + """Gets the symbol information of a binary + + Given a binary ID gets the symbol information of the binary + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_symbol_info_for_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSymbolsInfo", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "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_symbol_info_for_binary_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the symbol information of a binary + + Given a binary ID gets the symbol information of the binary + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_symbol_info_for_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSymbolsInfo", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_symbol_info_for_binary_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/symbol_info/{binary_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 list_analyses( + self, + search_term: Optional[StrictStr] = None, + workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None, + status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None, + model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None, + dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None, + usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseRecent: + """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 + + :param search_term: + :type search_term: str + :param workspace: The workspace to be viewed + :type workspace: List[Workspace] + :param status: The status of the analysis + :type status: List[StatusInput] + :param model_name: Show analysis belonging to the model + :type model_name: List[ModelName] + :param dynamic_execution_status: Show analysis that have a dynamic execution with the given status + :type dynamic_execution_status: DynamicExecutionStatusInput + :param usernames: Show analysis belonging to the user + :type usernames: List[Optional[str]] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2AnalysesEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_analyses_serialize( + search_term=search_term, + workspace=workspace, + status=status, + model_name=model_name, + dynamic_execution_status=dynamic_execution_status, + usernames=usernames, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRecent", + '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 list_analyses_with_http_info( + self, + search_term: Optional[StrictStr] = None, + workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None, + status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None, + model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None, + dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None, + usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseRecent]: + """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 + + :param search_term: + :type search_term: str + :param workspace: The workspace to be viewed + :type workspace: List[Workspace] + :param status: The status of the analysis + :type status: List[StatusInput] + :param model_name: Show analysis belonging to the model + :type model_name: List[ModelName] + :param dynamic_execution_status: Show analysis that have a dynamic execution with the given status + :type dynamic_execution_status: DynamicExecutionStatusInput + :param usernames: Show analysis belonging to the user + :type usernames: List[Optional[str]] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2AnalysesEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_analyses_serialize( + search_term=search_term, + workspace=workspace, + status=status, + model_name=model_name, + dynamic_execution_status=dynamic_execution_status, + usernames=usernames, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRecent", + '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 list_analyses_without_preload_content( + self, + search_term: Optional[StrictStr] = None, + workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None, + status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None, + model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None, + dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None, + usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """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 + + :param search_term: + :type search_term: str + :param workspace: The workspace to be viewed + :type workspace: List[Workspace] + :param status: The status of the analysis + :type status: List[StatusInput] + :param model_name: Show analysis belonging to the model + :type model_name: List[ModelName] + :param dynamic_execution_status: Show analysis that have a dynamic execution with the given status + :type dynamic_execution_status: DynamicExecutionStatusInput + :param usernames: Show analysis belonging to the user + :type usernames: List[Optional[str]] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2AnalysesEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_analyses_serialize( + search_term=search_term, + workspace=workspace, + status=status, + model_name=model_name, + dynamic_execution_status=dynamic_execution_status, + usernames=usernames, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseRecent", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_analyses_serialize( + self, + search_term, + workspace, + status, + model_name, + dynamic_execution_status, + usernames, + limit, + offset, + order_by, + order, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'workspace': 'multi', + 'status': 'multi', + 'model_name': 'multi', + 'usernames': 'multi', + } + + _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 + if search_term is not None: + + _query_params.append(('search_term', search_term)) + + if workspace is not None: + + _query_params.append(('workspace', workspace)) + + if status is not None: + + _query_params.append(('status', status)) + + if model_name is not None: + + _query_params.append(('model_name', model_name)) + + if dynamic_execution_status is not None: + + _query_params.append(('dynamic_execution_status', dynamic_execution_status.value)) + + if usernames is not None: + + _query_params.append(('usernames', usernames)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order_by is not None: + + _query_params.append(('order_by', order_by.value)) + + if order is not None: + + _query_params.append(('order', order.value)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/list', + 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 lookup_binary_id( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> object: + """Gets the analysis ID from binary ID + + Given an binary ID gets the ID of an analysis + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._lookup_binary_id_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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 lookup_binary_id_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[object]: + """Gets the analysis ID from binary ID + + Given an binary ID gets the ID of an analysis + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._lookup_binary_id_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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 lookup_binary_id_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the analysis ID from binary ID + + Given an binary ID gets the ID of an analysis + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._lookup_binary_id_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _lookup_binary_id_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/lookup/{binary_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 requeue_analysis( + self, + analysis_id: StrictInt, + re_analysis_form: ReAnalysisForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCreated: + """Requeue Analysis + + Re-queues an already uploaded analysis + + :param analysis_id: (required) + :type analysis_id: int + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param authorization: API Key bearer token + :type authorization: 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._requeue_analysis_serialize( + analysis_id=analysis_id, + re_analysis_form=re_analysis_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCreated", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "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 requeue_analysis_with_http_info( + self, + analysis_id: StrictInt, + re_analysis_form: ReAnalysisForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCreated]: + """Requeue Analysis + + Re-queues an already uploaded analysis + + :param analysis_id: (required) + :type analysis_id: int + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param authorization: API Key bearer token + :type authorization: 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._requeue_analysis_serialize( + analysis_id=analysis_id, + re_analysis_form=re_analysis_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCreated", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "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 requeue_analysis_without_preload_content( + self, + analysis_id: StrictInt, + re_analysis_form: ReAnalysisForm, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Requeue Analysis + + Re-queues an already uploaded analysis + + :param analysis_id: (required) + :type analysis_id: int + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param authorization: API Key bearer token + :type authorization: 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._requeue_analysis_serialize( + analysis_id=analysis_id, + re_analysis_form=re_analysis_form, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCreated", + '422': "BaseResponse", + '404': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _requeue_analysis_serialize( + self, + analysis_id, + re_analysis_form, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if re_analysis_form is not None: + _body_params = re_analysis_form + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/requeue', + 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 update_analysis( + self, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisDetailResponse: + """Update Analysis + + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_serialize( + analysis_id=analysis_id, + analysis_update_request=analysis_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisDetailResponse", + '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 update_analysis_with_http_info( + self, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisDetailResponse]: + """Update Analysis + + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_serialize( + analysis_id=analysis_id, + analysis_update_request=analysis_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisDetailResponse", + '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 update_analysis_without_preload_content( + self, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update Analysis + + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_serialize( + analysis_id=analysis_id, + analysis_update_request=analysis_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisDetailResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_analysis_serialize( + self, + analysis_id, + analysis_update_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if analysis_update_request is not None: + _body_params = analysis_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/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 update_analysis_tags( + self, + analysis_id: StrictInt, + analysis_update_tags_request: AnalysisUpdateTagsRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisUpdateTagsResponse: + """Update Analysis Tags + + Updates analysis tags. User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_tags_serialize( + analysis_id=analysis_id, + analysis_update_tags_request=analysis_update_tags_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisUpdateTagsResponse", + '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 update_analysis_tags_with_http_info( + self, + analysis_id: StrictInt, + analysis_update_tags_request: AnalysisUpdateTagsRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisUpdateTagsResponse]: + """Update Analysis Tags + + Updates analysis tags. User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_tags_serialize( + analysis_id=analysis_id, + analysis_update_tags_request=analysis_update_tags_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisUpdateTagsResponse", + '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 update_analysis_tags_without_preload_content( + self, + analysis_id: StrictInt, + analysis_update_tags_request: AnalysisUpdateTagsRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update Analysis Tags + + Updates analysis tags. User must be the owner. + + :param analysis_id: (required) + :type analysis_id: int + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param authorization: API Key bearer token + :type authorization: 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._update_analysis_tags_serialize( + analysis_id=analysis_id, + analysis_update_tags_request=analysis_update_tags_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisUpdateTagsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_analysis_tags_serialize( + self, + analysis_id, + analysis_update_tags_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if analysis_update_tags_request is not None: + _body_params = analysis_update_tags_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/analyses/{analysis_id}/tags', + 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 upload_file( + self, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + force_overwrite: Optional[StrictBool] = 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, + ) -> BaseResponseUploadResponse: + """Upload File + + + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param authorization: API Key bearer token + :type authorization: str + :param force_overwrite: + :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._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + authorization=authorization, + 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': "BaseResponseUploadResponse", + '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 upload_file_with_http_info( + self, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + force_overwrite: Optional[StrictBool] = 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[BaseResponseUploadResponse]: + """Upload File + + + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param authorization: API Key bearer token + :type authorization: str + :param force_overwrite: + :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._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + authorization=authorization, + 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': "BaseResponseUploadResponse", + '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 upload_file_without_preload_content( + self, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + force_overwrite: Optional[StrictBool] = 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 File + + + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param authorization: API Key bearer token + :type authorization: str + :param force_overwrite: + :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._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + authorization=authorization, + 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': "BaseResponseUploadResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upload_file_serialize( + self, + upload_file_type, + file, + packed_password, + authorization, + 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 + if packed_password is not None: + + _query_params.append(('packed_password', packed_password)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if upload_file_type is not None: + _form_params.append(('upload_file_type', upload_file_type)) + if file is not None: + _files['file'] = file + if force_overwrite is not None: + _form_params.append(('force_overwrite', force_overwrite)) + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/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/revengai/api/analyses_dynamic_execution_api.py b/revengai/revengai/api/analyses_dynamic_execution_api.py new file mode 100644 index 0000000..0e2dc40 --- /dev/null +++ b/revengai/revengai/api/analyses_dynamic_execution_api.py @@ -0,0 +1,1991 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Any, Optional +from typing_extensions import Annotated +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry +from revengai.models.base_response_process_tree import BaseResponseProcessTree +from revengai.models.base_response_ttps import BaseResponseTTPS + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesDynamicExecutionApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_dynamic_execution_status( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseDynamicExecutionStatus: + """Get the status of a dynamic execution task + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDynamicExecutionStatus", + '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_dynamic_execution_status_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseDynamicExecutionStatus]: + """Get the status of a dynamic execution task + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDynamicExecutionStatus", + '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_dynamic_execution_status_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the status of a dynamic execution task + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDynamicExecutionStatus", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dynamic_execution_status_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/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 get_network_overview( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseNetworkOverviewResponse: + """Get the dynamic execution results for network overview + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_network_overview_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNetworkOverviewResponse", + '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_network_overview_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseNetworkOverviewResponse]: + """Get the dynamic execution results for network overview + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_network_overview_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNetworkOverviewResponse", + '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_network_overview_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for network overview + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_network_overview_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseNetworkOverviewResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_network_overview_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/network-overview', + 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_process_dump( + self, + analysis_id: StrictInt, + dump_name: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> object: + """Get the dynamic execution results for a specific process dump + + + :param analysis_id: (required) + :type analysis_id: int + :param dump_name: (required) + :type dump_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_process_dump_serialize( + analysis_id=analysis_id, + dump_name=dump_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_process_dump_with_http_info( + self, + analysis_id: StrictInt, + dump_name: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[object]: + """Get the dynamic execution results for a specific process dump + + + :param analysis_id: (required) + :type analysis_id: int + :param dump_name: (required) + :type dump_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_process_dump_serialize( + analysis_id=analysis_id, + dump_name=dump_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_process_dump_without_preload_content( + self, + analysis_id: StrictInt, + dump_name: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for a specific process dump + + + :param analysis_id: (required) + :type analysis_id: int + :param dump_name: (required) + :type dump_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_process_dump_serialize( + analysis_id=analysis_id, + dump_name=dump_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_process_dump_serialize( + self, + analysis_id, + dump_name, + authorization, + _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 dump_name is not None: + _path_params['dump_name'] = dump_name + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/process-dumps/{dump_name}', + 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_process_dumps( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseProcessDumps: + """Get the dynamic execution results for process dumps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_dumps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessDumps", + '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_process_dumps_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseProcessDumps]: + """Get the dynamic execution results for process dumps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_dumps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessDumps", + '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_process_dumps_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for process dumps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_dumps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessDumps", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_process_dumps_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/process-dumps', + 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_process_registry( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseProcessRegistry: + """Get the dynamic execution results for process registry + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_registry_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessRegistry", + '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_process_registry_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseProcessRegistry]: + """Get the dynamic execution results for process registry + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_registry_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessRegistry", + '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_process_registry_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for process registry + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_registry_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessRegistry", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_process_registry_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/process-registry', + 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_process_tree( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseProcessTree: + """Get the dynamic execution results for process tree + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_tree_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessTree", + '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_process_tree_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseProcessTree]: + """Get the dynamic execution results for process tree + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_tree_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessTree", + '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_process_tree_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for process tree + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_process_tree_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseProcessTree", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_process_tree_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/process-tree', + 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_ttps( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseTTPS: + """Get the dynamic execution results for ttps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ttps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTTPS", + '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_ttps_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseTTPS]: + """Get the dynamic execution results for ttps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ttps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTTPS", + '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_ttps_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the dynamic execution results for ttps + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ttps_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTTPS", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ttps_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/ttps', + 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/revengai/api/analyses_results_metadata_api.py b/revengai/revengai/api/analyses_results_metadata_api.py new file mode 100644 index 0000000..96ed699 --- /dev/null +++ b/revengai/revengai/api/analyses_results_metadata_api.py @@ -0,0 +1,2324 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Any, Optional +from typing_extensions import Annotated +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData +from revengai.models.base_response_capabilities import BaseResponseCapabilities +from revengai.models.base_response_communities import BaseResponseCommunities +from revengai.models.base_response_list_sbom import BaseResponseListSBOM +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesResultsMetadataApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_capabilities( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCapabilities: + """Gets the capabilities from the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_capabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCapabilities", + '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_capabilities_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCapabilities]: + """Gets the capabilities from the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_capabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCapabilities", + '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_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the capabilities from the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_capabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCapabilities", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_capabilities_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/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_communities( + self, + analysis_id: StrictInt, + user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommunities: + """Gets the communities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param user_name: The user name to limit communities to + :type user_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_communities_serialize( + analysis_id=analysis_id, + user_name=user_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommunities", + '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_communities_with_http_info( + self, + analysis_id: StrictInt, + user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommunities]: + """Gets the communities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param user_name: The user name to limit communities to + :type user_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_communities_serialize( + analysis_id=analysis_id, + user_name=user_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommunities", + '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_communities_without_preload_content( + self, + analysis_id: StrictInt, + user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the communities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param user_name: The user name to limit communities to + :type user_name: str + :param authorization: API Key bearer token + :type authorization: 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._get_communities_serialize( + analysis_id=analysis_id, + user_name=user_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommunities", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_communities_serialize( + self, + analysis_id, + user_name, + authorization, + _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 user_name is not None: + + _query_params.append(('user_name', user_name)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/communities', + 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_functions_list( + self, + analysis_id: StrictInt, + search_term: Optional[StrictStr] = None, + min_v_addr: Optional[StrictInt] = None, + max_v_addr: Optional[StrictInt] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisFunctions: + """Gets functions from analysis + + Gets the functions identified during analysis + + :param analysis_id: (required) + :type analysis_id: int + :param search_term: + :type search_term: str + :param min_v_addr: + :type min_v_addr: int + :param max_v_addr: + :type max_v_addr: int + :param authorization: API Key bearer token + :type authorization: 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._get_functions_list_serialize( + analysis_id=analysis_id, + search_term=search_term, + min_v_addr=min_v_addr, + max_v_addr=max_v_addr, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisFunctions", + '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_functions_list_with_http_info( + self, + analysis_id: StrictInt, + search_term: Optional[StrictStr] = None, + min_v_addr: Optional[StrictInt] = None, + max_v_addr: Optional[StrictInt] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisFunctions]: + """Gets functions from analysis + + Gets the functions identified during analysis + + :param analysis_id: (required) + :type analysis_id: int + :param search_term: + :type search_term: str + :param min_v_addr: + :type min_v_addr: int + :param max_v_addr: + :type max_v_addr: int + :param authorization: API Key bearer token + :type authorization: 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._get_functions_list_serialize( + analysis_id=analysis_id, + search_term=search_term, + min_v_addr=min_v_addr, + max_v_addr=max_v_addr, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisFunctions", + '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_functions_list_without_preload_content( + self, + analysis_id: StrictInt, + search_term: Optional[StrictStr] = None, + min_v_addr: Optional[StrictInt] = None, + max_v_addr: Optional[StrictInt] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets functions from analysis + + Gets the functions identified during analysis + + :param analysis_id: (required) + :type analysis_id: int + :param search_term: + :type search_term: str + :param min_v_addr: + :type min_v_addr: int + :param max_v_addr: + :type max_v_addr: int + :param authorization: API Key bearer token + :type authorization: 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._get_functions_list_serialize( + analysis_id=analysis_id, + search_term=search_term, + min_v_addr=min_v_addr, + max_v_addr=max_v_addr, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisFunctions", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_functions_list_serialize( + self, + analysis_id, + search_term, + min_v_addr, + max_v_addr, + authorization, + _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 search_term is not None: + + _query_params.append(('search_term', search_term)) + + if min_v_addr is not None: + + _query_params.append(('min_v_addr', min_v_addr)) + + if max_v_addr is not None: + + _query_params.append(('max_v_addr', max_v_addr)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/list', + 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_pdf( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> object: + """Gets the PDF found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_pdf_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_pdf_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[object]: + """Gets the PDF found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_pdf_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_pdf_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the PDF found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_pdf_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_pdf_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/pdf', + 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_sbom( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListSBOM: + """Gets the software-bill-of-materials (SBOM) found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_sbom_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSBOM", + '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_sbom_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListSBOM]: + """Gets the software-bill-of-materials (SBOM) found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_sbom_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSBOM", + '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_sbom_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the software-bill-of-materials (SBOM) found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_sbom_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSBOM", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sbom_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/sbom', + 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_tags( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisTags: + """Get function tags with maliciousness score + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_tags_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisTags", + '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_tags_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisTags]: + """Get function tags with maliciousness score + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_tags_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisTags", + '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_tags_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get function tags with maliciousness score + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_tags_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisTags", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_tags_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/tags', + 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_threat_score( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisThreatScoreData: + """Gets the threat score found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisThreatScoreData", + '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_threat_score_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisThreatScoreData]: + """Gets the threat score found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisThreatScoreData", + '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_threat_score_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the threat score found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisThreatScoreData", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_threat_score_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/threat_score', + 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_vulnerabilities( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseVulnerabilities: + """Gets the vulnerabilities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vulnerabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseVulnerabilities", + '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_vulnerabilities_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseVulnerabilities]: + """Gets the vulnerabilities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vulnerabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseVulnerabilities", + '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_vulnerabilities_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the vulnerabilities found in the analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vulnerabilities_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseVulnerabilities", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_vulnerabilities_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/vulnerabilities', + 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/revengai/api/analyses_security_checks_api.py b/revengai/revengai/api/analyses_security_checks_api.py new file mode 100644 index 0000000..d74a6f6 --- /dev/null +++ b/revengai/revengai/api/analyses_security_checks_api.py @@ -0,0 +1,909 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesSecurityChecksApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_scurity_checks_task( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> QueuedSecurityChecksTaskResponse: + """Queues a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_scurity_checks_task_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "QueuedSecurityChecksTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + 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 create_scurity_checks_task_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[QueuedSecurityChecksTaskResponse]: + """Queues a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_scurity_checks_task_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "QueuedSecurityChecksTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + 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 create_scurity_checks_task_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Queues a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_scurity_checks_task_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "QueuedSecurityChecksTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_scurity_checks_task_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/security-checks', + 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_security_checks( + self, + analysis_id: StrictInt, + page: Annotated[int, Field(le=100000, strict=True, ge=1, description="The page number to retrieve.")], + page_size: Annotated[int, Field(strict=True, ge=1, description="Number of items per page.")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseSecurityChecksResponse: + """Get Security Checks + + Retrieve security checks results with pagination. + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. (required) + :type page: int + :param page_size: Number of items per page. (required) + :type page_size: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecurityChecksResponse", + '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_security_checks_with_http_info( + self, + analysis_id: StrictInt, + page: Annotated[int, Field(le=100000, strict=True, ge=1, description="The page number to retrieve.")], + page_size: Annotated[int, Field(strict=True, ge=1, description="Number of items per page.")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseSecurityChecksResponse]: + """Get Security Checks + + Retrieve security checks results with pagination. + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. (required) + :type page: int + :param page_size: Number of items per page. (required) + :type page_size: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecurityChecksResponse", + '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_security_checks_without_preload_content( + self, + analysis_id: StrictInt, + page: Annotated[int, Field(le=100000, strict=True, ge=1, description="The page number to retrieve.")], + page_size: Annotated[int, Field(strict=True, ge=1, description="Number of items per page.")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get Security Checks + + Retrieve security checks results with pagination. + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. (required) + :type page: int + :param page_size: Number of items per page. (required) + :type page_size: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseSecurityChecksResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_security_checks_serialize( + self, + analysis_id, + page, + page_size, + authorization, + _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)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/security-checks', + 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_security_checks_task_status( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> CheckSecurityChecksTaskResponse: + """Check the status of a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckSecurityChecksTaskResponse", + '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_security_checks_task_status_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[CheckSecurityChecksTaskResponse]: + """Check the status of a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckSecurityChecksTaskResponse", + '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_security_checks_task_status_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Check the status of a security check process + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_security_checks_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckSecurityChecksTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_security_checks_task_status_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/security-checks/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 + ) + + diff --git a/revengai/revengai/api/authentication_users_api.py b/revengai/revengai/api/authentication_users_api.py new file mode 100644 index 0000000..f3502a5 --- /dev/null +++ b/revengai/revengai/api/authentication_users_api.py @@ -0,0 +1,1386 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse +from revengai.models.base_response_login_response import BaseResponseLoginResponse +from revengai.models.login_request import LoginRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AuthenticationUsersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_requester_user_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGetUserResponse: + """Get the requesters user information + + + :param authorization: API Key bearer token + :type authorization: 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._get_requester_user_info_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetUserResponse", + '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_requester_user_info_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGetUserResponse]: + """Get the requesters user information + + + :param authorization: API Key bearer token + :type authorization: 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._get_requester_user_info_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetUserResponse", + '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_requester_user_info_without_preload_content( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get the requesters user information + + + :param authorization: API Key bearer token + :type authorization: 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._get_requester_user_info_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetUserResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_requester_user_info_serialize( + self, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/users/me', + 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_user( + self, + user_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGetPublicUserResponse: + """Get a user's public information + + + :param user_id: (required) + :type user_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_user_serialize( + user_id=user_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetPublicUserResponse", + '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_user_with_http_info( + self, + user_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGetPublicUserResponse]: + """Get a user's public information + + + :param user_id: (required) + :type user_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_user_serialize( + user_id=user_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetPublicUserResponse", + '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_user_without_preload_content( + self, + user_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get a user's public information + + + :param user_id: (required) + :type user_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_user_serialize( + user_id=user_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetPublicUserResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_serialize( + self, + user_id, + authorization, + _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 user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/users/{user_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 get_user_activity( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListUserActivityResponse: + """Get auth user activity + + + :param authorization: API Key bearer token + :type authorization: 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._get_user_activity_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListUserActivityResponse", + '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_user_activity_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListUserActivityResponse]: + """Get auth user activity + + + :param authorization: API Key bearer token + :type authorization: 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._get_user_activity_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListUserActivityResponse", + '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_user_activity_without_preload_content( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get auth user activity + + + :param authorization: API Key bearer token + :type authorization: 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._get_user_activity_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListUserActivityResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_activity_serialize( + self, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/users/activity', + 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_user_comments( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListCommentResponse: + """Get comments by user + + Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. + + :param authorization: API Key bearer token + :type authorization: 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._get_user_comments_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_user_comments_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListCommentResponse]: + """Get comments by user + + Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. + + :param authorization: API Key bearer token + :type authorization: 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._get_user_comments_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_user_comments_without_preload_content( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get comments by user + + Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. + + :param authorization: API Key bearer token + :type authorization: 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._get_user_comments_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_comments_serialize( + self, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/users/me/comments', + 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 login_user( + self, + login_request: LoginRequest, + _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, + ) -> BaseResponseLoginResponse: + """Authenticate a user + + Authenticates a user and returns a token. + + :param login_request: (required) + :type login_request: LoginRequest + :param _request_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._login_user_serialize( + login_request=login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLoginResponse", + '422': "BaseResponse", + '401': None, + } + 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 login_user_with_http_info( + self, + login_request: LoginRequest, + _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[BaseResponseLoginResponse]: + """Authenticate a user + + Authenticates a user and returns a token. + + :param login_request: (required) + :type login_request: LoginRequest + :param _request_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._login_user_serialize( + login_request=login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLoginResponse", + '422': "BaseResponse", + '401': None, + } + 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 login_user_without_preload_content( + self, + login_request: LoginRequest, + _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: + """Authenticate a user + + Authenticates a user and returns a token. + + :param login_request: (required) + :type login_request: LoginRequest + :param _request_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._login_user_serialize( + login_request=login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseLoginResponse", + '422': "BaseResponse", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _login_user_serialize( + self, + login_request, + _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 + # process the body parameter + if login_request is not None: + _body_params = login_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/auth/login', + 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/revengai/api/binaries_api.py b/revengai/revengai/api/binaries_api.py new file mode 100644 index 0000000..20b2de1 --- /dev/null +++ b/revengai/revengai/api/binaries_api.py @@ -0,0 +1,1702 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Any, Optional +from typing_extensions import Annotated +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class BinariesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def download_zipped_binary( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> object: + """Downloads a zipped binary with password protection + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._download_zipped_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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 download_zipped_binary_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[object]: + """Downloads a zipped binary with password protection + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._download_zipped_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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 download_zipped_binary_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Downloads a zipped binary with password protection + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._download_zipped_binary_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _download_zipped_binary_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/download-zipped', + 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_binary_additional_details( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBinaryAdditionalResponse: + """Gets the additional details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_additional_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAdditionalResponse", + '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_binary_additional_details_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBinaryAdditionalResponse]: + """Gets the additional details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_additional_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAdditionalResponse", + '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_binary_additional_details_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the additional details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_additional_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryAdditionalResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_additional_details_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/additional-details', + 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_binary_details( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBinaryDetailsResponse: + """Gets the details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryDetailsResponse", + '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_binary_details_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBinaryDetailsResponse]: + """Gets the details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryDetailsResponse", + '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_binary_details_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_details_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryDetailsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_details_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/details', + 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_binary_die_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListDieMatch: + """Gets the die info of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_die_info_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListDieMatch", + '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_binary_die_info_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListDieMatch]: + """Gets the die info of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_die_info_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListDieMatch", + '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_binary_die_info_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the die info of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_die_info_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListDieMatch", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_die_info_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/die-info', + 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_binary_externals( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBinaryExternalsResponse: + """Gets the external details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_externals_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryExternalsResponse", + '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_binary_externals_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBinaryExternalsResponse]: + """Gets the external details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_externals_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryExternalsResponse", + '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_binary_externals_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the external details of a binary + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_binary_externals_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinaryExternalsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_externals_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/externals', + 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_related_binaries( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseChildBinariesResponse: + """Gets the related binaries of a binary. + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_related_binaries_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseChildBinariesResponse", + '422': "BaseResponse", + '403': "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_related_binaries_with_http_info( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseChildBinariesResponse]: + """Gets the related binaries of a binary. + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_related_binaries_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseChildBinariesResponse", + '422': "BaseResponse", + '403': "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_related_binaries_without_preload_content( + self, + binary_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the related binaries of a binary. + + + :param binary_id: (required) + :type binary_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_related_binaries_serialize( + binary_id=binary_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseChildBinariesResponse", + '422': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_related_binaries_serialize( + self, + binary_id, + authorization, + _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 binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/binaries/{binary_id}/related', + 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/revengai/api/collections_api.py b/revengai/revengai/api/collections_api.py new file mode 100644 index 0000000..0053052 --- /dev/null +++ b/revengai/revengai/api/collections_api.py @@ -0,0 +1,2222 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.base_response_bool import BaseResponseBool +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest +from revengai.models.collection_create_request import CollectionCreateRequest +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest +from revengai.models.collection_update_request import CollectionUpdateRequest +from revengai.models.filters import Filters +from revengai.models.order import Order + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class CollectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_collection( + self, + collection_create_request: CollectionCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionResponse: + """Creates new collection information + + A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response. + + :param collection_create_request: (required) + :type collection_create_request: CollectionCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_collection_serialize( + collection_create_request=collection_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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 create_collection_with_http_info( + self, + collection_create_request: CollectionCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionResponse]: + """Creates new collection information + + A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response. + + :param collection_create_request: (required) + :type collection_create_request: CollectionCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_collection_serialize( + collection_create_request=collection_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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 create_collection_without_preload_content( + self, + collection_create_request: CollectionCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Creates new collection information + + A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response. + + :param collection_create_request: (required) + :type collection_create_request: CollectionCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_collection_serialize( + collection_create_request=collection_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_collection_serialize( + self, + collection_create_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if collection_create_request is not None: + _body_params = collection_create_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/collections', + 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 delete_collection( + self, + collection_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBool: + """Deletes a collection + + Deletes a collection + + :param collection_id: (required) + :type collection_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_collection_serialize( + collection_id=collection_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '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 delete_collection_with_http_info( + self, + collection_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBool]: + """Deletes a collection + + Deletes a collection + + :param collection_id: (required) + :type collection_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_collection_serialize( + collection_id=collection_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '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 delete_collection_without_preload_content( + self, + collection_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Deletes a collection + + Deletes a collection + + :param collection_id: (required) + :type collection_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_collection_serialize( + collection_id=collection_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_collection_serialize( + self, + collection_id, + authorization, + _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 collection_id is not None: + _path_params['collection_id'] = collection_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/collections/{collection_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 get_collection( + self, + collection_id: StrictInt, + include_tags: Optional[StrictBool] = None, + include_binaries: Optional[StrictBool] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionResponse: + """Returns a collection + + Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined. + + :param collection_id: (required) + :type collection_id: int + :param include_tags: + :type include_tags: bool + :param include_binaries: + :type include_binaries: bool + :param authorization: API Key bearer token + :type authorization: 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._get_collection_serialize( + collection_id=collection_id, + include_tags=include_tags, + include_binaries=include_binaries, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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_collection_with_http_info( + self, + collection_id: StrictInt, + include_tags: Optional[StrictBool] = None, + include_binaries: Optional[StrictBool] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionResponse]: + """Returns a collection + + Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined. + + :param collection_id: (required) + :type collection_id: int + :param include_tags: + :type include_tags: bool + :param include_binaries: + :type include_binaries: bool + :param authorization: API Key bearer token + :type authorization: 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._get_collection_serialize( + collection_id=collection_id, + include_tags=include_tags, + include_binaries=include_binaries, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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_collection_without_preload_content( + self, + collection_id: StrictInt, + include_tags: Optional[StrictBool] = None, + include_binaries: Optional[StrictBool] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Returns a collection + + Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined. + + :param collection_id: (required) + :type collection_id: int + :param include_tags: + :type include_tags: bool + :param include_binaries: + :type include_binaries: bool + :param authorization: API Key bearer token + :type authorization: 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._get_collection_serialize( + collection_id=collection_id, + include_tags=include_tags, + include_binaries=include_binaries, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_collection_serialize( + self, + collection_id, + include_tags, + include_binaries, + authorization, + _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 collection_id is not None: + _path_params['collection_id'] = collection_id + # process the query parameters + if include_tags is not None: + + _query_params.append(('include_tags', include_tags)) + + if include_binaries is not None: + + _query_params.append(('include_binaries', include_binaries)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/collections/{collection_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 list_collections( + self, + search_term: Optional[StrictStr] = None, + filters: Optional[List[Filters]] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListCollectionResults: + """Gets basic collections information + + Returns a list of collections + + :param search_term: + :type search_term: str + :param filters: + :type filters: List[Filters] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_collections_serialize( + search_term=search_term, + filters=filters, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCollectionResults", + '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 list_collections_with_http_info( + self, + search_term: Optional[StrictStr] = None, + filters: Optional[List[Filters]] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListCollectionResults]: + """Gets basic collections information + + Returns a list of collections + + :param search_term: + :type search_term: str + :param filters: + :type filters: List[Filters] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_collections_serialize( + search_term=search_term, + filters=filters, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCollectionResults", + '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 list_collections_without_preload_content( + self, + search_term: Optional[StrictStr] = None, + filters: Optional[List[Filters]] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None, + offset: Optional[StrictInt] = None, + order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None, + order: Optional[Order] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets basic collections information + + Returns a list of collections + + :param search_term: + :type search_term: str + :param filters: + :type filters: List[Filters] + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order: + :type order: Order + :param authorization: API Key bearer token + :type authorization: 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._list_collections_serialize( + search_term=search_term, + filters=filters, + limit=limit, + offset=offset, + order_by=order_by, + order=order, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCollectionResults", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_collections_serialize( + self, + search_term, + filters, + limit, + offset, + order_by, + order, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'filters': 'multi', + } + + _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 + if search_term is not None: + + _query_params.append(('search_term', search_term)) + + if filters is not None: + + _query_params.append(('filters', filters)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order_by is not None: + + _query_params.append(('order_by', order_by.value)) + + if order is not None: + + _query_params.append(('order', order.value)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/collections', + 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 update_collection( + self, + collection_id: StrictInt, + collection_update_request: CollectionUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionResponse: + """Updates a collection + + Updates a collection, you can update the collection name, description, and scope + + :param collection_id: (required) + :type collection_id: int + :param collection_update_request: (required) + :type collection_update_request: CollectionUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_serialize( + collection_id=collection_id, + collection_update_request=collection_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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 update_collection_with_http_info( + self, + collection_id: StrictInt, + collection_update_request: CollectionUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionResponse]: + """Updates a collection + + Updates a collection, you can update the collection name, description, and scope + + :param collection_id: (required) + :type collection_id: int + :param collection_update_request: (required) + :type collection_update_request: CollectionUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_serialize( + collection_id=collection_id, + collection_update_request=collection_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '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 update_collection_without_preload_content( + self, + collection_id: StrictInt, + collection_update_request: CollectionUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Updates a collection + + Updates a collection, you can update the collection name, description, and scope + + :param collection_id: (required) + :type collection_id: int + :param collection_update_request: (required) + :type collection_update_request: CollectionUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_serialize( + collection_id=collection_id, + collection_update_request=collection_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_collection_serialize( + self, + collection_id, + collection_update_request, + authorization, + _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 collection_id is not None: + _path_params['collection_id'] = collection_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if collection_update_request is not None: + _body_params = collection_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/collections/{collection_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 update_collection_binaries( + self, + collection_id: StrictInt, + collection_binaries_update_request: CollectionBinariesUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionBinariesUpdateResponse: + """Updates a collection binaries + + Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_binaries_update_request: (required) + :type collection_binaries_update_request: CollectionBinariesUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_binaries_serialize( + collection_id=collection_id, + collection_binaries_update_request=collection_binaries_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionBinariesUpdateResponse", + '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 update_collection_binaries_with_http_info( + self, + collection_id: StrictInt, + collection_binaries_update_request: CollectionBinariesUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionBinariesUpdateResponse]: + """Updates a collection binaries + + Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_binaries_update_request: (required) + :type collection_binaries_update_request: CollectionBinariesUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_binaries_serialize( + collection_id=collection_id, + collection_binaries_update_request=collection_binaries_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionBinariesUpdateResponse", + '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 update_collection_binaries_without_preload_content( + self, + collection_id: StrictInt, + collection_binaries_update_request: CollectionBinariesUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Updates a collection binaries + + Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_binaries_update_request: (required) + :type collection_binaries_update_request: CollectionBinariesUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_binaries_serialize( + collection_id=collection_id, + collection_binaries_update_request=collection_binaries_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionBinariesUpdateResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_collection_binaries_serialize( + self, + collection_id, + collection_binaries_update_request, + authorization, + _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 collection_id is not None: + _path_params['collection_id'] = collection_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if collection_binaries_update_request is not None: + _body_params = collection_binaries_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/collections/{collection_id}/binaries', + 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 update_collection_tags( + self, + collection_id: StrictInt, + collection_tags_update_request: CollectionTagsUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionTagsUpdateResponse: + """Updates a collection tags + + Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_tags_update_request: (required) + :type collection_tags_update_request: CollectionTagsUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_tags_serialize( + collection_id=collection_id, + collection_tags_update_request=collection_tags_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionTagsUpdateResponse", + '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 update_collection_tags_with_http_info( + self, + collection_id: StrictInt, + collection_tags_update_request: CollectionTagsUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionTagsUpdateResponse]: + """Updates a collection tags + + Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_tags_update_request: (required) + :type collection_tags_update_request: CollectionTagsUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_tags_serialize( + collection_id=collection_id, + collection_tags_update_request=collection_tags_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionTagsUpdateResponse", + '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 update_collection_tags_without_preload_content( + self, + collection_id: StrictInt, + collection_tags_update_request: CollectionTagsUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Updates a collection tags + + Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request. + + :param collection_id: (required) + :type collection_id: int + :param collection_tags_update_request: (required) + :type collection_tags_update_request: CollectionTagsUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_collection_tags_serialize( + collection_id=collection_id, + collection_tags_update_request=collection_tags_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionTagsUpdateResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_collection_tags_serialize( + self, + collection_id, + collection_tags_update_request, + authorization, + _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 collection_id is not None: + _path_params['collection_id'] = collection_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if collection_tags_update_request is not None: + _body_params = collection_tags_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/collections/{collection_id}/tags', + 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/revengai/api/confidence_api.py b/revengai/revengai/api/confidence_api.py new file mode 100644 index 0000000..22126f9 --- /dev/null +++ b/revengai/revengai/api/confidence_api.py @@ -0,0 +1,1214 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody +from revengai.models.tag_confidence_body import TagConfidenceBody +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class ConfidenceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_analysis_tag_score( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], + tag_confidence_body: TagConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListTagOriginBoxPlotConfidence: + """Calculate Tag Confidence Score for an Analysis + + Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list + + :param analysis_id: The analysis to calculate the tag scores for (required) + :type analysis_id: int + :param tag_confidence_body: (required) + :type tag_confidence_body: TagConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_tag_score_serialize( + analysis_id=analysis_id, + tag_confidence_body=tag_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListTagOriginBoxPlotConfidence", + '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_analysis_tag_score_with_http_info( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], + tag_confidence_body: TagConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListTagOriginBoxPlotConfidence]: + """Calculate Tag Confidence Score for an Analysis + + Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list + + :param analysis_id: The analysis to calculate the tag scores for (required) + :type analysis_id: int + :param tag_confidence_body: (required) + :type tag_confidence_body: TagConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_tag_score_serialize( + analysis_id=analysis_id, + tag_confidence_body=tag_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListTagOriginBoxPlotConfidence", + '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_analysis_tag_score_without_preload_content( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], + tag_confidence_body: TagConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Calculate Tag Confidence Score for an Analysis + + Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list + + :param analysis_id: The analysis to calculate the tag scores for (required) + :type analysis_id: int + :param tag_confidence_body: (required) + :type tag_confidence_body: TagConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_tag_score_serialize( + analysis_id=analysis_id, + tag_confidence_body=tag_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListTagOriginBoxPlotConfidence", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_tag_score_serialize( + self, + analysis_id, + tag_confidence_body, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if tag_confidence_body is not None: + _body_params = tag_confidence_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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/confidence/analysis/{analysis_id}/tag_score', + 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_analysis_threat_score( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBoxPlotConfidence: + """Calculate Threat Score for Binary + + Accepts a binary ID and returns the threat score for that binary + + :param analysis_id: The analysis to calculate the threat score for (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBoxPlotConfidence", + '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_analysis_threat_score_with_http_info( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBoxPlotConfidence]: + """Calculate Threat Score for Binary + + Accepts a binary ID and returns the threat score for that binary + + :param analysis_id: The analysis to calculate the threat score for (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBoxPlotConfidence", + '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_analysis_threat_score_without_preload_content( + self, + analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Calculate Threat Score for Binary + + Accepts a binary ID and returns the threat score for that binary + + :param analysis_id: The analysis to calculate the threat score for (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_threat_score_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBoxPlotConfidence", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_threat_score_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/confidence/analysis/{analysis_id}/threat_score', + 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_functions_name_score( + self, + function_name_confidence_body: FunctionNameConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListFunctionBoxPlotConfidence: + """Calculate function name confidence for a set of Functions + + Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param function_name_confidence_body: (required) + :type function_name_confidence_body: FunctionNameConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_name_score_serialize( + function_name_confidence_body=function_name_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '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_functions_name_score_with_http_info( + self, + function_name_confidence_body: FunctionNameConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListFunctionBoxPlotConfidence]: + """Calculate function name confidence for a set of Functions + + Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param function_name_confidence_body: (required) + :type function_name_confidence_body: FunctionNameConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_name_score_serialize( + function_name_confidence_body=function_name_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '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_functions_name_score_without_preload_content( + self, + function_name_confidence_body: FunctionNameConfidenceBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Calculate function name confidence for a set of Functions + + Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param function_name_confidence_body: (required) + :type function_name_confidence_body: FunctionNameConfidenceBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_name_score_serialize( + function_name_confidence_body=function_name_confidence_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_functions_name_score_serialize( + self, + function_name_confidence_body, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_name_confidence_body is not None: + _body_params = function_name_confidence_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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/confidence/functions/name_score', + 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_functions_threat_score( + self, + threat_score_function_body: ThreatScoreFunctionBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListFunctionBoxPlotConfidence: + """Calculate Threat Score for a set of Functions + + Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param threat_score_function_body: (required) + :type threat_score_function_body: ThreatScoreFunctionBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_threat_score_serialize( + threat_score_function_body=threat_score_function_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '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_functions_threat_score_with_http_info( + self, + threat_score_function_body: ThreatScoreFunctionBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListFunctionBoxPlotConfidence]: + """Calculate Threat Score for a set of Functions + + Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param threat_score_function_body: (required) + :type threat_score_function_body: ThreatScoreFunctionBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_threat_score_serialize( + threat_score_function_body=threat_score_function_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '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_functions_threat_score_without_preload_content( + self, + threat_score_function_body: ThreatScoreFunctionBody, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Calculate Threat Score for a set of Functions + + Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. + + :param threat_score_function_body: (required) + :type threat_score_function_body: ThreatScoreFunctionBody + :param authorization: API Key bearer token + :type authorization: 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._get_functions_threat_score_serialize( + threat_score_function_body=threat_score_function_body, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionBoxPlotConfidence", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_functions_threat_score_serialize( + self, + threat_score_function_body, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if threat_score_function_body is not None: + _body_params = threat_score_function_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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/confidence/functions/threat_score', + 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/revengai/api/external_sources_api.py b/revengai/revengai/api/external_sources_api.py new file mode 100644 index 0000000..70813ca --- /dev/null +++ b/revengai/revengai/api/external_sources_api.py @@ -0,0 +1,1709 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_external_response import BaseResponseExternalResponse +from revengai.models.base_response_str import BaseResponseStr +from revengai.models.base_response_task_response import BaseResponseTaskResponse + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class ExternalSourcesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_external_task_mb( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseStr: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_mb_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_external_task_mb_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseStr]: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_mb_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_external_task_mb_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_mb_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_external_task_mb_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analysis/{analysis_id}/external/mb', + 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 create_external_task_vt( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseStr: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_vt_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_external_task_vt_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseStr]: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_vt_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_external_task_vt_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Pulls data from VirusTotal + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_external_task_vt_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_external_task_vt_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analysis/{analysis_id}/external/vt', + 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_mb_data( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseExternalResponse: + """Get MalwareBazaar data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "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_mb_data_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseExternalResponse]: + """Get MalwareBazaar data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "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_mb_data_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get MalwareBazaar data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_mb_data_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis/{analysis_id}/external/mb', + 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_mb_task_status( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseTaskResponse: + """Check the status of MalwareBazaar data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '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_mb_task_status_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseTaskResponse]: + """Check the status of MalwareBazaar data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '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_mb_task_status_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Check the status of MalwareBazaar data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_mb_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_mb_task_status_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis/{analysis_id}/external/mb/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 get_vt_data( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseExternalResponse: + """Get VirusTotal data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "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_vt_data_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseExternalResponse]: + """Get VirusTotal data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "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_vt_data_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get VirusTotal data + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_data_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseExternalResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_vt_data_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis/{analysis_id}/external/vt', + 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_vt_task_status( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseTaskResponse: + """Check the status of VirusTotal data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '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_vt_task_status_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseTaskResponse]: + """Check the status of VirusTotal data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '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_vt_task_status_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Check the status of VirusTotal data retrieval + + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_vt_task_status_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_vt_task_status_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis/{analysis_id}/external/vt/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 + ) + + diff --git a/revengai/revengai/api/firmware_api.py b/revengai/revengai/api/firmware_api.py new file mode 100644 index 0000000..c7131ef --- /dev/null +++ b/revengai/revengai/api/firmware_api.py @@ -0,0 +1,624 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Any, Optional, Tuple, Union +from typing_extensions import Annotated + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FirmwareApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_binaries_for_firmware_task( + self, + task_id: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> object: + """Upload firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param task_id: (required) + :type task_id: str + :param authorization: API Key bearer token + :type authorization: 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._get_binaries_for_firmware_task_serialize( + task_id=task_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_binaries_for_firmware_task_with_http_info( + self, + task_id: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[object]: + """Upload firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param task_id: (required) + :type task_id: str + :param authorization: API Key bearer token + :type authorization: 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._get_binaries_for_firmware_task_serialize( + task_id=task_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '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_binaries_for_firmware_task_without_preload_content( + self, + task_id: StrictStr, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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 firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param task_id: (required) + :type task_id: str + :param authorization: API Key bearer token + :type authorization: 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._get_binaries_for_firmware_task_serialize( + task_id=task_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binaries_for_firmware_task_serialize( + self, + task_id, + authorization, + _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 task_id is not None: + _path_params['task_id'] = task_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/firmware/get-binaries/{task_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 upload_firmware( + self, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + password: Optional[StrictStr] = 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, + ) -> object: + """Upload firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param file: (required) + :type file: bytearray + :param authorization: API Key bearer token + :type authorization: str + :param password: + :type password: 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._upload_firmware_serialize( + file=file, + authorization=authorization, + password=password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '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 upload_firmware_with_http_info( + self, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + password: Optional[StrictStr] = 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[object]: + """Upload firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param file: (required) + :type file: bytearray + :param authorization: API Key bearer token + :type authorization: str + :param password: + :type password: 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._upload_firmware_serialize( + file=file, + authorization=authorization, + password=password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '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 upload_firmware_without_preload_content( + self, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None, + password: Optional[StrictStr] = 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 firmware for unpacking + + Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response. + + :param file: (required) + :type file: bytearray + :param authorization: API Key bearer token + :type authorization: str + :param password: + :type password: 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._upload_firmware_serialize( + file=file, + authorization=authorization, + password=password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upload_firmware_serialize( + self, + file, + authorization, + password, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if file is not None: + _files['file'] = file + if password is not None: + _form_params.append(('password', password)) + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/firmware', + 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/revengai/api/functions_ai_decompilation_api.py b/revengai/revengai/api/functions_ai_decompilation_api.py new file mode 100644 index 0000000..a83b702 --- /dev/null +++ b/revengai/revengai/api/functions_ai_decompilation_api.py @@ -0,0 +1,2728 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response import BaseResponse +from revengai.models.base_response_bool import BaseResponseBool +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsAIDecompilationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_ai_decompilation_comment( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_ai_decompilation_comment_with_http_info( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_ai_decompilation_comment_without_preload_content( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_ai_decompilation_comment_serialize( + self, + function_id, + function_comment_create_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_comment_create_request is not None: + _body_params = function_comment_create_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/ai-decompilation/comments', + 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 create_ai_decompilation_task( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponse: + """Begins AI Decompilation Process + + Begins the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '402': "BaseResponse", + '409': "BaseResponse", + '400': "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 create_ai_decompilation_task_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponse]: + """Begins AI Decompilation Process + + Begins the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '402': "BaseResponse", + '409': "BaseResponse", + '400': "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 create_ai_decompilation_task_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Begins AI Decompilation Process + + Begins the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_ai_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '402': "BaseResponse", + '409': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_ai_decompilation_task_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/ai-decompilation', + 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 delete_ai_decompilation_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBool: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_ai_decompilation_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBool]: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_ai_decompilation_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_ai_decompilation_comment_serialize( + self, + comment_id, + function_id, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_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 get_ai_decompilation_comments( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListCommentResponse: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_ai_decompilation_comments_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListCommentResponse]: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_ai_decompilation_comments_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_comments_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/ai-decompilation/comments', + 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_ai_decompilation_rating( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGetAiDecompilationRatingResponse: + """Get rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_rating_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationRatingResponse", + '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_ai_decompilation_rating_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGetAiDecompilationRatingResponse]: + """Get rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_rating_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationRatingResponse", + '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_ai_decompilation_rating_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_rating_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationRatingResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_rating_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/ai-decompilation/rating', + 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_ai_decompilation_task_result( + self, + function_id: StrictInt, + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGetAiDecompilationTask: + """Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :type generate_inline_comments: bool + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "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_ai_decompilation_task_result_with_http_info( + self, + function_id: StrictInt, + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGetAiDecompilationTask]: + """Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :type generate_inline_comments: bool + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "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_ai_decompilation_task_result_without_preload_content( + self, + function_id: StrictInt, + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :type generate_inline_comments: bool + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_task_result_serialize( + self, + function_id, + summarise, + generate_inline_comments, + authorization, + _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 + if summarise is not None: + + _query_params.append(('summarise', summarise)) + + if generate_inline_comments is not None: + + _query_params.append(('generate_inline_comments', generate_inline_comments)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/ai-decompilation', + 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_ai_decompilation_task_status( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionTaskResponse: + """Check the status of a function ai decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_status_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '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_ai_decompilation_task_status_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionTaskResponse]: + """Check the status of a function ai decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_status_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '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_ai_decompilation_task_status_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Check the status of a function ai decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_ai_decompilation_task_status_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_task_status_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/ai-decompilation/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 update_ai_decompilation_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_ai_decompilation_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_ai_decompilation_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_ai_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_ai_decompilation_comment_serialize( + self, + comment_id, + function_id, + comment_update_request, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if comment_update_request is not None: + _body_params = comment_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_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 upsert_ai_decompilation_rating( + self, + function_id: StrictInt, + upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponse: + """Upsert rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param upsert_ai_decomplation_rating_request: (required) + :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest + :param authorization: API Key bearer token + :type authorization: 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._upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 upsert_ai_decompilation_rating_with_http_info( + self, + function_id: StrictInt, + upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponse]: + """Upsert rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param upsert_ai_decomplation_rating_request: (required) + :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest + :param authorization: API Key bearer token + :type authorization: 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._upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 upsert_ai_decompilation_rating_without_preload_content( + self, + function_id: StrictInt, + upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Upsert rating for AI decompilation + + + :param function_id: (required) + :type function_id: int + :param upsert_ai_decomplation_rating_request: (required) + :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest + :param authorization: API Key bearer token + :type authorization: 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._upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upsert_ai_decompilation_rating_serialize( + self, + function_id, + upsert_ai_decomplation_rating_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if upsert_ai_decomplation_rating_request is not None: + _body_params = upsert_ai_decomplation_rating_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/functions/{function_id}/ai-decompilation/rating', + 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/revengai/api/functions_block_comments_api.py b/revengai/revengai/api/functions_block_comments_api.py new file mode 100644 index 0000000..6fc2378 --- /dev/null +++ b/revengai/revengai/api/functions_block_comments_api.py @@ -0,0 +1,897 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse +from revengai.models.block import Block + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsBlockCommentsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def generate_block_comments_for_block_in_function( + self, + function_id: StrictInt, + block: Block, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBlockCommentsGenerationForFunctionResponse: + """Generate block comments for a specific block in a function + + + :param function_id: (required) + :type function_id: int + :param block: (required) + :type block: Block + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_block_in_function_serialize( + function_id=function_id, + block=block, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '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 generate_block_comments_for_block_in_function_with_http_info( + self, + function_id: StrictInt, + block: Block, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBlockCommentsGenerationForFunctionResponse]: + """Generate block comments for a specific block in a function + + + :param function_id: (required) + :type function_id: int + :param block: (required) + :type block: Block + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_block_in_function_serialize( + function_id=function_id, + block=block, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '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 generate_block_comments_for_block_in_function_without_preload_content( + self, + function_id: StrictInt, + block: Block, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Generate block comments for a specific block in a function + + + :param function_id: (required) + :type function_id: int + :param block: (required) + :type block: Block + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_block_in_function_serialize( + function_id=function_id, + block=block, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_block_comments_for_block_in_function_serialize( + self, + function_id, + block, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if block is not None: + _body_params = block + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/block-comments/single', + 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 generate_block_comments_for_function( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBlockCommentsGenerationForFunctionResponse: + """Generate block comments for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '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 generate_block_comments_for_function_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBlockCommentsGenerationForFunctionResponse]: + """Generate block comments for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '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 generate_block_comments_for_function_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Generate block comments for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_block_comments_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsGenerationForFunctionResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_block_comments_for_function_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/block-comments', + 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 generate_overview_comment_for_function( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBlockCommentsOverviewGenerationResponse: + """Generate overview comment for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_overview_comment_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsOverviewGenerationResponse", + '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 generate_overview_comment_for_function_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBlockCommentsOverviewGenerationResponse]: + """Generate overview comment for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_overview_comment_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsOverviewGenerationResponse", + '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 generate_overview_comment_for_function_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Generate overview comment for a function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._generate_overview_comment_for_function_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBlockCommentsOverviewGenerationResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_overview_comment_for_function_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/block-comments/overview', + 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/revengai/api/functions_core_api.py b/revengai/revengai/api/functions_core_api.py new file mode 100644 index 0000000..b91c36e --- /dev/null +++ b/revengai/revengai/api/functions_core_api.py @@ -0,0 +1,3700 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from revengai.models.ai_unstrip_request import AiUnstripRequest +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse +from revengai.models.auto_unstrip_request import AutoUnstripRequest +from revengai.models.auto_unstrip_response import AutoUnstripResponse +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse +from revengai.models.unstrip_request import UnstripRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsCoreApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def ai_unstrip( + self, + analysis_id: StrictInt, + ai_unstrip_request: AiUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> AutoUnstripResponse: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param ai_unstrip_request: (required) + :type ai_unstrip_request: AiUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._ai_unstrip_serialize( + analysis_id=analysis_id, + ai_unstrip_request=ai_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 ai_unstrip_with_http_info( + self, + analysis_id: StrictInt, + ai_unstrip_request: AiUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[AutoUnstripResponse]: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param ai_unstrip_request: (required) + :type ai_unstrip_request: AiUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._ai_unstrip_serialize( + analysis_id=analysis_id, + ai_unstrip_request=ai_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 ai_unstrip_without_preload_content( + self, + analysis_id: StrictInt, + ai_unstrip_request: AiUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param ai_unstrip_request: (required) + :type ai_unstrip_request: AiUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._ai_unstrip_serialize( + analysis_id=analysis_id, + ai_unstrip_request=ai_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _ai_unstrip_serialize( + self, + analysis_id, + ai_unstrip_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if ai_unstrip_request is not None: + _body_params = ai_unstrip_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/functions/ai-unstrip', + 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 auto_unstrip( + self, + analysis_id: StrictInt, + auto_unstrip_request: AutoUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> AutoUnstripResponse: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param auto_unstrip_request: (required) + :type auto_unstrip_request: AutoUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._auto_unstrip_serialize( + analysis_id=analysis_id, + auto_unstrip_request=auto_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 auto_unstrip_with_http_info( + self, + analysis_id: StrictInt, + auto_unstrip_request: AutoUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[AutoUnstripResponse]: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param auto_unstrip_request: (required) + :type auto_unstrip_request: AutoUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._auto_unstrip_serialize( + analysis_id=analysis_id, + auto_unstrip_request=auto_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 auto_unstrip_without_preload_content( + self, + analysis_id: StrictInt, + auto_unstrip_request: AutoUnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param auto_unstrip_request: (required) + :type auto_unstrip_request: AutoUnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._auto_unstrip_serialize( + analysis_id=analysis_id, + auto_unstrip_request=auto_unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auto_unstrip_serialize( + self, + analysis_id, + auto_unstrip_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if auto_unstrip_request is not None: + _body_params = auto_unstrip_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/functions/auto-unstrip', + 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 cancel_ai_unstrip( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> AutoUnstripResponse: + """Cancels a running ai-unstrip + + Takes in the analysis ID and cancels a running ai-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_ai_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 cancel_ai_unstrip_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[AutoUnstripResponse]: + """Cancels a running ai-unstrip + + Takes in the analysis ID and cancels a running ai-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_ai_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 cancel_ai_unstrip_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Cancels a running ai-unstrip + + Takes in the analysis ID and cancels a running ai-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_ai_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_ai_unstrip_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/analyses/{analysis_id}/functions/ai-unstrip/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 cancel_auto_unstrip( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> AutoUnstripResponse: + """Cancels a running auto-unstrip + + Takes in the analysis ID and cancels a running auto-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_auto_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 cancel_auto_unstrip_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[AutoUnstripResponse]: + """Cancels a running auto-unstrip + + Takes in the analysis ID and cancels a running auto-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_auto_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '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 cancel_auto_unstrip_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Cancels a running auto-unstrip + + Takes in the analysis ID and cancels a running auto-unstrip operation + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._cancel_auto_unstrip_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_auto_unstrip_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/analyses/{analysis_id}/functions/unstrip/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 get_analysis_strings( + self, + analysis_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseAnalysisStringsResponse: + """Get string information found in the Analysis + + Get string information found in the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param function_search: Search is applied to function names + :type function_search: str + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + function_search=function_search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStringsResponse", + '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_analysis_strings_with_http_info( + self, + analysis_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseAnalysisStringsResponse]: + """Get string information found in the Analysis + + Get string information found in the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param function_search: Search is applied to function names + :type function_search: str + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + function_search=function_search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStringsResponse", + '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_analysis_strings_without_preload_content( + self, + analysis_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get string information found in the Analysis + + Get string information found in the analysis + + :param analysis_id: (required) + :type analysis_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param function_search: Search is applied to function names + :type function_search: str + :param authorization: API Key bearer token + :type authorization: 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._get_analysis_strings_serialize( + analysis_id=analysis_id, + page=page, + page_size=page_size, + search=search, + function_search=function_search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStringsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_strings_serialize( + self, + analysis_id, + page, + page_size, + search, + function_search, + authorization, + _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 function_search is not None: + + _query_params.append(('function_search', function_search)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/strings', + 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_function_blocks( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionBlocksResponse: + """Get disassembly blocks related to the function + + Get disassembly blocks related to the function + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_blocks_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionBlocksResponse", + '422': "BaseResponse", + '404': "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_function_blocks_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionBlocksResponse]: + """Get disassembly blocks related to the function + + Get disassembly blocks related to the function + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_blocks_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionBlocksResponse", + '422': "BaseResponse", + '404': "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_function_blocks_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get disassembly blocks related to the function + + Get disassembly blocks related to the function + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_blocks_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionBlocksResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_blocks_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/blocks', + 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_function_callees_callers( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCalleesCallerFunctionsResponse: + """Get list of functions that call or are called by the specified function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_callees_callers_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCalleesCallerFunctionsResponse", + '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_function_callees_callers_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCalleesCallerFunctionsResponse]: + """Get list of functions that call or are called by the specified function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_callees_callers_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCalleesCallerFunctionsResponse", + '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_function_callees_callers_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get list of functions that call or are called by the specified function + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_callees_callers_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCalleesCallerFunctionsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_callees_callers_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/callees_callers', + 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_function_capabilities( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionCapabilityResponse: + """Retrieve a functions capabilities + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_capabilities_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "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_function_capabilities_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionCapabilityResponse]: + """Retrieve a functions capabilities + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_capabilities_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "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_function_capabilities_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Retrieve a functions capabilities + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_capabilities_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_capabilities_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/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_function_details( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionsDetailResponse: + """Get function details + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_details_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionsDetailResponse", + '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_function_details_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionsDetailResponse]: + """Get function details + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_details_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionsDetailResponse", + '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_function_details_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get function details + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_details_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionsDetailResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_details_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{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 get_function_strings( + self, + function_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionStringsResponse: + """Get string information found in the function + + Get string information found in the function + + :param function_id: (required) + :type function_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param authorization: API Key bearer token + :type authorization: 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._get_function_strings_serialize( + function_id=function_id, + page=page, + page_size=page_size, + search=search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionStringsResponse", + '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_function_strings_with_http_info( + self, + function_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionStringsResponse]: + """Get string information found in the function + + Get string information found in the function + + :param function_id: (required) + :type function_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param authorization: API Key bearer token + :type authorization: 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._get_function_strings_serialize( + function_id=function_id, + page=page, + page_size=page_size, + search=search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionStringsResponse", + '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_function_strings_without_preload_content( + self, + function_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get string information found in the function + + Get string information found in the function + + :param function_id: (required) + :type function_id: int + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param search: Search is applied to string value + :type search: str + :param authorization: API Key bearer token + :type authorization: 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._get_function_strings_serialize( + function_id=function_id, + page=page, + page_size=page_size, + search=search, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionStringsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_strings_serialize( + self, + function_id, + page, + page_size, + search, + authorization, + _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 + 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)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/strings', + 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_similar_functions( + self, + function_id: StrictInt, + limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, + distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, + collection_ids: Annotated[Optional[List[StrictInt]], Field(description="Collection filtering by IDs")] = None, + debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, + debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, + binary_ids: Annotated[Optional[List[StrictInt]], Field(description="Limit similar functions to specific binaries")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListSimilarFunctionsResponse: + """Get list of similar functions + + + :param function_id: (required) + :type function_id: int + :param limit: Number of similar functions to return + :type limit: int + :param distance: Maximum cosine distance + :type distance: float + :param collection_ids: Collection filtering by IDs + :type collection_ids: List[int] + :param debug: Only return matching debug functions + :type debug: bool + :param debug_types: If limiting results to functions with debug names, which type of debug names to include? + :type debug_types: List[str] + :param binary_ids: Limit similar functions to specific binaries + :type binary_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._get_similar_functions_serialize( + function_id=function_id, + limit=limit, + distance=distance, + collection_ids=collection_ids, + debug=debug, + debug_types=debug_types, + binary_ids=binary_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSimilarFunctionsResponse", + '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_similar_functions_with_http_info( + self, + function_id: StrictInt, + limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, + distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, + collection_ids: Annotated[Optional[List[StrictInt]], Field(description="Collection filtering by IDs")] = None, + debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, + debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, + binary_ids: Annotated[Optional[List[StrictInt]], Field(description="Limit similar functions to specific binaries")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListSimilarFunctionsResponse]: + """Get list of similar functions + + + :param function_id: (required) + :type function_id: int + :param limit: Number of similar functions to return + :type limit: int + :param distance: Maximum cosine distance + :type distance: float + :param collection_ids: Collection filtering by IDs + :type collection_ids: List[int] + :param debug: Only return matching debug functions + :type debug: bool + :param debug_types: If limiting results to functions with debug names, which type of debug names to include? + :type debug_types: List[str] + :param binary_ids: Limit similar functions to specific binaries + :type binary_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._get_similar_functions_serialize( + function_id=function_id, + limit=limit, + distance=distance, + collection_ids=collection_ids, + debug=debug, + debug_types=debug_types, + binary_ids=binary_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSimilarFunctionsResponse", + '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_similar_functions_without_preload_content( + self, + function_id: StrictInt, + limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, + distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, + collection_ids: Annotated[Optional[List[StrictInt]], Field(description="Collection filtering by IDs")] = None, + debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, + debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, + binary_ids: Annotated[Optional[List[StrictInt]], Field(description="Limit similar functions to specific binaries")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get list of similar functions + + + :param function_id: (required) + :type function_id: int + :param limit: Number of similar functions to return + :type limit: int + :param distance: Maximum cosine distance + :type distance: float + :param collection_ids: Collection filtering by IDs + :type collection_ids: List[int] + :param debug: Only return matching debug functions + :type debug: bool + :param debug_types: If limiting results to functions with debug names, which type of debug names to include? + :type debug_types: List[str] + :param binary_ids: Limit similar functions to specific binaries + :type binary_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._get_similar_functions_serialize( + function_id=function_id, + limit=limit, + distance=distance, + collection_ids=collection_ids, + debug=debug, + debug_types=debug_types, + binary_ids=binary_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListSimilarFunctionsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_similar_functions_serialize( + self, + function_id, + limit, + distance, + collection_ids, + debug, + debug_types, + binary_ids, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'collection_ids': 'multi', + 'debug_types': 'multi', + 'binary_ids': 'multi', + } + + _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 + if limit is not None: + + _query_params.append(('limit', limit)) + + if distance is not None: + + _query_params.append(('distance', distance)) + + if collection_ids is not None: + + _query_params.append(('collection_ids', collection_ids)) + + if debug is not None: + + _query_params.append(('debug', debug)) + + if debug_types is not None: + + _query_params.append(('debug_types', debug_types)) + + if binary_ids is not None: + + _query_params.append(('binary_ids', binary_ids)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/similar-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 unstrip( + self, + analysis_id: StrictInt, + unstrip_request: UnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> AutoUnstripByGroupResponse: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param unstrip_request: (required) + :type unstrip_request: UnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._unstrip_serialize( + analysis_id=analysis_id, + unstrip_request=unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripByGroupResponse", + '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 unstrip_with_http_info( + self, + analysis_id: StrictInt, + unstrip_request: UnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[AutoUnstripByGroupResponse]: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param unstrip_request: (required) + :type unstrip_request: UnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._unstrip_serialize( + analysis_id=analysis_id, + unstrip_request=unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripByGroupResponse", + '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 unstrip_without_preload_content( + self, + analysis_id: StrictInt, + unstrip_request: UnstripRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Performs matching and auto-unstrip for an analysis and its functions + + Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system + + :param analysis_id: (required) + :type analysis_id: int + :param unstrip_request: (required) + :type unstrip_request: UnstripRequest + :param authorization: API Key bearer token + :type authorization: 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._unstrip_serialize( + analysis_id=analysis_id, + unstrip_request=unstrip_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AutoUnstripByGroupResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unstrip_serialize( + self, + analysis_id, + unstrip_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if unstrip_request is not None: + _body_params = unstrip_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/functions/unstrip', + 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/revengai/api/functions_data_types_api.py b/revengai/revengai/api/functions_data_types_api.py new file mode 100644 index 0000000..1390b5a --- /dev/null +++ b/revengai/revengai/api/functions_data_types_api.py @@ -0,0 +1,1838 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList +from revengai.models.function_data_types_params import FunctionDataTypesParams +from revengai.models.update_function_data_types import UpdateFunctionDataTypes + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsDataTypesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def generate_function_data_types_for_analysis( + self, + analysis_id: StrictInt, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGenerateFunctionDataTypes: + """Generate Function Data Types + + Submits a request to generate the function data types + + :param analysis_id: (required) + :type analysis_id: int + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerateFunctionDataTypes", + '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 generate_function_data_types_for_analysis_with_http_info( + self, + analysis_id: StrictInt, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGenerateFunctionDataTypes]: + """Generate Function Data Types + + Submits a request to generate the function data types + + :param analysis_id: (required) + :type analysis_id: int + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerateFunctionDataTypes", + '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 generate_function_data_types_for_analysis_without_preload_content( + self, + analysis_id: StrictInt, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Generate Function Data Types + + Submits a request to generate the function data types + + :param analysis_id: (required) + :type analysis_id: int + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerateFunctionDataTypes", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_function_data_types_for_analysis_serialize( + self, + analysis_id, + function_data_types_params, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_data_types_params is not None: + _body_params = function_data_types_params + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/analyses/{analysis_id}/functions/data_types', + 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 generate_function_data_types_for_functions( + self, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseGenerationStatusList: + """Generate Function Data Types for an arbitrary list of functions + + Submits a request to generate the function data types + + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_functions_serialize( + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerationStatusList", + '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 generate_function_data_types_for_functions_with_http_info( + self, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseGenerationStatusList]: + """Generate Function Data Types for an arbitrary list of functions + + Submits a request to generate the function data types + + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_functions_serialize( + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerationStatusList", + '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 generate_function_data_types_for_functions_without_preload_content( + self, + function_data_types_params: FunctionDataTypesParams, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Generate Function Data Types for an arbitrary list of functions + + Submits a request to generate the function data types + + :param function_data_types_params: (required) + :type function_data_types_params: FunctionDataTypesParams + :param authorization: API Key bearer token + :type authorization: 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._generate_function_data_types_for_functions_serialize( + function_data_types_params=function_data_types_params, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseGenerationStatusList", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _generate_function_data_types_for_functions_serialize( + self, + function_data_types_params, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_data_types_params is not None: + _body_params = function_data_types_params + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/data_types', + 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_function_data_types( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionDataTypes: + """Get Function Data Types + + Polling endpoint which returns the current status of function generation and once completed the data type information + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '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_function_data_types_with_http_info( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionDataTypes]: + """Get Function Data Types + + Polling endpoint which returns the current status of function generation and once completed the data type information + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '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_function_data_types_without_preload_content( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get Function Data Types + + Polling endpoint which returns the current status of function generation and once completed the data type information + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_data_types_serialize( + self, + analysis_id, + function_id, + authorization, + _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 function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/{function_id}/data_types', + 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 list_function_data_types_for_analysis( + self, + analysis_id: StrictInt, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionDataTypesList: + """List Function Data Types + + Returns data types for multiple functions with optional function ID filtering + + :param analysis_id: (required) + :type analysis_id: int + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '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 list_function_data_types_for_analysis_with_http_info( + self, + analysis_id: StrictInt, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionDataTypesList]: + """List Function Data Types + + Returns data types for multiple functions with optional function ID filtering + + :param analysis_id: (required) + :type analysis_id: int + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '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 list_function_data_types_for_analysis_without_preload_content( + self, + analysis_id: StrictInt, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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 Function Data Types + + Returns data types for multiple functions with optional function ID filtering + + :param analysis_id: (required) + :type analysis_id: int + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_analysis_serialize( + analysis_id=analysis_id, + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_function_data_types_for_analysis_serialize( + self, + analysis_id, + function_ids, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'function_ids': 'multi', + } + + _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 function_ids is not None: + + _query_params.append(('function_ids', function_ids)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/data_types', + 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 list_function_data_types_for_functions( + self, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionDataTypesList: + """List Function Data Types + + Returns data types for multiple function IDs + + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_functions_serialize( + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '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 list_function_data_types_for_functions_with_http_info( + self, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionDataTypesList]: + """List Function Data Types + + Returns data types for multiple function IDs + + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_functions_serialize( + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '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 list_function_data_types_for_functions_without_preload_content( + self, + function_ids: Optional[List[StrictInt]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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 Function Data Types + + Returns data types for multiple function IDs + + :param function_ids: + :type function_ids: List[int] + :param authorization: API Key bearer token + :type authorization: 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._list_function_data_types_for_functions_serialize( + function_ids=function_ids, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypesList", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_function_data_types_for_functions_serialize( + self, + function_ids, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'function_ids': 'multi', + } + + _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 + if function_ids is not None: + + _query_params.append(('function_ids', function_ids)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/data_types', + 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 update_function_data_types( + self, + analysis_id: StrictInt, + function_id: StrictInt, + update_function_data_types: UpdateFunctionDataTypes, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionDataTypes: + """Update Function Data Types + + Updates the function data types for a given function + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param update_function_data_types: (required) + :type update_function_data_types: UpdateFunctionDataTypes + :param authorization: API Key bearer token + :type authorization: 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._update_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + update_function_data_types=update_function_data_types, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '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 update_function_data_types_with_http_info( + self, + analysis_id: StrictInt, + function_id: StrictInt, + update_function_data_types: UpdateFunctionDataTypes, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionDataTypes]: + """Update Function Data Types + + Updates the function data types for a given function + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param update_function_data_types: (required) + :type update_function_data_types: UpdateFunctionDataTypes + :param authorization: API Key bearer token + :type authorization: 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._update_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + update_function_data_types=update_function_data_types, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '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 update_function_data_types_without_preload_content( + self, + analysis_id: StrictInt, + function_id: StrictInt, + update_function_data_types: UpdateFunctionDataTypes, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update Function Data Types + + Updates the function data types for a given function + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param update_function_data_types: (required) + :type update_function_data_types: UpdateFunctionDataTypes + :param authorization: API Key bearer token + :type authorization: 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._update_function_data_types_serialize( + analysis_id=analysis_id, + function_id=function_id, + update_function_data_types=update_function_data_types, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionDataTypes", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_function_data_types_serialize( + self, + analysis_id, + function_id, + update_function_data_types, + authorization, + _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 function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if update_function_data_types is not None: + _body_params = update_function_data_types + + + # 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' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v2/analyses/{analysis_id}/functions/{function_id}/data_types', + 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/revengai/api/functions_decompilation_api.py b/revengai/revengai/api/functions_decompilation_api.py new file mode 100644 index 0000000..287b3ed --- /dev/null +++ b/revengai/revengai/api/functions_decompilation_api.py @@ -0,0 +1,2097 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_bool import BaseResponseBool +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +from revengai.models.base_response_str import BaseResponseStr +from revengai.models.comment_update_request import CommentUpdateRequest +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsDecompilationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def check_function_decompilation_task( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionTaskResponse: + """Check the status of a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._check_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '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 check_function_decompilation_task_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionTaskResponse]: + """Check the status of a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._check_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '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 check_function_decompilation_task_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Check the status of a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._check_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _check_function_decompilation_task_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/decompilation/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 create_decompilation_comment( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_decompilation_comment_with_http_info( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "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 create_decompilation_comment_without_preload_content( + self, + function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Create a comment for this function + + Creates a comment associated with a specified function). + + :param function_id: (required) + :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest + :param authorization: API Key bearer token + :type authorization: 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._create_decompilation_comment_serialize( + function_id=function_id, + function_comment_create_request=function_comment_create_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponseCommentResponse", + '422': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_decompilation_comment_serialize( + self, + function_id, + function_comment_create_request, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_comment_create_request is not None: + _body_params = function_comment_create_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/decompilation/comments', + 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 create_function_decompilation_task( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseStr: + """Queues a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_function_decompilation_task_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseStr]: + """Queues a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "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 create_function_decompilation_task_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Queues a function decompilation + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._create_function_decompilation_task_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "BaseResponseStr", + '422': "BaseResponse", + '409': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_function_decompilation_task_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/{function_id}/decompilation', + 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 delete_decompilation_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBool: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_decompilation_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBool]: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 delete_decompilation_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Delete a comment + + Deletes an existing comment. Users can only delete their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._delete_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBool", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_decompilation_comment_serialize( + self, + comment_id, + function_id, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/functions/{function_id}/decompilation/comments/{comment_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 get_decompilation_comments( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListCommentResponse: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_decompilation_comments_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListCommentResponse]: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '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_decompilation_comments_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get comments for this function + + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_decompilation_comments_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_decompilation_comments_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/decompilation/comments', + 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_function_decompilation( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseDecompilationResponse: + """Get decompilation result + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_decompilation_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDecompilationResponse", + '422': "BaseResponse", + '404': "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_function_decompilation_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseDecompilationResponse]: + """Get decompilation result + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_decompilation_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDecompilationResponse", + '422': "BaseResponse", + '404': "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_function_decompilation_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get decompilation result + + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_decompilation_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDecompilationResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_decompilation_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/{function_id}/decompilation', + 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 update_decompilation_comment( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCommentResponse: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_decompilation_comment_with_http_info( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCommentResponse]: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "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 update_decompilation_comment_without_preload_content( + self, + comment_id: Annotated[int, Field(strict=True, ge=1)], + function_id: StrictInt, + comment_update_request: CommentUpdateRequest, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Update a comment + + Updates the content of an existing comment. Users can only update their own comments. + + :param comment_id: (required) + :type comment_id: int + :param function_id: (required) + :type function_id: int + :param comment_update_request: (required) + :type comment_update_request: CommentUpdateRequest + :param authorization: API Key bearer token + :type authorization: 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._update_decompilation_comment_serialize( + comment_id=comment_id, + function_id=function_id, + comment_update_request=comment_update_request, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCommentResponse", + '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_decompilation_comment_serialize( + self, + comment_id, + function_id, + comment_update_request, + authorization, + _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 comment_id is not None: + _path_params['comment_id'] = comment_id + if function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if comment_update_request is not None: + _body_params = comment_update_request + + + # 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' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/functions/{function_id}/decompilation/comments/{comment_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 + ) + + diff --git a/revengai/revengai/api/functions_renaming_history_api.py b/revengai/revengai/api/functions_renaming_history_api.py new file mode 100644 index 0000000..39dde0b --- /dev/null +++ b/revengai/revengai/api/functions_renaming_history_api.py @@ -0,0 +1,1214 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response import BaseResponse +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory +from revengai.models.function_rename import FunctionRename +from revengai.models.functions_list_rename import FunctionsListRename + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsRenamingHistoryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def batch_rename_function( + self, + functions_list_rename: FunctionsListRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponse: + """Batch Rename Functions + + Renames a list of functions using the function IDs Will record name changes in history + + :param functions_list_rename: (required) + :type functions_list_rename: FunctionsListRename + :param authorization: API Key bearer token + :type authorization: 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._batch_rename_function_serialize( + functions_list_rename=functions_list_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 batch_rename_function_with_http_info( + self, + functions_list_rename: FunctionsListRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponse]: + """Batch Rename Functions + + Renames a list of functions using the function IDs Will record name changes in history + + :param functions_list_rename: (required) + :type functions_list_rename: FunctionsListRename + :param authorization: API Key bearer token + :type authorization: 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._batch_rename_function_serialize( + functions_list_rename=functions_list_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 batch_rename_function_without_preload_content( + self, + functions_list_rename: FunctionsListRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Batch Rename Functions + + Renames a list of functions using the function IDs Will record name changes in history + + :param functions_list_rename: (required) + :type functions_list_rename: FunctionsListRename + :param authorization: API Key bearer token + :type authorization: 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._batch_rename_function_serialize( + functions_list_rename=functions_list_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _batch_rename_function_serialize( + self, + functions_list_rename, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if functions_list_rename is not None: + _body_params = functions_list_rename + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/rename/batch', + 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_function_name_history( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseListFunctionNameHistory: + """Get Function Name History + + Gets the name history of a function using the function ID + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_name_history_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionNameHistory", + '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_function_name_history_with_http_info( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseListFunctionNameHistory]: + """Get Function Name History + + Gets the name history of a function using the function ID + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_name_history_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionNameHistory", + '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_function_name_history_without_preload_content( + self, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Get Function Name History + + Gets the name history of a function using the function ID + + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_function_name_history_serialize( + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseListFunctionNameHistory", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_function_name_history_serialize( + self, + function_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/functions/history/{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 rename_function_id( + self, + function_id: StrictInt, + function_rename: FunctionRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponse: + """Rename Function + + Renames a function using the function ID Will record name change history + + :param function_id: (required) + :type function_id: int + :param function_rename: (required) + :type function_rename: FunctionRename + :param authorization: API Key bearer token + :type authorization: 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._rename_function_id_serialize( + function_id=function_id, + function_rename=function_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 rename_function_id_with_http_info( + self, + function_id: StrictInt, + function_rename: FunctionRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponse]: + """Rename Function + + Renames a function using the function ID Will record name change history + + :param function_id: (required) + :type function_id: int + :param function_rename: (required) + :type function_rename: FunctionRename + :param authorization: API Key bearer token + :type authorization: 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._rename_function_id_serialize( + function_id=function_id, + function_rename=function_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 rename_function_id_without_preload_content( + self, + function_id: StrictInt, + function_rename: FunctionRename, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Rename Function + + Renames a function using the function ID Will record name change history + + :param function_id: (required) + :type function_id: int + :param function_rename: (required) + :type function_rename: FunctionRename + :param authorization: API Key bearer token + :type authorization: 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._rename_function_id_serialize( + function_id=function_id, + function_rename=function_rename, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _rename_function_id_serialize( + self, + function_id, + function_rename, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if function_rename is not None: + _body_params = function_rename + + + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/rename/{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 revert_function_name( + self, + function_id: StrictInt, + history_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponse: + """Revert the function name + + Reverts the function name to a previous name using the function ID and history ID + + :param function_id: (required) + :type function_id: int + :param history_id: (required) + :type history_id: int + :param authorization: API Key bearer token + :type authorization: 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._revert_function_name_serialize( + function_id=function_id, + history_id=history_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 revert_function_name_with_http_info( + self, + function_id: StrictInt, + history_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponse]: + """Revert the function name + + Reverts the function name to a previous name using the function ID and history ID + + :param function_id: (required) + :type function_id: int + :param history_id: (required) + :type history_id: int + :param authorization: API Key bearer token + :type authorization: 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._revert_function_name_serialize( + function_id=function_id, + history_id=history_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '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 revert_function_name_without_preload_content( + self, + function_id: StrictInt, + history_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Revert the function name + + Reverts the function name to a previous name using the function ID and history ID + + :param function_id: (required) + :type function_id: int + :param history_id: (required) + :type history_id: int + :param authorization: API Key bearer token + :type authorization: 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._revert_function_name_serialize( + function_id=function_id, + history_id=history_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revert_function_name_serialize( + self, + function_id, + history_id, + authorization, + _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 + if history_id is not None: + _path_params['history_id'] = history_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/functions/history/{function_id}/{history_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 + ) + + diff --git a/revengai/revengai/api/functions_threat_score_api.py b/revengai/revengai/api/functions_threat_score_api.py new file mode 100644 index 0000000..d6fcf54 --- /dev/null +++ b/revengai/revengai/api/functions_threat_score_api.py @@ -0,0 +1,610 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class FunctionsThreatScoreApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_all_function_threat_scores( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionThreatScore: + """Gets the threat score for all functions + + Calculates the threat score for all functions inside of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_all_function_threat_scores_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionThreatScore", + '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_all_function_threat_scores_with_http_info( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionThreatScore]: + """Gets the threat score for all functions + + Calculates the threat score for all functions inside of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_all_function_threat_scores_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionThreatScore", + '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_all_function_threat_scores_without_preload_content( + self, + analysis_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the threat score for all functions + + Calculates the threat score for all functions inside of an analysis + + :param analysis_id: (required) + :type analysis_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_all_function_threat_scores_serialize( + analysis_id=analysis_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionThreatScore", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_all_function_threat_scores_serialize( + self, + analysis_id, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/threat_score', + 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_individual_function_threat_score( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionAnalysisThreatScoreData: + """Gets the threat score analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_individual_function_threat_score_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionAnalysisThreatScoreData", + '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_individual_function_threat_score_with_http_info( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionAnalysisThreatScoreData]: + """Gets the threat score analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_individual_function_threat_score_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionAnalysisThreatScoreData", + '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_individual_function_threat_score_without_preload_content( + self, + analysis_id: StrictInt, + function_id: StrictInt, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets the threat score analysis + + + :param analysis_id: (required) + :type analysis_id: int + :param function_id: (required) + :type function_id: int + :param authorization: API Key bearer token + :type authorization: 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._get_individual_function_threat_score_serialize( + analysis_id=analysis_id, + function_id=function_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionAnalysisThreatScoreData", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_individual_function_threat_score_serialize( + self, + analysis_id, + function_id, + authorization, + _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 function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/functions/{function_id}/threat_score', + 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/revengai/api/models_api.py b/revengai/revengai/api/models_api.py new file mode 100644 index 0000000..ca581f6 --- /dev/null +++ b/revengai/revengai/api/models_api.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from revengai.models.base_response_models_response import BaseResponseModelsResponse + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class ModelsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_models( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseModelsResponse: + """Gets models + + Gets active models available for analysis. + + :param authorization: API Key bearer token + :type authorization: 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._get_models_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseModelsResponse", + '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_models_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseModelsResponse]: + """Gets models + + Gets active models available for analysis. + + :param authorization: API Key bearer token + :type authorization: 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._get_models_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseModelsResponse", + '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_models_without_preload_content( + self, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Gets models + + Gets active models available for analysis. + + :param authorization: API Key bearer token + :type authorization: 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._get_models_serialize( + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseModelsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_models_serialize( + self, + authorization, + _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 + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/models', + 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/revengai/api/search_api.py b/revengai/revengai/api/search_api.py new file mode 100644 index 0000000..be0299d --- /dev/null +++ b/revengai/revengai/api/search_api.py @@ -0,0 +1,1500 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse +from revengai.models.filters import Filters +from revengai.models.order import Order + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class SearchApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def search_binaries( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None, + partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseBinarySearchResponse: + """Binaries search + + Searches for a specific binary + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the binary being searched + :type partial_name: str + :param partial_sha256: The partial or full sha256 of the binary being searched + :type partial_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param user_files_only: Whether to only search user's uploaded files + :type user_files_only: bool + :param authorization: API Key bearer token + :type authorization: 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._search_binaries_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + partial_sha256=partial_sha256, + tags=tags, + model_name=model_name, + user_files_only=user_files_only, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinarySearchResponse", + '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 search_binaries_with_http_info( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None, + partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseBinarySearchResponse]: + """Binaries search + + Searches for a specific binary + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the binary being searched + :type partial_name: str + :param partial_sha256: The partial or full sha256 of the binary being searched + :type partial_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param user_files_only: Whether to only search user's uploaded files + :type user_files_only: bool + :param authorization: API Key bearer token + :type authorization: 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._search_binaries_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + partial_sha256=partial_sha256, + tags=tags, + model_name=model_name, + user_files_only=user_files_only, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinarySearchResponse", + '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 search_binaries_without_preload_content( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None, + partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Binaries search + + Searches for a specific binary + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the binary being searched + :type partial_name: str + :param partial_sha256: The partial or full sha256 of the binary being searched + :type partial_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param user_files_only: Whether to only search user's uploaded files + :type user_files_only: bool + :param authorization: API Key bearer token + :type authorization: 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._search_binaries_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + partial_sha256=partial_sha256, + tags=tags, + model_name=model_name, + user_files_only=user_files_only, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseBinarySearchResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_binaries_serialize( + self, + page, + page_size, + partial_name, + partial_sha256, + tags, + model_name, + user_files_only, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'tags': 'multi', + } + + _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 + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if partial_name is not None: + + _query_params.append(('partial_name', partial_name)) + + if partial_sha256 is not None: + + _query_params.append(('partial_sha256', partial_sha256)) + + if tags is not None: + + _query_params.append(('tags', tags)) + + if model_name is not None: + + _query_params.append(('model_name', model_name)) + + if user_files_only is not None: + + _query_params.append(('user_files_only', user_files_only)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/search/binaries', + 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 search_collections( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None, + partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None, + partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, + order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, + order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseCollectionSearchResponse: + """Collections search + + Searches for a specific collection + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_collection_name: The partial or full name of the collection being searched + :type partial_collection_name: str + :param partial_binary_name: The partial or full name of the binary belonging to the collection + :type partial_binary_name: str + :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection + :type partial_binary_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param filters: The filters to be used for the search + :type filters: List[Filters] + :param order_by: The field to sort the order by in the results + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order_by_direction: The order direction in which to return results + :type order_by_direction: Order + :param authorization: API Key bearer token + :type authorization: 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._search_collections_serialize( + page=page, + page_size=page_size, + partial_collection_name=partial_collection_name, + partial_binary_name=partial_binary_name, + partial_binary_sha256=partial_binary_sha256, + tags=tags, + model_name=model_name, + filters=filters, + order_by=order_by, + order_by_direction=order_by_direction, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionSearchResponse", + '422': "BaseResponse", + '404': "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 search_collections_with_http_info( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None, + partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None, + partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, + order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, + order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseCollectionSearchResponse]: + """Collections search + + Searches for a specific collection + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_collection_name: The partial or full name of the collection being searched + :type partial_collection_name: str + :param partial_binary_name: The partial or full name of the binary belonging to the collection + :type partial_binary_name: str + :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection + :type partial_binary_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param filters: The filters to be used for the search + :type filters: List[Filters] + :param order_by: The field to sort the order by in the results + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order_by_direction: The order direction in which to return results + :type order_by_direction: Order + :param authorization: API Key bearer token + :type authorization: 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._search_collections_serialize( + page=page, + page_size=page_size, + partial_collection_name=partial_collection_name, + partial_binary_name=partial_binary_name, + partial_binary_sha256=partial_binary_sha256, + tags=tags, + model_name=model_name, + filters=filters, + order_by=order_by, + order_by_direction=order_by_direction, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionSearchResponse", + '422': "BaseResponse", + '404': "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 search_collections_without_preload_content( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None, + partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None, + partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, + order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, + order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Collections search + + Searches for a specific collection + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_collection_name: The partial or full name of the collection being searched + :type partial_collection_name: str + :param partial_binary_name: The partial or full name of the binary belonging to the collection + :type partial_binary_name: str + :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection + :type partial_binary_sha256: str + :param tags: The tags to be searched for + :type tags: List[str] + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param filters: The filters to be used for the search + :type filters: List[Filters] + :param order_by: The field to sort the order by in the results + :type order_by: AppApiRestV2CollectionsEnumsOrderBy + :param order_by_direction: The order direction in which to return results + :type order_by_direction: Order + :param authorization: API Key bearer token + :type authorization: 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._search_collections_serialize( + page=page, + page_size=page_size, + partial_collection_name=partial_collection_name, + partial_binary_name=partial_binary_name, + partial_binary_sha256=partial_binary_sha256, + tags=tags, + model_name=model_name, + filters=filters, + order_by=order_by, + order_by_direction=order_by_direction, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseCollectionSearchResponse", + '422': "BaseResponse", + '404': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_collections_serialize( + self, + page, + page_size, + partial_collection_name, + partial_binary_name, + partial_binary_sha256, + tags, + model_name, + filters, + order_by, + order_by_direction, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'tags': 'multi', + 'filters': 'multi', + } + + _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 + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if partial_collection_name is not None: + + _query_params.append(('partial_collection_name', partial_collection_name)) + + if partial_binary_name is not None: + + _query_params.append(('partial_binary_name', partial_binary_name)) + + if partial_binary_sha256 is not None: + + _query_params.append(('partial_binary_sha256', partial_binary_sha256)) + + if tags is not None: + + _query_params.append(('tags', tags)) + + if model_name is not None: + + _query_params.append(('model_name', model_name)) + + if filters is not None: + + _query_params.append(('filters', filters)) + + if order_by is not None: + + _query_params.append(('order_by', order_by.value)) + + if order_by_direction is not None: + + _query_params.append(('order_by_direction', order_by_direction.value)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/search/collections', + 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 search_functions( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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, + ) -> BaseResponseFunctionSearchResponse: + """Functions search + + Searches for a specific function + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the function being searched + :type partial_name: str + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param authorization: API Key bearer token + :type authorization: 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._search_functions_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + model_name=model_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionSearchResponse", + '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 search_functions_with_http_info( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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[BaseResponseFunctionSearchResponse]: + """Functions search + + Searches for a specific function + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the function being searched + :type partial_name: str + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param authorization: API Key bearer token + :type authorization: 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._search_functions_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + model_name=model_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionSearchResponse", + '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 search_functions_without_preload_content( + self, + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, + partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, + authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = 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: + """Functions search + + Searches for a specific function + + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: int + :param partial_name: The partial or full name of the function being searched + :type partial_name: str + :param model_name: The name of the model used to analyze the binary the function belongs to + :type model_name: str + :param authorization: API Key bearer token + :type authorization: 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._search_functions_serialize( + page=page, + page_size=page_size, + partial_name=partial_name, + model_name=model_name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionSearchResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_functions_serialize( + self, + page, + page_size, + partial_name, + model_name, + authorization, + _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 + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if partial_name is not None: + + _query_params.append(('partial_name', partial_name)) + + if model_name is not None: + + _query_params.append(('model_name', model_name)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/search/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 search_tags( + self, + partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")], + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = 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, + ) -> BaseResponseTagSearchResponse: + """Tags search + + Searches for tags by there name + + :param partial_name: The partial or full name of the tag to search for (required) + :type partial_name: str + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: 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._search_tags_serialize( + partial_name=partial_name, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTagSearchResponse", + '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 search_tags_with_http_info( + self, + partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")], + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = 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[BaseResponseTagSearchResponse]: + """Tags search + + Searches for tags by there name + + :param partial_name: The partial or full name of the tag to search for (required) + :type partial_name: str + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: 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._search_tags_serialize( + partial_name=partial_name, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTagSearchResponse", + '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 search_tags_without_preload_content( + self, + partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")], + page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = 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: + """Tags search + + Searches for tags by there name + + :param partial_name: The partial or full name of the tag to search for (required) + :type partial_name: str + :param page: The page number to retrieve. + :type page: int + :param page_size: Number of items per page. + :type page_size: 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._search_tags_serialize( + partial_name=partial_name, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseTagSearchResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_tags_serialize( + self, + partial_name, + page, + page_size, + _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 + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if partial_name is not None: + + _query_params.append(('partial_name', partial_name)) + + # 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/search/tags', + 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/revengai/api_client.py b/revengai/revengai/api_client.py new file mode 100644 index 0000000..583d00b --- /dev/null +++ b/revengai/revengai/api_client.py @@ -0,0 +1,804 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile +import uuid + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from revengai.configuration import Configuration +from revengai.api_response import ApiResponse, T as ApiResponseT +import revengai.models +from revengai import rest +from revengai.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/v1.72.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, uuid.UUID): + return str(obj) + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(revengai.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/revengai/revengai/api_response.py b/revengai/revengai/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/revengai/revengai/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/revengai/revengai/configuration.py b/revengai/revengai/configuration.py new file mode 100644 index 0000000..00e349c --- /dev/null +++ b/revengai/revengai/configuration.py @@ -0,0 +1,602 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "APIKey": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = revengai.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.reveng.ai" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("revengai") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if 'APIKey' in self.api_key: + auth['APIKey'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix( + 'APIKey', + ), + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v1.72.0\n"\ + "SDK Package Version: v1.72.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.reveng.ai", + 'description': "Production", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/revengai/revengai/exceptions.py b/revengai/revengai/exceptions.py new file mode 100644 index 0000000..a99f724 --- /dev/null +++ b/revengai/revengai/exceptions.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/revengai/revengai/models/__init__.py b/revengai/revengai/models/__init__.py new file mode 100644 index 0000000..b23e717 --- /dev/null +++ b/revengai/revengai/models/__init__.py @@ -0,0 +1,645 @@ +# coding: utf-8 + +# flake8: noqa +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +if __import__("typing").TYPE_CHECKING: + # import models into model package + from revengai.models.ann_function import ANNFunction + from revengai.models.addr import Addr + from revengai.models.ai_decompilation_rating import AiDecompilationRating + from revengai.models.ai_unstrip_request import AiUnstripRequest + from revengai.models.analysis_access_info import AnalysisAccessInfo + from revengai.models.analysis_config import AnalysisConfig + from revengai.models.analysis_create_request import AnalysisCreateRequest + from revengai.models.analysis_create_response import AnalysisCreateResponse + from revengai.models.analysis_detail_response import AnalysisDetailResponse + from revengai.models.analysis_functions import AnalysisFunctions + from revengai.models.analysis_record import AnalysisRecord + from revengai.models.analysis_scope import AnalysisScope + from revengai.models.analysis_strings_response import AnalysisStringsResponse + from revengai.models.analysis_tags import AnalysisTags + from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData + from revengai.models.analysis_update_request import AnalysisUpdateRequest + from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest + from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse + from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus + from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy + from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem + from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy + from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction + from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction + from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem + from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus + from revengai.models.argument import Argument + from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse + from revengai.models.auto_unstrip_request import AutoUnstripRequest + from revengai.models.auto_unstrip_response import AutoUnstripResponse + from revengai.models.base_response import BaseResponse + from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse + from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse + from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions + from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse + from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags + from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData + from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse + from revengai.models.base_response_basic import BaseResponseBasic + from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse + from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse + from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse + from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse + from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse + from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse + from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse + from revengai.models.base_response_bool import BaseResponseBool + from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence + from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse + from revengai.models.base_response_capabilities import BaseResponseCapabilities + from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse + from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse + from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse + from revengai.models.base_response_collection_response import BaseResponseCollectionResponse + from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse + from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse + from revengai.models.base_response_comment_response import BaseResponseCommentResponse + from revengai.models.base_response_communities import BaseResponseCommunities + from revengai.models.base_response_created import BaseResponseCreated + from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse + from revengai.models.base_response_dict import BaseResponseDict + from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus + from revengai.models.base_response_external_response import BaseResponseExternalResponse + from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData + from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse + from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse + from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes + from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList + from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse + from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse + from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse + from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore + from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse + from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes + from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList + from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse + from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask + from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse + from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse + from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults + from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse + from revengai.models.base_response_list_die_match import BaseResponseListDieMatch + from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence + from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory + from revengai.models.base_response_list_sbom import BaseResponseListSBOM + from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse + from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence + from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse + from revengai.models.base_response_login_response import BaseResponseLoginResponse + from revengai.models.base_response_logs import BaseResponseLogs + from revengai.models.base_response_models_response import BaseResponseModelsResponse + from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis + from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse + from revengai.models.base_response_params import BaseResponseParams + from revengai.models.base_response_process_dumps import BaseResponseProcessDumps + from revengai.models.base_response_process_registry import BaseResponseProcessRegistry + from revengai.models.base_response_process_tree import BaseResponseProcessTree + from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse + from revengai.models.base_response_recent import BaseResponseRecent + from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse + from revengai.models.base_response_status import BaseResponseStatus + from revengai.models.base_response_str import BaseResponseStr + from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo + from revengai.models.base_response_ttps import BaseResponseTTPS + from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse + from revengai.models.base_response_task_response import BaseResponseTaskResponse + from revengai.models.base_response_upload_response import BaseResponseUploadResponse + from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities + from revengai.models.basic import Basic + from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse + from revengai.models.binary_additional_response import BinaryAdditionalResponse + from revengai.models.binary_ann_form import BinaryAnnForm + from revengai.models.binary_ann_list_response import BinaryAnnListResponse + from revengai.models.binary_config import BinaryConfig + from revengai.models.binary_details_response import BinaryDetailsResponse + from revengai.models.binary_externals_response import BinaryExternalsResponse + from revengai.models.binary_search_response import BinarySearchResponse + from revengai.models.binary_search_result import BinarySearchResult + from revengai.models.binary_task_status import BinaryTaskStatus + from revengai.models.block import Block + from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse + from revengai.models.boundary import Boundary + from revengai.models.box_plot_confidence import BoxPlotConfidence + from revengai.models.callee_function_info import CalleeFunctionInfo + from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse + from revengai.models.caller_function_info import CallerFunctionInfo + from revengai.models.capabilities import Capabilities + from revengai.models.capability import Capability + from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse + from revengai.models.child_binaries_response import ChildBinariesResponse + from revengai.models.code_signature_model import CodeSignatureModel + from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest + from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse + from revengai.models.collection_binary_response import CollectionBinaryResponse + from revengai.models.collection_create_request import CollectionCreateRequest + from revengai.models.collection_list_item import CollectionListItem + from revengai.models.collection_response import CollectionResponse + from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner + from revengai.models.collection_scope import CollectionScope + from revengai.models.collection_search_response import CollectionSearchResponse + from revengai.models.collection_search_result import CollectionSearchResult + from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest + from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse + from revengai.models.collection_update_request import CollectionUpdateRequest + from revengai.models.comment_base import CommentBase + from revengai.models.comment_response import CommentResponse + from revengai.models.comment_update_request import CommentUpdateRequest + from revengai.models.communities import Communities + from revengai.models.community_match_percentages import CommunityMatchPercentages + from revengai.models.confidence_type import ConfidenceType + from revengai.models.context import Context + from revengai.models.created import Created + from revengai.models.decompilation_comment_context import DecompilationCommentContext + from revengai.models.decompilation_response import DecompilationResponse + from revengai.models.die_match import DieMatch + from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput + from revengai.models.elf_import_model import ELFImportModel + from revengai.models.elf_model import ELFModel + from revengai.models.elf_relocation import ELFRelocation + from revengai.models.elf_section import ELFSection + from revengai.models.elf_security import ELFSecurity + 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.entrypoint_model import EntrypointModel + from revengai.models.enumeration import Enumeration + from revengai.models.error_model import ErrorModel + from revengai.models.export_model import ExportModel + from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult + from revengai.models.external_response import ExternalResponse + from revengai.models.file_format import FileFormat + from revengai.models.file_hashes import FileHashes + from revengai.models.file_metadata import FileMetadata + from revengai.models.filters import Filters + from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData + from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse + from revengai.models.function_block_response import FunctionBlockResponse + from revengai.models.function_blocks_response import FunctionBlocksResponse + from revengai.models.function_boundary import FunctionBoundary + from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence + from revengai.models.function_capability_response import FunctionCapabilityResponse + from revengai.models.function_comment_create_request import FunctionCommentCreateRequest + from revengai.models.function_data_types import FunctionDataTypes + from revengai.models.function_data_types_list import FunctionDataTypesList + from revengai.models.function_data_types_list_item import FunctionDataTypesListItem + from revengai.models.function_data_types_params import FunctionDataTypesParams + from revengai.models.function_data_types_status import FunctionDataTypesStatus + from revengai.models.function_header import FunctionHeader + from revengai.models.function_info_input import FunctionInfoInput + from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner + from revengai.models.function_info_output import FunctionInfoOutput + from revengai.models.function_local_variable_response import FunctionLocalVariableResponse + from revengai.models.function_mapping_full import FunctionMappingFull + from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody + from revengai.models.function_name_history import FunctionNameHistory + from revengai.models.function_name_input import FunctionNameInput + from revengai.models.function_param_response import FunctionParamResponse + from revengai.models.function_rename import FunctionRename + from revengai.models.function_rename_map import FunctionRenameMap + from revengai.models.function_search_response import FunctionSearchResponse + from revengai.models.function_search_result import FunctionSearchResult + from revengai.models.function_string import FunctionString + from revengai.models.function_strings_response import FunctionStringsResponse + from revengai.models.function_task_response import FunctionTaskResponse + from revengai.models.function_task_status import FunctionTaskStatus + from revengai.models.function_threat_score import FunctionThreatScore + from revengai.models.function_type_input import FunctionTypeInput + from revengai.models.function_type_output import FunctionTypeOutput + from revengai.models.functions_detail_response import FunctionsDetailResponse + from revengai.models.functions_list_rename import FunctionsListRename + from revengai.models.generate_function_data_types import GenerateFunctionDataTypes + from revengai.models.generation_status_list import GenerationStatusList + from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse + from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask + from revengai.models.get_public_user_response import GetPublicUserResponse + from revengai.models.get_user_response import GetUserResponse + from revengai.models.global_variable import GlobalVariable + from revengai.models.isa import ISA + from revengai.models.icon_model import IconModel + from revengai.models.import_model import ImportModel + from revengai.models.inverse_function_map_item import InverseFunctionMapItem + from revengai.models.inverse_string_map_item import InverseStringMapItem + from revengai.models.inverse_value import InverseValue + from revengai.models.list_collection_results import ListCollectionResults + from revengai.models.login_request import LoginRequest + from revengai.models.login_response import LoginResponse + from revengai.models.logs import Logs + from revengai.models.matched_function_group import MatchedFunctionGroup + from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion + from revengai.models.meta_model import MetaModel + from revengai.models.model_name import ModelName + from revengai.models.models_response import ModelsResponse + from revengai.models.nearest_neighbor import NearestNeighbor + from revengai.models.network_overview_dns import NetworkOverviewDns + from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer + from revengai.models.network_overview_metadata import NetworkOverviewMetadata + from revengai.models.network_overview_response import NetworkOverviewResponse + from revengai.models.order import Order + from revengai.models.origin import Origin + from revengai.models.pdb_debug_model import PDBDebugModel + from revengai.models.pe_model import PEModel + from revengai.models.pagination_model import PaginationModel + from revengai.models.params import Params + from revengai.models.platform import Platform + from revengai.models.process import Process + from revengai.models.process_dump import ProcessDump + from revengai.models.process_dump_metadata import ProcessDumpMetadata + from revengai.models.process_dumps import ProcessDumps + from revengai.models.process_dumps_data import ProcessDumpsData + from revengai.models.process_registry import ProcessRegistry + from revengai.models.process_tree import ProcessTree + from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse + from revengai.models.re_analysis_form import ReAnalysisForm + from revengai.models.recent import Recent + from revengai.models.registry import Registry + from revengai.models.relative_binary_response import RelativeBinaryResponse + from revengai.models.sbom import SBOM + from revengai.models.sbom_package import SBOMPackage + from revengai.models.sandbox_options import SandboxOptions + from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig + from revengai.models.search_binary_ids import SearchBinaryIds + from revengai.models.search_function_ids import SearchFunctionIds + from revengai.models.section_model import SectionModel + from revengai.models.security_checks_response import SecurityChecksResponse + from revengai.models.security_checks_result import SecurityChecksResult + from revengai.models.security_model import SecurityModel + from revengai.models.severity_type import SeverityType + from revengai.models.similar_functions_response import SimilarFunctionsResponse + from revengai.models.single_code_certificate_model import SingleCodeCertificateModel + from revengai.models.single_code_signature_model import SingleCodeSignatureModel + from revengai.models.single_pdb_entry_model import SinglePDBEntryModel + from revengai.models.single_section_model import SingleSectionModel + from revengai.models.stack_variable import StackVariable + from revengai.models.status_input import StatusInput + from revengai.models.status_output import StatusOutput + from revengai.models.string_functions import StringFunctions + from revengai.models.structure import Structure + from revengai.models.structure_member import StructureMember + from revengai.models.symbols import Symbols + from revengai.models.symbols_info import SymbolsInfo + from revengai.models.ttps import TTPS + from revengai.models.ttps_attack import TTPSAttack + from revengai.models.ttps_data import TTPSData + from revengai.models.ttps_element import TTPSElement + from revengai.models.ttps_occurance import TTPSOccurance + from revengai.models.tag import Tag + from revengai.models.tag_confidence_body import TagConfidenceBody + from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence + from revengai.models.tag_response import TagResponse + from revengai.models.tag_search_response import TagSearchResponse + from revengai.models.tag_search_result import TagSearchResult + from revengai.models.tags import Tags + from revengai.models.task_response import TaskResponse + from revengai.models.task_status import TaskStatus + from revengai.models.threat_score_function_body import ThreatScoreFunctionBody + from revengai.models.timestamp_model import TimestampModel + from revengai.models.type_definition import TypeDefinition + from revengai.models.unstrip_request import UnstripRequest + from revengai.models.update_function_data_types import UpdateFunctionDataTypes + from revengai.models.upload_file_type import UploadFileType + from revengai.models.upload_response import UploadResponse + from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest + from revengai.models.user_activity_response import UserActivityResponse + from revengai.models.vulnerabilities import Vulnerabilities + from revengai.models.vulnerability import Vulnerability + from revengai.models.vulnerability_type import VulnerabilityType + from revengai.models.workspace import Workspace + +else: + from lazy_imports import LazyModule, as_package, load + + load( + LazyModule( + *as_package(__file__), + """# import models into model package +from revengai.models.ann_function import ANNFunction +from revengai.models.addr import Addr +from revengai.models.ai_decompilation_rating import AiDecompilationRating +from revengai.models.ai_unstrip_request import AiUnstripRequest +from revengai.models.analysis_access_info import AnalysisAccessInfo +from revengai.models.analysis_config import AnalysisConfig +from revengai.models.analysis_create_request import AnalysisCreateRequest +from revengai.models.analysis_create_response import AnalysisCreateResponse +from revengai.models.analysis_detail_response import AnalysisDetailResponse +from revengai.models.analysis_functions import AnalysisFunctions +from revengai.models.analysis_record import AnalysisRecord +from revengai.models.analysis_scope import AnalysisScope +from revengai.models.analysis_strings_response import AnalysisStringsResponse +from revengai.models.analysis_tags import AnalysisTags +from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData +from revengai.models.analysis_update_request import AnalysisUpdateRequest +from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest +from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse +from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus +from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy +from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy +from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction +from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction +from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem +from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus +from revengai.models.argument import Argument +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse +from revengai.models.auto_unstrip_request import AutoUnstripRequest +from revengai.models.auto_unstrip_response import AutoUnstripResponse +from revengai.models.base_response import BaseResponse +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse +from revengai.models.base_response_basic import BaseResponseBasic +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse +from revengai.models.base_response_bool import BaseResponseBool +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse +from revengai.models.base_response_capabilities import BaseResponseCapabilities +from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse +from revengai.models.base_response_comment_response import BaseResponseCommentResponse +from revengai.models.base_response_communities import BaseResponseCommunities +from revengai.models.base_response_created import BaseResponseCreated +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse +from revengai.models.base_response_dict import BaseResponseDict +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus +from revengai.models.base_response_external_response import BaseResponseExternalResponse +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory +from revengai.models.base_response_list_sbom import BaseResponseListSBOM +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse +from revengai.models.base_response_login_response import BaseResponseLoginResponse +from revengai.models.base_response_logs import BaseResponseLogs +from revengai.models.base_response_models_response import BaseResponseModelsResponse +from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse +from revengai.models.base_response_params import BaseResponseParams +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry +from revengai.models.base_response_process_tree import BaseResponseProcessTree +from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse +from revengai.models.base_response_recent import BaseResponseRecent +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse +from revengai.models.base_response_status import BaseResponseStatus +from revengai.models.base_response_str import BaseResponseStr +from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo +from revengai.models.base_response_ttps import BaseResponseTTPS +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse +from revengai.models.base_response_task_response import BaseResponseTaskResponse +from revengai.models.base_response_upload_response import BaseResponseUploadResponse +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities +from revengai.models.basic import Basic +from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse +from revengai.models.binary_additional_response import BinaryAdditionalResponse +from revengai.models.binary_ann_form import BinaryAnnForm +from revengai.models.binary_ann_list_response import BinaryAnnListResponse +from revengai.models.binary_config import BinaryConfig +from revengai.models.binary_details_response import BinaryDetailsResponse +from revengai.models.binary_externals_response import BinaryExternalsResponse +from revengai.models.binary_search_response import BinarySearchResponse +from revengai.models.binary_search_result import BinarySearchResult +from revengai.models.binary_task_status import BinaryTaskStatus +from revengai.models.block import Block +from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse +from revengai.models.boundary import Boundary +from revengai.models.box_plot_confidence import BoxPlotConfidence +from revengai.models.callee_function_info import CalleeFunctionInfo +from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse +from revengai.models.caller_function_info import CallerFunctionInfo +from revengai.models.capabilities import Capabilities +from revengai.models.capability import Capability +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse +from revengai.models.child_binaries_response import ChildBinariesResponse +from revengai.models.code_signature_model import CodeSignatureModel +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest +from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse +from revengai.models.collection_binary_response import CollectionBinaryResponse +from revengai.models.collection_create_request import CollectionCreateRequest +from revengai.models.collection_list_item import CollectionListItem +from revengai.models.collection_response import CollectionResponse +from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner +from revengai.models.collection_scope import CollectionScope +from revengai.models.collection_search_response import CollectionSearchResponse +from revengai.models.collection_search_result import CollectionSearchResult +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest +from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse +from revengai.models.collection_update_request import CollectionUpdateRequest +from revengai.models.comment_base import CommentBase +from revengai.models.comment_response import CommentResponse +from revengai.models.comment_update_request import CommentUpdateRequest +from revengai.models.communities import Communities +from revengai.models.community_match_percentages import CommunityMatchPercentages +from revengai.models.confidence_type import ConfidenceType +from revengai.models.context import Context +from revengai.models.created import Created +from revengai.models.decompilation_comment_context import DecompilationCommentContext +from revengai.models.decompilation_response import DecompilationResponse +from revengai.models.die_match import DieMatch +from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput +from revengai.models.elf_import_model import ELFImportModel +from revengai.models.elf_model import ELFModel +from revengai.models.elf_relocation import ELFRelocation +from revengai.models.elf_section import ELFSection +from revengai.models.elf_security import ELFSecurity +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.entrypoint_model import EntrypointModel +from revengai.models.enumeration import Enumeration +from revengai.models.error_model import ErrorModel +from revengai.models.export_model import ExportModel +from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult +from revengai.models.external_response import ExternalResponse +from revengai.models.file_format import FileFormat +from revengai.models.file_hashes import FileHashes +from revengai.models.file_metadata import FileMetadata +from revengai.models.filters import Filters +from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData +from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse +from revengai.models.function_block_response import FunctionBlockResponse +from revengai.models.function_blocks_response import FunctionBlocksResponse +from revengai.models.function_boundary import FunctionBoundary +from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence +from revengai.models.function_capability_response import FunctionCapabilityResponse +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest +from revengai.models.function_data_types import FunctionDataTypes +from revengai.models.function_data_types_list import FunctionDataTypesList +from revengai.models.function_data_types_list_item import FunctionDataTypesListItem +from revengai.models.function_data_types_params import FunctionDataTypesParams +from revengai.models.function_data_types_status import FunctionDataTypesStatus +from revengai.models.function_header import FunctionHeader +from revengai.models.function_info_input import FunctionInfoInput +from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner +from revengai.models.function_info_output import FunctionInfoOutput +from revengai.models.function_local_variable_response import FunctionLocalVariableResponse +from revengai.models.function_mapping_full import FunctionMappingFull +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody +from revengai.models.function_name_history import FunctionNameHistory +from revengai.models.function_name_input import FunctionNameInput +from revengai.models.function_param_response import FunctionParamResponse +from revengai.models.function_rename import FunctionRename +from revengai.models.function_rename_map import FunctionRenameMap +from revengai.models.function_search_response import FunctionSearchResponse +from revengai.models.function_search_result import FunctionSearchResult +from revengai.models.function_string import FunctionString +from revengai.models.function_strings_response import FunctionStringsResponse +from revengai.models.function_task_response import FunctionTaskResponse +from revengai.models.function_task_status import FunctionTaskStatus +from revengai.models.function_threat_score import FunctionThreatScore +from revengai.models.function_type_input import FunctionTypeInput +from revengai.models.function_type_output import FunctionTypeOutput +from revengai.models.functions_detail_response import FunctionsDetailResponse +from revengai.models.functions_list_rename import FunctionsListRename +from revengai.models.generate_function_data_types import GenerateFunctionDataTypes +from revengai.models.generation_status_list import GenerationStatusList +from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse +from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask +from revengai.models.get_public_user_response import GetPublicUserResponse +from revengai.models.get_user_response import GetUserResponse +from revengai.models.global_variable import GlobalVariable +from revengai.models.isa import ISA +from revengai.models.icon_model import IconModel +from revengai.models.import_model import ImportModel +from revengai.models.inverse_function_map_item import InverseFunctionMapItem +from revengai.models.inverse_string_map_item import InverseStringMapItem +from revengai.models.inverse_value import InverseValue +from revengai.models.list_collection_results import ListCollectionResults +from revengai.models.login_request import LoginRequest +from revengai.models.login_response import LoginResponse +from revengai.models.logs import Logs +from revengai.models.matched_function_group import MatchedFunctionGroup +from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion +from revengai.models.meta_model import MetaModel +from revengai.models.model_name import ModelName +from revengai.models.models_response import ModelsResponse +from revengai.models.nearest_neighbor import NearestNeighbor +from revengai.models.network_overview_dns import NetworkOverviewDns +from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer +from revengai.models.network_overview_metadata import NetworkOverviewMetadata +from revengai.models.network_overview_response import NetworkOverviewResponse +from revengai.models.order import Order +from revengai.models.origin import Origin +from revengai.models.pdb_debug_model import PDBDebugModel +from revengai.models.pe_model import PEModel +from revengai.models.pagination_model import PaginationModel +from revengai.models.params import Params +from revengai.models.platform import Platform +from revengai.models.process import Process +from revengai.models.process_dump import ProcessDump +from revengai.models.process_dump_metadata import ProcessDumpMetadata +from revengai.models.process_dumps import ProcessDumps +from revengai.models.process_dumps_data import ProcessDumpsData +from revengai.models.process_registry import ProcessRegistry +from revengai.models.process_tree import ProcessTree +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse +from revengai.models.re_analysis_form import ReAnalysisForm +from revengai.models.recent import Recent +from revengai.models.registry import Registry +from revengai.models.relative_binary_response import RelativeBinaryResponse +from revengai.models.sbom import SBOM +from revengai.models.sbom_package import SBOMPackage +from revengai.models.sandbox_options import SandboxOptions +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig +from revengai.models.search_binary_ids import SearchBinaryIds +from revengai.models.search_function_ids import SearchFunctionIds +from revengai.models.section_model import SectionModel +from revengai.models.security_checks_response import SecurityChecksResponse +from revengai.models.security_checks_result import SecurityChecksResult +from revengai.models.security_model import SecurityModel +from revengai.models.severity_type import SeverityType +from revengai.models.similar_functions_response import SimilarFunctionsResponse +from revengai.models.single_code_certificate_model import SingleCodeCertificateModel +from revengai.models.single_code_signature_model import SingleCodeSignatureModel +from revengai.models.single_pdb_entry_model import SinglePDBEntryModel +from revengai.models.single_section_model import SingleSectionModel +from revengai.models.stack_variable import StackVariable +from revengai.models.status_input import StatusInput +from revengai.models.status_output import StatusOutput +from revengai.models.string_functions import StringFunctions +from revengai.models.structure import Structure +from revengai.models.structure_member import StructureMember +from revengai.models.symbols import Symbols +from revengai.models.symbols_info import SymbolsInfo +from revengai.models.ttps import TTPS +from revengai.models.ttps_attack import TTPSAttack +from revengai.models.ttps_data import TTPSData +from revengai.models.ttps_element import TTPSElement +from revengai.models.ttps_occurance import TTPSOccurance +from revengai.models.tag import Tag +from revengai.models.tag_confidence_body import TagConfidenceBody +from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence +from revengai.models.tag_response import TagResponse +from revengai.models.tag_search_response import TagSearchResponse +from revengai.models.tag_search_result import TagSearchResult +from revengai.models.tags import Tags +from revengai.models.task_response import TaskResponse +from revengai.models.task_status import TaskStatus +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody +from revengai.models.timestamp_model import TimestampModel +from revengai.models.type_definition import TypeDefinition +from revengai.models.unstrip_request import UnstripRequest +from revengai.models.update_function_data_types import UpdateFunctionDataTypes +from revengai.models.upload_file_type import UploadFileType +from revengai.models.upload_response import UploadResponse +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest +from revengai.models.user_activity_response import UserActivityResponse +from revengai.models.vulnerabilities import Vulnerabilities +from revengai.models.vulnerability import Vulnerability +from revengai.models.vulnerability_type import VulnerabilityType +from revengai.models.workspace import Workspace + +""", + name=__name__, + doc=__doc__, + ) + ) diff --git a/revengai/revengai/models/addr.py b/revengai/revengai/models/addr.py new file mode 100644 index 0000000..b24d39d --- /dev/null +++ b/revengai/revengai/models/addr.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr, ValidationError, field_validator +from typing import Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +ADDR_ANY_OF_SCHEMAS = ["int", "str"] + +class Addr(BaseModel): + """ + Addr + """ + + # data type: int + anyof_schema_1_validator: Optional[StrictInt] = None + # data type: str + anyof_schema_2_validator: Optional[StrictStr] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[int, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "int", "str" } + + 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): + if v is None: + return v + + instance = Addr.model_construct() + error_messages = [] + # validate data type: int + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Addr with anyOf schemas: int, str. 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() + if json_str is None: + return instance + + error_messages = [] + # deserialize data into int + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + 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 Addr with anyOf schemas: int, str. 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], int, str]]: + """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/revengai/models/ai_decompilation_rating.py b/revengai/revengai/models/ai_decompilation_rating.py new file mode 100644 index 0000000..092fbc8 --- /dev/null +++ b/revengai/revengai/models/ai_decompilation_rating.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AiDecompilationRating(str, Enum): + """ + AiDecompilationRating + """ + + """ + allowed enum values + """ + POSITIVE = 'POSITIVE' + NEGATIVE = 'NEGATIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AiDecompilationRating from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/ai_unstrip_request.py b/revengai/revengai/models/ai_unstrip_request.py new file mode 100644 index 0000000..846d76e --- /dev/null +++ b/revengai/revengai/models/ai_unstrip_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AiUnstripRequest(BaseModel): + """ + AiUnstripRequest + """ # noqa: E501 + apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the suggested function names to the target functions, default is False") + __properties: ClassVar[List[str]] = ["apply"] + + 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 AiUnstripRequest 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 AiUnstripRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apply": obj.get("apply") if obj.get("apply") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_access_info.py b/revengai/revengai/models/analysis_access_info.py new file mode 100644 index 0000000..12a41b6 --- /dev/null +++ b/revengai/revengai/models/analysis_access_info.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisAccessInfo(BaseModel): + """ + AnalysisAccessInfo + """ # noqa: E501 + owner: StrictBool + username: StrictStr + __properties: ClassVar[List[str]] = ["owner", "username"] + + 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 AnalysisAccessInfo 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 AnalysisAccessInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "owner": obj.get("owner"), + "username": obj.get("username") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_config.py b/revengai/revengai/models/analysis_config.py new file mode 100644 index 0000000..26a3ab7 --- /dev/null +++ b/revengai/revengai/models/analysis_config.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.sandbox_options import SandboxOptions +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisConfig(BaseModel): + """ + AnalysisConfig + """ # noqa: E501 + scrape_third_party_config: Optional[ScrapeThirdPartyConfig] = Field(default=None, description="Settings to scrape third party sources") + generate_cves: Optional[StrictBool] = Field(default=False, description="A configuration option for fetching CVEs data.") + generate_sbom: Optional[StrictBool] = Field(default=False, description="A configuration option for generating software bill of materials data.") + generate_capabilities: Optional[StrictBool] = Field(default=False, description="A configuration option for generating capabilities of a binary") + no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") + advanced_analysis: Optional[StrictBool] = Field(default=False, description="Enables an advanced security analysis.") + sandbox_config: Optional[SandboxOptions] = Field(default=None, description="Including a sandbox config enables the dynamic execution sandbox") + __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_cves", "generate_sbom", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_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 AnalysisConfig 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 scrape_third_party_config + if self.scrape_third_party_config: + _dict['scrape_third_party_config'] = self.scrape_third_party_config.to_dict() + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scrape_third_party_config": ScrapeThirdPartyConfig.from_dict(obj["scrape_third_party_config"]) if obj.get("scrape_third_party_config") is not None else None, + "generate_cves": obj.get("generate_cves") if obj.get("generate_cves") is not None else False, + "generate_sbom": obj.get("generate_sbom") if obj.get("generate_sbom") is not None else False, + "generate_capabilities": obj.get("generate_capabilities") if obj.get("generate_capabilities") is not None else False, + "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False, + "advanced_analysis": obj.get("advanced_analysis") if obj.get("advanced_analysis") is not None else False, + "sandbox_config": SandboxOptions.from_dict(obj["sandbox_config"]) if obj.get("sandbox_config") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_create_request.py b/revengai/revengai/models/analysis_create_request.py new file mode 100644 index 0000000..e381ea1 --- /dev/null +++ b/revengai/revengai/models/analysis_create_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.analysis_config import AnalysisConfig +from revengai.models.analysis_scope import AnalysisScope +from revengai.models.binary_config import BinaryConfig +from revengai.models.symbols import Symbols +from revengai.models.tag import Tag +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisCreateRequest(BaseModel): + """ + AnalysisCreateRequest + """ # noqa: E501 + filename: StrictStr = Field(description="The name of the file") + sha_256_hash: StrictStr = Field(description="The name of the file") + tags: Optional[List[Tag]] = Field(default=None, description="List of community tags to assign to an analysis") + analysis_scope: Optional[AnalysisScope] = Field(default=None, description="The scope of the analysis determines who can access it") + symbols: Optional[Symbols] = None + debug_hash: Optional[StrictStr] = None + analysis_config: Optional[AnalysisConfig] = Field(default=None, description="The analysis config enables the configuration of optional analysis stages") + binary_config: Optional[BinaryConfig] = Field(default=None, description="The binary config can override automatically determined values such as ISA, Platform, File Format, etc") + __properties: ClassVar[List[str]] = ["filename", "sha_256_hash", "tags", "analysis_scope", "symbols", "debug_hash", "analysis_config", "binary_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 AnalysisCreateRequest 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 tags (list) + _items = [] + if self.tags: + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) + _dict['tags'] = _items + # override the default output from pydantic by calling `to_dict()` of symbols + if self.symbols: + _dict['symbols'] = self.symbols.to_dict() + # 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 binary_config + if self.binary_config: + _dict['binary_config'] = self.binary_config.to_dict() + # set to None if symbols (nullable) is None + # and model_fields_set contains the field + if self.symbols is None and "symbols" in self.model_fields_set: + _dict['symbols'] = None + + # set to None if debug_hash (nullable) is None + # and model_fields_set contains the field + if self.debug_hash is None and "debug_hash" in self.model_fields_set: + _dict['debug_hash'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filename": obj.get("filename"), + "sha_256_hash": obj.get("sha_256_hash"), + "tags": [Tag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, + "analysis_scope": obj.get("analysis_scope"), + "symbols": Symbols.from_dict(obj["symbols"]) if obj.get("symbols") is not None else None, + "debug_hash": obj.get("debug_hash"), + "analysis_config": AnalysisConfig.from_dict(obj["analysis_config"]) if obj.get("analysis_config") is not None else None, + "binary_config": BinaryConfig.from_dict(obj["binary_config"]) if obj.get("binary_config") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_create_response.py b/revengai/revengai/models/analysis_create_response.py new file mode 100644 index 0000000..322d24f --- /dev/null +++ b/revengai/revengai/models/analysis_create_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AnalysisCreateResponse(BaseModel): + """ + AnalysisCreateResponse + """ # noqa: E501 + analysis_id: StrictInt = Field(description="ID of created analysis") + binary_id: StrictInt = Field(description="ID of created binary") + __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 AnalysisCreateResponse 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 AnalysisCreateResponse 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/revengai/models/analysis_detail_response.py b/revengai/revengai/models/analysis_detail_response.py new file mode 100644 index 0000000..01d4473 --- /dev/null +++ b/revengai/revengai/models/analysis_detail_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.analysis_access_info import AnalysisAccessInfo +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisDetailResponse(BaseModel): + """ + AnalysisDetailResponse + """ # noqa: E501 + access: AnalysisAccessInfo + analysis_id: StrictInt + analysis_scope: StrictStr + architecture: StrictStr + binary_dynamic: StrictBool + binary_format: StrictStr + binary_name: StrictStr + binary_size: StrictInt + binary_type: StrictStr + creation: StrictStr + debug: StrictBool + model_name: StrictStr + sbom: Optional[Dict[str, Any]] = None + sha_256_hash: StrictStr + __properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "debug", "model_name", "sbom", "sha_256_hash"] + + 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 AnalysisDetailResponse 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 access + if self.access: + _dict['access'] = self.access.to_dict() + # set to None if sbom (nullable) is None + # and model_fields_set contains the field + if self.sbom is None and "sbom" in self.model_fields_set: + _dict['sbom'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access": AnalysisAccessInfo.from_dict(obj["access"]) if obj.get("access") is not None else None, + "analysis_id": obj.get("analysis_id"), + "analysis_scope": obj.get("analysis_scope"), + "architecture": obj.get("architecture"), + "binary_dynamic": obj.get("binary_dynamic"), + "binary_format": obj.get("binary_format"), + "binary_name": obj.get("binary_name"), + "binary_size": obj.get("binary_size"), + "binary_type": obj.get("binary_type"), + "creation": obj.get("creation"), + "debug": obj.get("debug"), + "model_name": obj.get("model_name"), + "sbom": obj.get("sbom"), + "sha_256_hash": obj.get("sha_256_hash") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_functions.py b/revengai/revengai/models/analysis_functions.py new file mode 100644 index 0000000..5100088 --- /dev/null +++ b/revengai/revengai/models/analysis_functions.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisFunctions(BaseModel): + """ + AnalysisFunctions + """ # noqa: E501 + functions: List[AppApiRestV2FunctionsTypesFunction] = Field(description="The functions associated with the analysis") + __properties: ClassVar[List[str]] = ["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 AnalysisFunctions 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisFunctions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "functions": [AppApiRestV2FunctionsTypesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_record.py b/revengai/revengai/models/analysis_record.py new file mode 100644 index 0000000..3f5abc8 --- /dev/null +++ b/revengai/revengai/models/analysis_record.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisRecord(BaseModel): + """ + AnalysisRecord + """ # noqa: E501 + analysis_id: StrictInt = Field(description="ID to identify analysis") + analysis_scope: StrictStr = Field(description="Scope of the analysis") + binary_id: StrictInt = Field(description="ID to identify the binary analyse") + model_id: StrictInt = Field(description="ID to identify the model used for analysis") + status: StrictStr = Field(description="The current status of analysis") + creation: datetime = Field(description="The current status of analysis") + is_owner: StrictBool = Field(description="Whether the current user is the owner of a binary") + binary_name: StrictStr = Field(description="The name of the file uploaded") + sha_256_hash: StrictStr = Field(description="The hash of the binary") + binary_size: StrictInt = Field(description="The size of the binary") + username: StrictStr = Field(description="The username of the analysis owner") + dynamic_execution_status: Optional[AppApiRestV2AnalysesEnumsDynamicExecutionStatus] = None + dynamic_execution_task_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["analysis_id", "analysis_scope", "binary_id", "model_id", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "binary_size", "username", "dynamic_execution_status", "dynamic_execution_task_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 AnalysisRecord 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 dynamic_execution_status (nullable) is None + # and model_fields_set contains the field + if self.dynamic_execution_status is None and "dynamic_execution_status" in self.model_fields_set: + _dict['dynamic_execution_status'] = None + + # set to None if dynamic_execution_task_id (nullable) is None + # and model_fields_set contains the field + if self.dynamic_execution_task_id is None and "dynamic_execution_task_id" in self.model_fields_set: + _dict['dynamic_execution_task_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisRecord 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"), + "analysis_scope": obj.get("analysis_scope"), + "binary_id": obj.get("binary_id"), + "model_id": obj.get("model_id"), + "status": obj.get("status"), + "creation": obj.get("creation"), + "is_owner": obj.get("is_owner"), + "binary_name": obj.get("binary_name"), + "sha_256_hash": obj.get("sha_256_hash"), + "binary_size": obj.get("binary_size"), + "username": obj.get("username"), + "dynamic_execution_status": obj.get("dynamic_execution_status"), + "dynamic_execution_task_id": obj.get("dynamic_execution_task_id") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_scope.py b/revengai/revengai/models/analysis_scope.py new file mode 100644 index 0000000..8cd484e --- /dev/null +++ b/revengai/revengai/models/analysis_scope.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AnalysisScope(str, Enum): + """ + AnalysisScope + """ + + """ + allowed enum values + """ + PRIVATE = 'PRIVATE' + PUBLIC = 'PUBLIC' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AnalysisScope from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/analysis_strings_response.py b/revengai/revengai/models/analysis_strings_response.py new file mode 100644 index 0000000..a2b75f0 --- /dev/null +++ b/revengai/revengai/models/analysis_strings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.string_functions import StringFunctions +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisStringsResponse(BaseModel): + """ + AnalysisStringsResponse + """ # noqa: E501 + strings: List[StringFunctions] = Field(description="The strings associated with the analysis") + total_strings: StrictInt = Field(description="The total number of strings associated with this analysis") + __properties: ClassVar[List[str]] = ["strings", "total_strings"] + + 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 AnalysisStringsResponse 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 AnalysisStringsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "strings": [StringFunctions.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, + "total_strings": obj.get("total_strings") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_tags.py b/revengai/revengai/models/analysis_tags.py new file mode 100644 index 0000000..f82b88f --- /dev/null +++ b/revengai/revengai/models/analysis_tags.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisTags(BaseModel): + """ + AnalysisTags + """ # noqa: E501 + analysis_tags: List[AppApiRestV2AnalysesResponsesTagItem] + suggested_tags: List[AppApiRestV2AnalysesResponsesTagItem] + __properties: ClassVar[List[str]] = ["analysis_tags", "suggested_tags"] + + 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 AnalysisTags 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 analysis_tags (list) + _items = [] + if self.analysis_tags: + for _item_analysis_tags in self.analysis_tags: + if _item_analysis_tags: + _items.append(_item_analysis_tags.to_dict()) + _dict['analysis_tags'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in suggested_tags (list) + _items = [] + if self.suggested_tags: + for _item_suggested_tags in self.suggested_tags: + if _item_suggested_tags: + _items.append(_item_suggested_tags.to_dict()) + _dict['suggested_tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisTags from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_tags": [AppApiRestV2AnalysesResponsesTagItem.from_dict(_item) for _item in obj["analysis_tags"]] if obj.get("analysis_tags") is not None else None, + "suggested_tags": [AppApiRestV2AnalysesResponsesTagItem.from_dict(_item) for _item in obj["suggested_tags"]] if obj.get("suggested_tags") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_threat_score_data.py b/revengai/revengai/models/analysis_threat_score_data.py new file mode 100644 index 0000000..5d564e2 --- /dev/null +++ b/revengai/revengai/models/analysis_threat_score_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisThreatScoreData(BaseModel): + """ + AnalysisThreatScoreData + """ # noqa: E501 + min: Union[StrictFloat, StrictInt] = Field(description="The minimum value for the analysis score") + max: Union[StrictFloat, StrictInt] = Field(description="The maximum value for the analysis score") + average: Union[StrictFloat, StrictInt] = Field(description="The average value for the analysis score") + upper: Union[StrictFloat, StrictInt] = Field(description="The upper limit for the analysis score") + lower: Union[StrictFloat, StrictInt] = Field(description="The lower limit for the analysis score") + malware_count: StrictInt = Field(description="Number of malware binaries used in threat score calculation") + benign_count: StrictInt = Field(description="Number of benign binaries used in threat score calculation") + __properties: ClassVar[List[str]] = ["min", "max", "average", "upper", "lower", "malware_count", "benign_count"] + + 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 AnalysisThreatScoreData 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 AnalysisThreatScoreData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min": obj.get("min"), + "max": obj.get("max"), + "average": obj.get("average"), + "upper": obj.get("upper"), + "lower": obj.get("lower"), + "malware_count": obj.get("malware_count"), + "benign_count": obj.get("benign_count") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_update_request.py b/revengai/revengai/models/analysis_update_request.py new file mode 100644 index 0000000..8b2ad52 --- /dev/null +++ b/revengai/revengai/models/analysis_update_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisUpdateRequest(BaseModel): + """ + AnalysisUpdateRequest + """ # noqa: E501 + binary_name: Optional[StrictStr] = None + analysis_scope: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["binary_name", "analysis_scope"] + + @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(['PUBLIC', 'PRIVATE']): + raise ValueError("must be one of enum values ('PUBLIC', 'PRIVATE')") + 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 AnalysisUpdateRequest 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 binary_name (nullable) is None + # and model_fields_set contains the field + if self.binary_name is None and "binary_name" in self.model_fields_set: + _dict['binary_name'] = None + + # set to None if analysis_scope (nullable) is None + # and model_fields_set contains the field + if self.analysis_scope is None and "analysis_scope" in self.model_fields_set: + _dict['analysis_scope'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_name": obj.get("binary_name"), + "analysis_scope": obj.get("analysis_scope") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_update_tags_request.py b/revengai/revengai/models/analysis_update_tags_request.py new file mode 100644 index 0000000..a563056 --- /dev/null +++ b/revengai/revengai/models/analysis_update_tags_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisUpdateTagsRequest(BaseModel): + """ + AnalysisUpdateTagsRequest + """ # noqa: E501 + tags: List[StrictStr] + __properties: ClassVar[List[str]] = ["tags"] + + 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 AnalysisUpdateTagsRequest 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 AnalysisUpdateTagsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags") + }) + return _obj + + diff --git a/revengai/revengai/models/analysis_update_tags_response.py b/revengai/revengai/models/analysis_update_tags_response.py new file mode 100644 index 0000000..491811f --- /dev/null +++ b/revengai/revengai/models/analysis_update_tags_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.tag_response import TagResponse +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisUpdateTagsResponse(BaseModel): + """ + AnalysisUpdateTagsResponse + """ # noqa: E501 + tags: List[TagResponse] = Field(description="The analysis tags after updating") + __properties: ClassVar[List[str]] = ["tags"] + + 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 AnalysisUpdateTagsResponse 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 tags (list) + _items = [] + if self.tags: + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) + _dict['tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisUpdateTagsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [TagResponse.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/ann_function.py b/revengai/revengai/models/ann_function.py new file mode 100644 index 0000000..f96562f --- /dev/null +++ b/revengai/revengai/models/ann_function.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from revengai.models.search_binary_ids import SearchBinaryIds +from revengai.models.search_function_ids import SearchFunctionIds +from typing import Optional, Set +from typing_extensions import Self + +class ANNFunction(BaseModel): + """ + ANNFunction + """ # noqa: E501 + limit: Optional[StrictInt] = Field(default=5, description="The amount of neighbours per function ID") + distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.1, description="The distance between two neighbours") + analysis_search_ids: Optional[List[StrictInt]] = Field(default=None, description="Perform a search on functions within a list of analyses") + collection_search_ids: Optional[Annotated[List[StrictInt], Field(max_length=5)]] = Field(default=None, description="Search only within these collections") + search_binary_ids: Optional[SearchBinaryIds] = None + search_function_ids: Optional[SearchFunctionIds] = None + debug_only: Optional[StrictBool] = Field(default=False, description="Searches for only functions which are debug") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["limit", "distance", "analysis_search_ids", "collection_search_ids", "search_binary_ids", "search_function_ids", "debug_only"] + + 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 ANNFunction 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 search_binary_ids + if self.search_binary_ids: + _dict['search_binary_ids'] = self.search_binary_ids.to_dict() + # override the default output from pydantic by calling `to_dict()` of search_function_ids + if self.search_function_ids: + _dict['search_function_ids'] = self.search_function_ids.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 ANNFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "limit": obj.get("limit") if obj.get("limit") is not None else 5, + "distance": obj.get("distance") if obj.get("distance") is not None else 0.1, + "analysis_search_ids": obj.get("analysis_search_ids"), + "collection_search_ids": obj.get("collection_search_ids"), + "search_binary_ids": SearchBinaryIds.from_dict(obj["search_binary_ids"]) if obj.get("search_binary_ids") is not None else None, + "search_function_ids": SearchFunctionIds.from_dict(obj["search_function_ids"]) if obj.get("search_function_ids") is not None else None, + "debug_only": obj.get("debug_only") if obj.get("debug_only") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py b/revengai/revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py new file mode 100644 index 0000000..00415d7 --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AppApiRestV2AnalysesEnumsDynamicExecutionStatus(str, Enum): + """ + Custom enum for the dynamic execution status + """ + + """ + allowed enum values + """ + PENDING = 'PENDING' + ERROR = 'ERROR' + SUCCESS = 'SUCCESS' + ALL = 'ALL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppApiRestV2AnalysesEnumsDynamicExecutionStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/app_api_rest_v2_analyses_enums_order_by.py b/revengai/revengai/models/app_api_rest_v2_analyses_enums_order_by.py new file mode 100644 index 0000000..22589ac --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_analyses_enums_order_by.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AppApiRestV2AnalysesEnumsOrderBy(str, Enum): + """ + AppApiRestV2AnalysesEnumsOrderBy + """ + + """ + allowed enum values + """ + CREATED = 'created' + NAME = 'name' + SIZE = 'size' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppApiRestV2AnalysesEnumsOrderBy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/app_api_rest_v2_analyses_responses_tag_item.py b/revengai/revengai/models/app_api_rest_v2_analyses_responses_tag_item.py new file mode 100644 index 0000000..df20124 --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_analyses_responses_tag_item.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AppApiRestV2AnalysesResponsesTagItem(BaseModel): + """ + AppApiRestV2AnalysesResponsesTagItem + """ # noqa: E501 + name: StrictStr + origin: StrictStr + collection_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["name", "origin", "collection_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 AppApiRestV2AnalysesResponsesTagItem 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 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: + _dict['collection_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppApiRestV2AnalysesResponsesTagItem 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"), + "origin": obj.get("origin"), + "collection_id": obj.get("collection_id") + }) + return _obj + + diff --git a/revengai/revengai/models/app_api_rest_v2_collections_enums_order_by.py b/revengai/revengai/models/app_api_rest_v2_collections_enums_order_by.py new file mode 100644 index 0000000..1b5df6e --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_collections_enums_order_by.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AppApiRestV2CollectionsEnumsOrderBy(str, Enum): + """ + AppApiRestV2CollectionsEnumsOrderBy + """ + + """ + allowed enum values + """ + CREATED = 'created' + COLLECTION = 'collection' + MODEL = 'model' + OWNER = 'owner' + COLLECTION_SIZE = 'collection_size' + UPDATED = 'updated' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppApiRestV2CollectionsEnumsOrderBy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/app_api_rest_v2_functions_responses_function.py b/revengai/revengai/models/app_api_rest_v2_functions_responses_function.py new file mode 100644 index 0000000..fed584b --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_functions_responses_function.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AppApiRestV2FunctionsResponsesFunction(BaseModel): + """ + Function schema used in function strings response. + """ # noqa: E501 + function_id: StrictInt + function_vaddr: StrictInt + __properties: ClassVar[List[str]] = ["function_id", "function_vaddr"] + + 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 AppApiRestV2FunctionsResponsesFunction 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 AppApiRestV2FunctionsResponsesFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_vaddr": obj.get("function_vaddr") + }) + return _obj + + diff --git a/revengai/revengai/models/app_api_rest_v2_functions_types_function.py b/revengai/revengai/models/app_api_rest_v2_functions_types_function.py new file mode 100644 index 0000000..17034f4 --- /dev/null +++ b/revengai/revengai/models/app_api_rest_v2_functions_types_function.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AppApiRestV2FunctionsTypesFunction(BaseModel): + """ + AppApiRestV2FunctionsTypesFunction + """ # noqa: E501 + function_id: StrictInt = Field(description="Function id") + function_name: StrictStr = Field(description="Function name") + function_vaddr: StrictInt = Field(description="Function virtual address") + function_size: StrictInt = Field(description="Function size") + debug: StrictBool = Field(description="Whether the function is debug") + embedding_3d: Optional[List[Union[StrictFloat, StrictInt]]] + embedding_1d: Optional[List[Union[StrictFloat, StrictInt]]] + __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "debug", "embedding_3d", "embedding_1d"] + + 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 AppApiRestV2FunctionsTypesFunction 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 embedding_3d (nullable) is None + # and model_fields_set contains the field + if self.embedding_3d is None and "embedding_3d" in self.model_fields_set: + _dict['embedding_3d'] = None + + # set to None if embedding_1d (nullable) is None + # and model_fields_set contains the field + if self.embedding_1d is None and "embedding_1d" in self.model_fields_set: + _dict['embedding_1d'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppApiRestV2FunctionsTypesFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_vaddr": obj.get("function_vaddr"), + "function_size": obj.get("function_size"), + "debug": obj.get("debug"), + "embedding_3d": obj.get("embedding_3d"), + "embedding_1d": obj.get("embedding_1d") + }) + return _obj + + diff --git a/revengai/revengai/models/app_services_binary_ann_schema_tag_item.py b/revengai/revengai/models/app_services_binary_ann_schema_tag_item.py new file mode 100644 index 0000000..c4259f0 --- /dev/null +++ b/revengai/revengai/models/app_services_binary_ann_schema_tag_item.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 AppServicesBinaryAnnSchemaTagItem(BaseModel): + """ + AppServicesBinaryAnnSchemaTagItem + """ # noqa: E501 + tag: Optional[StrictStr] = None + origin: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["tag", "origin"] + + 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 AppServicesBinaryAnnSchemaTagItem 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 tag (nullable) is None + # and model_fields_set contains the field + if self.tag is None and "tag" in self.model_fields_set: + _dict['tag'] = None + + # set to None if origin (nullable) is None + # and model_fields_set contains the field + if self.origin is None and "origin" in self.model_fields_set: + _dict['origin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppServicesBinaryAnnSchemaTagItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": obj.get("tag"), + "origin": obj.get("origin") + }) + return _obj + + diff --git a/revengai/revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py b/revengai/revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py new file mode 100644 index 0000000..ecdc982 --- /dev/null +++ b/revengai/revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AppServicesDynamicExecutionSchemasDynamicExecutionStatus(BaseModel): + """ + AppServicesDynamicExecutionSchemasDynamicExecutionStatus + """ # noqa: E501 + status: StrictStr + __properties: ClassVar[List[str]] = ["status"] + + 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 AppServicesDynamicExecutionSchemasDynamicExecutionStatus 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 AppServicesDynamicExecutionSchemasDynamicExecutionStatus 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") + }) + return _obj + + diff --git a/revengai/revengai/models/argument.py b/revengai/revengai/models/argument.py new file mode 100644 index 0000000..f4b0567 --- /dev/null +++ b/revengai/revengai/models/argument.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class Argument(BaseModel): + """ + Argument + """ # noqa: E501 + last_change: Optional[StrictStr] = None + offset: StrictInt = Field(description="Offset of the argument in the function signature") + name: StrictStr = Field(description="Name of the argument") + type: StrictStr = Field(description="Data type of the argument") + size: StrictInt = Field(description="Size of the argument in bytes") + __properties: ClassVar[List[str]] = ["last_change", "offset", "name", "type", "size"] + + 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 Argument 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Argument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "offset": obj.get("offset"), + "name": obj.get("name"), + "type": obj.get("type"), + "size": obj.get("size") + }) + return _obj + + diff --git a/revengai/revengai/models/auto_unstrip_by_group_response.py b/revengai/revengai/models/auto_unstrip_by_group_response.py new file mode 100644 index 0000000..4310ca8 --- /dev/null +++ b/revengai/revengai/models/auto_unstrip_by_group_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.matched_function_group import MatchedFunctionGroup +from typing import Optional, Set +from typing_extensions import Self + +class AutoUnstripByGroupResponse(BaseModel): + """ + AutoUnstripByGroupResponse + """ # noqa: E501 + progress: Optional[StrictInt] = Field(default=0, description="Progress of the auto-unstrip operation, represented as a percentage") + status: Optional[StrictStr] = None + total_time: Optional[StrictInt] = None + matches_map: Optional[Dict[str, List[MatchedFunctionGroup]]] = None + applied: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches_map", "applied"] + + 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 AutoUnstripByGroupResponse 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 value in matches_map (dict of array) + _field_dict_of_array = {} + if self.matches_map: + for _key_matches_map in self.matches_map: + if self.matches_map[_key_matches_map] is not None: + _field_dict_of_array[_key_matches_map] = [ + _item.to_dict() for _item in self.matches_map[_key_matches_map] + ] + _dict['matches_map'] = _field_dict_of_array + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if total_time (nullable) is None + # and model_fields_set contains the field + if self.total_time is None and "total_time" in self.model_fields_set: + _dict['total_time'] = None + + # set to None if matches_map (nullable) is None + # and model_fields_set contains the field + if self.matches_map is None and "matches_map" in self.model_fields_set: + _dict['matches_map'] = None + + # set to None if applied (nullable) is None + # and model_fields_set contains the field + if self.applied is None and "applied" in self.model_fields_set: + _dict['applied'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutoUnstripByGroupResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "progress": obj.get("progress") if obj.get("progress") is not None else 0, + "status": obj.get("status"), + "total_time": obj.get("total_time"), + "matches_map": dict( + (_k, + [MatchedFunctionGroup.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("matches_map", {}).items() + ), + "applied": obj.get("applied") + }) + return _obj + + diff --git a/revengai/revengai/models/auto_unstrip_request.py b/revengai/revengai/models/auto_unstrip_request.py new file mode 100644 index 0000000..d7a8e34 --- /dev/null +++ b/revengai/revengai/models/auto_unstrip_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AutoUnstripRequest(BaseModel): + """ + AutoUnstripRequest + """ # noqa: E501 + min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9") + apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False") + __properties: ClassVar[List[str]] = ["min_similarity", "apply"] + + 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 AutoUnstripRequest 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 AutoUnstripRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9, + "apply": obj.get("apply") if obj.get("apply") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/auto_unstrip_response.py b/revengai/revengai/models/auto_unstrip_response.py new file mode 100644 index 0000000..b3d5883 --- /dev/null +++ b/revengai/revengai/models/auto_unstrip_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.matched_function_suggestion import MatchedFunctionSuggestion +from typing import Optional, Set +from typing_extensions import Self + +class AutoUnstripResponse(BaseModel): + """ + AutoUnstripResponse + """ # noqa: E501 + progress: Optional[StrictInt] = Field(default=0, description="Progress of the auto-unstrip operation, represented as a percentage") + status: Optional[StrictStr] = None + total_time: Optional[StrictInt] = None + matches: Optional[List[MatchedFunctionSuggestion]] = None + applied: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches", "applied"] + + 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 AutoUnstripResponse 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 matches (list) + _items = [] + if self.matches: + for _item_matches in self.matches: + if _item_matches: + _items.append(_item_matches.to_dict()) + _dict['matches'] = _items + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if total_time (nullable) is None + # and model_fields_set contains the field + if self.total_time is None and "total_time" in self.model_fields_set: + _dict['total_time'] = None + + # 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: + _dict['matches'] = None + + # set to None if applied (nullable) is None + # and model_fields_set contains the field + if self.applied is None and "applied" in self.model_fields_set: + _dict['applied'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutoUnstripResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "progress": obj.get("progress") if obj.get("progress") is not None else 0, + "status": obj.get("status"), + "total_time": obj.get("total_time"), + "matches": [MatchedFunctionSuggestion.from_dict(_item) for _item in obj["matches"]] if obj.get("matches") is not None else None, + "applied": obj.get("applied") + }) + return _obj + + diff --git a/revengai/revengai/models/base_response.py b/revengai/revengai/models/base_response.py new file mode 100644 index 0000000..e8e3cff --- /dev/null +++ b/revengai/revengai/models/base_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class BaseResponse(BaseModel): + """ + BaseResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Any] = Field(default=None, description="Response data") + 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 BaseResponse 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 BaseResponse 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": AnyOf.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/revengai/models/base_response_analysis_create_response.py b/revengai/revengai/models/base_response_analysis_create_response.py new file mode 100644 index 0000000..1f9f22e --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_create_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_create_response import AnalysisCreateResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisCreateResponse(BaseModel): + """ + BaseResponseAnalysisCreateResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisCreateResponse] = 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 BaseResponseAnalysisCreateResponse 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 BaseResponseAnalysisCreateResponse 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": AnalysisCreateResponse.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/revengai/models/base_response_analysis_detail_response.py b/revengai/revengai/models/base_response_analysis_detail_response.py new file mode 100644 index 0000000..eb09baf --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_detail_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_detail_response import AnalysisDetailResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisDetailResponse(BaseModel): + """ + BaseResponseAnalysisDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisDetailResponse] = 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 BaseResponseAnalysisDetailResponse 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 BaseResponseAnalysisDetailResponse 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": AnalysisDetailResponse.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/revengai/models/base_response_analysis_functions.py b/revengai/revengai/models/base_response_analysis_functions.py new file mode 100644 index 0000000..18fc0ae --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_functions.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_functions import AnalysisFunctions +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisFunctions(BaseModel): + """ + BaseResponseAnalysisFunctions + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisFunctions] = 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 BaseResponseAnalysisFunctions 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 BaseResponseAnalysisFunctions 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": AnalysisFunctions.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/revengai/models/base_response_analysis_strings_response.py b/revengai/revengai/models/base_response_analysis_strings_response.py new file mode 100644 index 0000000..6e55ab2 --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_strings_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_strings_response import AnalysisStringsResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisStringsResponse(BaseModel): + """ + BaseResponseAnalysisStringsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisStringsResponse] = 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 BaseResponseAnalysisStringsResponse 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 BaseResponseAnalysisStringsResponse 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": AnalysisStringsResponse.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/revengai/models/base_response_analysis_tags.py b/revengai/revengai/models/base_response_analysis_tags.py new file mode 100644 index 0000000..f94169f --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_tags.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_tags import AnalysisTags +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisTags(BaseModel): + """ + BaseResponseAnalysisTags + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisTags] = 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 BaseResponseAnalysisTags 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 BaseResponseAnalysisTags 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": AnalysisTags.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/revengai/models/base_response_analysis_threat_score_data.py b/revengai/revengai/models/base_response_analysis_threat_score_data.py new file mode 100644 index 0000000..15902e9 --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_threat_score_data.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_threat_score_data import AnalysisThreatScoreData +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisThreatScoreData(BaseModel): + """ + BaseResponseAnalysisThreatScoreData + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisThreatScoreData] = 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 BaseResponseAnalysisThreatScoreData 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 BaseResponseAnalysisThreatScoreData 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": AnalysisThreatScoreData.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/revengai/models/base_response_analysis_update_tags_response.py b/revengai/revengai/models/base_response_analysis_update_tags_response.py new file mode 100644 index 0000000..60b4b4a --- /dev/null +++ b/revengai/revengai/models/base_response_analysis_update_tags_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.analysis_update_tags_response import AnalysisUpdateTagsResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisUpdateTagsResponse(BaseModel): + """ + BaseResponseAnalysisUpdateTagsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisUpdateTagsResponse] = 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 BaseResponseAnalysisUpdateTagsResponse 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 BaseResponseAnalysisUpdateTagsResponse 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": AnalysisUpdateTagsResponse.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/revengai/models/base_response_basic.py b/revengai/revengai/models/base_response_basic.py new file mode 100644 index 0000000..e7fe70b --- /dev/null +++ b/revengai/revengai/models/base_response_basic.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.basic import Basic +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBasic(BaseModel): + """ + BaseResponseBasic + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Basic] = 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 BaseResponseBasic 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 BaseResponseBasic 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": Basic.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/revengai/models/base_response_binary_additional_response.py b/revengai/revengai/models/base_response_binary_additional_response.py new file mode 100644 index 0000000..216a8ee --- /dev/null +++ b/revengai/revengai/models/base_response_binary_additional_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.binary_additional_response import BinaryAdditionalResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBinaryAdditionalResponse(BaseModel): + """ + BaseResponseBinaryAdditionalResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BinaryAdditionalResponse] = 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 BaseResponseBinaryAdditionalResponse 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 BaseResponseBinaryAdditionalResponse 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": BinaryAdditionalResponse.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/revengai/models/base_response_binary_ann_list_response.py b/revengai/revengai/models/base_response_binary_ann_list_response.py new file mode 100644 index 0000000..69c024c --- /dev/null +++ b/revengai/revengai/models/base_response_binary_ann_list_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.binary_ann_list_response import BinaryAnnListResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBinaryAnnListResponse(BaseModel): + """ + BaseResponseBinaryAnnListResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BinaryAnnListResponse] = 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 BaseResponseBinaryAnnListResponse 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 BaseResponseBinaryAnnListResponse 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": BinaryAnnListResponse.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/revengai/models/base_response_binary_details_response.py b/revengai/revengai/models/base_response_binary_details_response.py new file mode 100644 index 0000000..3ad6727 --- /dev/null +++ b/revengai/revengai/models/base_response_binary_details_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.binary_details_response import BinaryDetailsResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBinaryDetailsResponse(BaseModel): + """ + BaseResponseBinaryDetailsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BinaryDetailsResponse] = 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 BaseResponseBinaryDetailsResponse 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 BaseResponseBinaryDetailsResponse 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": BinaryDetailsResponse.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/revengai/models/base_response_binary_externals_response.py b/revengai/revengai/models/base_response_binary_externals_response.py new file mode 100644 index 0000000..f4c113d --- /dev/null +++ b/revengai/revengai/models/base_response_binary_externals_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.binary_externals_response import BinaryExternalsResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBinaryExternalsResponse(BaseModel): + """ + BaseResponseBinaryExternalsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BinaryExternalsResponse] = 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 BaseResponseBinaryExternalsResponse 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 BaseResponseBinaryExternalsResponse 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": BinaryExternalsResponse.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/revengai/models/base_response_binary_search_response.py b/revengai/revengai/models/base_response_binary_search_response.py new file mode 100644 index 0000000..c464e2a --- /dev/null +++ b/revengai/revengai/models/base_response_binary_search_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.binary_search_response import BinarySearchResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBinarySearchResponse(BaseModel): + """ + BaseResponseBinarySearchResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BinarySearchResponse] = 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 BaseResponseBinarySearchResponse 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 BaseResponseBinarySearchResponse 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": BinarySearchResponse.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/revengai/models/base_response_block_comments_generation_for_function_response.py b/revengai/revengai/models/base_response_block_comments_generation_for_function_response.py new file mode 100644 index 0000000..ec09c3e --- /dev/null +++ b/revengai/revengai/models/base_response_block_comments_generation_for_function_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBlockCommentsGenerationForFunctionResponse(BaseModel): + """ + BaseResponseBlockCommentsGenerationForFunctionResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BlockCommentsGenerationForFunctionResponse] = 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 BaseResponseBlockCommentsGenerationForFunctionResponse 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 BaseResponseBlockCommentsGenerationForFunctionResponse 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": BlockCommentsGenerationForFunctionResponse.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/revengai/models/base_response_block_comments_overview_generation_response.py b/revengai/revengai/models/base_response_block_comments_overview_generation_response.py new file mode 100644 index 0000000..3757d87 --- /dev/null +++ b/revengai/revengai/models/base_response_block_comments_overview_generation_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBlockCommentsOverviewGenerationResponse(BaseModel): + """ + BaseResponseBlockCommentsOverviewGenerationResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Dict[str, Any]] = 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 BaseResponseBlockCommentsOverviewGenerationResponse 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 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 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 BaseResponseBlockCommentsOverviewGenerationResponse 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": obj.get("data"), + "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/revengai/models/base_response_bool.py b/revengai/revengai/models/base_response_bool.py new file mode 100644 index 0000000..8b22bc4 --- /dev/null +++ b/revengai/revengai/models/base_response_bool.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBool(BaseModel): + """ + BaseResponseBool + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[StrictBool] = 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 BaseResponseBool 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 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 BaseResponseBool 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": obj.get("data"), + "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/revengai/models/base_response_box_plot_confidence.py b/revengai/revengai/models/base_response_box_plot_confidence.py new file mode 100644 index 0000000..698c33b --- /dev/null +++ b/revengai/revengai/models/base_response_box_plot_confidence.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.box_plot_confidence import BoxPlotConfidence +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseBoxPlotConfidence(BaseModel): + """ + BaseResponseBoxPlotConfidence + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[BoxPlotConfidence] = 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 BaseResponseBoxPlotConfidence 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 BaseResponseBoxPlotConfidence 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": BoxPlotConfidence.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/revengai/models/base_response_callees_caller_functions_response.py b/revengai/revengai/models/base_response_callees_caller_functions_response.py new file mode 100644 index 0000000..69c607d --- /dev/null +++ b/revengai/revengai/models/base_response_callees_caller_functions_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.callees_caller_functions_response import CalleesCallerFunctionsResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCalleesCallerFunctionsResponse(BaseModel): + """ + BaseResponseCalleesCallerFunctionsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CalleesCallerFunctionsResponse] = 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 BaseResponseCalleesCallerFunctionsResponse 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 BaseResponseCalleesCallerFunctionsResponse 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": CalleesCallerFunctionsResponse.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/revengai/models/base_response_capabilities.py b/revengai/revengai/models/base_response_capabilities.py new file mode 100644 index 0000000..ce64a4d --- /dev/null +++ b/revengai/revengai/models/base_response_capabilities.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 import Capabilities +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCapabilities(BaseModel): + """ + BaseResponseCapabilities + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Capabilities] = 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 BaseResponseCapabilities 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 BaseResponseCapabilities 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": Capabilities.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/revengai/models/base_response_check_security_checks_task_response.py b/revengai/revengai/models/base_response_check_security_checks_task_response.py new file mode 100644 index 0000000..b898861 --- /dev/null +++ b/revengai/revengai/models/base_response_check_security_checks_task_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.check_security_checks_task_response import CheckSecurityChecksTaskResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCheckSecurityChecksTaskResponse(BaseModel): + """ + BaseResponseCheckSecurityChecksTaskResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CheckSecurityChecksTaskResponse] = 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 BaseResponseCheckSecurityChecksTaskResponse 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 BaseResponseCheckSecurityChecksTaskResponse 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": CheckSecurityChecksTaskResponse.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/revengai/models/base_response_child_binaries_response.py b/revengai/revengai/models/base_response_child_binaries_response.py new file mode 100644 index 0000000..43720b7 --- /dev/null +++ b/revengai/revengai/models/base_response_child_binaries_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.child_binaries_response import ChildBinariesResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseChildBinariesResponse(BaseModel): + """ + BaseResponseChildBinariesResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ChildBinariesResponse] = 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 BaseResponseChildBinariesResponse 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 BaseResponseChildBinariesResponse 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": ChildBinariesResponse.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/revengai/models/base_response_collection_binaries_update_response.py b/revengai/revengai/models/base_response_collection_binaries_update_response.py new file mode 100644 index 0000000..6ec06d5 --- /dev/null +++ b/revengai/revengai/models/base_response_collection_binaries_update_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.collection_binaries_update_response import CollectionBinariesUpdateResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCollectionBinariesUpdateResponse(BaseModel): + """ + BaseResponseCollectionBinariesUpdateResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CollectionBinariesUpdateResponse] = 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 BaseResponseCollectionBinariesUpdateResponse 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 BaseResponseCollectionBinariesUpdateResponse 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": CollectionBinariesUpdateResponse.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/revengai/models/base_response_collection_response.py b/revengai/revengai/models/base_response_collection_response.py new file mode 100644 index 0000000..fcf46b6 --- /dev/null +++ b/revengai/revengai/models/base_response_collection_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.collection_response import CollectionResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCollectionResponse(BaseModel): + """ + BaseResponseCollectionResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CollectionResponse] = 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 BaseResponseCollectionResponse 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 BaseResponseCollectionResponse 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": CollectionResponse.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/revengai/models/base_response_collection_search_response.py b/revengai/revengai/models/base_response_collection_search_response.py new file mode 100644 index 0000000..a183334 --- /dev/null +++ b/revengai/revengai/models/base_response_collection_search_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.collection_search_response import CollectionSearchResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCollectionSearchResponse(BaseModel): + """ + BaseResponseCollectionSearchResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CollectionSearchResponse] = 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 BaseResponseCollectionSearchResponse 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 BaseResponseCollectionSearchResponse 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": CollectionSearchResponse.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/revengai/models/base_response_collection_tags_update_response.py b/revengai/revengai/models/base_response_collection_tags_update_response.py new file mode 100644 index 0000000..9d481be --- /dev/null +++ b/revengai/revengai/models/base_response_collection_tags_update_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.collection_tags_update_response import CollectionTagsUpdateResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCollectionTagsUpdateResponse(BaseModel): + """ + BaseResponseCollectionTagsUpdateResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CollectionTagsUpdateResponse] = 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 BaseResponseCollectionTagsUpdateResponse 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 BaseResponseCollectionTagsUpdateResponse 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": CollectionTagsUpdateResponse.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/revengai/models/base_response_comment_response.py b/revengai/revengai/models/base_response_comment_response.py new file mode 100644 index 0000000..fa54aeb --- /dev/null +++ b/revengai/revengai/models/base_response_comment_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.comment_response import CommentResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCommentResponse(BaseModel): + """ + BaseResponseCommentResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CommentResponse] = 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 BaseResponseCommentResponse 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 BaseResponseCommentResponse 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": CommentResponse.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/revengai/models/base_response_communities.py b/revengai/revengai/models/base_response_communities.py new file mode 100644 index 0000000..7ae826f --- /dev/null +++ b/revengai/revengai/models/base_response_communities.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.communities import Communities +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCommunities(BaseModel): + """ + BaseResponseCommunities + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Communities] = 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 BaseResponseCommunities 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 BaseResponseCommunities 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": Communities.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/revengai/models/base_response_created.py b/revengai/revengai/models/base_response_created.py new file mode 100644 index 0000000..6752394 --- /dev/null +++ b/revengai/revengai/models/base_response_created.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.created import Created +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseCreated(BaseModel): + """ + BaseResponseCreated + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Created] = 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 BaseResponseCreated 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 BaseResponseCreated 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": Created.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/revengai/models/base_response_decompilation_response.py b/revengai/revengai/models/base_response_decompilation_response.py new file mode 100644 index 0000000..2a35633 --- /dev/null +++ b/revengai/revengai/models/base_response_decompilation_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.decompilation_response import DecompilationResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseDecompilationResponse(BaseModel): + """ + BaseResponseDecompilationResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[DecompilationResponse] = 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 BaseResponseDecompilationResponse 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 BaseResponseDecompilationResponse 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": DecompilationResponse.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/revengai/models/base_response_dict.py b/revengai/revengai/models/base_response_dict.py new file mode 100644 index 0000000..0386c8a --- /dev/null +++ b/revengai/revengai/models/base_response_dict.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class BaseResponseDict(BaseModel): + """ + BaseResponseDict + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Dict[str, Any]] = 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 BaseResponseDict 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 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 BaseResponseDict 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": obj.get("data"), + "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/revengai/models/base_response_dynamic_execution_status.py b/revengai/revengai/models/base_response_dynamic_execution_status.py new file mode 100644 index 0000000..62cba30 --- /dev/null +++ b/revengai/revengai/models/base_response_dynamic_execution_status.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseDynamicExecutionStatus(BaseModel): + """ + BaseResponseDynamicExecutionStatus + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AppServicesDynamicExecutionSchemasDynamicExecutionStatus] = 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 BaseResponseDynamicExecutionStatus 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 BaseResponseDynamicExecutionStatus 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": AppServicesDynamicExecutionSchemasDynamicExecutionStatus.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/revengai/models/base_response_external_response.py b/revengai/revengai/models/base_response_external_response.py new file mode 100644 index 0000000..0351c1c --- /dev/null +++ b/revengai/revengai/models/base_response_external_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.external_response import ExternalResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseExternalResponse(BaseModel): + """ + BaseResponseExternalResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ExternalResponse] = 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 BaseResponseExternalResponse 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 BaseResponseExternalResponse 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": ExternalResponse.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/revengai/models/base_response_function_analysis_threat_score_data.py b/revengai/revengai/models/base_response_function_analysis_threat_score_data.py new file mode 100644 index 0000000..b13cac3 --- /dev/null +++ b/revengai/revengai/models/base_response_function_analysis_threat_score_data.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionAnalysisThreatScoreData(BaseModel): + """ + BaseResponseFunctionAnalysisThreatScoreData + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionAnalysisThreatScoreData] = 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 BaseResponseFunctionAnalysisThreatScoreData 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 BaseResponseFunctionAnalysisThreatScoreData 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": FunctionAnalysisThreatScoreData.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/revengai/models/base_response_function_blocks_response.py b/revengai/revengai/models/base_response_function_blocks_response.py new file mode 100644 index 0000000..63e545e --- /dev/null +++ b/revengai/revengai/models/base_response_function_blocks_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_blocks_response import FunctionBlocksResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionBlocksResponse(BaseModel): + """ + BaseResponseFunctionBlocksResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionBlocksResponse] = 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 BaseResponseFunctionBlocksResponse 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 BaseResponseFunctionBlocksResponse 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": FunctionBlocksResponse.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/revengai/models/base_response_function_capability_response.py b/revengai/revengai/models/base_response_function_capability_response.py new file mode 100644 index 0000000..cefc8fa --- /dev/null +++ b/revengai/revengai/models/base_response_function_capability_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_capability_response import FunctionCapabilityResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionCapabilityResponse(BaseModel): + """ + BaseResponseFunctionCapabilityResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionCapabilityResponse] = 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 BaseResponseFunctionCapabilityResponse 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 BaseResponseFunctionCapabilityResponse 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": FunctionCapabilityResponse.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/revengai/models/base_response_function_data_types.py b/revengai/revengai/models/base_response_function_data_types.py new file mode 100644 index 0000000..d3410ef --- /dev/null +++ b/revengai/revengai/models/base_response_function_data_types.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_data_types import FunctionDataTypes +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionDataTypes(BaseModel): + """ + BaseResponseFunctionDataTypes + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionDataTypes] = 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 BaseResponseFunctionDataTypes 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 BaseResponseFunctionDataTypes 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": FunctionDataTypes.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/revengai/models/base_response_function_data_types_list.py b/revengai/revengai/models/base_response_function_data_types_list.py new file mode 100644 index 0000000..ea312c9 --- /dev/null +++ b/revengai/revengai/models/base_response_function_data_types_list.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_data_types_list import FunctionDataTypesList +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionDataTypesList(BaseModel): + """ + BaseResponseFunctionDataTypesList + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionDataTypesList] = 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 BaseResponseFunctionDataTypesList 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 BaseResponseFunctionDataTypesList 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": FunctionDataTypesList.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/revengai/models/base_response_function_search_response.py b/revengai/revengai/models/base_response_function_search_response.py new file mode 100644 index 0000000..62b6b79 --- /dev/null +++ b/revengai/revengai/models/base_response_function_search_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_search_response import FunctionSearchResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionSearchResponse(BaseModel): + """ + BaseResponseFunctionSearchResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionSearchResponse] = 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 BaseResponseFunctionSearchResponse 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 BaseResponseFunctionSearchResponse 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": FunctionSearchResponse.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/revengai/models/base_response_function_strings_response.py b/revengai/revengai/models/base_response_function_strings_response.py new file mode 100644 index 0000000..4b275fd --- /dev/null +++ b/revengai/revengai/models/base_response_function_strings_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_strings_response import FunctionStringsResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionStringsResponse(BaseModel): + """ + BaseResponseFunctionStringsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionStringsResponse] = 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 BaseResponseFunctionStringsResponse 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 BaseResponseFunctionStringsResponse 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": FunctionStringsResponse.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/revengai/models/base_response_function_task_response.py b/revengai/revengai/models/base_response_function_task_response.py new file mode 100644 index 0000000..6780563 --- /dev/null +++ b/revengai/revengai/models/base_response_function_task_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_task_response import FunctionTaskResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionTaskResponse(BaseModel): + """ + BaseResponseFunctionTaskResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionTaskResponse] = 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 BaseResponseFunctionTaskResponse 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 BaseResponseFunctionTaskResponse 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": FunctionTaskResponse.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/revengai/models/base_response_function_threat_score.py b/revengai/revengai/models/base_response_function_threat_score.py new file mode 100644 index 0000000..e21fa00 --- /dev/null +++ b/revengai/revengai/models/base_response_function_threat_score.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_threat_score import FunctionThreatScore +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionThreatScore(BaseModel): + """ + BaseResponseFunctionThreatScore + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionThreatScore] = 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 BaseResponseFunctionThreatScore 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 BaseResponseFunctionThreatScore 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": FunctionThreatScore.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/revengai/models/base_response_functions_detail_response.py b/revengai/revengai/models/base_response_functions_detail_response.py new file mode 100644 index 0000000..8ca26cb --- /dev/null +++ b/revengai/revengai/models/base_response_functions_detail_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.functions_detail_response import FunctionsDetailResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseFunctionsDetailResponse(BaseModel): + """ + BaseResponseFunctionsDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[FunctionsDetailResponse] = 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 BaseResponseFunctionsDetailResponse 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 BaseResponseFunctionsDetailResponse 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": FunctionsDetailResponse.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/revengai/models/base_response_generate_function_data_types.py b/revengai/revengai/models/base_response_generate_function_data_types.py new file mode 100644 index 0000000..890ffa0 --- /dev/null +++ b/revengai/revengai/models/base_response_generate_function_data_types.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.generate_function_data_types import GenerateFunctionDataTypes +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGenerateFunctionDataTypes(BaseModel): + """ + BaseResponseGenerateFunctionDataTypes + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GenerateFunctionDataTypes] = 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 BaseResponseGenerateFunctionDataTypes 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 BaseResponseGenerateFunctionDataTypes 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": GenerateFunctionDataTypes.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/revengai/models/base_response_generation_status_list.py b/revengai/revengai/models/base_response_generation_status_list.py new file mode 100644 index 0000000..3576796 --- /dev/null +++ b/revengai/revengai/models/base_response_generation_status_list.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.generation_status_list import GenerationStatusList +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGenerationStatusList(BaseModel): + """ + BaseResponseGenerationStatusList + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GenerationStatusList] = 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 BaseResponseGenerationStatusList 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 BaseResponseGenerationStatusList 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": GenerationStatusList.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/revengai/models/base_response_get_ai_decompilation_rating_response.py b/revengai/revengai/models/base_response_get_ai_decompilation_rating_response.py new file mode 100644 index 0000000..dfbe80c --- /dev/null +++ b/revengai/revengai/models/base_response_get_ai_decompilation_rating_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGetAiDecompilationRatingResponse(BaseModel): + """ + BaseResponseGetAiDecompilationRatingResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GetAiDecompilationRatingResponse] = 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 BaseResponseGetAiDecompilationRatingResponse 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 BaseResponseGetAiDecompilationRatingResponse 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": GetAiDecompilationRatingResponse.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/revengai/models/base_response_get_ai_decompilation_task.py b/revengai/revengai/models/base_response_get_ai_decompilation_task.py new file mode 100644 index 0000000..858cdc1 --- /dev/null +++ b/revengai/revengai/models/base_response_get_ai_decompilation_task.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.get_ai_decompilation_task import GetAiDecompilationTask +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGetAiDecompilationTask(BaseModel): + """ + BaseResponseGetAiDecompilationTask + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GetAiDecompilationTask] = 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 BaseResponseGetAiDecompilationTask 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 BaseResponseGetAiDecompilationTask 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": GetAiDecompilationTask.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/revengai/models/base_response_get_public_user_response.py b/revengai/revengai/models/base_response_get_public_user_response.py new file mode 100644 index 0000000..6029a2c --- /dev/null +++ b/revengai/revengai/models/base_response_get_public_user_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.get_public_user_response import GetPublicUserResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGetPublicUserResponse(BaseModel): + """ + BaseResponseGetPublicUserResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GetPublicUserResponse] = 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 BaseResponseGetPublicUserResponse 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 BaseResponseGetPublicUserResponse 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": GetPublicUserResponse.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/revengai/models/base_response_get_user_response.py b/revengai/revengai/models/base_response_get_user_response.py new file mode 100644 index 0000000..f0f98ee --- /dev/null +++ b/revengai/revengai/models/base_response_get_user_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.get_user_response import GetUserResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseGetUserResponse(BaseModel): + """ + BaseResponseGetUserResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[GetUserResponse] = 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 BaseResponseGetUserResponse 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 BaseResponseGetUserResponse 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": GetUserResponse.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/revengai/models/base_response_list_collection_results.py b/revengai/revengai/models/base_response_list_collection_results.py new file mode 100644 index 0000000..19b617e --- /dev/null +++ b/revengai/revengai/models/base_response_list_collection_results.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.list_collection_results import ListCollectionResults +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListCollectionResults(BaseModel): + """ + BaseResponseListCollectionResults + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ListCollectionResults] = 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 BaseResponseListCollectionResults 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 BaseResponseListCollectionResults 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": ListCollectionResults.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/revengai/models/base_response_list_comment_response.py b/revengai/revengai/models/base_response_list_comment_response.py new file mode 100644 index 0000000..4679509 --- /dev/null +++ b/revengai/revengai/models/base_response_list_comment_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.comment_response import CommentResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListCommentResponse(BaseModel): + """ + BaseResponseListCommentResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[CommentResponse]] = 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 BaseResponseListCommentResponse 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListCommentResponse 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": [CommentResponse.from_dict(_item) for _item in 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/revengai/models/base_response_list_die_match.py b/revengai/revengai/models/base_response_list_die_match.py new file mode 100644 index 0000000..20587a9 --- /dev/null +++ b/revengai/revengai/models/base_response_list_die_match.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.die_match import DieMatch +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListDieMatch(BaseModel): + """ + BaseResponseListDieMatch + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[DieMatch]] = 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 BaseResponseListDieMatch 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListDieMatch 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": [DieMatch.from_dict(_item) for _item in 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/revengai/models/base_response_list_function_box_plot_confidence.py b/revengai/revengai/models/base_response_list_function_box_plot_confidence.py new file mode 100644 index 0000000..f153da2 --- /dev/null +++ b/revengai/revengai/models/base_response_list_function_box_plot_confidence.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_box_plot_confidence import FunctionBoxPlotConfidence +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListFunctionBoxPlotConfidence(BaseModel): + """ + BaseResponseListFunctionBoxPlotConfidence + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[FunctionBoxPlotConfidence]] = 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 BaseResponseListFunctionBoxPlotConfidence 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListFunctionBoxPlotConfidence 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": [FunctionBoxPlotConfidence.from_dict(_item) for _item in 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/revengai/models/base_response_list_function_name_history.py b/revengai/revengai/models/base_response_list_function_name_history.py new file mode 100644 index 0000000..7416ef3 --- /dev/null +++ b/revengai/revengai/models/base_response_list_function_name_history.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_name_history import FunctionNameHistory +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListFunctionNameHistory(BaseModel): + """ + BaseResponseListFunctionNameHistory + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[FunctionNameHistory]] = 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 BaseResponseListFunctionNameHistory 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListFunctionNameHistory 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": [FunctionNameHistory.from_dict(_item) for _item in 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/revengai/models/base_response_list_sbom.py b/revengai/revengai/models/base_response_list_sbom.py new file mode 100644 index 0000000..0014d79 --- /dev/null +++ b/revengai/revengai/models/base_response_list_sbom.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.sbom import SBOM +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListSBOM(BaseModel): + """ + BaseResponseListSBOM + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[SBOM]] = 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 BaseResponseListSBOM 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListSBOM 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": [SBOM.from_dict(_item) for _item in 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/revengai/models/base_response_list_similar_functions_response.py b/revengai/revengai/models/base_response_list_similar_functions_response.py new file mode 100644 index 0000000..d9650bd --- /dev/null +++ b/revengai/revengai/models/base_response_list_similar_functions_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.similar_functions_response import SimilarFunctionsResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListSimilarFunctionsResponse(BaseModel): + """ + BaseResponseListSimilarFunctionsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[SimilarFunctionsResponse]] = 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 BaseResponseListSimilarFunctionsResponse 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListSimilarFunctionsResponse 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": [SimilarFunctionsResponse.from_dict(_item) for _item in 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/revengai/models/base_response_list_tag_origin_box_plot_confidence.py b/revengai/revengai/models/base_response_list_tag_origin_box_plot_confidence.py new file mode 100644 index 0000000..3c107e6 --- /dev/null +++ b/revengai/revengai/models/base_response_list_tag_origin_box_plot_confidence.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListTagOriginBoxPlotConfidence(BaseModel): + """ + BaseResponseListTagOriginBoxPlotConfidence + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[TagOriginBoxPlotConfidence]] = 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 BaseResponseListTagOriginBoxPlotConfidence 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListTagOriginBoxPlotConfidence 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": [TagOriginBoxPlotConfidence.from_dict(_item) for _item in 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/revengai/models/base_response_list_user_activity_response.py b/revengai/revengai/models/base_response_list_user_activity_response.py new file mode 100644 index 0000000..9f0e5c9 --- /dev/null +++ b/revengai/revengai/models/base_response_list_user_activity_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.user_activity_response import UserActivityResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseListUserActivityResponse(BaseModel): + """ + BaseResponseListUserActivityResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[List[UserActivityResponse]] = 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 BaseResponseListUserActivityResponse 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # 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 BaseResponseListUserActivityResponse 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": [UserActivityResponse.from_dict(_item) for _item in 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/revengai/models/base_response_login_response.py b/revengai/revengai/models/base_response_login_response.py new file mode 100644 index 0000000..5531414 --- /dev/null +++ b/revengai/revengai/models/base_response_login_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.login_response import LoginResponse +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseLoginResponse(BaseModel): + """ + BaseResponseLoginResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[LoginResponse] = 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 BaseResponseLoginResponse 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 BaseResponseLoginResponse 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": LoginResponse.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/revengai/models/base_response_logs.py b/revengai/revengai/models/base_response_logs.py new file mode 100644 index 0000000..0ceb8a7 --- /dev/null +++ b/revengai/revengai/models/base_response_logs.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.logs import Logs +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseLogs(BaseModel): + """ + BaseResponseLogs + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Logs] = 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 BaseResponseLogs 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 BaseResponseLogs 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": Logs.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/revengai/models/base_response_models_response.py b/revengai/revengai/models/base_response_models_response.py new file mode 100644 index 0000000..ce455a8 --- /dev/null +++ b/revengai/revengai/models/base_response_models_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.models_response import ModelsResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseModelsResponse(BaseModel): + """ + BaseResponseModelsResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ModelsResponse] = 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 BaseResponseModelsResponse 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 BaseResponseModelsResponse 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": ModelsResponse.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/revengai/models/base_response_nearest_neighbor_analysis.py b/revengai/revengai/models/base_response_nearest_neighbor_analysis.py new file mode 100644 index 0000000..0f49e59 --- /dev/null +++ b/revengai/revengai/models/base_response_nearest_neighbor_analysis.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.nearest_neighbor import NearestNeighbor +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseNearestNeighborAnalysis(BaseModel): + """ + BaseResponseNearestNeighborAnalysis + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Dict[str, Dict[str, NearestNeighbor]]] = 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 BaseResponseNearestNeighborAnalysis 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 value in data (dict) + _field_dict = {} + if self.data: + for _key_data in self.data: + if self.data[_key_data]: + _field_dict[_key_data] = self.data[_key_data].to_dict() + _dict['data'] = _field_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 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 BaseResponseNearestNeighborAnalysis 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": dict( + (_k, dict( + (_ik, NearestNeighbor.from_dict(_iv)) + for _ik, _iv in _v.items() + ) + if _v is not None + else None + ) + for _k, _v in obj.get("data").items() + ) + 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/revengai/models/base_response_network_overview_response.py b/revengai/revengai/models/base_response_network_overview_response.py new file mode 100644 index 0000000..f95a267 --- /dev/null +++ b/revengai/revengai/models/base_response_network_overview_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.network_overview_response import NetworkOverviewResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseNetworkOverviewResponse(BaseModel): + """ + BaseResponseNetworkOverviewResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[NetworkOverviewResponse] = 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 BaseResponseNetworkOverviewResponse 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 BaseResponseNetworkOverviewResponse 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": NetworkOverviewResponse.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/revengai/models/base_response_params.py b/revengai/revengai/models/base_response_params.py new file mode 100644 index 0000000..6a32927 --- /dev/null +++ b/revengai/revengai/models/base_response_params.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.params import Params +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseParams(BaseModel): + """ + BaseResponseParams + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Params] = 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 BaseResponseParams 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 BaseResponseParams 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": Params.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/revengai/models/base_response_process_dumps.py b/revengai/revengai/models/base_response_process_dumps.py new file mode 100644 index 0000000..5b69c0d --- /dev/null +++ b/revengai/revengai/models/base_response_process_dumps.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.process_dumps import ProcessDumps +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseProcessDumps(BaseModel): + """ + BaseResponseProcessDumps + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ProcessDumps] = 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 BaseResponseProcessDumps 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 BaseResponseProcessDumps 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": ProcessDumps.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/revengai/models/base_response_process_registry.py b/revengai/revengai/models/base_response_process_registry.py new file mode 100644 index 0000000..370ee87 --- /dev/null +++ b/revengai/revengai/models/base_response_process_registry.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.process_registry import ProcessRegistry +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseProcessRegistry(BaseModel): + """ + BaseResponseProcessRegistry + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ProcessRegistry] = 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 BaseResponseProcessRegistry 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 BaseResponseProcessRegistry 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": ProcessRegistry.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/revengai/models/base_response_process_tree.py b/revengai/revengai/models/base_response_process_tree.py new file mode 100644 index 0000000..c17b1d9 --- /dev/null +++ b/revengai/revengai/models/base_response_process_tree.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.process_tree import ProcessTree +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseProcessTree(BaseModel): + """ + BaseResponseProcessTree + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ProcessTree] = 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 BaseResponseProcessTree 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 BaseResponseProcessTree 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": ProcessTree.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/revengai/models/base_response_queued_security_checks_task_response.py b/revengai/revengai/models/base_response_queued_security_checks_task_response.py new file mode 100644 index 0000000..84c5b66 --- /dev/null +++ b/revengai/revengai/models/base_response_queued_security_checks_task_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseQueuedSecurityChecksTaskResponse(BaseModel): + """ + BaseResponseQueuedSecurityChecksTaskResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[QueuedSecurityChecksTaskResponse] = 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 BaseResponseQueuedSecurityChecksTaskResponse 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 BaseResponseQueuedSecurityChecksTaskResponse 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": QueuedSecurityChecksTaskResponse.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/revengai/models/base_response_recent.py b/revengai/revengai/models/base_response_recent.py new file mode 100644 index 0000000..a0b3f53 --- /dev/null +++ b/revengai/revengai/models/base_response_recent.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.recent import Recent +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseRecent(BaseModel): + """ + BaseResponseRecent + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Recent] = 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 BaseResponseRecent 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 BaseResponseRecent 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": Recent.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/revengai/models/base_response_security_checks_response.py b/revengai/revengai/models/base_response_security_checks_response.py new file mode 100644 index 0000000..f643b27 --- /dev/null +++ b/revengai/revengai/models/base_response_security_checks_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.security_checks_response import SecurityChecksResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseSecurityChecksResponse(BaseModel): + """ + BaseResponseSecurityChecksResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[SecurityChecksResponse] = 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 BaseResponseSecurityChecksResponse 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 BaseResponseSecurityChecksResponse 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": SecurityChecksResponse.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/revengai/models/base_response_status.py b/revengai/revengai/models/base_response_status.py new file mode 100644 index 0000000..898c17d --- /dev/null +++ b/revengai/revengai/models/base_response_status.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.status_output import StatusOutput +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseStatus(BaseModel): + """ + BaseResponseStatus + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[StatusOutput] = 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 BaseResponseStatus 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 BaseResponseStatus 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": StatusOutput.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/revengai/models/base_response_str.py b/revengai/revengai/models/base_response_str.py new file mode 100644 index 0000000..891ceef --- /dev/null +++ b/revengai/revengai/models/base_response_str.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class BaseResponseStr(BaseModel): + """ + BaseResponseStr + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[StrictStr] = 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 BaseResponseStr 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 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 BaseResponseStr 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": obj.get("data"), + "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/revengai/models/base_response_symbols_info.py b/revengai/revengai/models/base_response_symbols_info.py new file mode 100644 index 0000000..acb397b --- /dev/null +++ b/revengai/revengai/models/base_response_symbols_info.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.symbols_info import SymbolsInfo +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseSymbolsInfo(BaseModel): + """ + BaseResponseSymbolsInfo + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[SymbolsInfo] = 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 BaseResponseSymbolsInfo 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 BaseResponseSymbolsInfo 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": SymbolsInfo.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/revengai/models/base_response_tag_search_response.py b/revengai/revengai/models/base_response_tag_search_response.py new file mode 100644 index 0000000..b0e7a60 --- /dev/null +++ b/revengai/revengai/models/base_response_tag_search_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.tag_search_response import TagSearchResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseTagSearchResponse(BaseModel): + """ + BaseResponseTagSearchResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[TagSearchResponse] = 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 BaseResponseTagSearchResponse 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 BaseResponseTagSearchResponse 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": TagSearchResponse.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/revengai/models/base_response_task_response.py b/revengai/revengai/models/base_response_task_response.py new file mode 100644 index 0000000..dd615ea --- /dev/null +++ b/revengai/revengai/models/base_response_task_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.task_response import TaskResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseTaskResponse(BaseModel): + """ + BaseResponseTaskResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[TaskResponse] = 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 BaseResponseTaskResponse 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 BaseResponseTaskResponse 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": TaskResponse.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/revengai/models/base_response_ttps.py b/revengai/revengai/models/base_response_ttps.py new file mode 100644 index 0000000..d50342b --- /dev/null +++ b/revengai/revengai/models/base_response_ttps.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.ttps import TTPS +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseTTPS(BaseModel): + """ + BaseResponseTTPS + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[TTPS] = 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 BaseResponseTTPS 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 BaseResponseTTPS 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": TTPS.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/revengai/models/base_response_upload_response.py b/revengai/revengai/models/base_response_upload_response.py new file mode 100644 index 0000000..0ac642d --- /dev/null +++ b/revengai/revengai/models/base_response_upload_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.upload_response import UploadResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseUploadResponse(BaseModel): + """ + BaseResponseUploadResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[UploadResponse] = 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 BaseResponseUploadResponse 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 BaseResponseUploadResponse 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": UploadResponse.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/revengai/models/base_response_vulnerabilities.py b/revengai/revengai/models/base_response_vulnerabilities.py new file mode 100644 index 0000000..59ddd40 --- /dev/null +++ b/revengai/revengai/models/base_response_vulnerabilities.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.vulnerabilities import Vulnerabilities +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseVulnerabilities(BaseModel): + """ + BaseResponseVulnerabilities + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[Vulnerabilities] = 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 BaseResponseVulnerabilities 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 BaseResponseVulnerabilities 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": Vulnerabilities.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/revengai/models/basic.py b/revengai/revengai/models/basic.py new file mode 100644 index 0000000..820b2f7 --- /dev/null +++ b/revengai/revengai/models/basic.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Basic(BaseModel): + """ + Basic + """ # noqa: E501 + binary_name: StrictStr = Field(description="The name of the binary uploaded") + binary_size: StrictInt = Field(description="The size of the binary uploaded (bytes)") + creation: datetime = Field(description="When the binary was uploaded") + sha_256_hash: StrictStr = Field(description="The hash of the binary uploaded") + model_name: StrictStr = Field(description="The model name used for analysis") + owner_username: StrictStr = Field(description="The name of the owner of the binary") + analysis_scope: StrictStr = Field(description="The scope of the analysis") + is_owner: StrictBool = Field(description="Whether the current user is the owner") + debug: StrictBool = Field(description="Whether the current analysis was analysed with debug symbols") + function_count: StrictInt = Field(description="The number of functions in the binary") + is_advanced: StrictBool = Field(description="Whether the analysis was advanced") + __properties: ClassVar[List[str]] = ["binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "owner_username", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced"] + + 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 Basic 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 Basic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_name": obj.get("binary_name"), + "binary_size": obj.get("binary_size"), + "creation": obj.get("creation"), + "sha_256_hash": obj.get("sha_256_hash"), + "model_name": obj.get("model_name"), + "owner_username": obj.get("owner_username"), + "analysis_scope": obj.get("analysis_scope"), + "is_owner": obj.get("is_owner"), + "debug": obj.get("debug"), + "function_count": obj.get("function_count"), + "is_advanced": obj.get("is_advanced") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_additional_details_data_response.py b/revengai/revengai/models/binary_additional_details_data_response.py new file mode 100644 index 0000000..2578d22 --- /dev/null +++ b/revengai/revengai/models/binary_additional_details_data_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.elf_model import ELFModel +from revengai.models.file_metadata import FileMetadata +from revengai.models.pe_model import PEModel +from typing import Optional, Set +from typing_extensions import Self + +class BinaryAdditionalDetailsDataResponse(BaseModel): + """ + BinaryAdditionalDetailsDataResponse + """ # noqa: E501 + file: FileMetadata + pe: Optional[PEModel] = None + elf: Optional[ELFModel] = None + __properties: ClassVar[List[str]] = ["file", "pe", "elf"] + + 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 BinaryAdditionalDetailsDataResponse 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 file + if self.file: + _dict['file'] = self.file.to_dict() + # override the default output from pydantic by calling `to_dict()` of pe + if self.pe: + _dict['pe'] = self.pe.to_dict() + # override the default output from pydantic by calling `to_dict()` of elf + if self.elf: + _dict['elf'] = self.elf.to_dict() + # set to None if pe (nullable) is None + # and model_fields_set contains the field + if self.pe is None and "pe" in self.model_fields_set: + _dict['pe'] = None + + # set to None if elf (nullable) is None + # and model_fields_set contains the field + if self.elf is None and "elf" in self.model_fields_set: + _dict['elf'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BinaryAdditionalDetailsDataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": FileMetadata.from_dict(obj["file"]) if obj.get("file") is not None else None, + "pe": PEModel.from_dict(obj["pe"]) if obj.get("pe") is not None else None, + "elf": ELFModel.from_dict(obj["elf"]) if obj.get("elf") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/binary_additional_response.py b/revengai/revengai/models/binary_additional_response.py new file mode 100644 index 0000000..0333eae --- /dev/null +++ b/revengai/revengai/models/binary_additional_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse +from typing import Optional, Set +from typing_extensions import Self + +class BinaryAdditionalResponse(BaseModel): + """ + BinaryAdditionalResponse + """ # noqa: E501 + binary_id: StrictInt + details: Optional[BinaryAdditionalDetailsDataResponse] + creation: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["binary_id", "details", "creation"] + + 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 BinaryAdditionalResponse 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 details + if self.details: + _dict['details'] = self.details.to_dict() + # 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: + _dict['details'] = None + + # set to None if creation (nullable) is None + # and model_fields_set contains the field + if self.creation is None and "creation" in self.model_fields_set: + _dict['creation'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BinaryAdditionalResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_id": obj.get("binary_id"), + "details": BinaryAdditionalDetailsDataResponse.from_dict(obj["details"]) if obj.get("details") is not None else None, + "creation": obj.get("creation") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_ann_form.py b/revengai/revengai/models/binary_ann_form.py new file mode 100644 index 0000000..c4813f6 --- /dev/null +++ b/revengai/revengai/models/binary_ann_form.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BinaryAnnForm(BaseModel): + """ + BinaryAnnForm + """ # noqa: E501 + confidence: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.0, description="Confidence of the annotation") + nns: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field(default=1, description="Number of nearest neighbors") + collection_ids: Optional[List[StrictInt]] = Field(default=None, description="Collection IDs to search for nearest neighbors") + binary_ids: Optional[List[StrictInt]] = Field(default=None, description="Binary IDs to search for nearest neighbors") + __properties: ClassVar[List[str]] = ["confidence", "nns", "collection_ids", "binary_ids"] + + 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 BinaryAnnForm 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 BinaryAnnForm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "confidence": obj.get("confidence") if obj.get("confidence") is not None else 0.0, + "nns": obj.get("nns") if obj.get("nns") is not None else 1, + "collection_ids": obj.get("collection_ids"), + "binary_ids": obj.get("binary_ids") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_ann_list_response.py b/revengai/revengai/models/binary_ann_list_response.py new file mode 100644 index 0000000..fa1619d --- /dev/null +++ b/revengai/revengai/models/binary_ann_list_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult +from typing import Optional, Set +from typing_extensions import Self + +class BinaryAnnListResponse(BaseModel): + """ + BinaryAnnListResponse + """ # noqa: E501 + list: List[ExportedBinaryAnnResult] + __properties: ClassVar[List[str]] = ["list"] + + 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 BinaryAnnListResponse 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 list (list) + _items = [] + if self.list: + for _item_list in self.list: + if _item_list: + _items.append(_item_list.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BinaryAnnListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "list": [ExportedBinaryAnnResult.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/binary_config.py b/revengai/revengai/models/binary_config.py new file mode 100644 index 0000000..ad24484 --- /dev/null +++ b/revengai/revengai/models/binary_config.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.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 + +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"] + + 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 BinaryConfig 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 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 + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BinaryConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isa": obj.get("isa"), + "platform": obj.get("platform"), + "file_format": obj.get("file_format") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_details_response.py b/revengai/revengai/models/binary_details_response.py new file mode 100644 index 0000000..9175ff2 --- /dev/null +++ b/revengai/revengai/models/binary_details_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class BinaryDetailsResponse(BaseModel): + """ + BinaryDetailsResponse + """ # noqa: E501 + arch: StrictStr = Field(description="The architecture of the binary") + bits: StrictInt = Field(description="The size of the binary in bits") + crc32: StrictStr + var_class: StrictStr = Field(alias="Class") + entropy: Union[StrictFloat, StrictInt] + file_size: StrictInt + language: StrictStr + md5: 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") + ssdeep: StrictStr + static: StrictBool + stripped: StrictBool + sub_sys: StrictStr + tlsh: StrictStr + type: StrictStr + debug: StrictBool + first_seen: datetime + __properties: ClassVar[List[str]] = ["arch", "bits", "crc32", "Class", "entropy", "file_size", "language", "md5", "machine", "os", "sha1", "sha256", "ssdeep", "static", "stripped", "sub_sys", "tlsh", "type", "debug", "first_seen"] + + model_config = ConfigDict( + 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 BinaryDetailsResponse 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 BinaryDetailsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "arch": obj.get("arch"), + "bits": obj.get("bits"), + "crc32": obj.get("crc32"), + "Class": obj.get("Class"), + "entropy": obj.get("entropy"), + "file_size": obj.get("file_size"), + "language": obj.get("language"), + "md5": obj.get("md5"), + "machine": obj.get("machine"), + "os": obj.get("os"), + "sha1": obj.get("sha1"), + "sha256": obj.get("sha256"), + "ssdeep": obj.get("ssdeep"), + "static": obj.get("static"), + "stripped": obj.get("stripped"), + "sub_sys": obj.get("sub_sys"), + "tlsh": obj.get("tlsh"), + "type": obj.get("type"), + "debug": obj.get("debug"), + "first_seen": obj.get("first_seen") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_externals_response.py b/revengai/revengai/models/binary_externals_response.py new file mode 100644 index 0000000..6da24c4 --- /dev/null +++ b/revengai/revengai/models/binary_externals_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BinaryExternalsResponse(BaseModel): + """ + BinaryExternalsResponse + """ # noqa: E501 + sha_256_hash: StrictStr = Field(description="SHA256 hash of the binary") + vt: Dict[str, Any] = Field(description="VirusTotal information") + vt_last_updated: datetime = Field(description="VirusTotal last updated date") + mb: Dict[str, Any] = Field(description="MalwareBazaar information") + mb_last_updated: datetime = Field(description="MalwareBazaar last updated date") + __properties: ClassVar[List[str]] = ["sha_256_hash", "vt", "vt_last_updated", "mb", "mb_last_updated"] + + 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 BinaryExternalsResponse 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 BinaryExternalsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sha_256_hash": obj.get("sha_256_hash"), + "vt": obj.get("vt"), + "vt_last_updated": obj.get("vt_last_updated"), + "mb": obj.get("mb"), + "mb_last_updated": obj.get("mb_last_updated") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_search_response.py b/revengai/revengai/models/binary_search_response.py new file mode 100644 index 0000000..2cb29bc --- /dev/null +++ b/revengai/revengai/models/binary_search_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.binary_search_result import BinarySearchResult +from typing import Optional, Set +from typing_extensions import Self + +class BinarySearchResponse(BaseModel): + """ + BinarySearchResponse + """ # noqa: E501 + results: List[BinarySearchResult] = Field(description="The results of the search") + __properties: ClassVar[List[str]] = ["results"] + + 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 BinarySearchResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BinarySearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [BinarySearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/binary_search_result.py b/revengai/revengai/models/binary_search_result.py new file mode 100644 index 0000000..25ac2ad --- /dev/null +++ b/revengai/revengai/models/binary_search_result.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +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 + +class BinarySearchResult(BaseModel): + """ + BinarySearchResult + """ # noqa: E501 + binary_id: StrictInt = Field(description="The binary ID") + binary_name: StrictStr = Field(description="The name of the binary") + analysis_id: StrictInt = Field(description="The analysis ID") + sha_256_hash: StrictStr = Field(description="The SHA-256 hash of the binary") + tags: Optional[List[StrictStr]] + created_at: datetime = Field(description="The creation date of the binary") + model_id: StrictInt = Field(description="The model ID of the binary") + model_name: StrictStr = Field(description="The name of the model") + owned_by: StrictStr = Field(description="The owner of the binary") + __properties: ClassVar[List[str]] = ["binary_id", "binary_name", "analysis_id", "sha_256_hash", "tags", "created_at", "model_id", "model_name", "owned_by"] + + model_config = ConfigDict( + 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 BinarySearchResult 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 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 BinarySearchResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_id": obj.get("binary_id"), + "binary_name": obj.get("binary_name"), + "analysis_id": obj.get("analysis_id"), + "sha_256_hash": obj.get("sha_256_hash"), + "tags": obj.get("tags"), + "created_at": obj.get("created_at"), + "model_id": obj.get("model_id"), + "model_name": obj.get("model_name"), + "owned_by": obj.get("owned_by") + }) + return _obj + + diff --git a/revengai/revengai/models/binary_task_status.py b/revengai/revengai/models/binary_task_status.py new file mode 100644 index 0000000..a7d9c28 --- /dev/null +++ b/revengai/revengai/models/binary_task_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 BinaryTaskStatus(str, Enum): + """ + BinaryTaskStatus + """ + + """ + allowed enum values + """ + UNINITIALISED = 'UNINITIALISED' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + COMPLETED = 'COMPLETED' + FAILED = 'FAILED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BinaryTaskStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/block.py b/revengai/revengai/models/block.py new file mode 100644 index 0000000..fcb9031 --- /dev/null +++ b/revengai/revengai/models/block.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Block(BaseModel): + """ + Block + """ # noqa: E501 + virtual_address: StrictInt + __properties: ClassVar[List[str]] = ["virtual_address"] + + 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 Block 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 Block from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "virtual_address": obj.get("virtual_address") + }) + return _obj + + diff --git a/revengai/revengai/models/block_comments_generation_for_function_response.py b/revengai/revengai/models/block_comments_generation_for_function_response.py new file mode 100644 index 0000000..9163b28 --- /dev/null +++ b/revengai/revengai/models/block_comments_generation_for_function_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BlockCommentsGenerationForFunctionResponse(BaseModel): + """ + BlockCommentsGenerationForFunctionResponse + """ # noqa: E501 + updated_blocks: StrictInt + __properties: ClassVar[List[str]] = ["updated_blocks"] + + 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 BlockCommentsGenerationForFunctionResponse 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 BlockCommentsGenerationForFunctionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "updated_blocks": obj.get("updated_blocks") + }) + return _obj + + diff --git a/revengai/revengai/models/boundary.py b/revengai/revengai/models/boundary.py new file mode 100644 index 0000000..5a3921d --- /dev/null +++ b/revengai/revengai/models/boundary.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Boundary(BaseModel): + """ + Boundary + """ # noqa: E501 + start_addr: StrictInt = Field(description="Start address of the function boundary") + end_addr: StrictInt = Field(description="End address of the function boundary") + name: StrictStr = Field(description="Name of the function") + __properties: ClassVar[List[str]] = ["start_addr", "end_addr", "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 Boundary 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 Boundary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start_addr": obj.get("start_addr"), + "end_addr": obj.get("end_addr"), + "name": obj.get("name") + }) + return _obj + + diff --git a/revengai/revengai/models/box_plot_confidence.py b/revengai/revengai/models/box_plot_confidence.py new file mode 100644 index 0000000..f2ae079 --- /dev/null +++ b/revengai/revengai/models/box_plot_confidence.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class BoxPlotConfidence(BaseModel): + """ + Format for confidence - returned in the box plot format + """ # noqa: E501 + min: Union[StrictFloat, StrictInt] + max: Union[StrictFloat, StrictInt] + average: Union[StrictFloat, StrictInt] + upper_quartile: Union[StrictFloat, StrictInt] + lower_quartile: Union[StrictFloat, StrictInt] + positive_count: StrictInt + negative_count: StrictInt + __properties: ClassVar[List[str]] = ["min", "max", "average", "upper_quartile", "lower_quartile", "positive_count", "negative_count"] + + 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 BoxPlotConfidence 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 BoxPlotConfidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min": obj.get("min"), + "max": obj.get("max"), + "average": obj.get("average"), + "upper_quartile": obj.get("upper_quartile"), + "lower_quartile": obj.get("lower_quartile"), + "positive_count": obj.get("positive_count"), + "negative_count": obj.get("negative_count") + }) + return _obj + + diff --git a/revengai/revengai/models/callee_function_info.py b/revengai/revengai/models/callee_function_info.py new file mode 100644 index 0000000..9b16a70 --- /dev/null +++ b/revengai/revengai/models/callee_function_info.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class CalleeFunctionInfo(BaseModel): + """ + CalleeFunctionInfo + """ # noqa: E501 + function_id: StrictInt + matched_function_id: Optional[StrictInt] + dashboard_url: Optional[StrictStr] + is_external: Optional[StrictBool] = Field(default=False, description="Indicates if the function is external") + callee_name: StrictStr = Field(description="Name of the called function") + callee_vaddr: StrictStr = Field(description="Virtual address of the called function") + __properties: ClassVar[List[str]] = ["function_id", "matched_function_id", "dashboard_url", "is_external", "callee_name", "callee_vaddr"] + + 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 CalleeFunctionInfo 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 matched_function_id (nullable) is None + # and model_fields_set contains the field + if self.matched_function_id is None and "matched_function_id" in self.model_fields_set: + _dict['matched_function_id'] = None + + # set to None if dashboard_url (nullable) is None + # and model_fields_set contains the field + if self.dashboard_url is None and "dashboard_url" in self.model_fields_set: + _dict['dashboard_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CalleeFunctionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "matched_function_id": obj.get("matched_function_id"), + "dashboard_url": obj.get("dashboard_url"), + "is_external": obj.get("is_external") if obj.get("is_external") is not None else False, + "callee_name": obj.get("callee_name"), + "callee_vaddr": obj.get("callee_vaddr") + }) + return _obj + + diff --git a/revengai/revengai/models/callees_caller_functions_response.py b/revengai/revengai/models/callees_caller_functions_response.py new file mode 100644 index 0000000..9d0fd4a --- /dev/null +++ b/revengai/revengai/models/callees_caller_functions_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.callee_function_info import CalleeFunctionInfo +from revengai.models.caller_function_info import CallerFunctionInfo +from typing import Optional, Set +from typing_extensions import Self + +class CalleesCallerFunctionsResponse(BaseModel): + """ + CalleesCallerFunctionsResponse + """ # noqa: E501 + base_address: Optional[StrictInt] = Field(default=0, description="Base address of the binary") + callees: List[CalleeFunctionInfo] = Field(description="List of functions called by the target function") + callers: List[CallerFunctionInfo] = Field(description="List of functions that call the target function") + __properties: ClassVar[List[str]] = ["base_address", "callees", "callers"] + + 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 CalleesCallerFunctionsResponse 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 callees (list) + _items = [] + if self.callees: + for _item_callees in self.callees: + if _item_callees: + _items.append(_item_callees.to_dict()) + _dict['callees'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in callers (list) + _items = [] + if self.callers: + for _item_callers in self.callers: + if _item_callers: + _items.append(_item_callers.to_dict()) + _dict['callers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CalleesCallerFunctionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base_address": obj.get("base_address") if obj.get("base_address") is not None else 0, + "callees": [CalleeFunctionInfo.from_dict(_item) for _item in obj["callees"]] if obj.get("callees") is not None else None, + "callers": [CallerFunctionInfo.from_dict(_item) for _item in obj["callers"]] if obj.get("callers") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/caller_function_info.py b/revengai/revengai/models/caller_function_info.py new file mode 100644 index 0000000..ee7a37e --- /dev/null +++ b/revengai/revengai/models/caller_function_info.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class CallerFunctionInfo(BaseModel): + """ + CallerFunctionInfo + """ # noqa: E501 + function_id: StrictInt + matched_function_id: Optional[StrictInt] + dashboard_url: Optional[StrictStr] + is_external: Optional[StrictBool] = Field(default=False, description="Indicates if the function is external") + caller_name: StrictStr = Field(description="Name of the calling function") + caller_vaddr: StrictStr = Field(description="Virtual address of the calling function") + __properties: ClassVar[List[str]] = ["function_id", "matched_function_id", "dashboard_url", "is_external", "caller_name", "caller_vaddr"] + + 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 CallerFunctionInfo 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 matched_function_id (nullable) is None + # and model_fields_set contains the field + if self.matched_function_id is None and "matched_function_id" in self.model_fields_set: + _dict['matched_function_id'] = None + + # set to None if dashboard_url (nullable) is None + # and model_fields_set contains the field + if self.dashboard_url is None and "dashboard_url" in self.model_fields_set: + _dict['dashboard_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallerFunctionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "matched_function_id": obj.get("matched_function_id"), + "dashboard_url": obj.get("dashboard_url"), + "is_external": obj.get("is_external") if obj.get("is_external") is not None else False, + "caller_name": obj.get("caller_name"), + "caller_vaddr": obj.get("caller_vaddr") + }) + return _obj + + diff --git a/revengai/revengai/models/capabilities.py b/revengai/revengai/models/capabilities.py new file mode 100644 index 0000000..4036cd3 --- /dev/null +++ b/revengai/revengai/models/capabilities.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.capability import Capability +from typing import Optional, Set +from typing_extensions import Self + +class Capabilities(BaseModel): + """ + Capabilities + """ # noqa: E501 + capabilities: List[Capability] = Field(description="List of capabilities for a given analysis") + __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 Capabilities 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Capabilities 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/revengai/models/capability.py b/revengai/revengai/models/capability.py new file mode 100644 index 0000000..bea20f8 --- /dev/null +++ b/revengai/revengai/models/capability.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 + function_name: StrictStr = Field(description="The name of the function with a capability") + function_vaddr: StrictInt = Field(description="The virtual address of the function where the capability comes from") + capabilities: List[StrictStr] = Field(description="The list of capabilities associated with the function") + __properties: ClassVar[List[str]] = ["function_name", "function_vaddr", "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 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({ + "function_name": obj.get("function_name"), + "function_vaddr": obj.get("function_vaddr"), + "capabilities": obj.get("capabilities") + }) + return _obj + + diff --git a/revengai/revengai/models/check_security_checks_task_response.py b/revengai/revengai/models/check_security_checks_task_response.py new file mode 100644 index 0000000..a177cc1 --- /dev/null +++ b/revengai/revengai/models/check_security_checks_task_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.binary_task_status import BinaryTaskStatus +from typing import Optional, Set +from typing_extensions import Self + +class CheckSecurityChecksTaskResponse(BaseModel): + """ + CheckSecurityChecksTaskResponse + """ # noqa: E501 + status: BinaryTaskStatus + __properties: ClassVar[List[str]] = ["status"] + + 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 CheckSecurityChecksTaskResponse 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 CheckSecurityChecksTaskResponse 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") + }) + return _obj + + diff --git a/revengai/revengai/models/child_binaries_response.py b/revengai/revengai/models/child_binaries_response.py new file mode 100644 index 0000000..4e19cc8 --- /dev/null +++ b/revengai/revengai/models/child_binaries_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.relative_binary_response import RelativeBinaryResponse +from typing import Optional, Set +from typing_extensions import Self + +class ChildBinariesResponse(BaseModel): + """ + ChildBinariesResponse + """ # noqa: E501 + children: List[RelativeBinaryResponse] = Field(description="List of child binaries associated with the parent binary") + parent: Optional[RelativeBinaryResponse] = None + __properties: ClassVar[List[str]] = ["children", "parent"] + + 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 ChildBinariesResponse 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 children (list) + _items = [] + if self.children: + for _item_children in self.children: + if _item_children: + _items.append(_item_children.to_dict()) + _dict['children'] = _items + # override the default output from pydantic by calling `to_dict()` of parent + if self.parent: + _dict['parent'] = self.parent.to_dict() + # set to None if parent (nullable) is None + # and model_fields_set contains the field + if self.parent is None and "parent" in self.model_fields_set: + _dict['parent'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChildBinariesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "children": [RelativeBinaryResponse.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None, + "parent": RelativeBinaryResponse.from_dict(obj["parent"]) if obj.get("parent") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/code_signature_model.py b/revengai/revengai/models/code_signature_model.py new file mode 100644 index 0000000..61632e0 --- /dev/null +++ b/revengai/revengai/models/code_signature_model.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.single_code_signature_model import SingleCodeSignatureModel +from typing import Optional, Set +from typing_extensions import Self + +class CodeSignatureModel(BaseModel): + """ + CodeSignatureModel + """ # noqa: E501 + signed: StrictBool + valid_signature: StrictBool + signatures: List[SingleCodeSignatureModel] + __properties: ClassVar[List[str]] = ["signed", "valid_signature", "signatures"] + + 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 CodeSignatureModel 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 signatures (list) + _items = [] + if self.signatures: + for _item_signatures in self.signatures: + if _item_signatures: + _items.append(_item_signatures.to_dict()) + _dict['signatures'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CodeSignatureModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "signed": obj.get("signed"), + "valid_signature": obj.get("valid_signature"), + "signatures": [SingleCodeSignatureModel.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/collection_binaries_update_request.py b/revengai/revengai/models/collection_binaries_update_request.py new file mode 100644 index 0000000..b348a05 --- /dev/null +++ b/revengai/revengai/models/collection_binaries_update_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CollectionBinariesUpdateRequest(BaseModel): + """ + CollectionBinariesUpdateRequest + """ # noqa: E501 + binaries: List[StrictInt] + __properties: ClassVar[List[str]] = ["binaries"] + + 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 CollectionBinariesUpdateRequest 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 CollectionBinariesUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binaries": obj.get("binaries") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_binaries_update_response.py b/revengai/revengai/models/collection_binaries_update_response.py new file mode 100644 index 0000000..325eeb5 --- /dev/null +++ b/revengai/revengai/models/collection_binaries_update_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.collection_binary_response import CollectionBinaryResponse +from typing import Optional, Set +from typing_extensions import Self + +class CollectionBinariesUpdateResponse(BaseModel): + """ + CollectionBinariesUpdateResponse + """ # noqa: E501 + binaries: List[CollectionBinaryResponse] = Field(description="Collection binaries") + __properties: ClassVar[List[str]] = ["binaries"] + + 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 CollectionBinariesUpdateResponse 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 binaries (list) + _items = [] + if self.binaries: + for _item_binaries in self.binaries: + if _item_binaries: + _items.append(_item_binaries.to_dict()) + _dict['binaries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionBinariesUpdateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binaries": [CollectionBinaryResponse.from_dict(_item) for _item in obj["binaries"]] if obj.get("binaries") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/collection_binary_response.py b/revengai/revengai/models/collection_binary_response.py new file mode 100644 index 0000000..8ef50c9 --- /dev/null +++ b/revengai/revengai/models/collection_binary_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +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 CollectionBinaryResponse(BaseModel): + """ + CollectionBinaryResponse + """ # noqa: E501 + analysis_id: StrictInt = Field(description="Analysis ID") + binary_id: StrictInt = Field(description="Binary ID") + binary_name: StrictStr = Field(description="Binary name") + owner_id: StrictInt = Field(description="Binary owner") + sha_256_hash: StrictStr = Field(description="Binary SHA-256 hash") + created_at: datetime = Field(description="Binary creation date") + __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "binary_name", "owner_id", "sha_256_hash", "created_at"] + + 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 CollectionBinaryResponse 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 CollectionBinaryResponse 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"), + "binary_name": obj.get("binary_name"), + "owner_id": obj.get("owner_id"), + "sha_256_hash": obj.get("sha_256_hash"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_create_request.py b/revengai/revengai/models/collection_create_request.py new file mode 100644 index 0000000..75ce44f --- /dev/null +++ b/revengai/revengai/models/collection_create_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.collection_scope import CollectionScope +from typing import Optional, Set +from typing_extensions import Self + +class CollectionCreateRequest(BaseModel): + """ + CollectionCreateRequest + """ # noqa: E501 + collection_name: StrictStr + description: StrictStr + collection_scope: Optional[CollectionScope] = None + tags: Optional[List[StrictStr]] = None + binaries: Optional[List[StrictInt]] = None + model_id: StrictInt + __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope", "tags", "binaries", "model_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 CollectionCreateRequest 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 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 + + # 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: + _dict['binaries'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection_name": obj.get("collection_name"), + "description": obj.get("description"), + "collection_scope": obj.get("collection_scope"), + "tags": obj.get("tags"), + "binaries": obj.get("binaries"), + "model_id": obj.get("model_id") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_list_item.py b/revengai/revengai/models/collection_list_item.py new file mode 100644 index 0000000..6411cbe --- /dev/null +++ b/revengai/revengai/models/collection_list_item.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CollectionListItem(BaseModel): + """ + CollectionListItem + """ # noqa: E501 + collection_name: StrictStr = Field(description="The name of the collection") + description: StrictStr = Field(description="The description of the collection") + collection_scope: StrictStr = Field(description="The scope of the collection") + collection_owner: StrictStr = Field(description="The owner of the collection") + official_collection: StrictBool = Field(description="Whether the collection is maintained by RevEng.AI") + collection_tags: Optional[List[StrictStr]] = Field(default=None, description="The tags of the collection") + collection_size: StrictInt = Field(description="The size of the collection") + collection_id: StrictInt = Field(description="The ID of the collection") + creation: datetime = Field(description="The current status of analysis") + model_name: StrictStr = Field(description="The model being used for the collection") + team_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope", "collection_owner", "official_collection", "collection_tags", "collection_size", "collection_id", "creation", "model_name", "team_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 CollectionListItem 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 team_id (nullable) is None + # and model_fields_set contains the field + if self.team_id is None and "team_id" in self.model_fields_set: + _dict['team_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionListItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection_name": obj.get("collection_name"), + "description": obj.get("description"), + "collection_scope": obj.get("collection_scope"), + "collection_owner": obj.get("collection_owner"), + "official_collection": obj.get("official_collection"), + "collection_tags": obj.get("collection_tags"), + "collection_size": obj.get("collection_size"), + "collection_id": obj.get("collection_id"), + "creation": obj.get("creation"), + "model_name": obj.get("model_name"), + "team_id": obj.get("team_id") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_response.py b/revengai/revengai/models/collection_response.py new file mode 100644 index 0000000..ed6ddc9 --- /dev/null +++ b/revengai/revengai/models/collection_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner +from revengai.models.collection_scope import CollectionScope +from typing import Optional, Set +from typing_extensions import Self + +class CollectionResponse(BaseModel): + """ + CollectionResponse + """ # noqa: E501 + collection_id: StrictInt = Field(description="Collection ID") + collection_name: StrictStr = Field(description="Collection name") + description: StrictStr = Field(description="Collection description") + model_id: StrictInt = Field(description="Collection model ID") + user_id: StrictInt = Field(description="Collection user ID") + team_id: Optional[StrictInt] = None + collection_scope: CollectionScope = Field(description="Collection public status") + created_at: datetime = Field(description="Collection creation date") + updated_at: datetime = Field(description="Collection last update date") + tags: Optional[List[StrictStr]] = None + binaries: Optional[List[CollectionResponseBinariesInner]] = None + __properties: ClassVar[List[str]] = ["collection_id", "collection_name", "description", "model_id", "user_id", "team_id", "collection_scope", "created_at", "updated_at", "tags", "binaries"] + + 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 CollectionResponse 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 binaries (list) + _items = [] + if self.binaries: + for _item_binaries in self.binaries: + if _item_binaries: + _items.append(_item_binaries.to_dict()) + _dict['binaries'] = _items + # set to None if team_id (nullable) is None + # and model_fields_set contains the field + if self.team_id is None and "team_id" in self.model_fields_set: + _dict['team_id'] = None + + # 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 + + # 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: + _dict['binaries'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection_id": obj.get("collection_id"), + "collection_name": obj.get("collection_name"), + "description": obj.get("description"), + "model_id": obj.get("model_id"), + "user_id": obj.get("user_id"), + "team_id": obj.get("team_id"), + "collection_scope": obj.get("collection_scope"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "tags": obj.get("tags"), + "binaries": [CollectionResponseBinariesInner.from_dict(_item) for _item in obj["binaries"]] if obj.get("binaries") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/collection_response_binaries_inner.py b/revengai/revengai/models/collection_response_binaries_inner.py new file mode 100644 index 0000000..20fdb57 --- /dev/null +++ b/revengai/revengai/models/collection_response_binaries_inner.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr, ValidationError, field_validator +from typing import Optional +from revengai.models.collection_binary_response import CollectionBinaryResponse +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +COLLECTIONRESPONSEBINARIESINNER_ANY_OF_SCHEMAS = ["CollectionBinaryResponse", "int"] + +class CollectionResponseBinariesInner(BaseModel): + """ + CollectionResponseBinariesInner + """ + + # data type: int + anyof_schema_1_validator: Optional[StrictInt] = None + # data type: CollectionBinaryResponse + anyof_schema_2_validator: Optional[CollectionBinaryResponse] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[CollectionBinaryResponse, int]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "CollectionBinaryResponse", "int" } + + 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 = CollectionResponseBinariesInner.model_construct() + error_messages = [] + # validate data type: int + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: CollectionBinaryResponse + if not isinstance(v, CollectionBinaryResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `CollectionBinaryResponse`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in CollectionResponseBinariesInner with anyOf schemas: CollectionBinaryResponse, int. 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 = [] + # deserialize data into int + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[CollectionBinaryResponse] = None + try: + instance.actual_instance = CollectionBinaryResponse.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 CollectionResponseBinariesInner with anyOf schemas: CollectionBinaryResponse, int. 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], CollectionBinaryResponse, int]]: + """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/revengai/models/collection_scope.py b/revengai/revengai/models/collection_scope.py new file mode 100644 index 0000000..b075e46 --- /dev/null +++ b/revengai/revengai/models/collection_scope.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 CollectionScope(str, Enum): + """ + CollectionScope + """ + + """ + allowed enum values + """ + PRIVATE = 'PRIVATE' + PUBLIC = 'PUBLIC' + PROTECTED = 'PROTECTED' + TEAM = 'TEAM' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CollectionScope from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/collection_search_response.py b/revengai/revengai/models/collection_search_response.py new file mode 100644 index 0000000..54e0862 --- /dev/null +++ b/revengai/revengai/models/collection_search_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.collection_search_result import CollectionSearchResult +from typing import Optional, Set +from typing_extensions import Self + +class CollectionSearchResponse(BaseModel): + """ + CollectionSearchResponse + """ # noqa: E501 + results: List[CollectionSearchResult] = Field(description="The results of the search") + __properties: ClassVar[List[str]] = ["results"] + + 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 CollectionSearchResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionSearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [CollectionSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/collection_search_result.py b/revengai/revengai/models/collection_search_result.py new file mode 100644 index 0000000..f4d827b --- /dev/null +++ b/revengai/revengai/models/collection_search_result.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +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 + +class CollectionSearchResult(BaseModel): + """ + CollectionSearchResult + """ # noqa: E501 + collection_id: StrictInt = Field(description="The ID of the collection") + collection_name: StrictStr = Field(description="The name of the collection") + scope: StrictStr = Field(description="The scope of the collection") + last_updated_at: datetime = Field(description="The last update date of the collection") + created_at: datetime = Field(description="The creation date of the collection") + model_id: StrictInt = Field(description="The model ID of the binary") + model_name: StrictStr = Field(description="The name of the model") + owned_by: StrictStr = Field(description="The owner of the collection") + tags: Optional[List[StrictStr]] = None + size: Optional[StrictInt] = None + description: StrictStr = Field(description="The description of the collection") + team_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["collection_id", "collection_name", "scope", "last_updated_at", "created_at", "model_id", "model_name", "owned_by", "tags", "size", "description", "team_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 CollectionSearchResult 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 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 + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if team_id (nullable) is None + # and model_fields_set contains the field + if self.team_id is None and "team_id" in self.model_fields_set: + _dict['team_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionSearchResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection_id": obj.get("collection_id"), + "collection_name": obj.get("collection_name"), + "scope": obj.get("scope"), + "last_updated_at": obj.get("last_updated_at"), + "created_at": obj.get("created_at"), + "model_id": obj.get("model_id"), + "model_name": obj.get("model_name"), + "owned_by": obj.get("owned_by"), + "tags": obj.get("tags"), + "size": obj.get("size"), + "description": obj.get("description"), + "team_id": obj.get("team_id") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_tags_update_request.py b/revengai/revengai/models/collection_tags_update_request.py new file mode 100644 index 0000000..b82dfc9 --- /dev/null +++ b/revengai/revengai/models/collection_tags_update_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CollectionTagsUpdateRequest(BaseModel): + """ + CollectionTagsUpdateRequest + """ # noqa: E501 + tags: List[StrictStr] + __properties: ClassVar[List[str]] = ["tags"] + + 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 CollectionTagsUpdateRequest 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 CollectionTagsUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_tags_update_response.py b/revengai/revengai/models/collection_tags_update_response.py new file mode 100644 index 0000000..c3d8ec0 --- /dev/null +++ b/revengai/revengai/models/collection_tags_update_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CollectionTagsUpdateResponse(BaseModel): + """ + CollectionTagsUpdateResponse + """ # noqa: E501 + tags: List[StrictStr] = Field(description="Collection tags") + __properties: ClassVar[List[str]] = ["tags"] + + 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 CollectionTagsUpdateResponse 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 CollectionTagsUpdateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags") + }) + return _obj + + diff --git a/revengai/revengai/models/collection_update_request.py b/revengai/revengai/models/collection_update_request.py new file mode 100644 index 0000000..a4850ef --- /dev/null +++ b/revengai/revengai/models/collection_update_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.collection_scope import CollectionScope +from typing import Optional, Set +from typing_extensions import Self + +class CollectionUpdateRequest(BaseModel): + """ + CollectionUpdateRequest + """ # noqa: E501 + collection_name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + collection_scope: Optional[CollectionScope] = None + __properties: ClassVar[List[str]] = ["collection_name", "description", "collection_scope"] + + 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 CollectionUpdateRequest 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 collection_name (nullable) is None + # and model_fields_set contains the field + if self.collection_name is None and "collection_name" in self.model_fields_set: + _dict['collection_name'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if collection_scope (nullable) is None + # and model_fields_set contains the field + if self.collection_scope is None and "collection_scope" in self.model_fields_set: + _dict['collection_scope'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection_name": obj.get("collection_name"), + "description": obj.get("description"), + "collection_scope": obj.get("collection_scope") + }) + return _obj + + diff --git a/revengai/revengai/models/comment_base.py b/revengai/revengai/models/comment_base.py new file mode 100644 index 0000000..e81da80 --- /dev/null +++ b/revengai/revengai/models/comment_base.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CommentBase(BaseModel): + """ + CommentBase + """ # noqa: E501 + content: StrictStr = Field(description="Comment text content") + __properties: ClassVar[List[str]] = ["content"] + + 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 CommentBase 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 CommentBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content") + }) + return _obj + + diff --git a/revengai/revengai/models/comment_response.py b/revengai/revengai/models/comment_response.py new file mode 100644 index 0000000..e3e5034 --- /dev/null +++ b/revengai/revengai/models/comment_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.context import Context +from typing import Optional, Set +from typing_extensions import Self + +class CommentResponse(BaseModel): + """ + CommentResponse + """ # noqa: E501 + content: StrictStr = Field(description="Comment text content") + id: StrictInt + user_id: StrictInt + resource_type: StrictStr + resource_id: StrictStr + context: Optional[Context] = None + created_at: datetime + updated_at: datetime + __properties: ClassVar[List[str]] = ["content", "id", "user_id", "resource_type", "resource_id", "context", "created_at", "updated_at"] + + 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 CommentResponse 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 context + if self.context: + _dict['context'] = self.context.to_dict() + # 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: + _dict['context'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CommentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "resource_type": obj.get("resource_type"), + "resource_id": obj.get("resource_id"), + "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/revengai/revengai/models/comment_update_request.py b/revengai/revengai/models/comment_update_request.py new file mode 100644 index 0000000..c1559ef --- /dev/null +++ b/revengai/revengai/models/comment_update_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CommentUpdateRequest(BaseModel): + """ + CommentUpdateRequest + """ # noqa: E501 + content: StrictStr = Field(description="Updated comment text") + __properties: ClassVar[List[str]] = ["content"] + + 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 CommentUpdateRequest 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 CommentUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content") + }) + return _obj + + diff --git a/revengai/revengai/models/communities.py b/revengai/revengai/models/communities.py new file mode 100644 index 0000000..0a325cd --- /dev/null +++ b/revengai/revengai/models/communities.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.community_match_percentages import CommunityMatchPercentages +from typing import Optional, Set +from typing_extensions import Self + +class Communities(BaseModel): + """ + Communities + """ # noqa: E501 + total_functions: StrictInt = Field(description="The total number of matched community functions") + total_matched_functions: StrictInt = Field(description="The total number of functions in the binary") + direct_community_match_percentages: List[CommunityMatchPercentages] = Field(description="The list of directly matched communities") + top_components: List[Dict[str, Any]] = Field(description="The top components of the binary") + __properties: ClassVar[List[str]] = ["total_functions", "total_matched_functions", "direct_community_match_percentages", "top_components"] + + 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 Communities 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 direct_community_match_percentages (list) + _items = [] + if self.direct_community_match_percentages: + for _item_direct_community_match_percentages in self.direct_community_match_percentages: + if _item_direct_community_match_percentages: + _items.append(_item_direct_community_match_percentages.to_dict()) + _dict['direct_community_match_percentages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Communities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total_functions": obj.get("total_functions"), + "total_matched_functions": obj.get("total_matched_functions"), + "direct_community_match_percentages": [CommunityMatchPercentages.from_dict(_item) for _item in obj["direct_community_match_percentages"]] if obj.get("direct_community_match_percentages") is not None else None, + "top_components": obj.get("top_components") + }) + return _obj + + diff --git a/revengai/revengai/models/community_match_percentages.py b/revengai/revengai/models/community_match_percentages.py new file mode 100644 index 0000000..a70ad1e --- /dev/null +++ b/revengai/revengai/models/community_match_percentages.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class CommunityMatchPercentages(BaseModel): + """ + CommunityMatchPercentages + """ # noqa: E501 + binary_name: StrictStr + binary_id: StrictInt + matched_communities_percent: Union[StrictFloat, StrictInt] + unmatched_communities_percent: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["binary_name", "binary_id", "matched_communities_percent", "unmatched_communities_percent"] + + 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 CommunityMatchPercentages 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 CommunityMatchPercentages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_name": obj.get("binary_name"), + "binary_id": obj.get("binary_id"), + "matched_communities_percent": obj.get("matched_communities_percent"), + "unmatched_communities_percent": obj.get("unmatched_communities_percent") + }) + return _obj + + diff --git a/revengai/revengai/models/confidence_type.py b/revengai/revengai/models/confidence_type.py new file mode 100644 index 0000000..97088c5 --- /dev/null +++ b/revengai/revengai/models/confidence_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 ConfidenceType(str, Enum): + """ + ConfidenceType + """ + + """ + allowed enum values + """ + FALSE_POSITIVE = 'FALSE_POSITIVE' + SIGNATURE = 'SIGNATURE' + HEURISTIC = 'HEURISTIC' + LIKELY_VULNERABLE = 'LIKELY_VULNERABLE' + VULNERABLE = 'VULNERABLE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConfidenceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/context.py b/revengai/revengai/models/context.py new file mode 100644 index 0000000..f67caef --- /dev/null +++ b/revengai/revengai/models/context.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Any, Dict, Optional +from revengai.models.decompilation_comment_context import DecompilationCommentContext +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CONTEXT_ANY_OF_SCHEMAS = ["DecompilationCommentContext", "object"] + +class Context(BaseModel): + """ + Context + """ + + # data type: DecompilationCommentContext + anyof_schema_1_validator: Optional[DecompilationCommentContext] = None + # data type: object + anyof_schema_2_validator: Optional[Dict[str, Any]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[DecompilationCommentContext, object]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "DecompilationCommentContext", "object" } + + 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): + if v is None: + return v + + instance = Context.model_construct() + error_messages = [] + # validate data type: DecompilationCommentContext + if not isinstance(v, DecompilationCommentContext): + error_messages.append(f"Error! Input type `{type(v)}` is not `DecompilationCommentContext`") + else: + return v + + # validate data type: object + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Context with anyOf schemas: DecompilationCommentContext, object. 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() + if json_str is None: + return instance + + error_messages = [] + # anyof_schema_1_validator: Optional[DecompilationCommentContext] = None + try: + instance.actual_instance = DecompilationCommentContext.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + 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 Context with anyOf schemas: DecompilationCommentContext, object. 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], DecompilationCommentContext, object]]: + """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/revengai/models/created.py b/revengai/revengai/models/created.py new file mode 100644 index 0000000..21035dd --- /dev/null +++ b/revengai/revengai/models/created.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Created(BaseModel): + """ + Created + """ # noqa: E501 + analysis_id: StrictInt = Field(description="The ID corresponding to the newly created analysis") + binary_id: StrictInt = Field(description="The ID corresponding to the binary that was created") + reference: StrictStr = Field(description="Deprecated will always be empty string") + __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "reference"] + + 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 Created 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 Created 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"), + "reference": obj.get("reference") + }) + return _obj + + diff --git a/revengai/revengai/models/decompilation_comment_context.py b/revengai/revengai/models/decompilation_comment_context.py new file mode 100644 index 0000000..6fbcad6 --- /dev/null +++ b/revengai/revengai/models/decompilation_comment_context.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DecompilationCommentContext(BaseModel): + """ + DecompilationCommentContext + """ # noqa: E501 + start_line: Optional[StrictInt] + end_line: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["start_line", "end_line"] + + 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 DecompilationCommentContext 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 start_line (nullable) is None + # and model_fields_set contains the field + if self.start_line is None and "start_line" in self.model_fields_set: + _dict['start_line'] = None + + # set to None if end_line (nullable) is None + # and model_fields_set contains the field + if self.end_line is None and "end_line" in self.model_fields_set: + _dict['end_line'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DecompilationCommentContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start_line": obj.get("start_line"), + "end_line": obj.get("end_line") + }) + return _obj + + diff --git a/revengai/revengai/models/decompilation_response.py b/revengai/revengai/models/decompilation_response.py new file mode 100644 index 0000000..069b0e3 --- /dev/null +++ b/revengai/revengai/models/decompilation_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DecompilationResponse(BaseModel): + """ + DecompilationResponse + """ # noqa: E501 + function_id: StrictInt + decompilation: StrictStr + calling_convention: StrictStr + __properties: ClassVar[List[str]] = ["function_id", "decompilation", "calling_convention"] + + 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 DecompilationResponse 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 DecompilationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "decompilation": obj.get("decompilation"), + "calling_convention": obj.get("calling_convention") + }) + return _obj + + diff --git a/revengai/revengai/models/die_match.py b/revengai/revengai/models/die_match.py new file mode 100644 index 0000000..dd27ce4 --- /dev/null +++ b/revengai/revengai/models/die_match.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DieMatch(BaseModel): + """ + DieMatch + """ # noqa: E501 + name: StrictStr = Field(description="Canonical name of the matched signature/technology (e.g., 'UPX', 'GCC', 'MSVC').") + type: StrictStr = Field(description="Category assigned by DIE for the match (e.g., 'compiler', 'packer', 'file').") + display: StrictStr = Field(description="Human-readable description from DIE's 'string' field; suitable for UI/logs, not for parsing.") + version: StrictStr = Field(description="Extracted version string when available; may be empty/None if unknown.") + __properties: ClassVar[List[str]] = ["name", "type", "display", "version"] + + 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 DieMatch 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 DieMatch 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"), + "type": obj.get("type"), + "display": obj.get("display"), + "version": obj.get("version") + }) + return _obj + + diff --git a/revengai/revengai/models/dynamic_execution_status_input.py b/revengai/revengai/models/dynamic_execution_status_input.py new file mode 100644 index 0000000..2c75993 --- /dev/null +++ b/revengai/revengai/models/dynamic_execution_status_input.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 DynamicExecutionStatusInput(str, Enum): + """ + Custom enum for the dynamic execution status + """ + + """ + allowed enum values + """ + PENDING = 'PENDING' + ERROR = 'ERROR' + SUCCESS = 'SUCCESS' + ALL = 'ALL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DynamicExecutionStatusInput from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/elf_dynamic_entry.py b/revengai/revengai/models/elf_dynamic_entry.py new file mode 100644 index 0000000..c39f6ce --- /dev/null +++ b/revengai/revengai/models/elf_dynamic_entry.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ElfDynamicEntry(BaseModel): + """ + ElfDynamicEntry + """ # noqa: E501 + tag: StrictStr + value: StrictInt + __properties: ClassVar[List[str]] = ["tag", "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 ElfDynamicEntry 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 ElfDynamicEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": obj.get("tag"), + "value": obj.get("value") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_import_model.py b/revengai/revengai/models/elf_import_model.py new file mode 100644 index 0000000..520253d --- /dev/null +++ b/revengai/revengai/models/elf_import_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ELFImportModel(BaseModel): + """ + ELFImportModel + """ # noqa: E501 + number_of_imports: StrictInt + imports: List[StrictStr] + __properties: ClassVar[List[str]] = ["number_of_imports", "imports"] + + 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 ELFImportModel 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 ELFImportModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number_of_imports": obj.get("number_of_imports"), + "imports": obj.get("imports") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_model.py b/revengai/revengai/models/elf_model.py new file mode 100644 index 0000000..69fc20a --- /dev/null +++ b/revengai/revengai/models/elf_model.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.elf_dynamic_entry import ElfDynamicEntry +from revengai.models.elf_import_model import ELFImportModel +from revengai.models.elf_relocation import ELFRelocation +from revengai.models.elf_section import ELFSection +from revengai.models.elf_security import ELFSecurity +from revengai.models.elf_segment import ELFSegment +from revengai.models.elf_symbol import ELFSymbol +from typing import Optional, Set +from typing_extensions import Self + +class ELFModel(BaseModel): + """ + ELFModel + """ # noqa: E501 + file_type: StrictStr + architecture: StrictStr + endianness: StrictStr + entry_point: StrictInt + entry_point_bytes: StrictStr + import_hash: StrictStr + export_hash: StrictStr + build_id: StrictStr + security: ELFSecurity + sections: List[ELFSection] + segments: List[ELFSegment] + symbols: List[ELFSymbol] + dynamic_symbols: List[ELFSymbol] + relocations: List[ELFRelocation] + imports: ELFImportModel + exported_functions: List[StrictStr] + dynamic_entries: List[ElfDynamicEntry] + notes: List[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"] + + 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 ELFModel 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 security + if self.security: + _dict['security'] = self.security.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sections (list) + _items = [] + if self.sections: + for _item_sections in self.sections: + if _item_sections: + _items.append(_item_sections.to_dict()) + _dict['sections'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in segments (list) + _items = [] + if self.segments: + for _item_segments in self.segments: + if _item_segments: + _items.append(_item_segments.to_dict()) + _dict['segments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in symbols (list) + _items = [] + if self.symbols: + for _item_symbols in self.symbols: + if _item_symbols: + _items.append(_item_symbols.to_dict()) + _dict['symbols'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dynamic_symbols (list) + _items = [] + if self.dynamic_symbols: + for _item_dynamic_symbols in self.dynamic_symbols: + if _item_dynamic_symbols: + _items.append(_item_dynamic_symbols.to_dict()) + _dict['dynamic_symbols'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in relocations (list) + _items = [] + if self.relocations: + for _item_relocations in self.relocations: + if _item_relocations: + _items.append(_item_relocations.to_dict()) + _dict['relocations'] = _items + # override the default output from pydantic by calling `to_dict()` of imports + if self.imports: + _dict['imports'] = self.imports.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dynamic_entries (list) + _items = [] + if self.dynamic_entries: + for _item_dynamic_entries in self.dynamic_entries: + if _item_dynamic_entries: + _items.append(_item_dynamic_entries.to_dict()) + _dict['dynamic_entries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ELFModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file_type": obj.get("file_type"), + "architecture": obj.get("architecture"), + "endianness": obj.get("endianness"), + "entry_point": obj.get("entry_point"), + "entry_point_bytes": obj.get("entry_point_bytes"), + "import_hash": obj.get("import_hash"), + "export_hash": obj.get("export_hash"), + "build_id": obj.get("build_id"), + "security": ELFSecurity.from_dict(obj["security"]) if obj.get("security") is not None else None, + "sections": [ELFSection.from_dict(_item) for _item in obj["sections"]] if obj.get("sections") is not None else None, + "segments": [ELFSegment.from_dict(_item) for _item in obj["segments"]] if obj.get("segments") is not None else None, + "symbols": [ELFSymbol.from_dict(_item) for _item in obj["symbols"]] if obj.get("symbols") is not None else None, + "dynamic_symbols": [ELFSymbol.from_dict(_item) for _item in obj["dynamic_symbols"]] if obj.get("dynamic_symbols") is not None else None, + "relocations": [ELFRelocation.from_dict(_item) for _item in obj["relocations"]] if obj.get("relocations") is not None else None, + "imports": ELFImportModel.from_dict(obj["imports"]) if obj.get("imports") is not None else None, + "exported_functions": obj.get("exported_functions"), + "dynamic_entries": [ElfDynamicEntry.from_dict(_item) for _item in obj["dynamic_entries"]] if obj.get("dynamic_entries") is not None else None, + "notes": obj.get("notes"), + "debug_info": obj.get("debug_info"), + "version_info": obj.get("version_info") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_relocation.py b/revengai/revengai/models/elf_relocation.py new file mode 100644 index 0000000..7941d1b --- /dev/null +++ b/revengai/revengai/models/elf_relocation.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ELFRelocation(BaseModel): + """ + ELFRelocation + """ # noqa: E501 + address: StrictInt + type: StrictInt + size: StrictInt + addend: StrictInt + symbol_name: StrictStr + is_dynamic: StrictBool + is_pltgot: StrictBool + __properties: ClassVar[List[str]] = ["address", "type", "size", "addend", "symbol_name", "is_dynamic", "is_pltgot"] + + 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 ELFRelocation 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 ELFRelocation 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"), + "type": obj.get("type"), + "size": obj.get("size"), + "addend": obj.get("addend"), + "symbol_name": obj.get("symbol_name"), + "is_dynamic": obj.get("is_dynamic"), + "is_pltgot": obj.get("is_pltgot") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_section.py b/revengai/revengai/models/elf_section.py new file mode 100644 index 0000000..d3f2b12 --- /dev/null +++ b/revengai/revengai/models/elf_section.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ELFSection(BaseModel): + """ + ELFSection + """ # noqa: E501 + name: StrictStr + type: StrictStr + virtual_address: StrictInt + virtual_size: StrictInt + raw_size: StrictInt + file_offset: StrictInt + flags: StrictStr + flags_raw: StrictInt + entropy: Union[StrictFloat, StrictInt] + alignment: StrictInt + __properties: ClassVar[List[str]] = ["name", "type", "virtual_address", "virtual_size", "raw_size", "file_offset", "flags", "flags_raw", "entropy", "alignment"] + + 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 ELFSection 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 ELFSection 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"), + "type": obj.get("type"), + "virtual_address": obj.get("virtual_address"), + "virtual_size": obj.get("virtual_size"), + "raw_size": obj.get("raw_size"), + "file_offset": obj.get("file_offset"), + "flags": obj.get("flags"), + "flags_raw": obj.get("flags_raw"), + "entropy": obj.get("entropy"), + "alignment": obj.get("alignment") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_security.py b/revengai/revengai/models/elf_security.py new file mode 100644 index 0000000..adad28f --- /dev/null +++ b/revengai/revengai/models/elf_security.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ELFSecurity(BaseModel): + """ + ELFSecurity + """ # noqa: E501 + pie: StrictBool + stripped: StrictBool + canary: StrictBool + nx: StrictBool + relo: StrictBool + __properties: ClassVar[List[str]] = ["pie", "stripped", "canary", "nx", "relo"] + + 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 ELFSecurity 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 ELFSecurity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pie": obj.get("pie"), + "stripped": obj.get("stripped"), + "canary": obj.get("canary"), + "nx": obj.get("nx"), + "relo": obj.get("relo") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_segment.py b/revengai/revengai/models/elf_segment.py new file mode 100644 index 0000000..a205f2e --- /dev/null +++ b/revengai/revengai/models/elf_segment.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ELFSegment(BaseModel): + """ + ELFSegment + """ # noqa: E501 + type: StrictStr + virtual_address: StrictInt + virtual_size: StrictInt + physical_address: StrictInt + physical_size: StrictInt + file_offset: StrictInt + flags: StrictStr + flags_raw: StrictInt + alignment: StrictInt + __properties: ClassVar[List[str]] = ["type", "virtual_address", "virtual_size", "physical_address", "physical_size", "file_offset", "flags", "flags_raw", "alignment"] + + 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 ELFSegment 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 ELFSegment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "virtual_address": obj.get("virtual_address"), + "virtual_size": obj.get("virtual_size"), + "physical_address": obj.get("physical_address"), + "physical_size": obj.get("physical_size"), + "file_offset": obj.get("file_offset"), + "flags": obj.get("flags"), + "flags_raw": obj.get("flags_raw"), + "alignment": obj.get("alignment") + }) + return _obj + + diff --git a/revengai/revengai/models/elf_symbol.py b/revengai/revengai/models/elf_symbol.py new file mode 100644 index 0000000..dc71e1c --- /dev/null +++ b/revengai/revengai/models/elf_symbol.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ELFSymbol(BaseModel): + """ + ELFSymbol + """ # noqa: E501 + name: StrictStr + value: StrictInt + size: StrictInt + type: StrictStr + binding: StrictStr + visibility: StrictStr + section_index: StrictInt + __properties: ClassVar[List[str]] = ["name", "value", "size", "type", "binding", "visibility", "section_index"] + + 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 ELFSymbol 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 ELFSymbol 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"), + "value": obj.get("value"), + "size": obj.get("size"), + "type": obj.get("type"), + "binding": obj.get("binding"), + "visibility": obj.get("visibility"), + "section_index": obj.get("section_index") + }) + return _obj + + diff --git a/revengai/revengai/models/entrypoint_model.py b/revengai/revengai/models/entrypoint_model.py new file mode 100644 index 0000000..cdf0769 --- /dev/null +++ b/revengai/revengai/models/entrypoint_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EntrypointModel(BaseModel): + """ + EntrypointModel + """ # noqa: E501 + address: StrictInt + first_bytes: StrictStr + __properties: ClassVar[List[str]] = ["address", "first_bytes"] + + 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 EntrypointModel 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 EntrypointModel 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"), + "first_bytes": obj.get("first_bytes") + }) + return _obj + + diff --git a/revengai/revengai/models/enumeration.py b/revengai/revengai/models/enumeration.py new file mode 100644 index 0000000..45cea73 --- /dev/null +++ b/revengai/revengai/models/enumeration.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class Enumeration(BaseModel): + """ + Enumeration + """ # noqa: E501 + last_change: Optional[StrictStr] = None + name: StrictStr = Field(description="Name of the enumeration") + members: Dict[str, StrictInt] = Field(description="Dictionary of enumeration members and their values") + artifact_type: Optional[StrictStr] = Field(default=None, description="Type of artifact that the enumeration is associated with") + __properties: ClassVar[List[str]] = ["last_change", "name", "members", "artifact_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 Enumeration 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Enumeration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "name": obj.get("name"), + "members": obj.get("members"), + "artifact_type": obj.get("artifact_type") + }) + return _obj + + diff --git a/revengai/revengai/models/error_model.py b/revengai/revengai/models/error_model.py new file mode 100644 index 0000000..fba489a --- /dev/null +++ b/revengai/revengai/models/error_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ErrorModel(BaseModel): + """ + ErrorModel + """ # noqa: E501 + code: StrictStr + message: StrictStr + __properties: ClassVar[List[str]] = ["code", "message"] + + 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 ErrorModel 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 ErrorModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message") + }) + return _obj + + diff --git a/revengai/revengai/models/export_model.py b/revengai/revengai/models/export_model.py new file mode 100644 index 0000000..8a9df81 --- /dev/null +++ b/revengai/revengai/models/export_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExportModel(BaseModel): + """ + ExportModel + """ # noqa: E501 + number_of_exports: StrictInt + exports: List[Dict[str, StrictInt]] + __properties: ClassVar[List[str]] = ["number_of_exports", "exports"] + + 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 ExportModel 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 ExportModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number_of_exports": obj.get("number_of_exports"), + "exports": obj.get("exports") + }) + return _obj + + diff --git a/revengai/revengai/models/exported_binary_ann_result.py b/revengai/revengai/models/exported_binary_ann_result.py new file mode 100644 index 0000000..5bed6bb --- /dev/null +++ b/revengai/revengai/models/exported_binary_ann_result.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem +from typing import Optional, Set +from typing_extensions import Self + +class ExportedBinaryAnnResult(BaseModel): + """ + ExportedBinaryAnnResult + """ # noqa: E501 + analysis_id: StrictInt + binary_id: StrictInt + binary_name: StrictStr + sha_256_hash: StrictStr + analysis_scope: StrictStr + embedding_3d: List[Union[StrictFloat, StrictInt]] + embedding_1d: List[Union[StrictFloat, StrictInt]] + confidence: Union[StrictFloat, StrictInt] + tags: Optional[List[AppServicesBinaryAnnSchemaTagItem]] = None + __properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "binary_name", "sha_256_hash", "analysis_scope", "embedding_3d", "embedding_1d", "confidence", "tags"] + + 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 ExportedBinaryAnnResult 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 tags (list) + _items = [] + if self.tags: + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) + _dict['tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportedBinaryAnnResult 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"), + "binary_name": obj.get("binary_name"), + "sha_256_hash": obj.get("sha_256_hash"), + "analysis_scope": obj.get("analysis_scope"), + "embedding_3d": obj.get("embedding_3d"), + "embedding_1d": obj.get("embedding_1d"), + "confidence": obj.get("confidence"), + "tags": [AppServicesBinaryAnnSchemaTagItem.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/external_response.py b/revengai/revengai/models/external_response.py new file mode 100644 index 0000000..d3ba7f0 --- /dev/null +++ b/revengai/revengai/models/external_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExternalResponse(BaseModel): + """ + ExternalResponse + """ # noqa: E501 + sha_256_hash: StrictStr + data: Dict[str, Any] + last_updated: datetime + __properties: ClassVar[List[str]] = ["sha_256_hash", "data", "last_updated"] + + 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 ExternalResponse 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 ExternalResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sha_256_hash": obj.get("sha_256_hash"), + "data": obj.get("data"), + "last_updated": obj.get("last_updated") + }) + return _obj + + diff --git a/revengai/revengai/models/file_format.py b/revengai/revengai/models/file_format.py new file mode 100644 index 0000000..f3c9461 --- /dev/null +++ b/revengai/revengai/models/file_format.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FileFormat(str, Enum): + """ + FileFormat + """ + + """ + allowed enum values + """ + PE = 'pe' + ELF = 'elf' + BLOB = 'blob' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FileFormat from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/file_hashes.py b/revengai/revengai/models/file_hashes.py new file mode 100644 index 0000000..8bc834a --- /dev/null +++ b/revengai/revengai/models/file_hashes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FileHashes(BaseModel): + """ + FileHashes + """ # noqa: E501 + md5: Optional[StrictStr] + sha1: Optional[StrictStr] + sha256: Optional[StrictStr] + sha512: Optional[StrictStr] + sha3_224: Optional[StrictStr] + sha3_256: Optional[StrictStr] + sha3_384: Optional[StrictStr] + sha3_512: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["md5", "sha1", "sha256", "sha512", "sha3_224", "sha3_256", "sha3_384", "sha3_512"] + + 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 FileHashes 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 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 sha512 (nullable) is None + # and model_fields_set contains the field + if self.sha512 is None and "sha512" in self.model_fields_set: + _dict['sha512'] = None + + # set to None if sha3_224 (nullable) is None + # and model_fields_set contains the field + if self.sha3_224 is None and "sha3_224" in self.model_fields_set: + _dict['sha3_224'] = None + + # set to None if sha3_256 (nullable) is None + # and model_fields_set contains the field + if self.sha3_256 is None and "sha3_256" in self.model_fields_set: + _dict['sha3_256'] = None + + # set to None if sha3_384 (nullable) is None + # and model_fields_set contains the field + if self.sha3_384 is None and "sha3_384" in self.model_fields_set: + _dict['sha3_384'] = None + + # set to None if sha3_512 (nullable) is None + # and model_fields_set contains the field + if self.sha3_512 is None and "sha3_512" in self.model_fields_set: + _dict['sha3_512'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileHashes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "md5": obj.get("md5"), + "sha1": obj.get("sha1"), + "sha256": obj.get("sha256"), + "sha512": obj.get("sha512"), + "sha3_224": obj.get("sha3_224"), + "sha3_256": obj.get("sha3_256"), + "sha3_384": obj.get("sha3_384"), + "sha3_512": obj.get("sha3_512") + }) + return _obj + + diff --git a/revengai/revengai/models/file_metadata.py b/revengai/revengai/models/file_metadata.py new file mode 100644 index 0000000..92b8f91 --- /dev/null +++ b/revengai/revengai/models/file_metadata.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from revengai.models.file_hashes import FileHashes +from typing import Optional, Set +from typing_extensions import Self + +class FileMetadata(BaseModel): + """ + FileMetadata + """ # noqa: E501 + size: StrictInt + friendly_size: StrictStr + entropy: Union[StrictFloat, StrictInt] + hashes: FileHashes + __properties: ClassVar[List[str]] = ["size", "friendly_size", "entropy", "hashes"] + + 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 FileMetadata 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 hashes + if self.hashes: + _dict['hashes'] = self.hashes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "size": obj.get("size"), + "friendly_size": obj.get("friendly_size"), + "entropy": obj.get("entropy"), + "hashes": FileHashes.from_dict(obj["hashes"]) if obj.get("hashes") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/filters.py b/revengai/revengai/models/filters.py new file mode 100644 index 0000000..f834f07 --- /dev/null +++ b/revengai/revengai/models/filters.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Filters(str, Enum): + """ + Filters + """ + + """ + allowed enum values + """ + OFFICIAL_ONLY = 'official_only' + USER_ONLY = 'user_only' + TEAM_ONLY = 'team_only' + PUBLIC_ONLY = 'public_only' + HIDE_EMPTY = 'hide_empty' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Filters from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/function_analysis_threat_score_data.py b/revengai/revengai/models/function_analysis_threat_score_data.py new file mode 100644 index 0000000..3f6a343 --- /dev/null +++ b/revengai/revengai/models/function_analysis_threat_score_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class FunctionAnalysisThreatScoreData(BaseModel): + """ + FunctionAnalysisThreatScoreData + """ # noqa: E501 + min: Union[StrictFloat, StrictInt] = Field(description="The minimum value for the analysis score") + max: Union[StrictFloat, StrictInt] = Field(description="The maximum value for the analysis score") + average: Union[StrictFloat, StrictInt] = Field(description="The average value for the analysis score") + upper: Union[StrictFloat, StrictInt] = Field(description="The upper limit for the analysis score") + lower: Union[StrictFloat, StrictInt] = Field(description="The lower limit for the analysis score") + malware_count: StrictInt = Field(description="Number of malware binaries used in threat score calculation") + benign_count: StrictInt = Field(description="Number of benign binaries used in threat score calculation") + __properties: ClassVar[List[str]] = ["min", "max", "average", "upper", "lower", "malware_count", "benign_count"] + + 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 FunctionAnalysisThreatScoreData 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 FunctionAnalysisThreatScoreData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min": obj.get("min"), + "max": obj.get("max"), + "average": obj.get("average"), + "upper": obj.get("upper"), + "lower": obj.get("lower"), + "malware_count": obj.get("malware_count"), + "benign_count": obj.get("benign_count") + }) + return _obj + + diff --git a/revengai/revengai/models/function_block_destination_response.py b/revengai/revengai/models/function_block_destination_response.py new file mode 100644 index 0000000..768a1a3 --- /dev/null +++ b/revengai/revengai/models/function_block_destination_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class FunctionBlockDestinationResponse(BaseModel): + """ + FunctionBlockDestinationResponse + """ # noqa: E501 + destination_block_id: Optional[StrictInt] + flowtype: StrictStr = Field(description="The type of execution flow between chunks") + vaddr: StrictStr = Field(description="The vaddr of the destination where the execution flow continues from") + __properties: ClassVar[List[str]] = ["destination_block_id", "flowtype", "vaddr"] + + 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 FunctionBlockDestinationResponse 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 destination_block_id (nullable) is None + # and model_fields_set contains the field + if self.destination_block_id is None and "destination_block_id" in self.model_fields_set: + _dict['destination_block_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionBlockDestinationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination_block_id": obj.get("destination_block_id"), + "flowtype": obj.get("flowtype"), + "vaddr": obj.get("vaddr") + }) + return _obj + + diff --git a/revengai/revengai/models/function_block_response.py b/revengai/revengai/models/function_block_response.py new file mode 100644 index 0000000..5e6c85b --- /dev/null +++ b/revengai/revengai/models/function_block_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_block_destination_response import FunctionBlockDestinationResponse +from typing import Optional, Set +from typing_extensions import Self + +class FunctionBlockResponse(BaseModel): + """ + FunctionBlockResponse + """ # noqa: E501 + asm: List[StrictStr] = Field(description="The ordered assembly strings for this chunk") + id: StrictInt = Field(description="ID of the block") + min_addr: StrictInt = Field(description="The minimum vaddr of the block") + max_addr: StrictInt = Field(description="The maximum vaddr of the block") + destinations: List[FunctionBlockDestinationResponse] = Field(description="The potential execution flow destinations from this block") + comment: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["asm", "id", "min_addr", "max_addr", "destinations", "comment"] + + 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 FunctionBlockResponse 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 destinations (list) + _items = [] + if self.destinations: + for _item_destinations in self.destinations: + if _item_destinations: + _items.append(_item_destinations.to_dict()) + _dict['destinations'] = _items + # set to None if comment (nullable) is None + # and model_fields_set contains the field + if self.comment is None and "comment" in self.model_fields_set: + _dict['comment'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionBlockResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asm": obj.get("asm"), + "id": obj.get("id"), + "min_addr": obj.get("min_addr"), + "max_addr": obj.get("max_addr"), + "destinations": [FunctionBlockDestinationResponse.from_dict(_item) for _item in obj["destinations"]] if obj.get("destinations") is not None else None, + "comment": obj.get("comment") + }) + return _obj + + diff --git a/revengai/revengai/models/function_blocks_response.py b/revengai/revengai/models/function_blocks_response.py new file mode 100644 index 0000000..74c5b16 --- /dev/null +++ b/revengai/revengai/models/function_blocks_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_block_response import FunctionBlockResponse +from revengai.models.function_local_variable_response import FunctionLocalVariableResponse +from revengai.models.function_param_response import FunctionParamResponse +from typing import Optional, Set +from typing_extensions import Self + +class FunctionBlocksResponse(BaseModel): + """ + Response for returning disassembly of a function. + """ # noqa: E501 + blocks: List[FunctionBlockResponse] = Field(description="Disassembly is broken into control flow blocks") + local_variables: List[FunctionLocalVariableResponse] = Field(description="Local variables associated with this function") + params: List[FunctionParamResponse] = Field(description="Params associated with this function") + overview_comment: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["blocks", "local_variables", "params", "overview_comment"] + + 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 FunctionBlocksResponse 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 blocks (list) + _items = [] + if self.blocks: + for _item_blocks in self.blocks: + if _item_blocks: + _items.append(_item_blocks.to_dict()) + _dict['blocks'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in local_variables (list) + _items = [] + if self.local_variables: + for _item_local_variables in self.local_variables: + if _item_local_variables: + _items.append(_item_local_variables.to_dict()) + _dict['local_variables'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in params (list) + _items = [] + if self.params: + for _item_params in self.params: + if _item_params: + _items.append(_item_params.to_dict()) + _dict['params'] = _items + # set to None if overview_comment (nullable) is None + # and model_fields_set contains the field + if self.overview_comment is None and "overview_comment" in self.model_fields_set: + _dict['overview_comment'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionBlocksResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "blocks": [FunctionBlockResponse.from_dict(_item) for _item in obj["blocks"]] if obj.get("blocks") is not None else None, + "local_variables": [FunctionLocalVariableResponse.from_dict(_item) for _item in obj["local_variables"]] if obj.get("local_variables") is not None else None, + "params": [FunctionParamResponse.from_dict(_item) for _item in obj["params"]] if obj.get("params") is not None else None, + "overview_comment": obj.get("overview_comment") + }) + return _obj + + diff --git a/revengai/revengai/models/function_boundary.py b/revengai/revengai/models/function_boundary.py new file mode 100644 index 0000000..4ddffac --- /dev/null +++ b/revengai/revengai/models/function_boundary.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FunctionBoundary(BaseModel): + """ + FunctionBoundary + """ # noqa: E501 + name: StrictStr + start_address: StrictInt + end_address: StrictInt + __properties: ClassVar[List[str]] = ["name", "start_address", "end_address"] + + 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 FunctionBoundary 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 FunctionBoundary 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"), + "start_address": obj.get("start_address"), + "end_address": obj.get("end_address") + }) + return _obj + + diff --git a/revengai/revengai/models/function_box_plot_confidence.py b/revengai/revengai/models/function_box_plot_confidence.py new file mode 100644 index 0000000..079a6fc --- /dev/null +++ b/revengai/revengai/models/function_box_plot_confidence.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.box_plot_confidence import BoxPlotConfidence +from typing import Optional, Set +from typing_extensions import Self + +class FunctionBoxPlotConfidence(BaseModel): + """ + FunctionBoxPlotConfidence + """ # noqa: E501 + function_id: StrictInt + box_plot: BoxPlotConfidence + __properties: ClassVar[List[str]] = ["function_id", "box_plot"] + + 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 FunctionBoxPlotConfidence 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 box_plot + if self.box_plot: + _dict['box_plot'] = self.box_plot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionBoxPlotConfidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_capability_response.py b/revengai/revengai/models/function_capability_response.py new file mode 100644 index 0000000..1c0e542 --- /dev/null +++ b/revengai/revengai/models/function_capability_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class FunctionCapabilityResponse(BaseModel): + """ + FunctionCapabilityResponse + """ # noqa: E501 + capabilities: List[StrictStr] = Field(description="The capabilities of the function") + __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 FunctionCapabilityResponse 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 FunctionCapabilityResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "capabilities": obj.get("capabilities") + }) + return _obj + + diff --git a/revengai/revengai/models/function_comment_create_request.py b/revengai/revengai/models/function_comment_create_request.py new file mode 100644 index 0000000..7e5c65f --- /dev/null +++ b/revengai/revengai/models/function_comment_create_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.decompilation_comment_context import DecompilationCommentContext +from typing import Optional, Set +from typing_extensions import Self + +class FunctionCommentCreateRequest(BaseModel): + """ + FunctionCommentCreateRequest + """ # noqa: E501 + content: StrictStr = Field(description="Comment text content") + context: Optional[DecompilationCommentContext] = Field(default=None, description="Comment context for a function decompilation") + __properties: ClassVar[List[str]] = ["content", "context"] + + 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 FunctionCommentCreateRequest 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 context + if self.context: + _dict['context'] = self.context.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionCommentCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "context": DecompilationCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_data_types.py b/revengai/revengai/models/function_data_types.py new file mode 100644 index 0000000..b0a1a30 --- /dev/null +++ b/revengai/revengai/models/function_data_types.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_info_output import FunctionInfoOutput +from typing import Optional, Set +from typing_extensions import Self + +class FunctionDataTypes(BaseModel): + """ + FunctionDataTypes + """ # noqa: E501 + completed: StrictBool = Field(description="Whether the service has completed data types generation") + status: StrictStr = Field(description="The current status of the data types service") + data_types: Optional[FunctionInfoOutput] = None + data_types_version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["completed", "status", "data_types", "data_types_version"] + + 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 FunctionDataTypes 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_types + if self.data_types: + _dict['data_types'] = self.data_types.to_dict() + # 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: + _dict['data_types'] = None + + # set to None if data_types_version (nullable) is None + # and model_fields_set contains the field + if self.data_types_version is None and "data_types_version" in self.model_fields_set: + _dict['data_types_version'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionDataTypes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "completed": obj.get("completed"), + "status": obj.get("status"), + "data_types": FunctionInfoOutput.from_dict(obj["data_types"]) if obj.get("data_types") is not None else None, + "data_types_version": obj.get("data_types_version") + }) + return _obj + + diff --git a/revengai/revengai/models/function_data_types_list.py b/revengai/revengai/models/function_data_types_list.py new file mode 100644 index 0000000..2013760 --- /dev/null +++ b/revengai/revengai/models/function_data_types_list.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_data_types_list_item import FunctionDataTypesListItem +from typing import Optional, Set +from typing_extensions import Self + +class FunctionDataTypesList(BaseModel): + """ + FunctionDataTypesList + """ # noqa: E501 + total_count: Optional[StrictInt] = Field(default=0, description="Total number of functions in analysis") + total_data_types_count: Optional[StrictInt] = Field(default=0, description="Total number of functions with data types") + items: List[FunctionDataTypesListItem] = Field(description="List of function data types information") + __properties: ClassVar[List[str]] = ["total_count", "total_data_types_count", "items"] + + 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 FunctionDataTypesList 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 items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionDataTypesList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total_count": obj.get("total_count") if obj.get("total_count") is not None else 0, + "total_data_types_count": obj.get("total_data_types_count") if obj.get("total_data_types_count") is not None else 0, + "items": [FunctionDataTypesListItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_data_types_list_item.py b/revengai/revengai/models/function_data_types_list_item.py new file mode 100644 index 0000000..a99ab1c --- /dev/null +++ b/revengai/revengai/models/function_data_types_list_item.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_info_output import FunctionInfoOutput +from typing import Optional, Set +from typing_extensions import Self + +class FunctionDataTypesListItem(BaseModel): + """ + FunctionDataTypesListItem + """ # noqa: E501 + completed: StrictBool = Field(description="Whether the service has completed data types generation") + status: StrictStr = Field(description="The current status of the data types service") + data_types: Optional[FunctionInfoOutput] = None + data_types_version: Optional[StrictInt] = None + function_id: StrictInt = Field(description="Function id") + __properties: ClassVar[List[str]] = ["completed", "status", "data_types", "data_types_version", "function_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 FunctionDataTypesListItem 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_types + if self.data_types: + _dict['data_types'] = self.data_types.to_dict() + # 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: + _dict['data_types'] = None + + # set to None if data_types_version (nullable) is None + # and model_fields_set contains the field + if self.data_types_version is None and "data_types_version" in self.model_fields_set: + _dict['data_types_version'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionDataTypesListItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "completed": obj.get("completed"), + "status": obj.get("status"), + "data_types": FunctionInfoOutput.from_dict(obj["data_types"]) if obj.get("data_types") is not None else None, + "data_types_version": obj.get("data_types_version"), + "function_id": obj.get("function_id") + }) + return _obj + + diff --git a/revengai/revengai/models/function_data_types_params.py b/revengai/revengai/models/function_data_types_params.py new file mode 100644 index 0000000..568bc0a --- /dev/null +++ b/revengai/revengai/models/function_data_types_params.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FunctionDataTypesParams(BaseModel): + """ + FunctionDataTypesParams + """ # noqa: E501 + function_ids: List[StrictInt] = Field(description="The function ID's to generate/get data types for") + __properties: ClassVar[List[str]] = ["function_ids"] + + 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 FunctionDataTypesParams 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 FunctionDataTypesParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_ids": obj.get("function_ids") + }) + return _obj + + diff --git a/revengai/revengai/models/function_data_types_status.py b/revengai/revengai/models/function_data_types_status.py new file mode 100644 index 0000000..75aa5ce --- /dev/null +++ b/revengai/revengai/models/function_data_types_status.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class FunctionDataTypesStatus(BaseModel): + """ + FunctionDataTypesStatus + """ # noqa: E501 + function_id: StrictInt = Field(description="Function id") + completed: StrictBool = Field(description="Whether the service has completed data types generation") + status: StrictStr = Field(description="The current status of the data types service") + __properties: ClassVar[List[str]] = ["function_id", "completed", "status"] + + 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 FunctionDataTypesStatus 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 FunctionDataTypesStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "completed": obj.get("completed"), + "status": obj.get("status") + }) + return _obj + + diff --git a/revengai/revengai/models/function_header.py b/revengai/revengai/models/function_header.py new file mode 100644 index 0000000..5d72d46 --- /dev/null +++ b/revengai/revengai/models/function_header.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.argument import Argument +from typing import Optional, Set +from typing_extensions import Self + +class FunctionHeader(BaseModel): + """ + FunctionHeader + """ # noqa: E501 + last_change: Optional[StrictStr] = None + name: StrictStr = Field(description="Name of the function") + addr: StrictInt = Field(description="Memory address of the function") + type: StrictStr = Field(description="Return type of the function") + args: Dict[str, Argument] = Field(description="Dictionary of function arguments") + __properties: ClassVar[List[str]] = ["last_change", "name", "addr", "type", "args"] + + 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 FunctionHeader 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 value in args (dict) + _field_dict = {} + if self.args: + for _key_args in self.args: + if self.args[_key_args]: + _field_dict[_key_args] = self.args[_key_args].to_dict() + _dict['args'] = _field_dict + # set to None if last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "name": obj.get("name"), + "addr": obj.get("addr"), + "type": obj.get("type"), + "args": dict( + (_k, Argument.from_dict(_v)) + for _k, _v in obj["args"].items() + ) + if obj.get("args") is not None + else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_info_input.py b/revengai/revengai/models/function_info_input.py new file mode 100644 index 0000000..af807eb --- /dev/null +++ b/revengai/revengai/models/function_info_input.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner +from revengai.models.function_type_input import FunctionTypeInput +from typing import Optional, Set +from typing_extensions import Self + +class FunctionInfoInput(BaseModel): + """ + FunctionInfoInput + """ # noqa: E501 + func_types: Optional[FunctionTypeInput] = None + func_deps: List[FunctionInfoInputFuncDepsInner] = Field(description="List of function dependencies") + __properties: ClassVar[List[str]] = ["func_types", "func_deps"] + + 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 FunctionInfoInput 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 func_types + if self.func_types: + _dict['func_types'] = self.func_types.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in func_deps (list) + _items = [] + if self.func_deps: + for _item_func_deps in self.func_deps: + if _item_func_deps: + _items.append(_item_func_deps.to_dict()) + _dict['func_deps'] = _items + # set to None if func_types (nullable) is None + # and model_fields_set contains the field + if self.func_types is None and "func_types" in self.model_fields_set: + _dict['func_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionInfoInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "func_types": FunctionTypeInput.from_dict(obj["func_types"]) if obj.get("func_types") is not None else None, + "func_deps": [FunctionInfoInputFuncDepsInner.from_dict(_item) for _item in obj["func_deps"]] if obj.get("func_deps") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_info_input_func_deps_inner.py b/revengai/revengai/models/function_info_input_func_deps_inner.py new file mode 100644 index 0000000..396a8c6 --- /dev/null +++ b/revengai/revengai/models/function_info_input_func_deps_inner.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.enumeration import Enumeration +from revengai.models.global_variable import GlobalVariable +from revengai.models.structure import Structure +from revengai.models.type_definition import TypeDefinition +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +FUNCTIONINFOINPUTFUNCDEPSINNER_ANY_OF_SCHEMAS = ["Enumeration", "GlobalVariable", "Structure", "TypeDefinition"] + +class FunctionInfoInputFuncDepsInner(BaseModel): + """ + FunctionInfoInputFuncDepsInner + """ + + # data type: Structure + anyof_schema_1_validator: Optional[Structure] = None + # data type: Enumeration + anyof_schema_2_validator: Optional[Enumeration] = None + # data type: TypeDefinition + anyof_schema_3_validator: Optional[TypeDefinition] = None + # data type: GlobalVariable + anyof_schema_4_validator: Optional[GlobalVariable] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[Enumeration, GlobalVariable, Structure, TypeDefinition]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "Enumeration", "GlobalVariable", "Structure", "TypeDefinition" } + + 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 = FunctionInfoInputFuncDepsInner.model_construct() + error_messages = [] + # validate data type: Structure + if not isinstance(v, Structure): + error_messages.append(f"Error! Input type `{type(v)}` is not `Structure`") + else: + return v + + # validate data type: Enumeration + if not isinstance(v, Enumeration): + error_messages.append(f"Error! Input type `{type(v)}` is not `Enumeration`") + else: + return v + + # validate data type: TypeDefinition + if not isinstance(v, TypeDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `TypeDefinition`") + else: + return v + + # validate data type: GlobalVariable + if not isinstance(v, GlobalVariable): + error_messages.append(f"Error! Input type `{type(v)}` is not `GlobalVariable`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in FunctionInfoInputFuncDepsInner with anyOf schemas: Enumeration, GlobalVariable, Structure, TypeDefinition. 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[Structure] = None + try: + instance.actual_instance = Structure.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[Enumeration] = None + try: + instance.actual_instance = Enumeration.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[TypeDefinition] = None + try: + instance.actual_instance = TypeDefinition.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_4_validator: Optional[GlobalVariable] = None + try: + instance.actual_instance = GlobalVariable.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 FunctionInfoInputFuncDepsInner with anyOf schemas: Enumeration, GlobalVariable, Structure, TypeDefinition. 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], Enumeration, GlobalVariable, Structure, TypeDefinition]]: + """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/revengai/models/function_info_output.py b/revengai/revengai/models/function_info_output.py new file mode 100644 index 0000000..4f25ca0 --- /dev/null +++ b/revengai/revengai/models/function_info_output.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner +from revengai.models.function_type_output import FunctionTypeOutput +from typing import Optional, Set +from typing_extensions import Self + +class FunctionInfoOutput(BaseModel): + """ + FunctionInfoOutput + """ # noqa: E501 + func_types: Optional[FunctionTypeOutput] = None + func_deps: List[FunctionInfoInputFuncDepsInner] = Field(description="List of function dependencies") + __properties: ClassVar[List[str]] = ["func_types", "func_deps"] + + 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 FunctionInfoOutput 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 func_types + if self.func_types: + _dict['func_types'] = self.func_types.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in func_deps (list) + _items = [] + if self.func_deps: + for _item_func_deps in self.func_deps: + if _item_func_deps: + _items.append(_item_func_deps.to_dict()) + _dict['func_deps'] = _items + # set to None if func_types (nullable) is None + # and model_fields_set contains the field + if self.func_types is None and "func_types" in self.model_fields_set: + _dict['func_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionInfoOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "func_types": FunctionTypeOutput.from_dict(obj["func_types"]) if obj.get("func_types") is not None else None, + "func_deps": [FunctionInfoInputFuncDepsInner.from_dict(_item) for _item in obj["func_deps"]] if obj.get("func_deps") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_local_variable_response.py b/revengai/revengai/models/function_local_variable_response.py new file mode 100644 index 0000000..97590a4 --- /dev/null +++ b/revengai/revengai/models/function_local_variable_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FunctionLocalVariableResponse(BaseModel): + """ + FunctionLocalVariableResponse + """ # noqa: E501 + address: StrictStr + d_type: StrictStr + size: StrictInt + loc: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["address", "d_type", "size", "loc", "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 FunctionLocalVariableResponse 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 FunctionLocalVariableResponse 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"), + "d_type": obj.get("d_type"), + "size": obj.get("size"), + "loc": obj.get("loc"), + "name": obj.get("name") + }) + return _obj + + diff --git a/revengai/revengai/models/function_mapping_full.py b/revengai/revengai/models/function_mapping_full.py new file mode 100644 index 0000000..2757cdb --- /dev/null +++ b/revengai/revengai/models/function_mapping_full.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.inverse_function_map_item import InverseFunctionMapItem +from revengai.models.inverse_string_map_item import InverseStringMapItem +from revengai.models.inverse_value import InverseValue +from typing import Optional, Set +from typing_extensions import Self + +class FunctionMappingFull(BaseModel): + """ + FunctionMappingFull + """ # noqa: E501 + inverse_string_map: Dict[str, InverseStringMapItem] + inverse_function_map: Dict[str, InverseFunctionMapItem] + unmatched_functions: Dict[str, InverseValue] + unmatched_external_vars: Dict[str, InverseValue] + unmatched_custom_types: Dict[str, InverseValue] + unmatched_strings: Dict[str, InverseValue] + unmatched_vars: Dict[str, InverseValue] + unmatched_go_to_labels: Dict[str, InverseValue] + unmatched_custom_function_pointers: Dict[str, InverseValue] + unmatched_variadic_lists: Dict[str, InverseValue] + fields: Dict[str, Dict[str, InverseValue]] + __properties: ClassVar[List[str]] = ["inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_external_vars", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "fields"] + + 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 FunctionMappingFull 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 value in inverse_string_map (dict) + _field_dict = {} + if self.inverse_string_map: + for _key_inverse_string_map in self.inverse_string_map: + if self.inverse_string_map[_key_inverse_string_map]: + _field_dict[_key_inverse_string_map] = self.inverse_string_map[_key_inverse_string_map].to_dict() + _dict['inverse_string_map'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in inverse_function_map (dict) + _field_dict = {} + if self.inverse_function_map: + for _key_inverse_function_map in self.inverse_function_map: + if self.inverse_function_map[_key_inverse_function_map]: + _field_dict[_key_inverse_function_map] = self.inverse_function_map[_key_inverse_function_map].to_dict() + _dict['inverse_function_map'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_functions (dict) + _field_dict = {} + if self.unmatched_functions: + for _key_unmatched_functions in self.unmatched_functions: + if self.unmatched_functions[_key_unmatched_functions]: + _field_dict[_key_unmatched_functions] = self.unmatched_functions[_key_unmatched_functions].to_dict() + _dict['unmatched_functions'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_external_vars (dict) + _field_dict = {} + if self.unmatched_external_vars: + for _key_unmatched_external_vars in self.unmatched_external_vars: + if self.unmatched_external_vars[_key_unmatched_external_vars]: + _field_dict[_key_unmatched_external_vars] = self.unmatched_external_vars[_key_unmatched_external_vars].to_dict() + _dict['unmatched_external_vars'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_custom_types (dict) + _field_dict = {} + if self.unmatched_custom_types: + for _key_unmatched_custom_types in self.unmatched_custom_types: + if self.unmatched_custom_types[_key_unmatched_custom_types]: + _field_dict[_key_unmatched_custom_types] = self.unmatched_custom_types[_key_unmatched_custom_types].to_dict() + _dict['unmatched_custom_types'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_strings (dict) + _field_dict = {} + if self.unmatched_strings: + for _key_unmatched_strings in self.unmatched_strings: + if self.unmatched_strings[_key_unmatched_strings]: + _field_dict[_key_unmatched_strings] = self.unmatched_strings[_key_unmatched_strings].to_dict() + _dict['unmatched_strings'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_vars (dict) + _field_dict = {} + if self.unmatched_vars: + for _key_unmatched_vars in self.unmatched_vars: + if self.unmatched_vars[_key_unmatched_vars]: + _field_dict[_key_unmatched_vars] = self.unmatched_vars[_key_unmatched_vars].to_dict() + _dict['unmatched_vars'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_go_to_labels (dict) + _field_dict = {} + if self.unmatched_go_to_labels: + for _key_unmatched_go_to_labels in self.unmatched_go_to_labels: + if self.unmatched_go_to_labels[_key_unmatched_go_to_labels]: + _field_dict[_key_unmatched_go_to_labels] = self.unmatched_go_to_labels[_key_unmatched_go_to_labels].to_dict() + _dict['unmatched_go_to_labels'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_custom_function_pointers (dict) + _field_dict = {} + if self.unmatched_custom_function_pointers: + for _key_unmatched_custom_function_pointers in self.unmatched_custom_function_pointers: + if self.unmatched_custom_function_pointers[_key_unmatched_custom_function_pointers]: + _field_dict[_key_unmatched_custom_function_pointers] = self.unmatched_custom_function_pointers[_key_unmatched_custom_function_pointers].to_dict() + _dict['unmatched_custom_function_pointers'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in unmatched_variadic_lists (dict) + _field_dict = {} + if self.unmatched_variadic_lists: + for _key_unmatched_variadic_lists in self.unmatched_variadic_lists: + if self.unmatched_variadic_lists[_key_unmatched_variadic_lists]: + _field_dict[_key_unmatched_variadic_lists] = self.unmatched_variadic_lists[_key_unmatched_variadic_lists].to_dict() + _dict['unmatched_variadic_lists'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in fields (dict) + _field_dict = {} + if self.fields: + for _key_fields in self.fields: + if self.fields[_key_fields]: + _field_dict[_key_fields] = self.fields[_key_fields].to_dict() + _dict['fields'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionMappingFull from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inverse_string_map": dict( + (_k, InverseStringMapItem.from_dict(_v)) + for _k, _v in obj["inverse_string_map"].items() + ) + if obj.get("inverse_string_map") is not None + else None, + "inverse_function_map": dict( + (_k, InverseFunctionMapItem.from_dict(_v)) + for _k, _v in obj["inverse_function_map"].items() + ) + if obj.get("inverse_function_map") is not None + else None, + "unmatched_functions": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_functions"].items() + ) + if obj.get("unmatched_functions") is not None + else None, + "unmatched_external_vars": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_external_vars"].items() + ) + if obj.get("unmatched_external_vars") is not None + else None, + "unmatched_custom_types": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_custom_types"].items() + ) + if obj.get("unmatched_custom_types") is not None + else None, + "unmatched_strings": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_strings"].items() + ) + if obj.get("unmatched_strings") is not None + else None, + "unmatched_vars": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_vars"].items() + ) + if obj.get("unmatched_vars") is not None + else None, + "unmatched_go_to_labels": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_go_to_labels"].items() + ) + if obj.get("unmatched_go_to_labels") is not None + else None, + "unmatched_custom_function_pointers": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_custom_function_pointers"].items() + ) + if obj.get("unmatched_custom_function_pointers") is not None + else None, + "unmatched_variadic_lists": dict( + (_k, InverseValue.from_dict(_v)) + for _k, _v in obj["unmatched_variadic_lists"].items() + ) + if obj.get("unmatched_variadic_lists") is not None + else None, + "fields": dict( + (_k, dict( + (_ik, InverseValue.from_dict(_iv)) + for _ik, _iv in _v.items() + ) + if _v is not None + else None + ) + for _k, _v in obj.get("fields").items() + ) + if obj.get("fields") is not None + else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_name_confidence_body.py b/revengai/revengai/models/function_name_confidence_body.py new file mode 100644 index 0000000..ccd6dff --- /dev/null +++ b/revengai/revengai/models/function_name_confidence_body.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from revengai.models.function_name_input import FunctionNameInput +from typing import Optional, Set +from typing_extensions import Self + +class FunctionNameConfidenceBody(BaseModel): + """ + FunctionNameConfidenceBody + """ # noqa: E501 + functions: Optional[Annotated[List[FunctionNameInput], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function ids and the function names they want to check confidence for") + is_debug: Optional[StrictBool] = Field(default=False, description="Flag to match only to a debug function") + __properties: ClassVar[List[str]] = ["functions", "is_debug"] + + 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 FunctionNameConfidenceBody 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionNameConfidenceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "functions": [FunctionNameInput.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, + "is_debug": obj.get("is_debug") if obj.get("is_debug") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/function_name_history.py b/revengai/revengai/models/function_name_history.py new file mode 100644 index 0000000..a3183b4 --- /dev/null +++ b/revengai/revengai/models/function_name_history.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class FunctionNameHistory(BaseModel): + """ + FunctionNameHistory + """ # noqa: E501 + history_id: StrictInt = Field(description="The ID of the history record") + change_made_by: StrictStr = Field(description="The user who made the change") + function_name: StrictStr = Field(description="The name of the function") + is_debug: StrictBool = Field(description="Whether the function is debugged") + source_type: StrictStr = Field(description="The source type of the function") + created_at: StrictStr = Field(description="The timestamp when the function name was created") + __properties: ClassVar[List[str]] = ["history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"] + + 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 FunctionNameHistory 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 FunctionNameHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "history_id": obj.get("history_id"), + "change_made_by": obj.get("change_made_by"), + "function_name": obj.get("function_name"), + "is_debug": obj.get("is_debug"), + "source_type": obj.get("source_type"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/revengai/revengai/models/function_name_input.py b/revengai/revengai/models/function_name_input.py new file mode 100644 index 0000000..abd85b6 --- /dev/null +++ b/revengai/revengai/models/function_name_input.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FunctionNameInput(BaseModel): + """ + FunctionNameInput + """ # noqa: E501 + function_id: StrictInt + function_name: StrictStr + __properties: ClassVar[List[str]] = ["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 FunctionNameInput 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 FunctionNameInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + return _obj + + diff --git a/revengai/revengai/models/function_param_response.py b/revengai/revengai/models/function_param_response.py new file mode 100644 index 0000000..01957ec --- /dev/null +++ b/revengai/revengai/models/function_param_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FunctionParamResponse(BaseModel): + """ + FunctionParamResponse + """ # noqa: E501 + d_type: StrictStr + loc: StrictStr + addr: StrictStr + length: StrictInt + name: StrictStr + __properties: ClassVar[List[str]] = ["d_type", "loc", "addr", "length", "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 FunctionParamResponse 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 FunctionParamResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "d_type": obj.get("d_type"), + "loc": obj.get("loc"), + "addr": obj.get("addr"), + "length": obj.get("length"), + "name": obj.get("name") + }) + return _obj + + diff --git a/revengai/revengai/models/function_rename.py b/revengai/revengai/models/function_rename.py new file mode 100644 index 0000000..25f6546 --- /dev/null +++ b/revengai/revengai/models/function_rename.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FunctionRename(BaseModel): + """ + FunctionRename + """ # noqa: E501 + new_name: Optional[StrictStr] = Field(default='', description="The new name for the function") + new_mangled_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["new_name", "new_mangled_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 FunctionRename 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 new_mangled_name (nullable) is None + # and model_fields_set contains the field + if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set: + _dict['new_mangled_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionRename from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "new_name": obj.get("new_name") if obj.get("new_name") is not None else '', + "new_mangled_name": obj.get("new_mangled_name") + }) + return _obj + + diff --git a/revengai/revengai/models/function_rename_map.py b/revengai/revengai/models/function_rename_map.py new file mode 100644 index 0000000..7ef61d9 --- /dev/null +++ b/revengai/revengai/models/function_rename_map.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class FunctionRenameMap(BaseModel): + """ + FunctionRenameMap + """ # noqa: E501 + function_id: StrictInt = Field(description="The ID of the function to rename") + new_name: Optional[StrictStr] = Field(default='', description="The new name for the function") + new_mangled_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["function_id", "new_name", "new_mangled_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 FunctionRenameMap 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 new_mangled_name (nullable) is None + # and model_fields_set contains the field + if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set: + _dict['new_mangled_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionRenameMap from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "new_name": obj.get("new_name") if obj.get("new_name") is not None else '', + "new_mangled_name": obj.get("new_mangled_name") + }) + return _obj + + diff --git a/revengai/revengai/models/function_search_response.py b/revengai/revengai/models/function_search_response.py new file mode 100644 index 0000000..4ba5bf0 --- /dev/null +++ b/revengai/revengai/models/function_search_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_search_result import FunctionSearchResult +from typing import Optional, Set +from typing_extensions import Self + +class FunctionSearchResponse(BaseModel): + """ + FunctionSearchResponse + """ # noqa: E501 + results: List[FunctionSearchResult] = Field(description="The results of the search") + __properties: ClassVar[List[str]] = ["results"] + + 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 FunctionSearchResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionSearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [FunctionSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_search_result.py b/revengai/revengai/models/function_search_result.py new file mode 100644 index 0000000..812b2fb --- /dev/null +++ b/revengai/revengai/models/function_search_result.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +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 FunctionSearchResult(BaseModel): + """ + FunctionSearchResult + """ # noqa: E501 + function_id: StrictInt = Field(description="The function ID") + function_name: StrictStr = Field(description="The name of the function") + binary_name: StrictStr = Field(description="The name of the binary the function belongs to") + created_at: datetime = Field(description="The creation date of the function") + model_id: StrictInt = Field(description="The model ID used to analyze the binary the function belongs to") + model_name: StrictStr = Field(description="The name of the model used to analyze the binary the function belongs to") + owned_by: StrictStr = Field(description="The owner of the binary the function belongs to") + __properties: ClassVar[List[str]] = ["function_id", "function_name", "binary_name", "created_at", "model_id", "model_name", "owned_by"] + + 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 FunctionSearchResult 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 FunctionSearchResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "binary_name": obj.get("binary_name"), + "created_at": obj.get("created_at"), + "model_id": obj.get("model_id"), + "model_name": obj.get("model_name"), + "owned_by": obj.get("owned_by") + }) + return _obj + + diff --git a/revengai/revengai/models/function_string.py b/revengai/revengai/models/function_string.py new file mode 100644 index 0000000..a1dc54b --- /dev/null +++ b/revengai/revengai/models/function_string.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FunctionString(BaseModel): + """ + FunctionString + """ # noqa: E501 + value: StrictStr = Field(description="The value of the string literal") + vaddr: StrictInt = Field(description="The vaddr of the string value") + __properties: ClassVar[List[str]] = ["value", "vaddr"] + + 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 FunctionString 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 FunctionString 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"), + "vaddr": obj.get("vaddr") + }) + return _obj + + diff --git a/revengai/revengai/models/function_strings_response.py b/revengai/revengai/models/function_strings_response.py new file mode 100644 index 0000000..00f304b --- /dev/null +++ b/revengai/revengai/models/function_strings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_string import FunctionString +from typing import Optional, Set +from typing_extensions import Self + +class FunctionStringsResponse(BaseModel): + """ + Response for listing all the strings of a function. + """ # noqa: E501 + strings: List[FunctionString] = Field(description="The strings associated with this function") + total_strings: StrictInt = Field(description="The total number of strings associated with this function") + __properties: ClassVar[List[str]] = ["strings", "total_strings"] + + 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 FunctionStringsResponse 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 FunctionStringsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "strings": [FunctionString.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, + "total_strings": obj.get("total_strings") + }) + return _obj + + diff --git a/revengai/revengai/models/function_task_response.py b/revengai/revengai/models/function_task_response.py new file mode 100644 index 0000000..d29def3 --- /dev/null +++ b/revengai/revengai/models/function_task_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_task_status import FunctionTaskStatus +from typing import Optional, Set +from typing_extensions import Self + +class FunctionTaskResponse(BaseModel): + """ + FunctionTaskResponse + """ # noqa: E501 + status: Optional[FunctionTaskStatus] = None + error_message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "error_message"] + + 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 FunctionTaskResponse 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 error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionTaskResponse 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"), + "error_message": obj.get("error_message") + }) + return _obj + + diff --git a/revengai/revengai/models/function_task_status.py b/revengai/revengai/models/function_task_status.py new file mode 100644 index 0000000..32e90ac --- /dev/null +++ b/revengai/revengai/models/function_task_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 FunctionTaskStatus(str, Enum): + """ + FunctionTaskStatus + """ + + """ + allowed enum values + """ + UNINITIALISED = 'UNINITIALISED' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + COMPLETED = 'COMPLETED' + FAILED = 'FAILED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FunctionTaskStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/function_threat_score.py b/revengai/revengai/models/function_threat_score.py new file mode 100644 index 0000000..c76e6da --- /dev/null +++ b/revengai/revengai/models/function_threat_score.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData +from typing import Optional, Set +from typing_extensions import Self + +class FunctionThreatScore(BaseModel): + """ + FunctionThreatScore + """ # noqa: E501 + results: Dict[str, FunctionAnalysisThreatScoreData] = Field(description="The results of the function threat") + __properties: ClassVar[List[str]] = ["results"] + + 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 FunctionThreatScore 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 value in results (dict) + _field_dict = {} + if self.results: + for _key_results in self.results: + if self.results[_key_results]: + _field_dict[_key_results] = self.results[_key_results].to_dict() + _dict['results'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionThreatScore from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": dict( + (_k, FunctionAnalysisThreatScoreData.from_dict(_v)) + for _k, _v in obj["results"].items() + ) + if obj.get("results") is not None + else None + }) + return _obj + + diff --git a/revengai/revengai/models/function_type_input.py b/revengai/revengai/models/function_type_input.py new file mode 100644 index 0000000..6ec13f2 --- /dev/null +++ b/revengai/revengai/models/function_type_input.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_header import FunctionHeader +from revengai.models.stack_variable import StackVariable +from typing import Optional, Set +from typing_extensions import Self + +class FunctionTypeInput(BaseModel): + """ + FunctionTypeInput + """ # noqa: E501 + last_change: Optional[StrictStr] = None + addr: StrictInt = Field(description="Memory address of the function") + size: StrictInt = Field(description="Size of the function in bytes") + header: FunctionHeader = Field(description="Function header information") + stack_vars: Optional[Dict[str, StackVariable]] = None + name: StrictStr = Field(description="Name of the function") + type: StrictStr = Field(description="Return type of the function") + artifact_type: Optional[StrictStr] = Field(default='Function', description="Type of artifact that the structure is associated with") + __properties: ClassVar[List[str]] = ["last_change", "addr", "size", "header", "stack_vars", "name", "type", "artifact_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 FunctionTypeInput 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 header + if self.header: + _dict['header'] = self.header.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in stack_vars (dict) + _field_dict = {} + if self.stack_vars: + for _key_stack_vars in self.stack_vars: + if self.stack_vars[_key_stack_vars]: + _field_dict[_key_stack_vars] = self.stack_vars[_key_stack_vars].to_dict() + _dict['stack_vars'] = _field_dict + # set to None if last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + # set to None if stack_vars (nullable) is None + # and model_fields_set contains the field + if self.stack_vars is None and "stack_vars" in self.model_fields_set: + _dict['stack_vars'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionTypeInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "addr": obj.get("addr"), + "size": obj.get("size"), + "header": FunctionHeader.from_dict(obj["header"]) if obj.get("header") is not None else None, + "stack_vars": dict( + (_k, StackVariable.from_dict(_v)) + for _k, _v in obj["stack_vars"].items() + ) + if obj.get("stack_vars") is not None + else None, + "name": obj.get("name"), + "type": obj.get("type"), + "artifact_type": obj.get("artifact_type") if obj.get("artifact_type") is not None else 'Function' + }) + return _obj + + diff --git a/revengai/revengai/models/function_type_output.py b/revengai/revengai/models/function_type_output.py new file mode 100644 index 0000000..53e6fc6 --- /dev/null +++ b/revengai/revengai/models/function_type_output.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_header import FunctionHeader +from revengai.models.stack_variable import StackVariable +from typing import Optional, Set +from typing_extensions import Self + +class FunctionTypeOutput(BaseModel): + """ + FunctionTypeOutput + """ # noqa: E501 + last_change: Optional[StrictStr] = None + addr: StrictInt = Field(description="Memory address of the function") + size: StrictInt = Field(description="Size of the function in bytes") + header: FunctionHeader = Field(description="Function header information") + stack_vars: Optional[Dict[str, StackVariable]] = None + name: StrictStr = Field(description="Name of the function") + type: StrictStr = Field(description="Return type of the function") + artifact_type: Optional[StrictStr] = Field(default='Function', description="Type of artifact that the structure is associated with") + __properties: ClassVar[List[str]] = ["last_change", "addr", "size", "header", "stack_vars", "name", "type", "artifact_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 FunctionTypeOutput 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 header + if self.header: + _dict['header'] = self.header.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in stack_vars (dict) + _field_dict = {} + if self.stack_vars: + for _key_stack_vars in self.stack_vars: + if self.stack_vars[_key_stack_vars]: + _field_dict[_key_stack_vars] = self.stack_vars[_key_stack_vars].to_dict() + _dict['stack_vars'] = _field_dict + # set to None if last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + # set to None if stack_vars (nullable) is None + # and model_fields_set contains the field + if self.stack_vars is None and "stack_vars" in self.model_fields_set: + _dict['stack_vars'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionTypeOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "addr": obj.get("addr"), + "size": obj.get("size"), + "header": FunctionHeader.from_dict(obj["header"]) if obj.get("header") is not None else None, + "stack_vars": dict( + (_k, StackVariable.from_dict(_v)) + for _k, _v in obj["stack_vars"].items() + ) + if obj.get("stack_vars") is not None + else None, + "name": obj.get("name"), + "type": obj.get("type"), + "artifact_type": obj.get("artifact_type") if obj.get("artifact_type") is not None else 'Function' + }) + return _obj + + diff --git a/revengai/revengai/models/functions_detail_response.py b/revengai/revengai/models/functions_detail_response.py new file mode 100644 index 0000000..82af85c --- /dev/null +++ b/revengai/revengai/models/functions_detail_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class FunctionsDetailResponse(BaseModel): + """ + FunctionsDetailResponse + """ # noqa: E501 + function_id: StrictInt + function_name: StrictStr + function_vaddr: StrictInt + function_size: StrictInt + analysis_id: StrictInt + binary_id: StrictInt + binary_name: StrictStr + sha_256_hash: StrictStr + debug_hash: Optional[StrictStr] + embedding_3d: Optional[List[Union[StrictFloat, StrictInt]]] = None + embedding_1d: Optional[List[Union[StrictFloat, StrictInt]]] = None + __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "embedding_3d", "embedding_1d"] + + 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 FunctionsDetailResponse 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 debug_hash (nullable) is None + # and model_fields_set contains the field + if self.debug_hash is None and "debug_hash" in self.model_fields_set: + _dict['debug_hash'] = None + + # set to None if embedding_3d (nullable) is None + # and model_fields_set contains the field + if self.embedding_3d is None and "embedding_3d" in self.model_fields_set: + _dict['embedding_3d'] = None + + # set to None if embedding_1d (nullable) is None + # and model_fields_set contains the field + if self.embedding_1d is None and "embedding_1d" in self.model_fields_set: + _dict['embedding_1d'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionsDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "function_vaddr": obj.get("function_vaddr"), + "function_size": obj.get("function_size"), + "analysis_id": obj.get("analysis_id"), + "binary_id": obj.get("binary_id"), + "binary_name": obj.get("binary_name"), + "sha_256_hash": obj.get("sha_256_hash"), + "debug_hash": obj.get("debug_hash"), + "embedding_3d": obj.get("embedding_3d"), + "embedding_1d": obj.get("embedding_1d") + }) + return _obj + + diff --git a/revengai/revengai/models/functions_list_rename.py b/revengai/revengai/models/functions_list_rename.py new file mode 100644 index 0000000..77fe0d9 --- /dev/null +++ b/revengai/revengai/models/functions_list_rename.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_rename_map import FunctionRenameMap +from typing import Optional, Set +from typing_extensions import Self + +class FunctionsListRename(BaseModel): + """ + FunctionsListRename + """ # noqa: E501 + functions: List[FunctionRenameMap] = Field(description="A list of functions to rename") + __properties: ClassVar[List[str]] = ["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 FunctionsListRename 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionsListRename from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "functions": [FunctionRenameMap.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/generate_function_data_types.py b/revengai/revengai/models/generate_function_data_types.py new file mode 100644 index 0000000..52dc7ad --- /dev/null +++ b/revengai/revengai/models/generate_function_data_types.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.generation_status_list import GenerationStatusList +from typing import Optional, Set +from typing_extensions import Self + +class GenerateFunctionDataTypes(BaseModel): + """ + GenerateFunctionDataTypes + """ # noqa: E501 + queued: StrictBool = Field(description="[DEPRECATED] This value has been replaced with the `data_types_list` field") + reference: StrictStr = Field(description="[DEPRECATED] This value has been replaced with the `data_types_list` field") + data_types_list: GenerationStatusList = Field(description="List of function data types information that are either already generated, or now queued for generation") + __properties: ClassVar[List[str]] = ["queued", "reference", "data_types_list"] + + 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 GenerateFunctionDataTypes 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_types_list + if self.data_types_list: + _dict['data_types_list'] = self.data_types_list.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenerateFunctionDataTypes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "queued": obj.get("queued"), + "reference": obj.get("reference"), + "data_types_list": GenerationStatusList.from_dict(obj["data_types_list"]) if obj.get("data_types_list") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/generation_status_list.py b/revengai/revengai/models/generation_status_list.py new file mode 100644 index 0000000..9972a9f --- /dev/null +++ b/revengai/revengai/models/generation_status_list.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_data_types_status import FunctionDataTypesStatus +from typing import Optional, Set +from typing_extensions import Self + +class GenerationStatusList(BaseModel): + """ + GenerationStatusList + """ # noqa: E501 + total_count: Optional[StrictInt] = Field(default=0, description="Total number of functions in analysis") + total_data_types_count: Optional[StrictInt] = Field(default=0, description="Total number of functions with data types") + items: List[FunctionDataTypesStatus] = Field(description="List of function data types information") + __properties: ClassVar[List[str]] = ["total_count", "total_data_types_count", "items"] + + 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 GenerationStatusList 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 items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenerationStatusList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total_count": obj.get("total_count") if obj.get("total_count") is not None else 0, + "total_data_types_count": obj.get("total_data_types_count") if obj.get("total_data_types_count") is not None else 0, + "items": [FunctionDataTypesStatus.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/get_ai_decompilation_rating_response.py b/revengai/revengai/models/get_ai_decompilation_rating_response.py new file mode 100644 index 0000000..8ae44c4 --- /dev/null +++ b/revengai/revengai/models/get_ai_decompilation_rating_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.ai_decompilation_rating import AiDecompilationRating +from typing import Optional, Set +from typing_extensions import Self + +class GetAiDecompilationRatingResponse(BaseModel): + """ + GetAiDecompilationRatingResponse + """ # noqa: E501 + rating: AiDecompilationRating = Field(description="The rating the user has given to the AI decompilation response") + __properties: ClassVar[List[str]] = ["rating"] + + 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 GetAiDecompilationRatingResponse 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 GetAiDecompilationRatingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rating": obj.get("rating") + }) + return _obj + + diff --git a/revengai/revengai/models/get_ai_decompilation_task.py b/revengai/revengai/models/get_ai_decompilation_task.py new file mode 100644 index 0000000..45fee4f --- /dev/null +++ b/revengai/revengai/models/get_ai_decompilation_task.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_mapping_full import FunctionMappingFull +from revengai.models.inverse_function_map_item import InverseFunctionMapItem +from typing import Optional, Set +from typing_extensions import Self + +class GetAiDecompilationTask(BaseModel): + """ + GetAiDecompilationTask + """ # noqa: E501 + status: StrictStr + decompilation: Optional[StrictStr] + raw_decompilation: Optional[StrictStr] + function_mapping: Optional[Dict[str, InverseFunctionMapItem]] + function_mapping_full: Optional[FunctionMappingFull] + summary: Optional[StrictStr] = None + ai_summary: Optional[StrictStr] = None + raw_ai_summary: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "decompilation", "raw_decompilation", "function_mapping", "function_mapping_full", "summary", "ai_summary", "raw_ai_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 GetAiDecompilationTask 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 value in function_mapping (dict) + _field_dict = {} + if self.function_mapping: + for _key_function_mapping in self.function_mapping: + if self.function_mapping[_key_function_mapping]: + _field_dict[_key_function_mapping] = self.function_mapping[_key_function_mapping].to_dict() + _dict['function_mapping'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of function_mapping_full + if self.function_mapping_full: + _dict['function_mapping_full'] = self.function_mapping_full.to_dict() + # set to None if decompilation (nullable) is None + # and model_fields_set contains the field + if self.decompilation is None and "decompilation" in self.model_fields_set: + _dict['decompilation'] = None + + # set to None if raw_decompilation (nullable) is None + # and model_fields_set contains the field + if self.raw_decompilation is None and "raw_decompilation" in self.model_fields_set: + _dict['raw_decompilation'] = None + + # set to None if function_mapping (nullable) is None + # and model_fields_set contains the field + if self.function_mapping is None and "function_mapping" in self.model_fields_set: + _dict['function_mapping'] = None + + # set to None if function_mapping_full (nullable) is None + # and model_fields_set contains the field + if self.function_mapping_full is None and "function_mapping_full" in self.model_fields_set: + _dict['function_mapping_full'] = None + + # set to None if summary (nullable) is None + # and model_fields_set contains the field + if self.summary is None and "summary" in self.model_fields_set: + _dict['summary'] = None + + # set to None if ai_summary (nullable) is None + # and model_fields_set contains the field + if self.ai_summary is None and "ai_summary" in self.model_fields_set: + _dict['ai_summary'] = None + + # set to None if raw_ai_summary (nullable) is None + # and model_fields_set contains the field + if self.raw_ai_summary is None and "raw_ai_summary" in self.model_fields_set: + _dict['raw_ai_summary'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetAiDecompilationTask 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"), + "decompilation": obj.get("decompilation"), + "raw_decompilation": obj.get("raw_decompilation"), + "function_mapping": dict( + (_k, InverseFunctionMapItem.from_dict(_v)) + for _k, _v in obj["function_mapping"].items() + ) + if obj.get("function_mapping") is not None + else None, + "function_mapping_full": FunctionMappingFull.from_dict(obj["function_mapping_full"]) if obj.get("function_mapping_full") is not None else None, + "summary": obj.get("summary"), + "ai_summary": obj.get("ai_summary"), + "raw_ai_summary": obj.get("raw_ai_summary") + }) + return _obj + + diff --git a/revengai/revengai/models/get_public_user_response.py b/revengai/revengai/models/get_public_user_response.py new file mode 100644 index 0000000..96fc690 --- /dev/null +++ b/revengai/revengai/models/get_public_user_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetPublicUserResponse(BaseModel): + """ + GetPublicUserResponse + """ # noqa: E501 + username: StrictStr + user_id: StrictInt + __properties: ClassVar[List[str]] = ["username", "user_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 GetPublicUserResponse 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 GetPublicUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/revengai/revengai/models/get_user_response.py b/revengai/revengai/models/get_user_response.py new file mode 100644 index 0000000..d154ee5 --- /dev/null +++ b/revengai/revengai/models/get_user_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetUserResponse(BaseModel): + """ + GetUserResponse + """ # noqa: E501 + username: StrictStr + user_id: StrictInt + first_name: StrictStr + last_name: StrictStr + email: StrictStr + creation: datetime + tutorial_seen: StrictBool + __properties: ClassVar[List[str]] = ["username", "user_id", "first_name", "last_name", "email", "creation", "tutorial_seen"] + + 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 GetUserResponse 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 GetUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "user_id": obj.get("user_id"), + "first_name": obj.get("first_name"), + "last_name": obj.get("last_name"), + "email": obj.get("email"), + "creation": obj.get("creation"), + "tutorial_seen": obj.get("tutorial_seen") + }) + return _obj + + diff --git a/revengai/revengai/models/global_variable.py b/revengai/revengai/models/global_variable.py new file mode 100644 index 0000000..e111045 --- /dev/null +++ b/revengai/revengai/models/global_variable.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class GlobalVariable(BaseModel): + """ + GlobalVariable + """ # noqa: E501 + last_change: Optional[StrictStr] = None + addr: StrictInt = Field(description="Memory address of the global variable") + name: StrictStr = Field(description="Name of the global variable") + type: StrictStr = Field(description="Data type of the global variable") + size: StrictInt = Field(description="Size of the global variable in bytes") + artifact_type: Optional[StrictStr] = Field(default=None, description="Type of artifact that the global variable is associated with") + __properties: ClassVar[List[str]] = ["last_change", "addr", "name", "type", "size", "artifact_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 GlobalVariable 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GlobalVariable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "addr": obj.get("addr"), + "name": obj.get("name"), + "type": obj.get("type"), + "size": obj.get("size"), + "artifact_type": obj.get("artifact_type") + }) + return _obj + + diff --git a/revengai/revengai/models/icon_model.py b/revengai/revengai/models/icon_model.py new file mode 100644 index 0000000..c94dc0f --- /dev/null +++ b/revengai/revengai/models/icon_model.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 IconModel(BaseModel): + """ + IconModel + """ # noqa: E501 + content: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["content"] + + 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 IconModel 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IconModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content") + }) + return _obj + + diff --git a/revengai/revengai/models/import_model.py b/revengai/revengai/models/import_model.py new file mode 100644 index 0000000..d266b2c --- /dev/null +++ b/revengai/revengai/models/import_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ImportModel(BaseModel): + """ + ImportModel + """ # noqa: E501 + number_of_imports: StrictInt + imports: List[Dict[str, Dict[str, StrictInt]]] + __properties: ClassVar[List[str]] = ["number_of_imports", "imports"] + + 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 ImportModel 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 ImportModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number_of_imports": obj.get("number_of_imports"), + "imports": obj.get("imports") + }) + return _obj + + diff --git a/revengai/revengai/models/inverse_function_map_item.py b/revengai/revengai/models/inverse_function_map_item.py new file mode 100644 index 0000000..37d2951 --- /dev/null +++ b/revengai/revengai/models/inverse_function_map_item.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.addr import Addr +from typing import Optional, Set +from typing_extensions import Self + +class InverseFunctionMapItem(BaseModel): + """ + InverseFunctionMapItem + """ # noqa: E501 + name: StrictStr + addr: Optional[Addr] + is_external: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["name", "addr", "is_external"] + + 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 InverseFunctionMapItem 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 addr + if self.addr: + _dict['addr'] = self.addr.to_dict() + # set to None if addr (nullable) is None + # and model_fields_set contains the field + if self.addr is None and "addr" in self.model_fields_set: + _dict['addr'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InverseFunctionMapItem 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"), + "addr": Addr.from_dict(obj["addr"]) if obj.get("addr") is not None else None, + "is_external": obj.get("is_external") if obj.get("is_external") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/inverse_string_map_item.py b/revengai/revengai/models/inverse_string_map_item.py new file mode 100644 index 0000000..efa6ca4 --- /dev/null +++ b/revengai/revengai/models/inverse_string_map_item.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InverseStringMapItem(BaseModel): + """ + InverseStringMapItem + """ # noqa: E501 + string: StrictStr + addr: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["string", "addr"] + + 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 InverseStringMapItem 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 addr (nullable) is None + # and model_fields_set contains the field + if self.addr is None and "addr" in self.model_fields_set: + _dict['addr'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InverseStringMapItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "string": obj.get("string"), + "addr": obj.get("addr") + }) + return _obj + + diff --git a/revengai/revengai/models/inverse_value.py b/revengai/revengai/models/inverse_value.py new file mode 100644 index 0000000..995fd95 --- /dev/null +++ b/revengai/revengai/models/inverse_value.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class InverseValue(BaseModel): + """ + InverseValue + """ # noqa: E501 + value: StrictStr + __properties: ClassVar[List[str]] = ["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 InverseValue 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 InverseValue 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") + }) + return _obj + + diff --git a/revengai/revengai/models/isa.py b/revengai/revengai/models/isa.py new file mode 100644 index 0000000..8db8737 --- /dev/null +++ b/revengai/revengai/models/isa.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 ISA(str, Enum): + """ + ISA + """ + + """ + allowed enum values + """ + X86 = 'x86' + X86_64 = 'x86_64' + ARM = 'arm' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ISA from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/list_collection_results.py b/revengai/revengai/models/list_collection_results.py new file mode 100644 index 0000000..617ea50 --- /dev/null +++ b/revengai/revengai/models/list_collection_results.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.collection_list_item import CollectionListItem +from typing import Optional, Set +from typing_extensions import Self + +class ListCollectionResults(BaseModel): + """ + ListCollectionResults + """ # noqa: E501 + results: List[CollectionListItem] = Field(description="Page containing the results of the collections search") + __properties: ClassVar[List[str]] = ["results"] + + 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 ListCollectionResults 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListCollectionResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [CollectionListItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/login_request.py b/revengai/revengai/models/login_request.py new file mode 100644 index 0000000..09579a3 --- /dev/null +++ b/revengai/revengai/models/login_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 LoginRequest(BaseModel): + """ + LoginRequest + """ # noqa: E501 + username: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="User's username") + password: Annotated[str, Field(min_length=10, strict=True)] = Field(description="User's password") + __properties: ClassVar[List[str]] = ["username", "password"] + + 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 LoginRequest 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 LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj + + diff --git a/revengai/revengai/models/login_response.py b/revengai/revengai/models/login_response.py new file mode 100644 index 0000000..b09f66c --- /dev/null +++ b/revengai/revengai/models/login_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class LoginResponse(BaseModel): + """ + LoginResponse + """ # noqa: E501 + token: StrictStr = Field(description="Authentication token for subsequent requests") + __properties: ClassVar[List[str]] = ["token"] + + 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 LoginResponse 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 LoginResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + return _obj + + diff --git a/revengai/revengai/models/logs.py b/revengai/revengai/models/logs.py new file mode 100644 index 0000000..e4416e5 --- /dev/null +++ b/revengai/revengai/models/logs.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Logs(BaseModel): + """ + Logs + """ # noqa: E501 + logs: StrictStr = Field(description="Full logs of an analysis of an analysis_id") + __properties: ClassVar[List[str]] = ["logs"] + + 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 Logs 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 Logs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "logs": obj.get("logs") + }) + return _obj + + diff --git a/revengai/revengai/models/matched_function_group.py b/revengai/revengai/models/matched_function_group.py new file mode 100644 index 0000000..c326410 --- /dev/null +++ b/revengai/revengai/models/matched_function_group.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, Union +from typing import Optional, Set +from typing_extensions import Self + +class MatchedFunctionGroup(BaseModel): + """ + MatchedFunctionGroup + """ # noqa: E501 + function_group_name: StrictStr = Field(description="Name of the function group that contains the matched functions") + similarity: Union[StrictFloat, StrictInt] = Field(description="Similarity score of the match") + __properties: ClassVar[List[str]] = ["function_group_name", "similarity"] + + 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 MatchedFunctionGroup 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 MatchedFunctionGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_group_name": obj.get("function_group_name"), + "similarity": obj.get("similarity") + }) + return _obj + + diff --git a/revengai/revengai/models/matched_function_suggestion.py b/revengai/revengai/models/matched_function_suggestion.py new file mode 100644 index 0000000..6bffc45 --- /dev/null +++ b/revengai/revengai/models/matched_function_suggestion.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class MatchedFunctionSuggestion(BaseModel): + """ + MatchedFunctionSuggestion + """ # noqa: E501 + function_id: StrictInt = Field(description="Unique identifier of the matched function") + function_vaddr: Optional[StrictInt] + suggested_name: StrictStr = Field(description="Name of the function group that contains the matched functions") + __properties: ClassVar[List[str]] = ["function_id", "function_vaddr", "suggested_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 MatchedFunctionSuggestion 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 function_vaddr (nullable) is None + # and model_fields_set contains the field + if self.function_vaddr is None and "function_vaddr" in self.model_fields_set: + _dict['function_vaddr'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MatchedFunctionSuggestion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_vaddr": obj.get("function_vaddr"), + "suggested_name": obj.get("suggested_name") + }) + return _obj + + diff --git a/revengai/revengai/models/meta_model.py b/revengai/revengai/models/meta_model.py new file mode 100644 index 0000000..d33355b --- /dev/null +++ b/revengai/revengai/models/meta_model.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.pagination_model import PaginationModel +from typing import Optional, Set +from typing_extensions import Self + +class MetaModel(BaseModel): + """ + MetaModel + """ # noqa: E501 + pagination: Optional[PaginationModel] = None + __properties: ClassVar[List[str]] = ["pagination"] + + 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 MetaModel 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 pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # set to None if pagination (nullable) is None + # and model_fields_set contains the field + if self.pagination is None and "pagination" in self.model_fields_set: + _dict['pagination'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MetaModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": PaginationModel.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/model_name.py b/revengai/revengai/models/model_name.py new file mode 100644 index 0000000..073ebeb --- /dev/null +++ b/revengai/revengai/models/model_name.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 ModelName(str, Enum): + """ + Custom enum for the model name + """ + + """ + allowed enum values + """ + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_WINDOWS = 'binnet-0.5-x86-windows' + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_LINUX = 'binnet-0.5-x86-linux' + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_MACOS = 'binnet-0.5-x86-macos' + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_ANDROID = 'binnet-0.5-x86-android' + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_WINDOWS = 'binnet-0.5-x86-32-windows' + BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_LINUX = 'binnet-0.5-x86-32-linux' + BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_WINDOWS = 'binnet-0.5-arm-64-windows' + BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_LINUX = 'binnet-0.5-arm-64-linux' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ModelName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/models_response.py b/revengai/revengai/models/models_response.py new file mode 100644 index 0000000..4ae361d --- /dev/null +++ b/revengai/revengai/models/models_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ModelsResponse(BaseModel): + """ + ModelsResponse + """ # noqa: E501 + models: List[StrictStr] = Field(description="List of active models available analysis.") + __properties: ClassVar[List[str]] = ["models"] + + 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 ModelsResponse 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 ModelsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "models": obj.get("models") + }) + return _obj + + diff --git a/revengai/revengai/models/nearest_neighbor.py b/revengai/revengai/models/nearest_neighbor.py new file mode 100644 index 0000000..0b0d2cd --- /dev/null +++ b/revengai/revengai/models/nearest_neighbor.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class NearestNeighbor(BaseModel): + """ + NearestNeighbor + """ # noqa: E501 + distance: Union[StrictFloat, StrictInt] + nearest_neighbor_analysis_id: StrictInt + nearest_neighbor_analysis_name: StrictStr + nearest_neighbor_function_name: StrictStr + nearest_neighbor_function_name_mangled: Optional[StrictStr] + nearest_neighbor_binary_id: StrictInt + nearest_neighbor_sha_256_hash: StrictStr + nearest_neighbor_debug: StrictBool + __properties: ClassVar[List[str]] = ["distance", "nearest_neighbor_analysis_id", "nearest_neighbor_analysis_name", "nearest_neighbor_function_name", "nearest_neighbor_function_name_mangled", "nearest_neighbor_binary_id", "nearest_neighbor_sha_256_hash", "nearest_neighbor_debug"] + + 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 NearestNeighbor 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 nearest_neighbor_function_name_mangled (nullable) is None + # and model_fields_set contains the field + if self.nearest_neighbor_function_name_mangled is None and "nearest_neighbor_function_name_mangled" in self.model_fields_set: + _dict['nearest_neighbor_function_name_mangled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NearestNeighbor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "distance": obj.get("distance"), + "nearest_neighbor_analysis_id": obj.get("nearest_neighbor_analysis_id"), + "nearest_neighbor_analysis_name": obj.get("nearest_neighbor_analysis_name"), + "nearest_neighbor_function_name": obj.get("nearest_neighbor_function_name"), + "nearest_neighbor_function_name_mangled": obj.get("nearest_neighbor_function_name_mangled"), + "nearest_neighbor_binary_id": obj.get("nearest_neighbor_binary_id"), + "nearest_neighbor_sha_256_hash": obj.get("nearest_neighbor_sha_256_hash"), + "nearest_neighbor_debug": obj.get("nearest_neighbor_debug") + }) + return _obj + + diff --git a/revengai/revengai/models/network_overview_dns.py b/revengai/revengai/models/network_overview_dns.py new file mode 100644 index 0000000..f08a598 --- /dev/null +++ b/revengai/revengai/models/network_overview_dns.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer +from typing import Optional, Set +from typing_extensions import Self + +class NetworkOverviewDns(BaseModel): + """ + NetworkOverviewDns + """ # noqa: E501 + host: StrictStr + type: StrictStr + answers: List[NetworkOverviewDnsAnswer] + __properties: ClassVar[List[str]] = ["host", "type", "answers"] + + 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 NetworkOverviewDns 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 answers (list) + _items = [] + if self.answers: + for _item_answers in self.answers: + if _item_answers: + _items.append(_item_answers.to_dict()) + _dict['answers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkOverviewDns from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "host": obj.get("host"), + "type": obj.get("type"), + "answers": [NetworkOverviewDnsAnswer.from_dict(_item) for _item in obj["answers"]] if obj.get("answers") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/network_overview_dns_answer.py b/revengai/revengai/models/network_overview_dns_answer.py new file mode 100644 index 0000000..a616a64 --- /dev/null +++ b/revengai/revengai/models/network_overview_dns_answer.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class NetworkOverviewDnsAnswer(BaseModel): + """ + NetworkOverviewDnsAnswer + """ # noqa: E501 + type: StrictStr + data: StrictStr + __properties: ClassVar[List[str]] = ["type", "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 NetworkOverviewDnsAnswer 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 NetworkOverviewDnsAnswer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "data": obj.get("data") + }) + return _obj + + diff --git a/revengai/revengai/models/network_overview_metadata.py b/revengai/revengai/models/network_overview_metadata.py new file mode 100644 index 0000000..637c014 --- /dev/null +++ b/revengai/revengai/models/network_overview_metadata.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 NetworkOverviewMetadata(BaseModel): + """ + NetworkOverviewMetadata + """ # noqa: E501 + host: StrictStr + country_code: StrictStr + asn: StrictStr = Field(alias="ASN") + type: StrictStr + __properties: ClassVar[List[str]] = ["host", "country_code", "ASN", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metadata']): + raise ValueError("must be one of enum values ('metadata')") + 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 NetworkOverviewMetadata 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 NetworkOverviewMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "host": obj.get("host"), + "country_code": obj.get("country_code"), + "ASN": obj.get("ASN"), + "type": obj.get("type") + }) + return _obj + + diff --git a/revengai/revengai/models/network_overview_response.py b/revengai/revengai/models/network_overview_response.py new file mode 100644 index 0000000..df0ccdc --- /dev/null +++ b/revengai/revengai/models/network_overview_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.network_overview_dns import NetworkOverviewDns +from revengai.models.network_overview_metadata import NetworkOverviewMetadata +from typing import Optional, Set +from typing_extensions import Self + +class NetworkOverviewResponse(BaseModel): + """ + NetworkOverviewResponse + """ # noqa: E501 + dns: List[NetworkOverviewDns] + metadata: List[NetworkOverviewMetadata] + __properties: ClassVar[List[str]] = ["dns", "metadata"] + + 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 NetworkOverviewResponse 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 dns (list) + _items = [] + if self.dns: + for _item_dns in self.dns: + if _item_dns: + _items.append(_item_dns.to_dict()) + _dict['dns'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkOverviewResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dns": [NetworkOverviewDns.from_dict(_item) for _item in obj["dns"]] if obj.get("dns") is not None else None, + "metadata": [NetworkOverviewMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/order.py b/revengai/revengai/models/order.py new file mode 100644 index 0000000..fffbeca --- /dev/null +++ b/revengai/revengai/models/order.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Order(str, Enum): + """ + Order + """ + + """ + allowed enum values + """ + ASC = 'ASC' + DESC = 'DESC' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Order from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/origin.py b/revengai/revengai/models/origin.py new file mode 100644 index 0000000..c204ecf --- /dev/null +++ b/revengai/revengai/models/origin.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Origin(str, Enum): + """ + Origin + """ + + """ + allowed enum values + """ + REV_ENG_MINUS_MALWARE = 'RevEng-Malware' + REV_ENG_MINUS_LIBRARY = 'RevEng-Library' + REV_ENG_MINUS_BENIGN = 'RevEng-Benign' + REVENG = 'RevEng' + REV_ENG_MINUS_HEURISTIC = 'RevEng-Heuristic' + REV_ENG_MINUS_UNKNOWN = 'RevEng-Unknown' + VIRUSTOTAL = 'VirusTotal' + MALWAREBAZAAR = 'MalwareBazaar' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Origin from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/pagination_model.py b/revengai/revengai/models/pagination_model.py new file mode 100644 index 0000000..94f631e --- /dev/null +++ b/revengai/revengai/models/pagination_model.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PaginationModel(BaseModel): + """ + PaginationModel + """ # noqa: E501 + page_size: StrictInt + page_number: StrictInt + has_next_page: StrictBool + __properties: ClassVar[List[str]] = ["page_size", "page_number", "has_next_page"] + + 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 PaginationModel 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 PaginationModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page_size": obj.get("page_size"), + "page_number": obj.get("page_number"), + "has_next_page": obj.get("has_next_page") + }) + return _obj + + diff --git a/revengai/revengai/models/params.py b/revengai/revengai/models/params.py new file mode 100644 index 0000000..6084f9d --- /dev/null +++ b/revengai/revengai/models/params.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class Params(BaseModel): + """ + Params + """ # noqa: E501 + debug_hash: Optional[StrictStr] + binary_size: StrictInt = Field(description="The size of the binary data") + architecture: StrictStr = Field(description="The architecture of the binary data") + binary_type: StrictStr = Field(description="The type of binary data") + binary_format: StrictStr = Field(description="The format of the binary data") + binary_dynamic: StrictBool = Field(description="Whether the binary data is dynamic") + model_name: StrictStr = Field(description="The name of the model") + __properties: ClassVar[List[str]] = ["debug_hash", "binary_size", "architecture", "binary_type", "binary_format", "binary_dynamic", "model_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 Params 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 debug_hash (nullable) is None + # and model_fields_set contains the field + if self.debug_hash is None and "debug_hash" in self.model_fields_set: + _dict['debug_hash'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Params from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "debug_hash": obj.get("debug_hash"), + "binary_size": obj.get("binary_size"), + "architecture": obj.get("architecture"), + "binary_type": obj.get("binary_type"), + "binary_format": obj.get("binary_format"), + "binary_dynamic": obj.get("binary_dynamic"), + "model_name": obj.get("model_name") + }) + return _obj + + diff --git a/revengai/revengai/models/pdb_debug_model.py b/revengai/revengai/models/pdb_debug_model.py new file mode 100644 index 0000000..53bc5c7 --- /dev/null +++ b/revengai/revengai/models/pdb_debug_model.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.single_pdb_entry_model import SinglePDBEntryModel +from typing import Optional, Set +from typing_extensions import Self + +class PDBDebugModel(BaseModel): + """ + PDBDebugModel + """ # noqa: E501 + debug_entries: List[SinglePDBEntryModel] + __properties: ClassVar[List[str]] = ["debug_entries"] + + 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 PDBDebugModel 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 debug_entries (list) + _items = [] + if self.debug_entries: + for _item_debug_entries in self.debug_entries: + if _item_debug_entries: + _items.append(_item_debug_entries.to_dict()) + _dict['debug_entries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PDBDebugModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "debug_entries": [SinglePDBEntryModel.from_dict(_item) for _item in obj["debug_entries"]] if obj.get("debug_entries") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/pe_model.py b/revengai/revengai/models/pe_model.py new file mode 100644 index 0000000..8fc942d --- /dev/null +++ b/revengai/revengai/models/pe_model.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.code_signature_model import CodeSignatureModel +from revengai.models.entrypoint_model import EntrypointModel +from revengai.models.export_model import ExportModel +from revengai.models.icon_model import IconModel +from revengai.models.import_model import ImportModel +from revengai.models.pdb_debug_model import PDBDebugModel +from revengai.models.section_model import SectionModel +from revengai.models.security_model import SecurityModel +from revengai.models.timestamp_model import TimestampModel +from typing import Optional, Set +from typing_extensions import Self + +class PEModel(BaseModel): + """ + PEModel + """ # noqa: E501 + type: StrictStr + timestamps: Optional[TimestampModel] + architecture: StrictStr + checksum: StrictInt + image_base: StrictInt + security: Optional[SecurityModel] + version_info: Optional[Dict[str, Any]] + debug_info: Optional[PDBDebugModel] + number_of_resources: Optional[StrictInt] + entry_point: Optional[EntrypointModel] + signature: Optional[CodeSignatureModel] + dotnet: StrictBool + debug_stripped: StrictBool + import_hash: StrictStr + export_hash: StrictStr + rich_header_hash: StrictStr + sections: Optional[SectionModel] + imports: Optional[ImportModel] + exports: Optional[ExportModel] + icon_data: Optional[IconModel] + __properties: ClassVar[List[str]] = ["type", "timestamps", "architecture", "checksum", "image_base", "security", "version_info", "debug_info", "number_of_resources", "entry_point", "signature", "dotnet", "debug_stripped", "import_hash", "export_hash", "rich_header_hash", "sections", "imports", "exports", "icon_data"] + + model_config = ConfigDict( + 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 PEModel 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 timestamps + if self.timestamps: + _dict['timestamps'] = self.timestamps.to_dict() + # override the default output from pydantic by calling `to_dict()` of security + if self.security: + _dict['security'] = self.security.to_dict() + # override the default output from pydantic by calling `to_dict()` of debug_info + if self.debug_info: + _dict['debug_info'] = self.debug_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of entry_point + if self.entry_point: + _dict['entry_point'] = self.entry_point.to_dict() + # override the default output from pydantic by calling `to_dict()` of signature + if self.signature: + _dict['signature'] = self.signature.to_dict() + # override the default output from pydantic by calling `to_dict()` of sections + if self.sections: + _dict['sections'] = self.sections.to_dict() + # override the default output from pydantic by calling `to_dict()` of imports + if self.imports: + _dict['imports'] = self.imports.to_dict() + # override the default output from pydantic by calling `to_dict()` of exports + if self.exports: + _dict['exports'] = self.exports.to_dict() + # override the default output from pydantic by calling `to_dict()` of icon_data + if self.icon_data: + _dict['icon_data'] = self.icon_data.to_dict() + # set to None if timestamps (nullable) is None + # and model_fields_set contains the field + if self.timestamps is None and "timestamps" in self.model_fields_set: + _dict['timestamps'] = None + + # set to None if security (nullable) is None + # and model_fields_set contains the field + if self.security is None and "security" in self.model_fields_set: + _dict['security'] = None + + # set to None if version_info (nullable) is None + # and model_fields_set contains the field + if self.version_info is None and "version_info" in self.model_fields_set: + _dict['version_info'] = None + + # set to None if debug_info (nullable) is None + # and model_fields_set contains the field + if self.debug_info is None and "debug_info" in self.model_fields_set: + _dict['debug_info'] = None + + # set to None if number_of_resources (nullable) is None + # and model_fields_set contains the field + if self.number_of_resources is None and "number_of_resources" in self.model_fields_set: + _dict['number_of_resources'] = None + + # set to None if entry_point (nullable) is None + # and model_fields_set contains the field + if self.entry_point is None and "entry_point" in self.model_fields_set: + _dict['entry_point'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + # set to None if sections (nullable) is None + # and model_fields_set contains the field + if self.sections is None and "sections" in self.model_fields_set: + _dict['sections'] = None + + # set to None if imports (nullable) is None + # and model_fields_set contains the field + if self.imports is None and "imports" in self.model_fields_set: + _dict['imports'] = None + + # set to None if exports (nullable) is None + # and model_fields_set contains the field + if self.exports is None and "exports" in self.model_fields_set: + _dict['exports'] = None + + # set to None if icon_data (nullable) is None + # and model_fields_set contains the field + if self.icon_data is None and "icon_data" in self.model_fields_set: + _dict['icon_data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PEModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "timestamps": TimestampModel.from_dict(obj["timestamps"]) if obj.get("timestamps") is not None else None, + "architecture": obj.get("architecture"), + "checksum": obj.get("checksum"), + "image_base": obj.get("image_base"), + "security": SecurityModel.from_dict(obj["security"]) if obj.get("security") is not None else None, + "version_info": obj.get("version_info"), + "debug_info": PDBDebugModel.from_dict(obj["debug_info"]) if obj.get("debug_info") is not None else None, + "number_of_resources": obj.get("number_of_resources"), + "entry_point": EntrypointModel.from_dict(obj["entry_point"]) if obj.get("entry_point") is not None else None, + "signature": CodeSignatureModel.from_dict(obj["signature"]) if obj.get("signature") is not None else None, + "dotnet": obj.get("dotnet"), + "debug_stripped": obj.get("debug_stripped"), + "import_hash": obj.get("import_hash"), + "export_hash": obj.get("export_hash"), + "rich_header_hash": obj.get("rich_header_hash"), + "sections": SectionModel.from_dict(obj["sections"]) if obj.get("sections") is not None else None, + "imports": ImportModel.from_dict(obj["imports"]) if obj.get("imports") is not None else None, + "exports": ExportModel.from_dict(obj["exports"]) if obj.get("exports") is not None else None, + "icon_data": IconModel.from_dict(obj["icon_data"]) if obj.get("icon_data") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/platform.py b/revengai/revengai/models/platform.py new file mode 100644 index 0000000..d7fe5bd --- /dev/null +++ b/revengai/revengai/models/platform.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Platform(str, Enum): + """ + Platform + """ + + """ + allowed enum values + """ + LINUX = 'linux' + WINDOWS = 'windows' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Platform from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/process.py b/revengai/revengai/models/process.py new file mode 100644 index 0000000..cd84baa --- /dev/null +++ b/revengai/revengai/models/process.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Process(BaseModel): + """ + Process + """ # noqa: E501 + pid: StrictInt + procname: StrictStr + executable_name: StrictStr + args: List[StrictStr] + ts_from: Union[StrictFloat, StrictInt] + ts_to: Optional[Union[StrictFloat, StrictInt]] + children: List[Any] + __properties: ClassVar[List[str]] = ["pid", "procname", "executable_name", "args", "ts_from", "ts_to", "children"] + + 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 Process 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 ts_to (nullable) is None + # and model_fields_set contains the field + if self.ts_to is None and "ts_to" in self.model_fields_set: + _dict['ts_to'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Process from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pid": obj.get("pid"), + "procname": obj.get("procname"), + "executable_name": obj.get("executable_name"), + "args": obj.get("args"), + "ts_from": obj.get("ts_from"), + "ts_to": obj.get("ts_to"), + "children": obj.get("children") + }) + return _obj + + diff --git a/revengai/revengai/models/process_dump.py b/revengai/revengai/models/process_dump.py new file mode 100644 index 0000000..1d86fc2 --- /dev/null +++ b/revengai/revengai/models/process_dump.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.process_dump_metadata import ProcessDumpMetadata +from typing import Optional, Set +from typing_extensions import Self + +class ProcessDump(BaseModel): + """ + ProcessDump + """ # noqa: E501 + base_address: StrictInt + actual_filename: StrictStr + filename_friendly: StrictStr + extended_metadata: ProcessDumpMetadata + __properties: ClassVar[List[str]] = ["base_address", "actual_filename", "filename_friendly", "extended_metadata"] + + 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 ProcessDump 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 extended_metadata + if self.extended_metadata: + _dict['extended_metadata'] = self.extended_metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessDump from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base_address": obj.get("base_address"), + "actual_filename": obj.get("actual_filename"), + "filename_friendly": obj.get("filename_friendly"), + "extended_metadata": ProcessDumpMetadata.from_dict(obj["extended_metadata"]) if obj.get("extended_metadata") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/process_dump_metadata.py b/revengai/revengai/models/process_dump_metadata.py new file mode 100644 index 0000000..18287dc --- /dev/null +++ b/revengai/revengai/models/process_dump_metadata.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ProcessDumpMetadata(BaseModel): + """ + ProcessDumpMetadata + """ # noqa: E501 + sha256: StrictStr + type: StrictStr + size: StrictInt + __properties: ClassVar[List[str]] = ["sha256", "type", "size"] + + 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 ProcessDumpMetadata 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 ProcessDumpMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sha256": obj.get("sha256"), + "type": obj.get("type"), + "size": obj.get("size") + }) + return _obj + + diff --git a/revengai/revengai/models/process_dumps.py b/revengai/revengai/models/process_dumps.py new file mode 100644 index 0000000..028e480 --- /dev/null +++ b/revengai/revengai/models/process_dumps.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.process_dumps_data import ProcessDumpsData +from typing import Optional, Set +from typing_extensions import Self + +class ProcessDumps(BaseModel): + """ + ProcessDumps + """ # noqa: E501 + success: StrictBool + data: ProcessDumpsData + __properties: ClassVar[List[str]] = ["success", "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 ProcessDumps 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessDumps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "data": ProcessDumpsData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/process_dumps_data.py b/revengai/revengai/models/process_dumps_data.py new file mode 100644 index 0000000..af9a92d --- /dev/null +++ b/revengai/revengai/models/process_dumps_data.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.process_dump import ProcessDump +from typing import Optional, Set +from typing_extensions import Self + +class ProcessDumpsData(BaseModel): + """ + ProcessDumpsData + """ # noqa: E501 + count: StrictInt + dumps: List[ProcessDump] + __properties: ClassVar[List[str]] = ["count", "dumps"] + + 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 ProcessDumpsData 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 dumps (list) + _items = [] + if self.dumps: + for _item_dumps in self.dumps: + if _item_dumps: + _items.append(_item_dumps.to_dict()) + _dict['dumps'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessDumpsData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "dumps": [ProcessDump.from_dict(_item) for _item in obj["dumps"]] if obj.get("dumps") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/process_registry.py b/revengai/revengai/models/process_registry.py new file mode 100644 index 0000000..d4e4d4d --- /dev/null +++ b/revengai/revengai/models/process_registry.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.registry import Registry +from typing import Optional, Set +from typing_extensions import Self + +class ProcessRegistry(BaseModel): + """ + ProcessRegistry + """ # noqa: E501 + success: StrictBool + data: Dict[str, List[Registry]] + __properties: ClassVar[List[str]] = ["success", "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 ProcessRegistry 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 value in data (dict of array) + _field_dict_of_array = {} + if self.data: + for _key_data in self.data: + if self.data[_key_data] is not None: + _field_dict_of_array[_key_data] = [ + _item.to_dict() for _item in self.data[_key_data] + ] + _dict['data'] = _field_dict_of_array + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessRegistry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "data": dict( + (_k, + [Registry.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("data", {}).items() + ) + }) + return _obj + + diff --git a/revengai/revengai/models/process_tree.py b/revengai/revengai/models/process_tree.py new file mode 100644 index 0000000..35e87f0 --- /dev/null +++ b/revengai/revengai/models/process_tree.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.process import Process +from typing import Optional, Set +from typing_extensions import Self + +class ProcessTree(BaseModel): + """ + ProcessTree + """ # noqa: E501 + success: StrictBool + data: List[Process] + __properties: ClassVar[List[str]] = ["success", "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 ProcessTree 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessTree from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "data": [Process.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/queued_security_checks_task_response.py b/revengai/revengai/models/queued_security_checks_task_response.py new file mode 100644 index 0000000..1c4ff81 --- /dev/null +++ b/revengai/revengai/models/queued_security_checks_task_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class QueuedSecurityChecksTaskResponse(BaseModel): + """ + QueuedSecurityChecksTaskResponse + """ # noqa: E501 + task_id: StrictStr + __properties: ClassVar[List[str]] = ["task_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 QueuedSecurityChecksTaskResponse 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 QueuedSecurityChecksTaskResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task_id": obj.get("task_id") + }) + return _obj + + diff --git a/revengai/revengai/models/re_analysis_form.py b/revengai/revengai/models/re_analysis_form.py new file mode 100644 index 0000000..e0bc04d --- /dev/null +++ b/revengai/revengai/models/re_analysis_form.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class ReAnalysisForm(BaseModel): + """ + Form Model for receiving the analysis request + """ # noqa: E501 + tags: Optional[List[StrictStr]] = Field(default=None, description="Tags associated with the analysis") + command_line_args: Optional[StrictStr] = Field(default='', description="Command line arguments for dynamic execution") + priority: Optional[StrictInt] = Field(default=0, description="Priority of the analysis") + essential: Optional[StrictBool] = Field(default=True, description="Only runs essential parts of the analysis, skips tags/sbom/cves etc.") + model_name: Optional[StrictStr] = None + no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") + __properties: ClassVar[List[str]] = ["tags", "command_line_args", "priority", "essential", "model_name", "no_cache"] + + 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 ReAnalysisForm 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 model_name (nullable) is None + # and model_fields_set contains the field + if self.model_name is None and "model_name" in self.model_fields_set: + _dict['model_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReAnalysisForm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags"), + "command_line_args": obj.get("command_line_args") if obj.get("command_line_args") is not None else '', + "priority": obj.get("priority") if obj.get("priority") is not None else 0, + "essential": obj.get("essential") if obj.get("essential") is not None else True, + "model_name": obj.get("model_name"), + "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/recent.py b/revengai/revengai/models/recent.py new file mode 100644 index 0000000..d0a8f88 --- /dev/null +++ b/revengai/revengai/models/recent.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.analysis_record import AnalysisRecord +from typing import Optional, Set +from typing_extensions import Self + +class Recent(BaseModel): + """ + Recent + """ # noqa: E501 + results: List[AnalysisRecord] = Field(description="2D List containing the results of the analysis") + __properties: ClassVar[List[str]] = ["results"] + + 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 Recent 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Recent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [AnalysisRecord.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/registry.py b/revengai/revengai/models/registry.py new file mode 100644 index 0000000..92d7f09 --- /dev/null +++ b/revengai/revengai/models/registry.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Registry(BaseModel): + """ + Registry + """ # noqa: E501 + method: StrictStr + key: StrictStr + value_name: Optional[StrictStr] + value: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["method", "key", "value_name", "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 Registry 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 value_name (nullable) is None + # and model_fields_set contains the field + if self.value_name is None and "value_name" in self.model_fields_set: + _dict['value_name'] = None + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Registry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "method": obj.get("method"), + "key": obj.get("key"), + "value_name": obj.get("value_name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/revengai/revengai/models/relative_binary_response.py b/revengai/revengai/models/relative_binary_response.py new file mode 100644 index 0000000..abbaba7 --- /dev/null +++ b/revengai/revengai/models/relative_binary_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 RelativeBinaryResponse(BaseModel): + """ + RelativeBinaryResponse + """ # noqa: E501 + binary_id: StrictInt = Field(description="ID of the relative binary") + name: StrictStr = Field(description="Name of the relative binary") + sha256: StrictStr = Field(description="SHA256 hash of the relative binary") + __properties: ClassVar[List[str]] = ["binary_id", "name", "sha256"] + + 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 RelativeBinaryResponse 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 RelativeBinaryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_id": obj.get("binary_id"), + "name": obj.get("name"), + "sha256": obj.get("sha256") + }) + return _obj + + diff --git a/revengai/revengai/models/sandbox_options.py b/revengai/revengai/models/sandbox_options.py new file mode 100644 index 0000000..740278b --- /dev/null +++ b/revengai/revengai/models/sandbox_options.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class SandboxOptions(BaseModel): + """ + SandboxOptions + """ # noqa: E501 + enabled: Optional[StrictBool] = False + command_line_args: Optional[StrictStr] = Field(default='', description="The command line parameters to pass to the dynamic execution sandbox. Requires `sandbox` to be True.") + __properties: ClassVar[List[str]] = ["enabled", "command_line_args"] + + 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 SandboxOptions 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 SandboxOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") if obj.get("enabled") is not None else False, + "command_line_args": obj.get("command_line_args") if obj.get("command_line_args") is not None else '' + }) + return _obj + + diff --git a/revengai/revengai/models/sbom.py b/revengai/revengai/models/sbom.py new file mode 100644 index 0000000..7a4c669 --- /dev/null +++ b/revengai/revengai/models/sbom.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.sbom_package import SBOMPackage +from typing import Optional, Set +from typing_extensions import Self + +class SBOM(BaseModel): + """ + SBOM + """ # noqa: E501 + packages: List[SBOMPackage] = Field(description="The packages found") + imported_libs: List[StrictStr] = Field(description="The import libraries found") + __properties: ClassVar[List[str]] = ["packages", "imported_libs"] + + 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 SBOM 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 packages (list) + _items = [] + if self.packages: + for _item_packages in self.packages: + if _item_packages: + _items.append(_item_packages.to_dict()) + _dict['packages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SBOM from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "packages": [SBOMPackage.from_dict(_item) for _item in obj["packages"]] if obj.get("packages") is not None else None, + "imported_libs": obj.get("imported_libs") + }) + return _obj + + diff --git a/revengai/revengai/models/sbom_package.py b/revengai/revengai/models/sbom_package.py new file mode 100644 index 0000000..c29f2cb --- /dev/null +++ b/revengai/revengai/models/sbom_package.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SBOMPackage(BaseModel): + """ + SBOMPackage + """ # noqa: E501 + name: StrictStr = Field(description="The name of the package") + version: StrictStr = Field(description="The version of the package") + __properties: ClassVar[List[str]] = ["name", "version"] + + 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 SBOMPackage 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 SBOMPackage 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"), + "version": obj.get("version") + }) + return _obj + + diff --git a/revengai/revengai/models/scrape_third_party_config.py b/revengai/revengai/models/scrape_third_party_config.py new file mode 100644 index 0000000..a731ba2 --- /dev/null +++ b/revengai/revengai/models/scrape_third_party_config.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class ScrapeThirdPartyConfig(BaseModel): + """ + ScrapeThirdPartyConfig + """ # noqa: E501 + enabled: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["enabled"] + + 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 ScrapeThirdPartyConfig 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 ScrapeThirdPartyConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") if obj.get("enabled") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/search_binary_ids.py b/revengai/revengai/models/search_binary_ids.py new file mode 100644 index 0000000..7fb011d --- /dev/null +++ b/revengai/revengai/models/search_binary_ids.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +SEARCHBINARYIDS_ANY_OF_SCHEMAS = ["List[int]", "object"] + +class SearchBinaryIds(BaseModel): + """ + Optionally perform the search on matching functions from binaries in this list + """ + + # data type: List[int] + anyof_schema_1_validator: Optional[List[StrictInt]] = None + # data type: object + anyof_schema_2_validator: Optional[Any] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[List[int], object]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "List[int]", "object" } + + 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 = SearchBinaryIds.model_construct() + error_messages = [] + # validate data type: List[int] + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in SearchBinaryIds with anyOf schemas: List[int], object. 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 = [] + # deserialize data into List[int] + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + 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 SearchBinaryIds with anyOf schemas: List[int], object. 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], List[int], object]]: + """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/revengai/models/search_function_ids.py b/revengai/revengai/models/search_function_ids.py new file mode 100644 index 0000000..65baf03 --- /dev/null +++ b/revengai/revengai/models/search_function_ids.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +SEARCHFUNCTIONIDS_ANY_OF_SCHEMAS = ["List[int]", "object"] + +class SearchFunctionIds(BaseModel): + """ + Optionally perform the search on matching functions within this list of functions + """ + + # data type: List[int] + anyof_schema_1_validator: Optional[List[StrictInt]] = None + # data type: object + anyof_schema_2_validator: Optional[Any] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[List[int], object]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "List[int]", "object" } + + 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 = SearchFunctionIds.model_construct() + error_messages = [] + # validate data type: List[int] + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in SearchFunctionIds with anyOf schemas: List[int], object. 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 = [] + # deserialize data into List[int] + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + 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 SearchFunctionIds with anyOf schemas: List[int], object. 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], List[int], object]]: + """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/revengai/models/section_model.py b/revengai/revengai/models/section_model.py new file mode 100644 index 0000000..ab5427a --- /dev/null +++ b/revengai/revengai/models/section_model.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.single_section_model import SingleSectionModel +from typing import Optional, Set +from typing_extensions import Self + +class SectionModel(BaseModel): + """ + SectionModel + """ # noqa: E501 + number_of_sections: StrictInt + sections: List[SingleSectionModel] + __properties: ClassVar[List[str]] = ["number_of_sections", "sections"] + + 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 SectionModel 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 sections (list) + _items = [] + if self.sections: + for _item_sections in self.sections: + if _item_sections: + _items.append(_item_sections.to_dict()) + _dict['sections'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SectionModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number_of_sections": obj.get("number_of_sections"), + "sections": [SingleSectionModel.from_dict(_item) for _item in obj["sections"]] if obj.get("sections") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/security_checks_response.py b/revengai/revengai/models/security_checks_response.py new file mode 100644 index 0000000..24353cc --- /dev/null +++ b/revengai/revengai/models/security_checks_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.security_checks_result import SecurityChecksResult +from typing import Optional, Set +from typing_extensions import Self + +class SecurityChecksResponse(BaseModel): + """ + SecurityChecksResponse + """ # noqa: E501 + binary_id: StrictInt + total_results: StrictInt + results: List[SecurityChecksResult] + __properties: ClassVar[List[str]] = ["binary_id", "total_results", "results"] + + 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 SecurityChecksResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SecurityChecksResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_id": obj.get("binary_id"), + "total_results": obj.get("total_results"), + "results": [SecurityChecksResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/security_checks_result.py b/revengai/revengai/models/security_checks_result.py new file mode 100644 index 0000000..a4227bc --- /dev/null +++ b/revengai/revengai/models/security_checks_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.confidence_type import ConfidenceType +from revengai.models.severity_type import SeverityType +from revengai.models.vulnerability_type import VulnerabilityType +from typing import Optional, Set +from typing_extensions import Self + +class SecurityChecksResult(BaseModel): + """ + SecurityChecksResult + """ # noqa: E501 + function_id: StrictInt + function_name: StrictStr + name: StrictStr + vuln_class: VulnerabilityType + description: StrictStr + remediation: StrictStr + confidence: ConfidenceType + severity: SeverityType + __properties: ClassVar[List[str]] = ["function_id", "function_name", "name", "vuln_class", "description", "remediation", "confidence", "severity"] + + 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 SecurityChecksResult 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 SecurityChecksResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "name": obj.get("name"), + "vuln_class": obj.get("vuln_class"), + "description": obj.get("description"), + "remediation": obj.get("remediation"), + "confidence": obj.get("confidence"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/revengai/revengai/models/security_model.py b/revengai/revengai/models/security_model.py new file mode 100644 index 0000000..b422b62 --- /dev/null +++ b/revengai/revengai/models/security_model.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SecurityModel(BaseModel): + """ + SecurityModel + """ # noqa: E501 + aslr: StrictBool + dep: StrictBool + cfg: StrictBool + driver_model: StrictBool + app_container: StrictBool + terminal_server_aware: StrictBool + image_isolation: StrictBool + code_integrity: StrictBool + high_entropy: StrictBool + seh: StrictBool + bound_image: StrictBool + __properties: ClassVar[List[str]] = ["aslr", "dep", "cfg", "driver_model", "app_container", "terminal_server_aware", "image_isolation", "code_integrity", "high_entropy", "seh", "bound_image"] + + model_config = ConfigDict( + 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 SecurityModel 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 SecurityModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aslr": obj.get("aslr"), + "dep": obj.get("dep"), + "cfg": obj.get("cfg"), + "driver_model": obj.get("driver_model"), + "app_container": obj.get("app_container"), + "terminal_server_aware": obj.get("terminal_server_aware"), + "image_isolation": obj.get("image_isolation"), + "code_integrity": obj.get("code_integrity"), + "high_entropy": obj.get("high_entropy"), + "seh": obj.get("seh"), + "bound_image": obj.get("bound_image") + }) + return _obj + + diff --git a/revengai/revengai/models/severity_type.py b/revengai/revengai/models/severity_type.py new file mode 100644 index 0000000..b1a1ea7 --- /dev/null +++ b/revengai/revengai/models/severity_type.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 SeverityType(str, Enum): + """ + SeverityType + """ + + """ + allowed enum values + """ + CRITICAL = 'CRITICAL' + HIGH = 'HIGH' + MEDIUM = 'MEDIUM' + LOW = 'LOW' + INFO = 'INFO' + NONE = 'NONE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SeverityType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/similar_functions_response.py b/revengai/revengai/models/similar_functions_response.py new file mode 100644 index 0000000..f5a0f3e --- /dev/null +++ b/revengai/revengai/models/similar_functions_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SimilarFunctionsResponse(BaseModel): + """ + SimilarFunctionsResponse + """ # noqa: E501 + function_id: StrictInt + function_name: StrictStr + binary_id: StrictInt + binary_name: StrictStr + distance: Union[StrictFloat, StrictInt] + embedding_3d: List[Union[StrictFloat, StrictInt]] + embedding_1d: List[Union[StrictFloat, StrictInt]] + sha_256_hash: StrictStr + __properties: ClassVar[List[str]] = ["function_id", "function_name", "binary_id", "binary_name", "distance", "embedding_3d", "embedding_1d", "sha_256_hash"] + + 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 SimilarFunctionsResponse 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 SimilarFunctionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "binary_id": obj.get("binary_id"), + "binary_name": obj.get("binary_name"), + "distance": obj.get("distance"), + "embedding_3d": obj.get("embedding_3d"), + "embedding_1d": obj.get("embedding_1d"), + "sha_256_hash": obj.get("sha_256_hash") + }) + return _obj + + diff --git a/revengai/revengai/models/single_code_certificate_model.py b/revengai/revengai/models/single_code_certificate_model.py new file mode 100644 index 0000000..6f20a3b --- /dev/null +++ b/revengai/revengai/models/single_code_certificate_model.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SingleCodeCertificateModel(BaseModel): + """ + SingleCodeCertificateModel + """ # noqa: E501 + version: StrictInt + issued_on: StrictStr + expires_on: StrictStr + issuer_name: StrictStr + serial_number: StrictStr + subject_name: StrictStr + __properties: ClassVar[List[str]] = ["version", "issued_on", "expires_on", "issuer_name", "serial_number", "subject_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 SingleCodeCertificateModel 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 SingleCodeCertificateModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "issued_on": obj.get("issued_on"), + "expires_on": obj.get("expires_on"), + "issuer_name": obj.get("issuer_name"), + "serial_number": obj.get("serial_number"), + "subject_name": obj.get("subject_name") + }) + return _obj + + diff --git a/revengai/revengai/models/single_code_signature_model.py b/revengai/revengai/models/single_code_signature_model.py new file mode 100644 index 0000000..36aebc2 --- /dev/null +++ b/revengai/revengai/models/single_code_signature_model.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.single_code_certificate_model import SingleCodeCertificateModel +from typing import Optional, Set +from typing_extensions import Self + +class SingleCodeSignatureModel(BaseModel): + """ + SingleCodeSignatureModel + """ # noqa: E501 + certificates: List[SingleCodeCertificateModel] + authenticode_digest: StrictStr + __properties: ClassVar[List[str]] = ["certificates", "authenticode_digest"] + + 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 SingleCodeSignatureModel 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 certificates (list) + _items = [] + if self.certificates: + for _item_certificates in self.certificates: + if _item_certificates: + _items.append(_item_certificates.to_dict()) + _dict['certificates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SingleCodeSignatureModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "certificates": [SingleCodeCertificateModel.from_dict(_item) for _item in obj["certificates"]] if obj.get("certificates") is not None else None, + "authenticode_digest": obj.get("authenticode_digest") + }) + return _obj + + diff --git a/revengai/revengai/models/single_pdb_entry_model.py b/revengai/revengai/models/single_pdb_entry_model.py new file mode 100644 index 0000000..f121be7 --- /dev/null +++ b/revengai/revengai/models/single_pdb_entry_model.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SinglePDBEntryModel(BaseModel): + """ + SinglePDBEntryModel + """ # noqa: E501 + guid: StrictStr + age: StrictInt + path: StrictStr + __properties: ClassVar[List[str]] = ["guid", "age", "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 SinglePDBEntryModel 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 SinglePDBEntryModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "guid": obj.get("guid"), + "age": obj.get("age"), + "path": obj.get("path") + }) + return _obj + + diff --git a/revengai/revengai/models/single_section_model.py b/revengai/revengai/models/single_section_model.py new file mode 100644 index 0000000..63bb193 --- /dev/null +++ b/revengai/revengai/models/single_section_model.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SingleSectionModel(BaseModel): + """ + SingleSectionModel + """ # noqa: E501 + name: StrictStr + virtual_address: StrictInt + virtual_size: StrictInt + characteristics: StrictStr + raw_size: StrictInt + entropy: Union[StrictFloat, StrictInt] + sha3_256: StrictStr + __properties: ClassVar[List[str]] = ["name", "virtual_address", "virtual_size", "characteristics", "raw_size", "entropy", "sha3_256"] + + 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 SingleSectionModel 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 SingleSectionModel 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"), + "virtual_address": obj.get("virtual_address"), + "virtual_size": obj.get("virtual_size"), + "characteristics": obj.get("characteristics"), + "raw_size": obj.get("raw_size"), + "entropy": obj.get("entropy"), + "sha3_256": obj.get("sha3_256") + }) + return _obj + + diff --git a/revengai/revengai/models/stack_variable.py b/revengai/revengai/models/stack_variable.py new file mode 100644 index 0000000..2e9eb78 --- /dev/null +++ b/revengai/revengai/models/stack_variable.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class StackVariable(BaseModel): + """ + StackVariable + """ # noqa: E501 + last_change: Optional[StrictStr] = None + offset: StrictInt = Field(description="Offset of the stack variable") + name: StrictStr = Field(description="Name of the stack variable") + type: StrictStr = Field(description="Data type of the stack variable") + size: StrictInt = Field(description="Size of the stack variable in bytes") + addr: StrictInt = Field(description="Memory address of the stack variable") + __properties: ClassVar[List[str]] = ["last_change", "offset", "name", "type", "size", "addr"] + + 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 StackVariable 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StackVariable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "offset": obj.get("offset"), + "name": obj.get("name"), + "type": obj.get("type"), + "size": obj.get("size"), + "addr": obj.get("addr") + }) + return _obj + + diff --git a/revengai/revengai/models/status_input.py b/revengai/revengai/models/status_input.py new file mode 100644 index 0000000..11eb07c --- /dev/null +++ b/revengai/revengai/models/status_input.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 StatusInput(str, Enum): + """ + Custom enum for the analysis status + """ + + """ + allowed enum values + """ + UPLOADED = 'Uploaded' + QUEUED = 'Queued' + COMPLETE = 'Complete' + ERROR = 'Error' + PROCESSING = 'Processing' + ALL = 'All' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of StatusInput from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/status_output.py b/revengai/revengai/models/status_output.py new file mode 100644 index 0000000..43a94dc --- /dev/null +++ b/revengai/revengai/models/status_output.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 StatusOutput(BaseModel): + """ + StatusOutput + """ # noqa: E501 + analysis_id: StrictInt = Field(description="The ID corresponding to the checked status") + analysis_status: StrictStr = Field(description="The status of the checked analysis") + __properties: ClassVar[List[str]] = ["analysis_id", "analysis_status"] + + 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 StatusOutput 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 StatusOutput 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"), + "analysis_status": obj.get("analysis_status") + }) + return _obj + + diff --git a/revengai/revengai/models/string_functions.py b/revengai/revengai/models/string_functions.py new file mode 100644 index 0000000..ffbc065 --- /dev/null +++ b/revengai/revengai/models/string_functions.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction +from typing import Optional, Set +from typing_extensions import Self + +class StringFunctions(BaseModel): + """ + This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. + """ # noqa: E501 + value: StrictStr = Field(description="The value of the string literal") + functions: List[AppApiRestV2FunctionsResponsesFunction] = Field(description="The function ids the string literal was found within") + __properties: ClassVar[List[str]] = ["value", "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 StringFunctions 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StringFunctions 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"), + "functions": [AppApiRestV2FunctionsResponsesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/structure.py b/revengai/revengai/models/structure.py new file mode 100644 index 0000000..ae1cac6 --- /dev/null +++ b/revengai/revengai/models/structure.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.structure_member import StructureMember +from typing import Optional, Set +from typing_extensions import Self + +class Structure(BaseModel): + """ + Structure + """ # noqa: E501 + last_change: Optional[StrictStr] = None + name: StrictStr = Field(description="Name of the structure") + size: Optional[StrictInt] = None + members: Dict[str, StructureMember] = Field(description="Dictionary of structure members") + artifact_type: Optional[StrictStr] = Field(default=None, description="Type of artifact that the structure is associated with") + __properties: ClassVar[List[str]] = ["last_change", "name", "size", "members", "artifact_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 Structure 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 value in members (dict) + _field_dict = {} + if self.members: + for _key_members in self.members: + if self.members[_key_members]: + _field_dict[_key_members] = self.members[_key_members].to_dict() + _dict['members'] = _field_dict + # set to None if last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Structure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "name": obj.get("name"), + "size": obj.get("size"), + "members": dict( + (_k, StructureMember.from_dict(_v)) + for _k, _v in obj["members"].items() + ) + if obj.get("members") is not None + else None, + "artifact_type": obj.get("artifact_type") + }) + return _obj + + diff --git a/revengai/revengai/models/structure_member.py b/revengai/revengai/models/structure_member.py new file mode 100644 index 0000000..554557f --- /dev/null +++ b/revengai/revengai/models/structure_member.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing import Optional, Set +from typing_extensions import Self + +class StructureMember(BaseModel): + """ + StructureMember + """ # noqa: E501 + last_change: Optional[StrictStr] = None + name: StrictStr = Field(description="Name of the structure member") + offset: StrictInt = Field(description="Offset of the member within the structure") + type: StrictStr = Field(description="Data type of the structure member") + size: StrictInt = Field(description="Size of the structure member in bytes") + __properties: ClassVar[List[str]] = ["last_change", "name", "offset", "type", "size"] + + 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 StructureMember 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StructureMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "name": obj.get("name"), + "offset": obj.get("offset"), + "type": obj.get("type"), + "size": obj.get("size") + }) + return _obj + + diff --git a/revengai/revengai/models/symbols.py b/revengai/revengai/models/symbols.py new file mode 100644 index 0000000..28e94bc --- /dev/null +++ b/revengai/revengai/models/symbols.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.function_boundary import FunctionBoundary +from typing import Optional, Set +from typing_extensions import Self + +class Symbols(BaseModel): + """ + Symbols + """ # noqa: E501 + base_address: Optional[StrictInt] = Field(default=0, description="The starting address of the execution") + function_boundaries: Optional[List[FunctionBoundary]] = Field(default=None, description="List of user defined function boundaries") + __properties: ClassVar[List[str]] = ["base_address", "function_boundaries"] + + 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 Symbols 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 function_boundaries (list) + _items = [] + if self.function_boundaries: + for _item_function_boundaries in self.function_boundaries: + if _item_function_boundaries: + _items.append(_item_function_boundaries.to_dict()) + _dict['function_boundaries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Symbols from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base_address": obj.get("base_address") if obj.get("base_address") is not None else 0, + "function_boundaries": [FunctionBoundary.from_dict(_item) for _item in obj["function_boundaries"]] if obj.get("function_boundaries") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/symbols_info.py b/revengai/revengai/models/symbols_info.py new file mode 100644 index 0000000..acef945 --- /dev/null +++ b/revengai/revengai/models/symbols_info.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.boundary import Boundary +from typing import Optional, Set +from typing_extensions import Self + +class SymbolsInfo(BaseModel): + """ + SymbolsInfo + """ # noqa: E501 + base_addr: Optional[StrictInt] = None + provided_boundaries: Optional[Boundary] = None + __properties: ClassVar[List[str]] = ["base_addr", "provided_boundaries"] + + 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 SymbolsInfo 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 provided_boundaries + if self.provided_boundaries: + _dict['provided_boundaries'] = self.provided_boundaries.to_dict() + # set to None if base_addr (nullable) is None + # and model_fields_set contains the field + if self.base_addr is None and "base_addr" in self.model_fields_set: + _dict['base_addr'] = None + + # set to None if provided_boundaries (nullable) is None + # and model_fields_set contains the field + if self.provided_boundaries is None and "provided_boundaries" in self.model_fields_set: + _dict['provided_boundaries'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SymbolsInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base_addr": obj.get("base_addr"), + "provided_boundaries": Boundary.from_dict(obj["provided_boundaries"]) if obj.get("provided_boundaries") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/tag.py b/revengai/revengai/models/tag.py new file mode 100644 index 0000000..60f8daf --- /dev/null +++ b/revengai/revengai/models/tag.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Tag(BaseModel): + """ + Tag + """ # noqa: E501 + name: StrictStr + __properties: ClassVar[List[str]] = ["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 Tag 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 Tag 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") + }) + return _obj + + diff --git a/revengai/revengai/models/tag_confidence_body.py b/revengai/revengai/models/tag_confidence_body.py new file mode 100644 index 0000000..00db0a2 --- /dev/null +++ b/revengai/revengai/models/tag_confidence_body.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.tags import Tags +from typing import Optional, Set +from typing_extensions import Self + +class TagConfidenceBody(BaseModel): + """ + TagConfidenceBody + """ # noqa: E501 + tags: Annotated[List[Tags], Field(min_length=1, max_length=10)] + __properties: ClassVar[List[str]] = ["tags"] + + 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 TagConfidenceBody 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 tags (list) + _items = [] + if self.tags: + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) + _dict['tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagConfidenceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [Tags.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/tag_origin_box_plot_confidence.py b/revengai/revengai/models/tag_origin_box_plot_confidence.py new file mode 100644 index 0000000..6ce9efb --- /dev/null +++ b/revengai/revengai/models/tag_origin_box_plot_confidence.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.box_plot_confidence import BoxPlotConfidence +from revengai.models.tags import Tags +from typing import Optional, Set +from typing_extensions import Self + +class TagOriginBoxPlotConfidence(BaseModel): + """ + TagOriginBoxPlotConfidence + """ # noqa: E501 + tag: Tags + box_plot: BoxPlotConfidence + __properties: ClassVar[List[str]] = ["tag", "box_plot"] + + 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 TagOriginBoxPlotConfidence 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 tag + if self.tag: + _dict['tag'] = self.tag.to_dict() + # override the default output from pydantic by calling `to_dict()` of box_plot + if self.box_plot: + _dict['box_plot'] = self.box_plot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagOriginBoxPlotConfidence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": Tags.from_dict(obj["tag"]) if obj.get("tag") is not None else None, + "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/tag_response.py b/revengai/revengai/models/tag_response.py new file mode 100644 index 0000000..e10a578 --- /dev/null +++ b/revengai/revengai/models/tag_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class TagResponse(BaseModel): + """ + TagResponse + """ # noqa: E501 + name: StrictStr = Field(description="Name of the tag") + origin: StrictStr = Field(description="Origin of tag") + __properties: ClassVar[List[str]] = ["name", "origin"] + + 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 TagResponse 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 TagResponse 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"), + "origin": obj.get("origin") + }) + return _obj + + diff --git a/revengai/revengai/models/tag_search_response.py b/revengai/revengai/models/tag_search_response.py new file mode 100644 index 0000000..f2b332e --- /dev/null +++ b/revengai/revengai/models/tag_search_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.tag_search_result import TagSearchResult +from typing import Optional, Set +from typing_extensions import Self + +class TagSearchResponse(BaseModel): + """ + TagSearchResponse + """ # noqa: E501 + results: List[TagSearchResult] = Field(description="The results of the search") + __properties: ClassVar[List[str]] = ["results"] + + 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 TagSearchResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagSearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [TagSearchResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/tag_search_result.py b/revengai/revengai/models/tag_search_result.py new file mode 100644 index 0000000..0fa3b56 --- /dev/null +++ b/revengai/revengai/models/tag_search_result.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 TagSearchResult(BaseModel): + """ + TagSearchResult + """ # noqa: E501 + tag_id: StrictInt = Field(description="The ID of the tag") + tag: StrictStr = Field(description="The name of the tag") + __properties: ClassVar[List[str]] = ["tag_id", "tag"] + + 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 TagSearchResult 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 TagSearchResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag_id": obj.get("tag_id"), + "tag": obj.get("tag") + }) + return _obj + + diff --git a/revengai/revengai/models/tags.py b/revengai/revengai/models/tags.py new file mode 100644 index 0000000..2d58b86 --- /dev/null +++ b/revengai/revengai/models/tags.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.origin import Origin +from typing import Optional, Set +from typing_extensions import Self + +class Tags(BaseModel): + """ + Tags + """ # noqa: E501 + tag: StrictStr = Field(description="The tag name") + origin: Origin = Field(description="The origin of the tag") + __properties: ClassVar[List[str]] = ["tag", "origin"] + + 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 Tags 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 Tags from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": obj.get("tag"), + "origin": obj.get("origin") + }) + return _obj + + diff --git a/revengai/revengai/models/task_response.py b/revengai/revengai/models/task_response.py new file mode 100644 index 0000000..493c9a8 --- /dev/null +++ b/revengai/revengai/models/task_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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.task_status import TaskStatus +from typing import Optional, Set +from typing_extensions import Self + +class TaskResponse(BaseModel): + """ + TaskResponse + """ # noqa: E501 + status: Optional[TaskStatus] = None + error_message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "error_message"] + + 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 TaskResponse 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 error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskResponse 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"), + "error_message": obj.get("error_message") + }) + return _obj + + diff --git a/revengai/revengai/models/task_status.py b/revengai/revengai/models/task_status.py new file mode 100644 index 0000000..bfb6cfb --- /dev/null +++ b/revengai/revengai/models/task_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 TaskStatus(str, Enum): + """ + TaskStatus + """ + + """ + allowed enum values + """ + UNINITIALISED = 'UNINITIALISED' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + COMPLETED = 'COMPLETED' + FAILED = 'FAILED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TaskStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/threat_score_function_body.py b/revengai/revengai/models/threat_score_function_body.py new file mode 100644 index 0000000..7f35b26 --- /dev/null +++ b/revengai/revengai/models/threat_score_function_body.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ThreatScoreFunctionBody(BaseModel): + """ + ThreatScoreFunctionBody + """ # noqa: E501 + function_ids: Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function IDs to calculate threat score for") + __properties: ClassVar[List[str]] = ["function_ids"] + + 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 ThreatScoreFunctionBody 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 ThreatScoreFunctionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_ids": obj.get("function_ids") + }) + return _obj + + diff --git a/revengai/revengai/models/timestamp_model.py b/revengai/revengai/models/timestamp_model.py new file mode 100644 index 0000000..005b06d --- /dev/null +++ b/revengai/revengai/models/timestamp_model.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TimestampModel(BaseModel): + """ + TimestampModel + """ # noqa: E501 + pe_timestamp: StrictInt + export_timestamp: StrictInt + debug_timestamp: StrictInt + __properties: ClassVar[List[str]] = ["pe_timestamp", "export_timestamp", "debug_timestamp"] + + 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 TimestampModel 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 TimestampModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pe_timestamp": obj.get("pe_timestamp"), + "export_timestamp": obj.get("export_timestamp"), + "debug_timestamp": obj.get("debug_timestamp") + }) + return _obj + + diff --git a/revengai/revengai/models/ttps.py b/revengai/revengai/models/ttps.py new file mode 100644 index 0000000..5722e1f --- /dev/null +++ b/revengai/revengai/models/ttps.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.ttps_data import TTPSData +from typing import Optional, Set +from typing_extensions import Self + +class TTPS(BaseModel): + """ + TTPS + """ # noqa: E501 + success: StrictBool + data: TTPSData + __properties: ClassVar[List[str]] = ["success", "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 TTPS 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TTPS from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "data": TTPSData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/ttps_attack.py b/revengai/revengai/models/ttps_attack.py new file mode 100644 index 0000000..e62becb --- /dev/null +++ b/revengai/revengai/models/ttps_attack.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class TTPSAttack(BaseModel): + """ + TTPSAttack + """ # noqa: E501 + id: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "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 TTPSAttack 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 TTPSAttack from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/revengai/revengai/models/ttps_data.py b/revengai/revengai/models/ttps_data.py new file mode 100644 index 0000000..f8d3452 --- /dev/null +++ b/revengai/revengai/models/ttps_data.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.ttps_element import TTPSElement +from typing import Optional, Set +from typing_extensions import Self + +class TTPSData(BaseModel): + """ + TTPSData + """ # noqa: E501 + score: StrictInt + ttps: List[TTPSElement] + __properties: ClassVar[List[str]] = ["score", "ttps"] + + 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 TTPSData 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 ttps (list) + _items = [] + if self.ttps: + for _item_ttps in self.ttps: + if _item_ttps: + _items.append(_item_ttps.to_dict()) + _dict['ttps'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TTPSData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "ttps": [TTPSElement.from_dict(_item) for _item in obj["ttps"]] if obj.get("ttps") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/ttps_element.py b/revengai/revengai/models/ttps_element.py new file mode 100644 index 0000000..897213a --- /dev/null +++ b/revengai/revengai/models/ttps_element.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.ttps_attack import TTPSAttack +from revengai.models.ttps_occurance import TTPSOccurance +from typing import Optional, Set +from typing_extensions import Self + +class TTPSElement(BaseModel): + """ + TTPSElement + """ # noqa: E501 + name: StrictStr + attack: List[TTPSAttack] + occurrences: List[TTPSOccurance] + score: StrictInt + __properties: ClassVar[List[str]] = ["name", "attack", "occurrences", "score"] + + 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 TTPSElement 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 attack (list) + _items = [] + if self.attack: + for _item_attack in self.attack: + if _item_attack: + _items.append(_item_attack.to_dict()) + _dict['attack'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in occurrences (list) + _items = [] + if self.occurrences: + for _item_occurrences in self.occurrences: + if _item_occurrences: + _items.append(_item_occurrences.to_dict()) + _dict['occurrences'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TTPSElement 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"), + "attack": [TTPSAttack.from_dict(_item) for _item in obj["attack"]] if obj.get("attack") is not None else None, + "occurrences": [TTPSOccurance.from_dict(_item) for _item in obj["occurrences"]] if obj.get("occurrences") is not None else None, + "score": obj.get("score") + }) + return _obj + + diff --git a/revengai/revengai/models/ttps_occurance.py b/revengai/revengai/models/ttps_occurance.py new file mode 100644 index 0000000..a52ed4b --- /dev/null +++ b/revengai/revengai/models/ttps_occurance.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TTPSOccurance(BaseModel): + """ + TTPSOccurance + """ # noqa: E501 + ppid: StrictInt + pid: StrictInt + __properties: ClassVar[List[str]] = ["ppid", "pid"] + + 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 TTPSOccurance 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 TTPSOccurance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ppid": obj.get("ppid"), + "pid": obj.get("pid") + }) + return _obj + + diff --git a/revengai/revengai/models/type_definition.py b/revengai/revengai/models/type_definition.py new file mode 100644 index 0000000..2efc5d2 --- /dev/null +++ b/revengai/revengai/models/type_definition.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 TypeDefinition(BaseModel): + """ + TypeDefinition + """ # noqa: E501 + last_change: Optional[StrictStr] = None + name: StrictStr = Field(description="Name of the type definition") + type: StrictStr = Field(description="Underlying type of the type definition") + artifact_type: Optional[StrictStr] = Field(default=None, description="Type of artifact the type definition is associated with") + __properties: ClassVar[List[str]] = ["last_change", "name", "type", "artifact_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 TypeDefinition 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 last_change (nullable) is None + # and model_fields_set contains the field + if self.last_change is None and "last_change" in self.model_fields_set: + _dict['last_change'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TypeDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "last_change": obj.get("last_change"), + "name": obj.get("name"), + "type": obj.get("type"), + "artifact_type": obj.get("artifact_type") + }) + return _obj + + diff --git a/revengai/revengai/models/unstrip_request.py b/revengai/revengai/models/unstrip_request.py new file mode 100644 index 0000000..f64034d --- /dev/null +++ b/revengai/revengai/models/unstrip_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UnstripRequest(BaseModel): + """ + UnstripRequest + """ # noqa: E501 + min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9") + limit: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return, default is 1, maximum is 10") + apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False") + __properties: ClassVar[List[str]] = ["min_similarity", "limit", "apply"] + + 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 UnstripRequest 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 UnstripRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9, + "limit": obj.get("limit") if obj.get("limit") is not None else 1, + "apply": obj.get("apply") if obj.get("apply") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/update_function_data_types.py b/revengai/revengai/models/update_function_data_types.py new file mode 100644 index 0000000..0ccdf6c --- /dev/null +++ b/revengai/revengai/models/update_function_data_types.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.function_info_input import FunctionInfoInput +from typing import Optional, Set +from typing_extensions import Self + +class UpdateFunctionDataTypes(BaseModel): + """ + UpdateFunctionDataTypes + """ # noqa: E501 + data_types_version: StrictInt = Field(description="Version of the function data types, used to check this update is not overwriting a newer one") + data_types: FunctionInfoInput = Field(description="Function data types information to update") + __properties: ClassVar[List[str]] = ["data_types_version", "data_types"] + + 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 UpdateFunctionDataTypes 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_types + if self.data_types: + _dict['data_types'] = self.data_types.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateFunctionDataTypes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_types_version": obj.get("data_types_version"), + "data_types": FunctionInfoInput.from_dict(obj["data_types"]) if obj.get("data_types") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/upload_file_type.py b/revengai/revengai/models/upload_file_type.py new file mode 100644 index 0000000..8408cc2 --- /dev/null +++ b/revengai/revengai/models/upload_file_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 UploadFileType(str, Enum): + """ + UploadFileType + """ + + """ + allowed enum values + """ + BINARY = 'BINARY' + DEBUG = 'DEBUG' + PACKED = 'PACKED' + FIRMWARE = 'FIRMWARE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UploadFileType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/upload_response.py b/revengai/revengai/models/upload_response.py new file mode 100644 index 0000000..02f5f95 --- /dev/null +++ b/revengai/revengai/models/upload_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.upload_file_type import UploadFileType +from typing import Optional, Set +from typing_extensions import Self + +class UploadResponse(BaseModel): + """ + UploadResponse + """ # noqa: E501 + sha_256_hash: StrictStr + file_type: UploadFileType + filename: StrictStr + __properties: ClassVar[List[str]] = ["sha_256_hash", "file_type", "filename"] + + 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 UploadResponse 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 UploadResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sha_256_hash": obj.get("sha_256_hash"), + "file_type": obj.get("file_type"), + "filename": obj.get("filename") + }) + return _obj + + diff --git a/revengai/revengai/models/upsert_ai_decomplation_rating_request.py b/revengai/revengai/models/upsert_ai_decomplation_rating_request.py new file mode 100644 index 0000000..148ab32 --- /dev/null +++ b/revengai/revengai/models/upsert_ai_decomplation_rating_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 revengai.models.ai_decompilation_rating import AiDecompilationRating +from typing import Optional, Set +from typing_extensions import Self + +class UpsertAiDecomplationRatingRequest(BaseModel): + """ + UpsertAiDecomplationRatingRequest + """ # noqa: E501 + rating: AiDecompilationRating = Field(description="The rating for the AI decompilation response") + __properties: ClassVar[List[str]] = ["rating"] + + 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 UpsertAiDecomplationRatingRequest 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 UpsertAiDecomplationRatingRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rating": obj.get("rating") + }) + return _obj + + diff --git a/revengai/revengai/models/user_activity_response.py b/revengai/revengai/models/user_activity_response.py new file mode 100644 index 0000000..56a1a7d --- /dev/null +++ b/revengai/revengai/models/user_activity_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserActivityResponse(BaseModel): + """ + UserActivityResponse + """ # noqa: E501 + actions: StrictStr + activity_scope: StrictStr + creation: datetime + message: StrictStr + sources: StrictStr + username: StrictStr + __properties: ClassVar[List[str]] = ["actions", "activity_scope", "creation", "message", "sources", "username"] + + 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 UserActivityResponse 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 UserActivityResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actions": obj.get("actions"), + "activity_scope": obj.get("activity_scope"), + "creation": obj.get("creation"), + "message": obj.get("message"), + "sources": obj.get("sources"), + "username": obj.get("username") + }) + return _obj + + diff --git a/revengai/revengai/models/vulnerabilities.py b/revengai/revengai/models/vulnerabilities.py new file mode 100644 index 0000000..ff53851 --- /dev/null +++ b/revengai/revengai/models/vulnerabilities.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 +from revengai.models.vulnerability import Vulnerability +from typing import Optional, Set +from typing_extensions import Self + +class Vulnerabilities(BaseModel): + """ + Vulnerabilities + """ # noqa: E501 + vulnerabilities: List[Vulnerability] + __properties: ClassVar[List[str]] = ["vulnerabilities"] + + 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 Vulnerabilities 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 vulnerabilities (list) + _items = [] + if self.vulnerabilities: + for _item_vulnerabilities in self.vulnerabilities: + if _item_vulnerabilities: + _items.append(_item_vulnerabilities.to_dict()) + _dict['vulnerabilities'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Vulnerabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vulnerabilities": [Vulnerability.from_dict(_item) for _item in obj["vulnerabilities"]] if obj.get("vulnerabilities") is not None else None + }) + return _obj + + diff --git a/revengai/revengai/models/vulnerability.py b/revengai/revengai/models/vulnerability.py new file mode 100644 index 0000000..3969fe3 --- /dev/null +++ b/revengai/revengai/models/vulnerability.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Vulnerability(BaseModel): + """ + Vulnerability + """ # noqa: E501 + vendor: StrictStr + product: StrictStr + version: StrictStr + cve_number: StrictStr + severity: StrictStr + source: StrictStr + cvss_version: StrictStr + cvss_vector: StrictStr + remarks: StrictStr + score: Union[StrictFloat, StrictInt] + is_unknown: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["vendor", "product", "version", "cve_number", "severity", "source", "cvss_version", "cvss_vector", "remarks", "score", "is_unknown"] + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'UNKNOWN']): + raise ValueError("must be one of enum values ('CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'UNKNOWN')") + 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 Vulnerability 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 Vulnerability from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vendor": obj.get("vendor"), + "product": obj.get("product"), + "version": obj.get("version"), + "cve_number": obj.get("cve_number"), + "severity": obj.get("severity"), + "source": obj.get("source"), + "cvss_version": obj.get("cvss_version"), + "cvss_vector": obj.get("cvss_vector"), + "remarks": obj.get("remarks"), + "score": obj.get("score"), + "is_unknown": obj.get("is_unknown") if obj.get("is_unknown") is not None else False + }) + return _obj + + diff --git a/revengai/revengai/models/vulnerability_type.py b/revengai/revengai/models/vulnerability_type.py new file mode 100644 index 0000000..0222851 --- /dev/null +++ b/revengai/revengai/models/vulnerability_type.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 VulnerabilityType(str, Enum): + """ + VulnerabilityType + """ + + """ + allowed enum values + """ + UNSAFE_FUNCTIONS = 'UNSAFE_FUNCTIONS' + MEMORY_CORRUPTION = 'MEMORY_CORRUPTION' + INJECTION_ATTACK = 'INJECTION_ATTACK' + MISCONFIGURATION = 'MISCONFIGURATION' + DEBUG = 'DEBUG' + HARDCODED_SECRET = 'HARDCODED_SECRET' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VulnerabilityType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/models/workspace.py b/revengai/revengai/models/workspace.py new file mode 100644 index 0000000..f7d0c50 --- /dev/null +++ b/revengai/revengai/models/workspace.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + 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 Workspace(str, Enum): + """ + Workspace + """ + + """ + allowed enum values + """ + PERSONAL = 'personal' + TEAM = 'team' + PUBLIC = 'public' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Workspace from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/revengai/py.typed b/revengai/revengai/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/revengai/revengai/rest.py b/revengai/revengai/rest.py new file mode 100644 index 0000000..831e07a --- /dev/null +++ b/revengai/revengai/rest.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from revengai.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/test/test/__init__.py b/test/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test/test_addr.py b/test/test/test_addr.py new file mode 100644 index 0000000..3618751 --- /dev/null +++ b/test/test/test_addr.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.addr import Addr + +class TestAddr(unittest.TestCase): + """Addr unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Addr: + """Test Addr + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Addr` + """ + model = Addr() + if include_optional: + return Addr( + ) + else: + return Addr( + ) + """ + + def testAddr(self): + """Test Addr""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ai_decompilation_rating.py b/test/test/test_ai_decompilation_rating.py new file mode 100644 index 0000000..a347d26 --- /dev/null +++ b/test/test/test_ai_decompilation_rating.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ai_decompilation_rating import AiDecompilationRating + +class TestAiDecompilationRating(unittest.TestCase): + """AiDecompilationRating unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAiDecompilationRating(self): + """Test AiDecompilationRating""" + # inst = AiDecompilationRating() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ai_unstrip_request.py b/test/test/test_ai_unstrip_request.py new file mode 100644 index 0000000..44c92ab --- /dev/null +++ b/test/test/test_ai_unstrip_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ai_unstrip_request import AiUnstripRequest + +class TestAiUnstripRequest(unittest.TestCase): + """AiUnstripRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AiUnstripRequest: + """Test AiUnstripRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AiUnstripRequest` + """ + model = AiUnstripRequest() + if include_optional: + return AiUnstripRequest( + apply = True + ) + else: + return AiUnstripRequest( + ) + """ + + def testAiUnstripRequest(self): + """Test AiUnstripRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analyses_comments_api.py b/test/test/test_analyses_comments_api.py new file mode 100644 index 0000000..93f0d43 --- /dev/null +++ b/test/test/test_analyses_comments_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_comments_api import AnalysesCommentsApi + + +class TestAnalysesCommentsApi(unittest.TestCase): + """AnalysesCommentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesCommentsApi() + + def tearDown(self) -> None: + pass + + def test_create_analysis_comment(self) -> None: + """Test case for create_analysis_comment + + Create a comment for this analysis + """ + pass + + def test_delete_analysis_comment(self) -> None: + """Test case for delete_analysis_comment + + Delete a comment + """ + pass + + def test_get_analysis_comments(self) -> None: + """Test case for get_analysis_comments + + Get comments for this analysis + """ + pass + + def test_update_analysis_comment(self) -> None: + """Test case for update_analysis_comment + + Update a comment + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analyses_core_api.py b/test/test/test_analyses_core_api.py new file mode 100644 index 0000000..d8df056 --- /dev/null +++ b/test/test/test_analyses_core_api.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_core_api import AnalysesCoreApi + + +class TestAnalysesCoreApi(unittest.TestCase): + """AnalysesCoreApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesCoreApi() + + def tearDown(self) -> None: + pass + + def test_create_analysis(self) -> None: + """Test case for create_analysis + + Create Analysis + """ + pass + + def test_delete_analysis(self) -> None: + """Test case for delete_analysis + + Delete Analysis + """ + pass + + def test_find_similar_functions_batch(self) -> None: + """Test case for find_similar_functions_batch + + Batch Symbol ANN using Analysis ID + """ + pass + + def test_get_analysis_basic_info(self) -> None: + """Test case for get_analysis_basic_info + + Gets basic analysis information + """ + pass + + def test_get_analysis_logs(self) -> None: + """Test case for get_analysis_logs + + Gets the logs of an analysis + """ + pass + + def test_get_analysis_params(self) -> None: + """Test case for get_analysis_params + + Gets analysis param information + """ + pass + + def test_get_analysis_status(self) -> None: + """Test case for get_analysis_status + + Gets the status of an analysis + """ + pass + + def test_get_binary_ann(self) -> None: + """Test case for get_binary_ann + + Binary Ann + """ + pass + + def test_get_symbol_info_for_binary(self) -> None: + """Test case for get_symbol_info_for_binary + + Gets the symbol information of a binary + """ + pass + + def test_list_analyses(self) -> None: + """Test case for list_analyses + + Gets the most recent analyses + """ + pass + + def test_lookup_binary_id(self) -> None: + """Test case for lookup_binary_id + + Gets the analysis ID from binary ID + """ + pass + + def test_requeue_analysis(self) -> None: + """Test case for requeue_analysis + + Requeue Analysis + """ + pass + + def test_update_analysis(self) -> None: + """Test case for update_analysis + + Update Analysis + """ + pass + + def test_update_analysis_tags(self) -> None: + """Test case for update_analysis_tags + + Update Analysis Tags + """ + pass + + def test_upload_file(self) -> None: + """Test case for upload_file + + Upload File + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analyses_dynamic_execution_api.py b/test/test/test_analyses_dynamic_execution_api.py new file mode 100644 index 0000000..0fca2ae --- /dev/null +++ b/test/test/test_analyses_dynamic_execution_api.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi + + +class TestAnalysesDynamicExecutionApi(unittest.TestCase): + """AnalysesDynamicExecutionApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesDynamicExecutionApi() + + def tearDown(self) -> None: + pass + + def test_get_dynamic_execution_status(self) -> None: + """Test case for get_dynamic_execution_status + + Get the status of a dynamic execution task + """ + pass + + def test_get_network_overview(self) -> None: + """Test case for get_network_overview + + Get the dynamic execution results for network overview + """ + pass + + def test_get_process_dump(self) -> None: + """Test case for get_process_dump + + Get the dynamic execution results for a specific process dump + """ + pass + + def test_get_process_dumps(self) -> None: + """Test case for get_process_dumps + + Get the dynamic execution results for process dumps + """ + pass + + def test_get_process_registry(self) -> None: + """Test case for get_process_registry + + Get the dynamic execution results for process registry + """ + pass + + def test_get_process_tree(self) -> None: + """Test case for get_process_tree + + Get the dynamic execution results for process tree + """ + pass + + def test_get_ttps(self) -> None: + """Test case for get_ttps + + Get the dynamic execution results for ttps + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analyses_results_metadata_api.py b/test/test/test_analyses_results_metadata_api.py new file mode 100644 index 0000000..f4eed2e --- /dev/null +++ b/test/test/test_analyses_results_metadata_api.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi + + +class TestAnalysesResultsMetadataApi(unittest.TestCase): + """AnalysesResultsMetadataApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesResultsMetadataApi() + + def tearDown(self) -> None: + pass + + def test_get_capabilities(self) -> None: + """Test case for get_capabilities + + Gets the capabilities from the analysis + """ + pass + + def test_get_communities(self) -> None: + """Test case for get_communities + + Gets the communities found in the analysis + """ + pass + + def test_get_functions_list(self) -> None: + """Test case for get_functions_list + + Gets functions from analysis + """ + pass + + def test_get_pdf(self) -> None: + """Test case for get_pdf + + Gets the PDF found in the analysis + """ + pass + + def test_get_sbom(self) -> None: + """Test case for get_sbom + + Gets the software-bill-of-materials (SBOM) found in the analysis + """ + pass + + def test_get_tags(self) -> None: + """Test case for get_tags + + Get function tags with maliciousness score + """ + pass + + def test_get_threat_score(self) -> None: + """Test case for get_threat_score + + Gets the threat score found in the analysis + """ + pass + + def test_get_vulnerabilities(self) -> None: + """Test case for get_vulnerabilities + + Gets the vulnerabilities found in the analysis + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analyses_security_checks_api.py b/test/test/test_analyses_security_checks_api.py new file mode 100644 index 0000000..4916713 --- /dev/null +++ b/test/test/test_analyses_security_checks_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi + + +class TestAnalysesSecurityChecksApi(unittest.TestCase): + """AnalysesSecurityChecksApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesSecurityChecksApi() + + def tearDown(self) -> None: + pass + + def test_create_scurity_checks_task(self) -> None: + """Test case for create_scurity_checks_task + + Queues a security check process + """ + pass + + def test_get_security_checks(self) -> None: + """Test case for get_security_checks + + Get Security Checks + """ + pass + + def test_get_security_checks_task_status(self) -> None: + """Test case for get_security_checks_task_status + + Check the status of a security check process + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_access_info.py b/test/test/test_analysis_access_info.py new file mode 100644 index 0000000..f0dde34 --- /dev/null +++ b/test/test/test_analysis_access_info.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_access_info import AnalysisAccessInfo + +class TestAnalysisAccessInfo(unittest.TestCase): + """AnalysisAccessInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisAccessInfo: + """Test AnalysisAccessInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisAccessInfo` + """ + model = AnalysisAccessInfo() + if include_optional: + return AnalysisAccessInfo( + owner = True, + username = '' + ) + else: + return AnalysisAccessInfo( + owner = True, + username = '', + ) + """ + + def testAnalysisAccessInfo(self): + """Test AnalysisAccessInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_config.py b/test/test/test_analysis_config.py new file mode 100644 index 0000000..9b90547 --- /dev/null +++ b/test/test/test_analysis_config.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_config import AnalysisConfig + +class TestAnalysisConfig(unittest.TestCase): + """AnalysisConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisConfig: + """Test AnalysisConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisConfig` + """ + model = AnalysisConfig() + if include_optional: + return AnalysisConfig( + scrape_third_party_config = revengai.models.scrape_third_party_config.ScrapeThirdPartyConfig( + enabled = True, ), + generate_cves = True, + generate_sbom = True, + generate_capabilities = True, + no_cache = True, + advanced_analysis = True, + sandbox_config = revengai.models.sandbox_options.SandboxOptions( + enabled = True, + command_line_args = '', ) + ) + else: + return AnalysisConfig( + ) + """ + + def testAnalysisConfig(self): + """Test AnalysisConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_create_request.py b/test/test/test_analysis_create_request.py new file mode 100644 index 0000000..ad9e15d --- /dev/null +++ b/test/test/test_analysis_create_request.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_create_request import AnalysisCreateRequest + +class TestAnalysisCreateRequest(unittest.TestCase): + """AnalysisCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisCreateRequest: + """Test AnalysisCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisCreateRequest` + """ + model = AnalysisCreateRequest() + if include_optional: + return AnalysisCreateRequest( + filename = '', + sha_256_hash = '', + tags = [ + revengai.models.tag.Tag( + name = '', ) + ], + analysis_scope = 'PRIVATE', + symbols = revengai.models.symbols.Symbols( + base_address = 56, + function_boundaries = [ + revengai.models.function_boundary.FunctionBoundary( + name = '', + start_address = 56, + end_address = 56, ) + ], ), + debug_hash = '', + analysis_config = revengai.models.analysis_config.AnalysisConfig( + scrape_third_party_config = revengai.models.scrape_third_party_config.ScrapeThirdPartyConfig( + enabled = True, ), + generate_cves = True, + generate_sbom = True, + generate_capabilities = True, + no_cache = True, + advanced_analysis = True, + sandbox_config = revengai.models.sandbox_options.SandboxOptions( + enabled = True, + command_line_args = '', ), ), + binary_config = revengai.models.binary_config.BinaryConfig( + isa = 'x86', + platform = 'linux', + file_format = 'pe', ) + ) + else: + return AnalysisCreateRequest( + filename = '', + sha_256_hash = '', + ) + """ + + def testAnalysisCreateRequest(self): + """Test AnalysisCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_create_response.py b/test/test/test_analysis_create_response.py new file mode 100644 index 0000000..b8f133a --- /dev/null +++ b/test/test/test_analysis_create_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_create_response import AnalysisCreateResponse + +class TestAnalysisCreateResponse(unittest.TestCase): + """AnalysisCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisCreateResponse: + """Test AnalysisCreateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisCreateResponse` + """ + model = AnalysisCreateResponse() + if include_optional: + return AnalysisCreateResponse( + analysis_id = 56, + binary_id = 56 + ) + else: + return AnalysisCreateResponse( + analysis_id = 56, + binary_id = 56, + ) + """ + + def testAnalysisCreateResponse(self): + """Test AnalysisCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_detail_response.py b/test/test/test_analysis_detail_response.py new file mode 100644 index 0000000..9caea02 --- /dev/null +++ b/test/test/test_analysis_detail_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_detail_response import AnalysisDetailResponse + +class TestAnalysisDetailResponse(unittest.TestCase): + """AnalysisDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisDetailResponse: + """Test AnalysisDetailResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisDetailResponse` + """ + model = AnalysisDetailResponse() + if include_optional: + return AnalysisDetailResponse( + access = revengai.models.analysis_access_info.AnalysisAccessInfo( + owner = True, + username = '', ), + analysis_id = 56, + analysis_scope = '', + architecture = '', + binary_dynamic = True, + binary_format = '', + binary_name = '', + binary_size = 56, + binary_type = '', + creation = '', + debug = True, + model_name = '', + sbom = { + 'key' : null + }, + sha_256_hash = '' + ) + else: + return AnalysisDetailResponse( + access = revengai.models.analysis_access_info.AnalysisAccessInfo( + owner = True, + username = '', ), + analysis_id = 56, + analysis_scope = '', + architecture = '', + binary_dynamic = True, + binary_format = '', + binary_name = '', + binary_size = 56, + binary_type = '', + creation = '', + debug = True, + model_name = '', + sha_256_hash = '', + ) + """ + + def testAnalysisDetailResponse(self): + """Test AnalysisDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_functions.py b/test/test/test_analysis_functions.py new file mode 100644 index 0000000..6b54a66 --- /dev/null +++ b/test/test/test_analysis_functions.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_functions import AnalysisFunctions + +class TestAnalysisFunctions(unittest.TestCase): + """AnalysisFunctions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisFunctions: + """Test AnalysisFunctions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisFunctions` + """ + model = AnalysisFunctions() + if include_optional: + return AnalysisFunctions( + functions = [ + revengai.models.function.Function( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + debug = True, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], ) + ] + ) + else: + return AnalysisFunctions( + functions = [ + revengai.models.function.Function( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + debug = True, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], ) + ], + ) + """ + + def testAnalysisFunctions(self): + """Test AnalysisFunctions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_record.py b/test/test/test_analysis_record.py new file mode 100644 index 0000000..5f17ad8 --- /dev/null +++ b/test/test/test_analysis_record.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_record import AnalysisRecord + +class TestAnalysisRecord(unittest.TestCase): + """AnalysisRecord unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisRecord: + """Test AnalysisRecord + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisRecord` + """ + model = AnalysisRecord() + if include_optional: + return AnalysisRecord( + analysis_id = 56, + analysis_scope = '', + binary_id = 56, + model_id = 56, + status = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_owner = True, + binary_name = '', + sha_256_hash = '', + binary_size = 56, + username = '', + dynamic_execution_status = 'PENDING', + dynamic_execution_task_id = 56 + ) + else: + return AnalysisRecord( + analysis_id = 56, + analysis_scope = '', + binary_id = 56, + model_id = 56, + status = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_owner = True, + binary_name = '', + sha_256_hash = '', + binary_size = 56, + username = '', + ) + """ + + def testAnalysisRecord(self): + """Test AnalysisRecord""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_scope.py b/test/test/test_analysis_scope.py new file mode 100644 index 0000000..e5f465a --- /dev/null +++ b/test/test/test_analysis_scope.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_scope import AnalysisScope + +class TestAnalysisScope(unittest.TestCase): + """AnalysisScope unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnalysisScope(self): + """Test AnalysisScope""" + # inst = AnalysisScope() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_strings_response.py b/test/test/test_analysis_strings_response.py new file mode 100644 index 0000000..c602630 --- /dev/null +++ b/test/test/test_analysis_strings_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_strings_response import AnalysisStringsResponse + +class TestAnalysisStringsResponse(unittest.TestCase): + """AnalysisStringsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisStringsResponse: + """Test AnalysisStringsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisStringsResponse` + """ + model = AnalysisStringsResponse() + if include_optional: + return AnalysisStringsResponse( + strings = [ + revengai.models.string_functions.StringFunctions( + value = '', + functions = [ + revengai.models.function.Function( + function_id = 56, + function_vaddr = 56, ) + ], ) + ], + total_strings = 56 + ) + else: + return AnalysisStringsResponse( + strings = [ + revengai.models.string_functions.StringFunctions( + value = '', + functions = [ + revengai.models.function.Function( + function_id = 56, + function_vaddr = 56, ) + ], ) + ], + total_strings = 56, + ) + """ + + def testAnalysisStringsResponse(self): + """Test AnalysisStringsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_tags.py b/test/test/test_analysis_tags.py new file mode 100644 index 0000000..dc17442 --- /dev/null +++ b/test/test/test_analysis_tags.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_tags import AnalysisTags + +class TestAnalysisTags(unittest.TestCase): + """AnalysisTags unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisTags: + """Test AnalysisTags + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisTags` + """ + model = AnalysisTags() + if include_optional: + return AnalysisTags( + analysis_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ], + suggested_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ] + ) + else: + return AnalysisTags( + analysis_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ], + suggested_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ], + ) + """ + + def testAnalysisTags(self): + """Test AnalysisTags""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_threat_score_data.py b/test/test/test_analysis_threat_score_data.py new file mode 100644 index 0000000..04e6bff --- /dev/null +++ b/test/test/test_analysis_threat_score_data.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData + +class TestAnalysisThreatScoreData(unittest.TestCase): + """AnalysisThreatScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisThreatScoreData: + """Test AnalysisThreatScoreData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisThreatScoreData` + """ + model = AnalysisThreatScoreData() + if include_optional: + return AnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56 + ) + else: + return AnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, + ) + """ + + def testAnalysisThreatScoreData(self): + """Test AnalysisThreatScoreData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_update_request.py b/test/test/test_analysis_update_request.py new file mode 100644 index 0000000..82800e8 --- /dev/null +++ b/test/test/test_analysis_update_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_update_request import AnalysisUpdateRequest + +class TestAnalysisUpdateRequest(unittest.TestCase): + """AnalysisUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisUpdateRequest: + """Test AnalysisUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisUpdateRequest` + """ + model = AnalysisUpdateRequest() + if include_optional: + return AnalysisUpdateRequest( + binary_name = '', + analysis_scope = 'PUBLIC' + ) + else: + return AnalysisUpdateRequest( + ) + """ + + def testAnalysisUpdateRequest(self): + """Test AnalysisUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_update_tags_request.py b/test/test/test_analysis_update_tags_request.py new file mode 100644 index 0000000..3483e2f --- /dev/null +++ b/test/test/test_analysis_update_tags_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest + +class TestAnalysisUpdateTagsRequest(unittest.TestCase): + """AnalysisUpdateTagsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisUpdateTagsRequest: + """Test AnalysisUpdateTagsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisUpdateTagsRequest` + """ + model = AnalysisUpdateTagsRequest() + if include_optional: + return AnalysisUpdateTagsRequest( + tags = [ + '' + ] + ) + else: + return AnalysisUpdateTagsRequest( + tags = [ + '' + ], + ) + """ + + def testAnalysisUpdateTagsRequest(self): + """Test AnalysisUpdateTagsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_analysis_update_tags_response.py b/test/test/test_analysis_update_tags_response.py new file mode 100644 index 0000000..ac0de1d --- /dev/null +++ b/test/test/test_analysis_update_tags_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse + +class TestAnalysisUpdateTagsResponse(unittest.TestCase): + """AnalysisUpdateTagsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisUpdateTagsResponse: + """Test AnalysisUpdateTagsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisUpdateTagsResponse` + """ + model = AnalysisUpdateTagsResponse() + if include_optional: + return AnalysisUpdateTagsResponse( + tags = [ + revengai.models.tag_response.TagResponse( + name = '', + origin = '', ) + ] + ) + else: + return AnalysisUpdateTagsResponse( + tags = [ + revengai.models.tag_response.TagResponse( + name = '', + origin = '', ) + ], + ) + """ + + def testAnalysisUpdateTagsResponse(self): + """Test AnalysisUpdateTagsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ann_function.py b/test/test/test_ann_function.py new file mode 100644 index 0000000..faf68e7 --- /dev/null +++ b/test/test/test_ann_function.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ann_function import ANNFunction + +class TestANNFunction(unittest.TestCase): + """ANNFunction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ANNFunction: + """Test ANNFunction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ANNFunction` + """ + model = ANNFunction() + if include_optional: + return ANNFunction( + limit = 56, + distance = 1.337, + analysis_search_ids = [ + 56 + ], + collection_search_ids = [ + 56 + ], + search_binary_ids = None, + search_function_ids = None, + debug_only = True + ) + else: + return ANNFunction( + ) + """ + + def testANNFunction(self): + """Test ANNFunction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_analyses_enums_dynamic_execution_status.py b/test/test/test_app_api_rest_v2_analyses_enums_dynamic_execution_status.py new file mode 100644 index 0000000..82ea7b7 --- /dev/null +++ b/test/test/test_app_api_rest_v2_analyses_enums_dynamic_execution_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus + +class TestAppApiRestV2AnalysesEnumsDynamicExecutionStatus(unittest.TestCase): + """AppApiRestV2AnalysesEnumsDynamicExecutionStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAppApiRestV2AnalysesEnumsDynamicExecutionStatus(self): + """Test AppApiRestV2AnalysesEnumsDynamicExecutionStatus""" + # inst = AppApiRestV2AnalysesEnumsDynamicExecutionStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_analyses_enums_order_by.py b/test/test/test_app_api_rest_v2_analyses_enums_order_by.py new file mode 100644 index 0000000..a86cc21 --- /dev/null +++ b/test/test/test_app_api_rest_v2_analyses_enums_order_by.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy + +class TestAppApiRestV2AnalysesEnumsOrderBy(unittest.TestCase): + """AppApiRestV2AnalysesEnumsOrderBy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAppApiRestV2AnalysesEnumsOrderBy(self): + """Test AppApiRestV2AnalysesEnumsOrderBy""" + # inst = AppApiRestV2AnalysesEnumsOrderBy() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_analyses_responses_tag_item.py b/test/test/test_app_api_rest_v2_analyses_responses_tag_item.py new file mode 100644 index 0000000..3a83cc5 --- /dev/null +++ b/test/test/test_app_api_rest_v2_analyses_responses_tag_item.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem + +class TestAppApiRestV2AnalysesResponsesTagItem(unittest.TestCase): + """AppApiRestV2AnalysesResponsesTagItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppApiRestV2AnalysesResponsesTagItem: + """Test AppApiRestV2AnalysesResponsesTagItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppApiRestV2AnalysesResponsesTagItem` + """ + model = AppApiRestV2AnalysesResponsesTagItem() + if include_optional: + return AppApiRestV2AnalysesResponsesTagItem( + name = '', + origin = '', + collection_id = 56 + ) + else: + return AppApiRestV2AnalysesResponsesTagItem( + name = '', + origin = '', + ) + """ + + def testAppApiRestV2AnalysesResponsesTagItem(self): + """Test AppApiRestV2AnalysesResponsesTagItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_collections_enums_order_by.py b/test/test/test_app_api_rest_v2_collections_enums_order_by.py new file mode 100644 index 0000000..575841c --- /dev/null +++ b/test/test/test_app_api_rest_v2_collections_enums_order_by.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy + +class TestAppApiRestV2CollectionsEnumsOrderBy(unittest.TestCase): + """AppApiRestV2CollectionsEnumsOrderBy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAppApiRestV2CollectionsEnumsOrderBy(self): + """Test AppApiRestV2CollectionsEnumsOrderBy""" + # inst = AppApiRestV2CollectionsEnumsOrderBy() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_functions_responses_function.py b/test/test/test_app_api_rest_v2_functions_responses_function.py new file mode 100644 index 0000000..d8835a3 --- /dev/null +++ b/test/test/test_app_api_rest_v2_functions_responses_function.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction + +class TestAppApiRestV2FunctionsResponsesFunction(unittest.TestCase): + """AppApiRestV2FunctionsResponsesFunction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppApiRestV2FunctionsResponsesFunction: + """Test AppApiRestV2FunctionsResponsesFunction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppApiRestV2FunctionsResponsesFunction` + """ + model = AppApiRestV2FunctionsResponsesFunction() + if include_optional: + return AppApiRestV2FunctionsResponsesFunction( + function_id = 56, + function_vaddr = 56 + ) + else: + return AppApiRestV2FunctionsResponsesFunction( + function_id = 56, + function_vaddr = 56, + ) + """ + + def testAppApiRestV2FunctionsResponsesFunction(self): + """Test AppApiRestV2FunctionsResponsesFunction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_api_rest_v2_functions_types_function.py b/test/test/test_app_api_rest_v2_functions_types_function.py new file mode 100644 index 0000000..5311215 --- /dev/null +++ b/test/test/test_app_api_rest_v2_functions_types_function.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction + +class TestAppApiRestV2FunctionsTypesFunction(unittest.TestCase): + """AppApiRestV2FunctionsTypesFunction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppApiRestV2FunctionsTypesFunction: + """Test AppApiRestV2FunctionsTypesFunction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppApiRestV2FunctionsTypesFunction` + """ + model = AppApiRestV2FunctionsTypesFunction() + if include_optional: + return AppApiRestV2FunctionsTypesFunction( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + debug = True, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ] + ) + else: + return AppApiRestV2FunctionsTypesFunction( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + debug = True, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + ) + """ + + def testAppApiRestV2FunctionsTypesFunction(self): + """Test AppApiRestV2FunctionsTypesFunction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_services_binary_ann_schema_tag_item.py b/test/test/test_app_services_binary_ann_schema_tag_item.py new file mode 100644 index 0000000..1229af5 --- /dev/null +++ b/test/test/test_app_services_binary_ann_schema_tag_item.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem + +class TestAppServicesBinaryAnnSchemaTagItem(unittest.TestCase): + """AppServicesBinaryAnnSchemaTagItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppServicesBinaryAnnSchemaTagItem: + """Test AppServicesBinaryAnnSchemaTagItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppServicesBinaryAnnSchemaTagItem` + """ + model = AppServicesBinaryAnnSchemaTagItem() + if include_optional: + return AppServicesBinaryAnnSchemaTagItem( + tag = '', + origin = '' + ) + else: + return AppServicesBinaryAnnSchemaTagItem( + ) + """ + + def testAppServicesBinaryAnnSchemaTagItem(self): + """Test AppServicesBinaryAnnSchemaTagItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_app_services_dynamic_execution_schemas_dynamic_execution_status.py b/test/test/test_app_services_dynamic_execution_schemas_dynamic_execution_status.py new file mode 100644 index 0000000..30f6b5b --- /dev/null +++ b/test/test/test_app_services_dynamic_execution_schemas_dynamic_execution_status.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus + +class TestAppServicesDynamicExecutionSchemasDynamicExecutionStatus(unittest.TestCase): + """AppServicesDynamicExecutionSchemasDynamicExecutionStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppServicesDynamicExecutionSchemasDynamicExecutionStatus: + """Test AppServicesDynamicExecutionSchemasDynamicExecutionStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppServicesDynamicExecutionSchemasDynamicExecutionStatus` + """ + model = AppServicesDynamicExecutionSchemasDynamicExecutionStatus() + if include_optional: + return AppServicesDynamicExecutionSchemasDynamicExecutionStatus( + status = '' + ) + else: + return AppServicesDynamicExecutionSchemasDynamicExecutionStatus( + status = '', + ) + """ + + def testAppServicesDynamicExecutionSchemasDynamicExecutionStatus(self): + """Test AppServicesDynamicExecutionSchemasDynamicExecutionStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_argument.py b/test/test/test_argument.py new file mode 100644 index 0000000..dec5529 --- /dev/null +++ b/test/test/test_argument.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.argument import Argument + +class TestArgument(unittest.TestCase): + """Argument unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Argument: + """Test Argument + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Argument` + """ + model = Argument() + if include_optional: + return Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56 + ) + else: + return Argument( + offset = 56, + name = '', + type = '', + size = 56, + ) + """ + + def testArgument(self): + """Test Argument""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_authentication_users_api.py b/test/test/test_authentication_users_api.py new file mode 100644 index 0000000..978c549 --- /dev/null +++ b/test/test/test_authentication_users_api.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.authentication_users_api import AuthenticationUsersApi + + +class TestAuthenticationUsersApi(unittest.TestCase): + """AuthenticationUsersApi unit test stubs""" + + def setUp(self) -> None: + self.api = AuthenticationUsersApi() + + def tearDown(self) -> None: + pass + + def test_get_requester_user_info(self) -> None: + """Test case for get_requester_user_info + + Get the requesters user information + """ + pass + + def test_get_user(self) -> None: + """Test case for get_user + + Get a user's public information + """ + pass + + def test_get_user_activity(self) -> None: + """Test case for get_user_activity + + Get auth user activity + """ + pass + + def test_get_user_comments(self) -> None: + """Test case for get_user_comments + + Get comments by user + """ + pass + + def test_login_user(self) -> None: + """Test case for login_user + + Authenticate a user + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_auto_unstrip_by_group_response.py b/test/test/test_auto_unstrip_by_group_response.py new file mode 100644 index 0000000..df42b38 --- /dev/null +++ b/test/test/test_auto_unstrip_by_group_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse + +class TestAutoUnstripByGroupResponse(unittest.TestCase): + """AutoUnstripByGroupResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AutoUnstripByGroupResponse: + """Test AutoUnstripByGroupResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AutoUnstripByGroupResponse` + """ + model = AutoUnstripByGroupResponse() + if include_optional: + return AutoUnstripByGroupResponse( + progress = 56, + status = '', + total_time = 56, + matches_map = { + 'key' : [ + revengai.models.matched_function_group.MatchedFunctionGroup( + function_group_name = '', + similarity = 1.337, ) + ] + }, + applied = True + ) + else: + return AutoUnstripByGroupResponse( + ) + """ + + def testAutoUnstripByGroupResponse(self): + """Test AutoUnstripByGroupResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_auto_unstrip_request.py b/test/test/test_auto_unstrip_request.py new file mode 100644 index 0000000..862b607 --- /dev/null +++ b/test/test/test_auto_unstrip_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.auto_unstrip_request import AutoUnstripRequest + +class TestAutoUnstripRequest(unittest.TestCase): + """AutoUnstripRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AutoUnstripRequest: + """Test AutoUnstripRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AutoUnstripRequest` + """ + model = AutoUnstripRequest() + if include_optional: + return AutoUnstripRequest( + min_similarity = 0.0, + apply = True + ) + else: + return AutoUnstripRequest( + ) + """ + + def testAutoUnstripRequest(self): + """Test AutoUnstripRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_auto_unstrip_response.py b/test/test/test_auto_unstrip_response.py new file mode 100644 index 0000000..87fa68a --- /dev/null +++ b/test/test/test_auto_unstrip_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.auto_unstrip_response import AutoUnstripResponse + +class TestAutoUnstripResponse(unittest.TestCase): + """AutoUnstripResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AutoUnstripResponse: + """Test AutoUnstripResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AutoUnstripResponse` + """ + model = AutoUnstripResponse() + if include_optional: + return AutoUnstripResponse( + progress = 56, + status = '', + total_time = 56, + matches = [ + revengai.models.matched_function_suggestion.MatchedFunctionSuggestion( + function_id = 56, + function_vaddr = 56, + suggested_name = '', ) + ], + applied = True + ) + else: + return AutoUnstripResponse( + ) + """ + + def testAutoUnstripResponse(self): + """Test AutoUnstripResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response.py b/test/test/test_base_response.py new file mode 100644 index 0000000..e543c33 --- /dev/null +++ b/test/test/test_base_response.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response import BaseResponse + +class TestBaseResponse(unittest.TestCase): + """BaseResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponse: + """Test BaseResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponse` + """ + model = BaseResponse() + if include_optional: + return BaseResponse( + status = True, + data = None, + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponse( + ) + """ + + def testBaseResponse(self): + """Test BaseResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_create_response.py b/test/test/test_base_response_analysis_create_response.py new file mode 100644 index 0000000..d9302a0 --- /dev/null +++ b/test/test/test_base_response_analysis_create_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse + +class TestBaseResponseAnalysisCreateResponse(unittest.TestCase): + """BaseResponseAnalysisCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisCreateResponse: + """Test BaseResponseAnalysisCreateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisCreateResponse` + """ + model = BaseResponseAnalysisCreateResponse() + if include_optional: + return BaseResponseAnalysisCreateResponse( + status = True, + data = revengai.models.analysis_create_response.AnalysisCreateResponse( + analysis_id = 56, + binary_id = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisCreateResponse( + ) + """ + + def testBaseResponseAnalysisCreateResponse(self): + """Test BaseResponseAnalysisCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_detail_response.py b/test/test/test_base_response_analysis_detail_response.py new file mode 100644 index 0000000..e9b928d --- /dev/null +++ b/test/test/test_base_response_analysis_detail_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse + +class TestBaseResponseAnalysisDetailResponse(unittest.TestCase): + """BaseResponseAnalysisDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisDetailResponse: + """Test BaseResponseAnalysisDetailResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisDetailResponse` + """ + model = BaseResponseAnalysisDetailResponse() + if include_optional: + return BaseResponseAnalysisDetailResponse( + status = True, + data = revengai.models.analysis_detail_response.AnalysisDetailResponse( + access = revengai.models.analysis_access_info.AnalysisAccessInfo( + owner = True, + username = '', ), + analysis_id = 56, + analysis_scope = '', + architecture = '', + binary_dynamic = True, + binary_format = '', + binary_name = '', + binary_size = 56, + binary_type = '', + creation = '', + debug = True, + model_name = '', + sbom = { + 'key' : null + }, + sha_256_hash = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisDetailResponse( + ) + """ + + def testBaseResponseAnalysisDetailResponse(self): + """Test BaseResponseAnalysisDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_functions.py b/test/test/test_base_response_analysis_functions.py new file mode 100644 index 0000000..9e246fe --- /dev/null +++ b/test/test/test_base_response_analysis_functions.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions + +class TestBaseResponseAnalysisFunctions(unittest.TestCase): + """BaseResponseAnalysisFunctions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisFunctions: + """Test BaseResponseAnalysisFunctions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisFunctions` + """ + model = BaseResponseAnalysisFunctions() + if include_optional: + return BaseResponseAnalysisFunctions( + status = True, + data = revengai.models.analysis_functions.AnalysisFunctions( + functions = [ + revengai.models.function.Function( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + debug = True, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisFunctions( + ) + """ + + def testBaseResponseAnalysisFunctions(self): + """Test BaseResponseAnalysisFunctions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_strings_response.py b/test/test/test_base_response_analysis_strings_response.py new file mode 100644 index 0000000..6ff10ab --- /dev/null +++ b/test/test/test_base_response_analysis_strings_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse + +class TestBaseResponseAnalysisStringsResponse(unittest.TestCase): + """BaseResponseAnalysisStringsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisStringsResponse: + """Test BaseResponseAnalysisStringsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisStringsResponse` + """ + model = BaseResponseAnalysisStringsResponse() + if include_optional: + return BaseResponseAnalysisStringsResponse( + status = True, + data = revengai.models.analysis_strings_response.AnalysisStringsResponse( + strings = [ + revengai.models.string_functions.StringFunctions( + value = '', + functions = [ + revengai.models.function.Function( + function_id = 56, + function_vaddr = 56, ) + ], ) + ], + total_strings = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisStringsResponse( + ) + """ + + def testBaseResponseAnalysisStringsResponse(self): + """Test BaseResponseAnalysisStringsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_tags.py b/test/test/test_base_response_analysis_tags.py new file mode 100644 index 0000000..b2be45b --- /dev/null +++ b/test/test/test_base_response_analysis_tags.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags + +class TestBaseResponseAnalysisTags(unittest.TestCase): + """BaseResponseAnalysisTags unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisTags: + """Test BaseResponseAnalysisTags + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisTags` + """ + model = BaseResponseAnalysisTags() + if include_optional: + return BaseResponseAnalysisTags( + status = True, + data = revengai.models.analysis_tags.AnalysisTags( + analysis_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ], + suggested_tags = [ + revengai.models.tag_item.TagItem( + name = '', + origin = '', + collection_id = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisTags( + ) + """ + + def testBaseResponseAnalysisTags(self): + """Test BaseResponseAnalysisTags""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_threat_score_data.py b/test/test/test_base_response_analysis_threat_score_data.py new file mode 100644 index 0000000..1ce8ba6 --- /dev/null +++ b/test/test/test_base_response_analysis_threat_score_data.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData + +class TestBaseResponseAnalysisThreatScoreData(unittest.TestCase): + """BaseResponseAnalysisThreatScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisThreatScoreData: + """Test BaseResponseAnalysisThreatScoreData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisThreatScoreData` + """ + model = BaseResponseAnalysisThreatScoreData() + if include_optional: + return BaseResponseAnalysisThreatScoreData( + status = True, + data = revengai.models.analysis_threat_score_data.AnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisThreatScoreData( + ) + """ + + def testBaseResponseAnalysisThreatScoreData(self): + """Test BaseResponseAnalysisThreatScoreData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_analysis_update_tags_response.py b/test/test/test_base_response_analysis_update_tags_response.py new file mode 100644 index 0000000..1f8b74f --- /dev/null +++ b/test/test/test_base_response_analysis_update_tags_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse + +class TestBaseResponseAnalysisUpdateTagsResponse(unittest.TestCase): + """BaseResponseAnalysisUpdateTagsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisUpdateTagsResponse: + """Test BaseResponseAnalysisUpdateTagsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisUpdateTagsResponse` + """ + model = BaseResponseAnalysisUpdateTagsResponse() + if include_optional: + return BaseResponseAnalysisUpdateTagsResponse( + status = True, + data = revengai.models.analysis_update_tags_response.AnalysisUpdateTagsResponse( + tags = [ + revengai.models.tag_response.TagResponse( + name = '', + origin = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisUpdateTagsResponse( + ) + """ + + def testBaseResponseAnalysisUpdateTagsResponse(self): + """Test BaseResponseAnalysisUpdateTagsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_basic.py b/test/test/test_base_response_basic.py new file mode 100644 index 0000000..403939d --- /dev/null +++ b/test/test/test_base_response_basic.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_basic import BaseResponseBasic + +class TestBaseResponseBasic(unittest.TestCase): + """BaseResponseBasic unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBasic: + """Test BaseResponseBasic + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBasic` + """ + model = BaseResponseBasic() + if include_optional: + return BaseResponseBasic( + status = True, + data = revengai.models.basic.Basic( + binary_name = '', + binary_size = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sha_256_hash = '', + model_name = '', + owner_username = '', + analysis_scope = '', + is_owner = True, + debug = True, + function_count = 56, + is_advanced = True, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBasic( + ) + """ + + def testBaseResponseBasic(self): + """Test BaseResponseBasic""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_binary_additional_response.py b/test/test/test_base_response_binary_additional_response.py new file mode 100644 index 0000000..dc8fccc --- /dev/null +++ b/test/test/test_base_response_binary_additional_response.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse + +class TestBaseResponseBinaryAdditionalResponse(unittest.TestCase): + """BaseResponseBinaryAdditionalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBinaryAdditionalResponse: + """Test BaseResponseBinaryAdditionalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBinaryAdditionalResponse` + """ + model = BaseResponseBinaryAdditionalResponse() + if include_optional: + return BaseResponseBinaryAdditionalResponse( + status = True, + data = revengai.models.binary_additional_response.BinaryAdditionalResponse( + binary_id = 56, + details = revengai.models.binary_additional_details_data_response.BinaryAdditionalDetailsDataResponse( + file = revengai.models.file_metadata.FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), ), + pe = revengai.models.pe_model.PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ), ), + elf = revengai.models.elf_model.ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + }, ), ), + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBinaryAdditionalResponse( + ) + """ + + def testBaseResponseBinaryAdditionalResponse(self): + """Test BaseResponseBinaryAdditionalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_binary_ann_list_response.py b/test/test/test_base_response_binary_ann_list_response.py new file mode 100644 index 0000000..852378b --- /dev/null +++ b/test/test/test_base_response_binary_ann_list_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse + +class TestBaseResponseBinaryAnnListResponse(unittest.TestCase): + """BaseResponseBinaryAnnListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBinaryAnnListResponse: + """Test BaseResponseBinaryAnnListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBinaryAnnListResponse` + """ + model = BaseResponseBinaryAnnListResponse() + if include_optional: + return BaseResponseBinaryAnnListResponse( + status = True, + data = revengai.models.binary_ann_list_response.BinaryAnnListResponse( + list = [ + revengai.models.exported_binary_ann_result.ExportedBinaryAnnResult( + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + analysis_scope = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + confidence = 1.337, + tags = [ + revengai.models.tag_item.TagItem( + tag = '', + origin = '', ) + ], ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBinaryAnnListResponse( + ) + """ + + def testBaseResponseBinaryAnnListResponse(self): + """Test BaseResponseBinaryAnnListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_binary_details_response.py b/test/test/test_base_response_binary_details_response.py new file mode 100644 index 0000000..1aa5068 --- /dev/null +++ b/test/test/test_base_response_binary_details_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_binary_details_response import BaseResponseBinaryDetailsResponse + +class TestBaseResponseBinaryDetailsResponse(unittest.TestCase): + """BaseResponseBinaryDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBinaryDetailsResponse: + """Test BaseResponseBinaryDetailsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBinaryDetailsResponse` + """ + model = BaseResponseBinaryDetailsResponse() + if include_optional: + return BaseResponseBinaryDetailsResponse( + status = True, + data = revengai.models.binary_details_response.BinaryDetailsResponse( + arch = '', + bits = 56, + crc32 = '', + class = '', + entropy = 1.337, + file_size = 56, + language = '', + md5 = '', + machine = '', + os = '', + sha1 = '', + sha256 = '', + ssdeep = '', + static = True, + stripped = True, + sub_sys = '', + tlsh = '', + type = '', + debug = True, + first_seen = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBinaryDetailsResponse( + ) + """ + + def testBaseResponseBinaryDetailsResponse(self): + """Test BaseResponseBinaryDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_binary_externals_response.py b/test/test/test_base_response_binary_externals_response.py new file mode 100644 index 0000000..a6d2248 --- /dev/null +++ b/test/test/test_base_response_binary_externals_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse + +class TestBaseResponseBinaryExternalsResponse(unittest.TestCase): + """BaseResponseBinaryExternalsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBinaryExternalsResponse: + """Test BaseResponseBinaryExternalsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBinaryExternalsResponse` + """ + model = BaseResponseBinaryExternalsResponse() + if include_optional: + return BaseResponseBinaryExternalsResponse( + status = True, + data = revengai.models.binary_externals_response.BinaryExternalsResponse( + sha_256_hash = '', + vt = { + 'key' : null + }, + vt_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + mb = { + 'key' : null + }, + mb_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBinaryExternalsResponse( + ) + """ + + def testBaseResponseBinaryExternalsResponse(self): + """Test BaseResponseBinaryExternalsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_binary_search_response.py b/test/test/test_base_response_binary_search_response.py new file mode 100644 index 0000000..15a4fb3 --- /dev/null +++ b/test/test/test_base_response_binary_search_response.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse + +class TestBaseResponseBinarySearchResponse(unittest.TestCase): + """BaseResponseBinarySearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBinarySearchResponse: + """Test BaseResponseBinarySearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBinarySearchResponse` + """ + model = BaseResponseBinarySearchResponse() + if include_optional: + return BaseResponseBinarySearchResponse( + status = True, + data = revengai.models.binary_search_response.BinarySearchResponse( + results = [ + revengai.models.binary_search_result.BinarySearchResult( + binary_id = 56, + binary_name = '', + analysis_id = 56, + sha_256_hash = '', + tags = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBinarySearchResponse( + ) + """ + + def testBaseResponseBinarySearchResponse(self): + """Test BaseResponseBinarySearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_block_comments_generation_for_function_response.py b/test/test/test_base_response_block_comments_generation_for_function_response.py new file mode 100644 index 0000000..7ace6aa --- /dev/null +++ b/test/test/test_base_response_block_comments_generation_for_function_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse + +class TestBaseResponseBlockCommentsGenerationForFunctionResponse(unittest.TestCase): + """BaseResponseBlockCommentsGenerationForFunctionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBlockCommentsGenerationForFunctionResponse: + """Test BaseResponseBlockCommentsGenerationForFunctionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBlockCommentsGenerationForFunctionResponse` + """ + model = BaseResponseBlockCommentsGenerationForFunctionResponse() + if include_optional: + return BaseResponseBlockCommentsGenerationForFunctionResponse( + status = True, + data = revengai.models.block_comments_generation_for_function_response.BlockCommentsGenerationForFunctionResponse( + updated_blocks = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBlockCommentsGenerationForFunctionResponse( + ) + """ + + def testBaseResponseBlockCommentsGenerationForFunctionResponse(self): + """Test BaseResponseBlockCommentsGenerationForFunctionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_block_comments_overview_generation_response.py b/test/test/test_base_response_block_comments_overview_generation_response.py new file mode 100644 index 0000000..1e31a0d --- /dev/null +++ b/test/test/test_base_response_block_comments_overview_generation_response.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse + +class TestBaseResponseBlockCommentsOverviewGenerationResponse(unittest.TestCase): + """BaseResponseBlockCommentsOverviewGenerationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBlockCommentsOverviewGenerationResponse: + """Test BaseResponseBlockCommentsOverviewGenerationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBlockCommentsOverviewGenerationResponse` + """ + model = BaseResponseBlockCommentsOverviewGenerationResponse() + if include_optional: + return BaseResponseBlockCommentsOverviewGenerationResponse( + status = True, + data = revengai.models.block_comments_overview_generation_response.BlockCommentsOverviewGenerationResponse(), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBlockCommentsOverviewGenerationResponse( + ) + """ + + def testBaseResponseBlockCommentsOverviewGenerationResponse(self): + """Test BaseResponseBlockCommentsOverviewGenerationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_bool.py b/test/test/test_base_response_bool.py new file mode 100644 index 0000000..f9a24d1 --- /dev/null +++ b/test/test/test_base_response_bool.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_bool import BaseResponseBool + +class TestBaseResponseBool(unittest.TestCase): + """BaseResponseBool unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBool: + """Test BaseResponseBool + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBool` + """ + model = BaseResponseBool() + if include_optional: + return BaseResponseBool( + status = True, + data = True, + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBool( + ) + """ + + def testBaseResponseBool(self): + """Test BaseResponseBool""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_box_plot_confidence.py b/test/test/test_base_response_box_plot_confidence.py new file mode 100644 index 0000000..8a96b13 --- /dev/null +++ b/test/test/test_base_response_box_plot_confidence.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence + +class TestBaseResponseBoxPlotConfidence(unittest.TestCase): + """BaseResponseBoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseBoxPlotConfidence: + """Test BaseResponseBoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseBoxPlotConfidence` + """ + model = BaseResponseBoxPlotConfidence() + if include_optional: + return BaseResponseBoxPlotConfidence( + status = True, + data = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseBoxPlotConfidence( + ) + """ + + def testBaseResponseBoxPlotConfidence(self): + """Test BaseResponseBoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_callees_caller_functions_response.py b/test/test/test_base_response_callees_caller_functions_response.py new file mode 100644 index 0000000..c7a95f8 --- /dev/null +++ b/test/test/test_base_response_callees_caller_functions_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse + +class TestBaseResponseCalleesCallerFunctionsResponse(unittest.TestCase): + """BaseResponseCalleesCallerFunctionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCalleesCallerFunctionsResponse: + """Test BaseResponseCalleesCallerFunctionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCalleesCallerFunctionsResponse` + """ + model = BaseResponseCalleesCallerFunctionsResponse() + if include_optional: + return BaseResponseCalleesCallerFunctionsResponse( + status = True, + data = revengai.models.callees_caller_functions_response.CalleesCallerFunctionsResponse( + base_address = 56, + callees = [ + revengai.models.callee_function_info.CalleeFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + callee_name = 'FUN_001e1370', + callee_vaddr = '1971056', ) + ], + callers = [ + revengai.models.caller_function_info.CallerFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + caller_name = 'FUN_0002a5d8', + caller_vaddr = '173528', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCalleesCallerFunctionsResponse( + ) + """ + + def testBaseResponseCalleesCallerFunctionsResponse(self): + """Test BaseResponseCalleesCallerFunctionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_capabilities.py b/test/test/test_base_response_capabilities.py new file mode 100644 index 0000000..daa159a --- /dev/null +++ b/test/test/test_base_response_capabilities.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_capabilities import BaseResponseCapabilities + +class TestBaseResponseCapabilities(unittest.TestCase): + """BaseResponseCapabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCapabilities: + """Test BaseResponseCapabilities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCapabilities` + """ + model = BaseResponseCapabilities() + if include_optional: + return BaseResponseCapabilities( + status = True, + data = revengai.models.capabilities.Capabilities( + capabilities = [ + revengai.models.capability.Capability( + function_name = '', + function_vaddr = 56, + capabilities = [ + '' + ], ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCapabilities( + ) + """ + + def testBaseResponseCapabilities(self): + """Test BaseResponseCapabilities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_check_security_checks_task_response.py b/test/test/test_base_response_check_security_checks_task_response.py new file mode 100644 index 0000000..19f6f8a --- /dev/null +++ b/test/test/test_base_response_check_security_checks_task_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse + +class TestBaseResponseCheckSecurityChecksTaskResponse(unittest.TestCase): + """BaseResponseCheckSecurityChecksTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCheckSecurityChecksTaskResponse: + """Test BaseResponseCheckSecurityChecksTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCheckSecurityChecksTaskResponse` + """ + model = BaseResponseCheckSecurityChecksTaskResponse() + if include_optional: + return BaseResponseCheckSecurityChecksTaskResponse( + status = True, + data = revengai.models.check_security_checks_task_response.CheckSecurityChecksTaskResponse( + status = 'UNINITIALISED', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCheckSecurityChecksTaskResponse( + ) + """ + + def testBaseResponseCheckSecurityChecksTaskResponse(self): + """Test BaseResponseCheckSecurityChecksTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_child_binaries_response.py b/test/test/test_base_response_child_binaries_response.py new file mode 100644 index 0000000..54b1f32 --- /dev/null +++ b/test/test/test_base_response_child_binaries_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse + +class TestBaseResponseChildBinariesResponse(unittest.TestCase): + """BaseResponseChildBinariesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseChildBinariesResponse: + """Test BaseResponseChildBinariesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseChildBinariesResponse` + """ + model = BaseResponseChildBinariesResponse() + if include_optional: + return BaseResponseChildBinariesResponse( + status = True, + data = revengai.models.child_binaries_response.ChildBinariesResponse( + children = [ + revengai.models.relative_binary_response.RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', ) + ], + parent = revengai.models.relative_binary_response.RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', ), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseChildBinariesResponse( + ) + """ + + def testBaseResponseChildBinariesResponse(self): + """Test BaseResponseChildBinariesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_collection_binaries_update_response.py b/test/test/test_base_response_collection_binaries_update_response.py new file mode 100644 index 0000000..8cc74fe --- /dev/null +++ b/test/test/test_base_response_collection_binaries_update_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse + +class TestBaseResponseCollectionBinariesUpdateResponse(unittest.TestCase): + """BaseResponseCollectionBinariesUpdateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCollectionBinariesUpdateResponse: + """Test BaseResponseCollectionBinariesUpdateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCollectionBinariesUpdateResponse` + """ + model = BaseResponseCollectionBinariesUpdateResponse() + if include_optional: + return BaseResponseCollectionBinariesUpdateResponse( + status = True, + data = revengai.models.collection_binaries_update_response.CollectionBinariesUpdateResponse( + binaries = [ + revengai.models.collection_binary_response.CollectionBinaryResponse( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCollectionBinariesUpdateResponse( + ) + """ + + def testBaseResponseCollectionBinariesUpdateResponse(self): + """Test BaseResponseCollectionBinariesUpdateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_collection_response.py b/test/test/test_base_response_collection_response.py new file mode 100644 index 0000000..f02be10 --- /dev/null +++ b/test/test/test_base_response_collection_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_collection_response import BaseResponseCollectionResponse + +class TestBaseResponseCollectionResponse(unittest.TestCase): + """BaseResponseCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCollectionResponse: + """Test BaseResponseCollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCollectionResponse` + """ + model = BaseResponseCollectionResponse() + if include_optional: + return BaseResponseCollectionResponse( + status = True, + data = revengai.models.collection_response.CollectionResponse( + collection_id = 56, + collection_name = '', + description = '', + model_id = 56, + user_id = 56, + team_id = 56, + collection_scope = 'PRIVATE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tags = [ + '' + ], + binaries = [ + null + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCollectionResponse( + ) + """ + + def testBaseResponseCollectionResponse(self): + """Test BaseResponseCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_collection_search_response.py b/test/test/test_base_response_collection_search_response.py new file mode 100644 index 0000000..f8f16fc --- /dev/null +++ b/test/test/test_base_response_collection_search_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse + +class TestBaseResponseCollectionSearchResponse(unittest.TestCase): + """BaseResponseCollectionSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCollectionSearchResponse: + """Test BaseResponseCollectionSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCollectionSearchResponse` + """ + model = BaseResponseCollectionSearchResponse() + if include_optional: + return BaseResponseCollectionSearchResponse( + status = True, + data = revengai.models.collection_search_response.CollectionSearchResponse( + results = [ + revengai.models.collection_search_result.CollectionSearchResult( + collection_id = 56, + collection_name = '', + scope = '', + last_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + tags = [ + '' + ], + size = 56, + description = '', + team_id = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCollectionSearchResponse( + ) + """ + + def testBaseResponseCollectionSearchResponse(self): + """Test BaseResponseCollectionSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_collection_tags_update_response.py b/test/test/test_base_response_collection_tags_update_response.py new file mode 100644 index 0000000..40b17a8 --- /dev/null +++ b/test/test/test_base_response_collection_tags_update_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse + +class TestBaseResponseCollectionTagsUpdateResponse(unittest.TestCase): + """BaseResponseCollectionTagsUpdateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCollectionTagsUpdateResponse: + """Test BaseResponseCollectionTagsUpdateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCollectionTagsUpdateResponse` + """ + model = BaseResponseCollectionTagsUpdateResponse() + if include_optional: + return BaseResponseCollectionTagsUpdateResponse( + status = True, + data = revengai.models.collection_tags_update_response.CollectionTagsUpdateResponse( + tags = [ + '' + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCollectionTagsUpdateResponse( + ) + """ + + def testBaseResponseCollectionTagsUpdateResponse(self): + """Test BaseResponseCollectionTagsUpdateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_comment_response.py b/test/test/test_base_response_comment_response.py new file mode 100644 index 0000000..d966406 --- /dev/null +++ b/test/test/test_base_response_comment_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_comment_response import BaseResponseCommentResponse + +class TestBaseResponseCommentResponse(unittest.TestCase): + """BaseResponseCommentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCommentResponse: + """Test BaseResponseCommentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCommentResponse` + """ + model = BaseResponseCommentResponse() + if include_optional: + return BaseResponseCommentResponse( + status = True, + data = revengai.models.comment_response.CommentResponse( + content = '', + id = 56, + user_id = 56, + resource_type = '', + resource_id = '', + context = null, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCommentResponse( + ) + """ + + def testBaseResponseCommentResponse(self): + """Test BaseResponseCommentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_communities.py b/test/test/test_base_response_communities.py new file mode 100644 index 0000000..22b7c6d --- /dev/null +++ b/test/test/test_base_response_communities.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_communities import BaseResponseCommunities + +class TestBaseResponseCommunities(unittest.TestCase): + """BaseResponseCommunities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCommunities: + """Test BaseResponseCommunities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCommunities` + """ + model = BaseResponseCommunities() + if include_optional: + return BaseResponseCommunities( + status = True, + data = revengai.models.communities.Communities( + total_functions = 56, + total_matched_functions = 56, + direct_community_match_percentages = [ + revengai.models.community_match_percentages.CommunityMatchPercentages( + binary_name = '', + binary_id = 56, + matched_communities_percent = 1.337, + unmatched_communities_percent = 1.337, ) + ], + top_components = [ + { + 'key' : null + } + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCommunities( + ) + """ + + def testBaseResponseCommunities(self): + """Test BaseResponseCommunities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_created.py b/test/test/test_base_response_created.py new file mode 100644 index 0000000..db9e080 --- /dev/null +++ b/test/test/test_base_response_created.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_created import BaseResponseCreated + +class TestBaseResponseCreated(unittest.TestCase): + """BaseResponseCreated unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCreated: + """Test BaseResponseCreated + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseCreated` + """ + model = BaseResponseCreated() + if include_optional: + return BaseResponseCreated( + status = True, + data = revengai.models.created.Created( + analysis_id = 56, + binary_id = 56, + reference = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseCreated( + ) + """ + + def testBaseResponseCreated(self): + """Test BaseResponseCreated""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_decompilation_response.py b/test/test/test_base_response_decompilation_response.py new file mode 100644 index 0000000..2459c5b --- /dev/null +++ b/test/test/test_base_response_decompilation_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse + +class TestBaseResponseDecompilationResponse(unittest.TestCase): + """BaseResponseDecompilationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseDecompilationResponse: + """Test BaseResponseDecompilationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseDecompilationResponse` + """ + model = BaseResponseDecompilationResponse() + if include_optional: + return BaseResponseDecompilationResponse( + status = True, + data = revengai.models.decompilation_response.DecompilationResponse( + function_id = 56, + decompilation = '', + calling_convention = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseDecompilationResponse( + ) + """ + + def testBaseResponseDecompilationResponse(self): + """Test BaseResponseDecompilationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_dict.py b/test/test/test_base_response_dict.py new file mode 100644 index 0000000..d192d4c --- /dev/null +++ b/test/test/test_base_response_dict.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_dict import BaseResponseDict + +class TestBaseResponseDict(unittest.TestCase): + """BaseResponseDict unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseDict: + """Test BaseResponseDict + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseDict` + """ + model = BaseResponseDict() + if include_optional: + return BaseResponseDict( + status = True, + data = { + 'key' : null + }, + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseDict( + ) + """ + + def testBaseResponseDict(self): + """Test BaseResponseDict""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_dynamic_execution_status.py b/test/test/test_base_response_dynamic_execution_status.py new file mode 100644 index 0000000..15334e1 --- /dev/null +++ b/test/test/test_base_response_dynamic_execution_status.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus + +class TestBaseResponseDynamicExecutionStatus(unittest.TestCase): + """BaseResponseDynamicExecutionStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseDynamicExecutionStatus: + """Test BaseResponseDynamicExecutionStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseDynamicExecutionStatus` + """ + model = BaseResponseDynamicExecutionStatus() + if include_optional: + return BaseResponseDynamicExecutionStatus( + status = True, + data = revengai.models.dynamic_execution_status.DynamicExecutionStatus( + status = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseDynamicExecutionStatus( + ) + """ + + def testBaseResponseDynamicExecutionStatus(self): + """Test BaseResponseDynamicExecutionStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_external_response.py b/test/test/test_base_response_external_response.py new file mode 100644 index 0000000..d4733b5 --- /dev/null +++ b/test/test/test_base_response_external_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_external_response import BaseResponseExternalResponse + +class TestBaseResponseExternalResponse(unittest.TestCase): + """BaseResponseExternalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseExternalResponse: + """Test BaseResponseExternalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseExternalResponse` + """ + model = BaseResponseExternalResponse() + if include_optional: + return BaseResponseExternalResponse( + status = True, + data = revengai.models.external_response.ExternalResponse( + sha_256_hash = '', + data = { + 'key' : null + }, + last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseExternalResponse( + ) + """ + + def testBaseResponseExternalResponse(self): + """Test BaseResponseExternalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_analysis_threat_score_data.py b/test/test/test_base_response_function_analysis_threat_score_data.py new file mode 100644 index 0000000..3241cfb --- /dev/null +++ b/test/test/test_base_response_function_analysis_threat_score_data.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData + +class TestBaseResponseFunctionAnalysisThreatScoreData(unittest.TestCase): + """BaseResponseFunctionAnalysisThreatScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionAnalysisThreatScoreData: + """Test BaseResponseFunctionAnalysisThreatScoreData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionAnalysisThreatScoreData` + """ + model = BaseResponseFunctionAnalysisThreatScoreData() + if include_optional: + return BaseResponseFunctionAnalysisThreatScoreData( + status = True, + data = revengai.models.function_analysis_threat_score_data.FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionAnalysisThreatScoreData( + ) + """ + + def testBaseResponseFunctionAnalysisThreatScoreData(self): + """Test BaseResponseFunctionAnalysisThreatScoreData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_blocks_response.py b/test/test/test_base_response_function_blocks_response.py new file mode 100644 index 0000000..4b3e152 --- /dev/null +++ b/test/test/test_base_response_function_blocks_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse + +class TestBaseResponseFunctionBlocksResponse(unittest.TestCase): + """BaseResponseFunctionBlocksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionBlocksResponse: + """Test BaseResponseFunctionBlocksResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionBlocksResponse` + """ + model = BaseResponseFunctionBlocksResponse() + if include_optional: + return BaseResponseFunctionBlocksResponse( + status = True, + data = revengai.models.function_blocks_response.FunctionBlocksResponse( + blocks = [ + revengai.models.function_block_response.FunctionBlockResponse( + asm = [ + '' + ], + id = 56, + min_addr = 56, + max_addr = 56, + destinations = [ + revengai.models.function_block_destination_response.FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', ) + ], + comment = '', ) + ], + local_variables = [ + revengai.models.function_local_variable_response.FunctionLocalVariableResponse( + address = '', + d_type = '', + size = 56, + loc = '', + name = '', ) + ], + params = [ + revengai.models.function_param_response.FunctionParamResponse( + d_type = '', + loc = '', + addr = '', + length = 56, + name = '', ) + ], + overview_comment = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionBlocksResponse( + ) + """ + + def testBaseResponseFunctionBlocksResponse(self): + """Test BaseResponseFunctionBlocksResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_capability_response.py b/test/test/test_base_response_function_capability_response.py new file mode 100644 index 0000000..d39ea90 --- /dev/null +++ b/test/test/test_base_response_function_capability_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse + +class TestBaseResponseFunctionCapabilityResponse(unittest.TestCase): + """BaseResponseFunctionCapabilityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionCapabilityResponse: + """Test BaseResponseFunctionCapabilityResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionCapabilityResponse` + """ + model = BaseResponseFunctionCapabilityResponse() + if include_optional: + return BaseResponseFunctionCapabilityResponse( + status = True, + data = revengai.models.function_capability_response.FunctionCapabilityResponse( + capabilities = [ + '' + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionCapabilityResponse( + ) + """ + + def testBaseResponseFunctionCapabilityResponse(self): + """Test BaseResponseFunctionCapabilityResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_data_types.py b/test/test/test_base_response_function_data_types.py new file mode 100644 index 0000000..a084b4b --- /dev/null +++ b/test/test/test_base_response_function_data_types.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes + +class TestBaseResponseFunctionDataTypes(unittest.TestCase): + """BaseResponseFunctionDataTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionDataTypes: + """Test BaseResponseFunctionDataTypes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionDataTypes` + """ + model = BaseResponseFunctionDataTypes() + if include_optional: + return BaseResponseFunctionDataTypes( + status = True, + data = revengai.models.function_data_types.FunctionDataTypes( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionDataTypes( + ) + """ + + def testBaseResponseFunctionDataTypes(self): + """Test BaseResponseFunctionDataTypes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_data_types_list.py b/test/test/test_base_response_function_data_types_list.py new file mode 100644 index 0000000..c78c639 --- /dev/null +++ b/test/test/test_base_response_function_data_types_list.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList + +class TestBaseResponseFunctionDataTypesList(unittest.TestCase): + """BaseResponseFunctionDataTypesList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionDataTypesList: + """Test BaseResponseFunctionDataTypesList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionDataTypesList` + """ + model = BaseResponseFunctionDataTypesList() + if include_optional: + return BaseResponseFunctionDataTypesList( + status = True, + data = revengai.models.function_data_types_list.FunctionDataTypesList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_list_item.FunctionDataTypesListItem( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56, + function_id = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionDataTypesList( + ) + """ + + def testBaseResponseFunctionDataTypesList(self): + """Test BaseResponseFunctionDataTypesList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_search_response.py b/test/test/test_base_response_function_search_response.py new file mode 100644 index 0000000..38afae3 --- /dev/null +++ b/test/test/test_base_response_function_search_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse + +class TestBaseResponseFunctionSearchResponse(unittest.TestCase): + """BaseResponseFunctionSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionSearchResponse: + """Test BaseResponseFunctionSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionSearchResponse` + """ + model = BaseResponseFunctionSearchResponse() + if include_optional: + return BaseResponseFunctionSearchResponse( + status = True, + data = revengai.models.function_search_response.FunctionSearchResponse( + results = [ + revengai.models.function_search_result.FunctionSearchResult( + function_id = 56, + function_name = '', + binary_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionSearchResponse( + ) + """ + + def testBaseResponseFunctionSearchResponse(self): + """Test BaseResponseFunctionSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_strings_response.py b/test/test/test_base_response_function_strings_response.py new file mode 100644 index 0000000..76548f8 --- /dev/null +++ b/test/test/test_base_response_function_strings_response.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse + +class TestBaseResponseFunctionStringsResponse(unittest.TestCase): + """BaseResponseFunctionStringsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionStringsResponse: + """Test BaseResponseFunctionStringsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionStringsResponse` + """ + model = BaseResponseFunctionStringsResponse() + if include_optional: + return BaseResponseFunctionStringsResponse( + status = True, + data = revengai.models.function_strings_response.FunctionStringsResponse( + strings = [ + revengai.models.function_string.FunctionString( + value = '', + vaddr = 56, ) + ], + total_strings = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionStringsResponse( + ) + """ + + def testBaseResponseFunctionStringsResponse(self): + """Test BaseResponseFunctionStringsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_task_response.py b/test/test/test_base_response_function_task_response.py new file mode 100644 index 0000000..f7c3ff2 --- /dev/null +++ b/test/test/test_base_response_function_task_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse + +class TestBaseResponseFunctionTaskResponse(unittest.TestCase): + """BaseResponseFunctionTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionTaskResponse: + """Test BaseResponseFunctionTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionTaskResponse` + """ + model = BaseResponseFunctionTaskResponse() + if include_optional: + return BaseResponseFunctionTaskResponse( + status = True, + data = revengai.models.function_task_response.FunctionTaskResponse( + status = 'UNINITIALISED', + error_message = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionTaskResponse( + ) + """ + + def testBaseResponseFunctionTaskResponse(self): + """Test BaseResponseFunctionTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_function_threat_score.py b/test/test/test_base_response_function_threat_score.py new file mode 100644 index 0000000..fdf7890 --- /dev/null +++ b/test/test/test_base_response_function_threat_score.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore + +class TestBaseResponseFunctionThreatScore(unittest.TestCase): + """BaseResponseFunctionThreatScore unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionThreatScore: + """Test BaseResponseFunctionThreatScore + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionThreatScore` + """ + model = BaseResponseFunctionThreatScore() + if include_optional: + return BaseResponseFunctionThreatScore( + status = True, + data = revengai.models.function_threat_score.FunctionThreatScore( + results = { + 'key' : revengai.models.function_analysis_threat_score_data.FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, ) + }, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionThreatScore( + ) + """ + + def testBaseResponseFunctionThreatScore(self): + """Test BaseResponseFunctionThreatScore""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_functions_detail_response.py b/test/test/test_base_response_functions_detail_response.py new file mode 100644 index 0000000..4cd3bf8 --- /dev/null +++ b/test/test/test_base_response_functions_detail_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse + +class TestBaseResponseFunctionsDetailResponse(unittest.TestCase): + """BaseResponseFunctionsDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseFunctionsDetailResponse: + """Test BaseResponseFunctionsDetailResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseFunctionsDetailResponse` + """ + model = BaseResponseFunctionsDetailResponse() + if include_optional: + return BaseResponseFunctionsDetailResponse( + status = True, + data = revengai.models.functions_detail_response.FunctionsDetailResponse( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + debug_hash = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseFunctionsDetailResponse( + ) + """ + + def testBaseResponseFunctionsDetailResponse(self): + """Test BaseResponseFunctionsDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_generate_function_data_types.py b/test/test/test_base_response_generate_function_data_types.py new file mode 100644 index 0000000..81e47c6 --- /dev/null +++ b/test/test/test_base_response_generate_function_data_types.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes + +class TestBaseResponseGenerateFunctionDataTypes(unittest.TestCase): + """BaseResponseGenerateFunctionDataTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGenerateFunctionDataTypes: + """Test BaseResponseGenerateFunctionDataTypes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGenerateFunctionDataTypes` + """ + model = BaseResponseGenerateFunctionDataTypes() + if include_optional: + return BaseResponseGenerateFunctionDataTypes( + status = True, + data = revengai.models.generate_function_data_types.GenerateFunctionDataTypes( + queued = True, + reference = '', + data_types_list = revengai.models.generation_status_list.GenerationStatusList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ], ), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGenerateFunctionDataTypes( + ) + """ + + def testBaseResponseGenerateFunctionDataTypes(self): + """Test BaseResponseGenerateFunctionDataTypes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_generation_status_list.py b/test/test/test_base_response_generation_status_list.py new file mode 100644 index 0000000..4f76e18 --- /dev/null +++ b/test/test/test_base_response_generation_status_list.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList + +class TestBaseResponseGenerationStatusList(unittest.TestCase): + """BaseResponseGenerationStatusList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGenerationStatusList: + """Test BaseResponseGenerationStatusList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGenerationStatusList` + """ + model = BaseResponseGenerationStatusList() + if include_optional: + return BaseResponseGenerationStatusList( + status = True, + data = revengai.models.generation_status_list.GenerationStatusList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGenerationStatusList( + ) + """ + + def testBaseResponseGenerationStatusList(self): + """Test BaseResponseGenerationStatusList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_get_ai_decompilation_rating_response.py b/test/test/test_base_response_get_ai_decompilation_rating_response.py new file mode 100644 index 0000000..4f0234d --- /dev/null +++ b/test/test/test_base_response_get_ai_decompilation_rating_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse + +class TestBaseResponseGetAiDecompilationRatingResponse(unittest.TestCase): + """BaseResponseGetAiDecompilationRatingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGetAiDecompilationRatingResponse: + """Test BaseResponseGetAiDecompilationRatingResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGetAiDecompilationRatingResponse` + """ + model = BaseResponseGetAiDecompilationRatingResponse() + if include_optional: + return BaseResponseGetAiDecompilationRatingResponse( + status = True, + data = revengai.models.get_ai_decompilation_rating_response.GetAiDecompilationRatingResponse( + rating = 'POSITIVE', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGetAiDecompilationRatingResponse( + ) + """ + + def testBaseResponseGetAiDecompilationRatingResponse(self): + """Test BaseResponseGetAiDecompilationRatingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_get_ai_decompilation_task.py b/test/test/test_base_response_get_ai_decompilation_task.py new file mode 100644 index 0000000..379f2d2 --- /dev/null +++ b/test/test/test_base_response_get_ai_decompilation_task.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask + +class TestBaseResponseGetAiDecompilationTask(unittest.TestCase): + """BaseResponseGetAiDecompilationTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGetAiDecompilationTask: + """Test BaseResponseGetAiDecompilationTask + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGetAiDecompilationTask` + """ + model = BaseResponseGetAiDecompilationTask() + if include_optional: + return BaseResponseGetAiDecompilationTask( + status = True, + data = revengai.models.get_ai_decompilation_task.GetAiDecompilationTask( + status = '', + decompilation = '', + raw_decompilation = '', + function_mapping = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + function_mapping_full = revengai.models.function_mapping_full.FunctionMappingFull( + inverse_string_map = { + 'key' : revengai.models.inverse_string_map_item.InverseStringMapItem( + string = '', + addr = 56, ) + }, + inverse_function_map = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + unmatched_functions = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_types = { + 'key' : + }, + unmatched_strings = { + 'key' : + }, + unmatched_vars = { + 'key' : + }, + unmatched_go_to_labels = { + 'key' : + }, + unmatched_custom_function_pointers = { + 'key' : + }, + unmatched_variadic_lists = { + 'key' : + }, + fields = { + 'key' : { + 'key' : + } + }, ), + summary = '', + ai_summary = '', + raw_ai_summary = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGetAiDecompilationTask( + ) + """ + + def testBaseResponseGetAiDecompilationTask(self): + """Test BaseResponseGetAiDecompilationTask""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_get_public_user_response.py b/test/test/test_base_response_get_public_user_response.py new file mode 100644 index 0000000..5ed9655 --- /dev/null +++ b/test/test/test_base_response_get_public_user_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse + +class TestBaseResponseGetPublicUserResponse(unittest.TestCase): + """BaseResponseGetPublicUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGetPublicUserResponse: + """Test BaseResponseGetPublicUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGetPublicUserResponse` + """ + model = BaseResponseGetPublicUserResponse() + if include_optional: + return BaseResponseGetPublicUserResponse( + status = True, + data = revengai.models.get_public_user_response.GetPublicUserResponse( + username = '', + user_id = 56, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGetPublicUserResponse( + ) + """ + + def testBaseResponseGetPublicUserResponse(self): + """Test BaseResponseGetPublicUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_get_user_response.py b/test/test/test_base_response_get_user_response.py new file mode 100644 index 0000000..9d3eb4b --- /dev/null +++ b/test/test/test_base_response_get_user_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_get_user_response import BaseResponseGetUserResponse + +class TestBaseResponseGetUserResponse(unittest.TestCase): + """BaseResponseGetUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseGetUserResponse: + """Test BaseResponseGetUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseGetUserResponse` + """ + model = BaseResponseGetUserResponse() + if include_optional: + return BaseResponseGetUserResponse( + status = True, + data = revengai.models.get_user_response.GetUserResponse( + username = '', + user_id = 56, + first_name = '', + last_name = '', + email = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tutorial_seen = True, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseGetUserResponse( + ) + """ + + def testBaseResponseGetUserResponse(self): + """Test BaseResponseGetUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_collection_results.py b/test/test/test_base_response_list_collection_results.py new file mode 100644 index 0000000..dd079b9 --- /dev/null +++ b/test/test/test_base_response_list_collection_results.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults + +class TestBaseResponseListCollectionResults(unittest.TestCase): + """BaseResponseListCollectionResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListCollectionResults: + """Test BaseResponseListCollectionResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListCollectionResults` + """ + model = BaseResponseListCollectionResults() + if include_optional: + return BaseResponseListCollectionResults( + status = True, + data = revengai.models.list_collection_results.ListCollectionResults( + results = [ + revengai.models.collection_list_item.CollectionListItem( + collection_name = '', + description = '', + collection_scope = '', + collection_owner = '', + official_collection = True, + collection_tags = [ + '' + ], + collection_size = 56, + collection_id = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_name = '', + team_id = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListCollectionResults( + ) + """ + + def testBaseResponseListCollectionResults(self): + """Test BaseResponseListCollectionResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_comment_response.py b/test/test/test_base_response_list_comment_response.py new file mode 100644 index 0000000..00c286f --- /dev/null +++ b/test/test/test_base_response_list_comment_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse + +class TestBaseResponseListCommentResponse(unittest.TestCase): + """BaseResponseListCommentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListCommentResponse: + """Test BaseResponseListCommentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListCommentResponse` + """ + model = BaseResponseListCommentResponse() + if include_optional: + return BaseResponseListCommentResponse( + status = True, + data = [ + revengai.models.comment_response.CommentResponse( + content = '', + id = 56, + user_id = 56, + resource_type = '', + resource_id = '', + context = null, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListCommentResponse( + ) + """ + + def testBaseResponseListCommentResponse(self): + """Test BaseResponseListCommentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_die_match.py b/test/test/test_base_response_list_die_match.py new file mode 100644 index 0000000..8536932 --- /dev/null +++ b/test/test/test_base_response_list_die_match.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_die_match import BaseResponseListDieMatch + +class TestBaseResponseListDieMatch(unittest.TestCase): + """BaseResponseListDieMatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListDieMatch: + """Test BaseResponseListDieMatch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListDieMatch` + """ + model = BaseResponseListDieMatch() + if include_optional: + return BaseResponseListDieMatch( + status = True, + data = [ + revengai.models.die_match.DieMatch( + name = '', + type = '', + display = '', + version = '', ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListDieMatch( + ) + """ + + def testBaseResponseListDieMatch(self): + """Test BaseResponseListDieMatch""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_function_box_plot_confidence.py b/test/test/test_base_response_list_function_box_plot_confidence.py new file mode 100644 index 0000000..1cc85bd --- /dev/null +++ b/test/test/test_base_response_list_function_box_plot_confidence.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence + +class TestBaseResponseListFunctionBoxPlotConfidence(unittest.TestCase): + """BaseResponseListFunctionBoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListFunctionBoxPlotConfidence: + """Test BaseResponseListFunctionBoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListFunctionBoxPlotConfidence` + """ + model = BaseResponseListFunctionBoxPlotConfidence() + if include_optional: + return BaseResponseListFunctionBoxPlotConfidence( + status = True, + data = [ + revengai.models.function_box_plot_confidence.FunctionBoxPlotConfidence( + function_id = 56, + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ), ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListFunctionBoxPlotConfidence( + ) + """ + + def testBaseResponseListFunctionBoxPlotConfidence(self): + """Test BaseResponseListFunctionBoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_function_name_history.py b/test/test/test_base_response_list_function_name_history.py new file mode 100644 index 0000000..64a3e83 --- /dev/null +++ b/test/test/test_base_response_list_function_name_history.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory + +class TestBaseResponseListFunctionNameHistory(unittest.TestCase): + """BaseResponseListFunctionNameHistory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListFunctionNameHistory: + """Test BaseResponseListFunctionNameHistory + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListFunctionNameHistory` + """ + model = BaseResponseListFunctionNameHistory() + if include_optional: + return BaseResponseListFunctionNameHistory( + status = True, + data = [ + revengai.models.function_name_history.FunctionNameHistory( + history_id = 56, + change_made_by = '', + function_name = '', + is_debug = True, + source_type = '', + created_at = '', ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListFunctionNameHistory( + ) + """ + + def testBaseResponseListFunctionNameHistory(self): + """Test BaseResponseListFunctionNameHistory""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_sbom.py b/test/test/test_base_response_list_sbom.py new file mode 100644 index 0000000..a12e367 --- /dev/null +++ b/test/test/test_base_response_list_sbom.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_sbom import BaseResponseListSBOM + +class TestBaseResponseListSBOM(unittest.TestCase): + """BaseResponseListSBOM unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListSBOM: + """Test BaseResponseListSBOM + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListSBOM` + """ + model = BaseResponseListSBOM() + if include_optional: + return BaseResponseListSBOM( + status = True, + data = [ + revengai.models.sbom.SBOM( + packages = [ + revengai.models.sbom_package.SBOMPackage( + name = '', + version = '', ) + ], + imported_libs = [ + '' + ], ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListSBOM( + ) + """ + + def testBaseResponseListSBOM(self): + """Test BaseResponseListSBOM""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_similar_functions_response.py b/test/test/test_base_response_list_similar_functions_response.py new file mode 100644 index 0000000..2dd3b5a --- /dev/null +++ b/test/test/test_base_response_list_similar_functions_response.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse + +class TestBaseResponseListSimilarFunctionsResponse(unittest.TestCase): + """BaseResponseListSimilarFunctionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListSimilarFunctionsResponse: + """Test BaseResponseListSimilarFunctionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListSimilarFunctionsResponse` + """ + model = BaseResponseListSimilarFunctionsResponse() + if include_optional: + return BaseResponseListSimilarFunctionsResponse( + status = True, + data = [ + revengai.models.similar_functions_response.SimilarFunctionsResponse( + function_id = 56, + function_name = '', + binary_id = 56, + binary_name = '', + distance = 1.337, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + sha_256_hash = '', ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListSimilarFunctionsResponse( + ) + """ + + def testBaseResponseListSimilarFunctionsResponse(self): + """Test BaseResponseListSimilarFunctionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_tag_origin_box_plot_confidence.py b/test/test/test_base_response_list_tag_origin_box_plot_confidence.py new file mode 100644 index 0000000..7744940 --- /dev/null +++ b/test/test/test_base_response_list_tag_origin_box_plot_confidence.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence + +class TestBaseResponseListTagOriginBoxPlotConfidence(unittest.TestCase): + """BaseResponseListTagOriginBoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListTagOriginBoxPlotConfidence: + """Test BaseResponseListTagOriginBoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListTagOriginBoxPlotConfidence` + """ + model = BaseResponseListTagOriginBoxPlotConfidence() + if include_optional: + return BaseResponseListTagOriginBoxPlotConfidence( + status = True, + data = [ + revengai.models.tag_origin_box_plot_confidence.TagOriginBoxPlotConfidence( + tag = revengai.models.tags.Tags( + tag = '', + origin = 'RevEng-Malware', ), + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ), ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListTagOriginBoxPlotConfidence( + ) + """ + + def testBaseResponseListTagOriginBoxPlotConfidence(self): + """Test BaseResponseListTagOriginBoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_list_user_activity_response.py b/test/test/test_base_response_list_user_activity_response.py new file mode 100644 index 0000000..7242909 --- /dev/null +++ b/test/test/test_base_response_list_user_activity_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse + +class TestBaseResponseListUserActivityResponse(unittest.TestCase): + """BaseResponseListUserActivityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseListUserActivityResponse: + """Test BaseResponseListUserActivityResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseListUserActivityResponse` + """ + model = BaseResponseListUserActivityResponse() + if include_optional: + return BaseResponseListUserActivityResponse( + status = True, + data = [ + revengai.models.user_activity_response.UserActivityResponse( + actions = '', + activity_scope = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', + sources = '', + username = '', ) + ], + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseListUserActivityResponse( + ) + """ + + def testBaseResponseListUserActivityResponse(self): + """Test BaseResponseListUserActivityResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_login_response.py b/test/test/test_base_response_login_response.py new file mode 100644 index 0000000..eb58e6d --- /dev/null +++ b/test/test/test_base_response_login_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_login_response import BaseResponseLoginResponse + +class TestBaseResponseLoginResponse(unittest.TestCase): + """BaseResponseLoginResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseLoginResponse: + """Test BaseResponseLoginResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseLoginResponse` + """ + model = BaseResponseLoginResponse() + if include_optional: + return BaseResponseLoginResponse( + status = True, + data = revengai.models.login_response.LoginResponse( + token = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseLoginResponse( + ) + """ + + def testBaseResponseLoginResponse(self): + """Test BaseResponseLoginResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_logs.py b/test/test/test_base_response_logs.py new file mode 100644 index 0000000..d3013f5 --- /dev/null +++ b/test/test/test_base_response_logs.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_logs import BaseResponseLogs + +class TestBaseResponseLogs(unittest.TestCase): + """BaseResponseLogs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseLogs: + """Test BaseResponseLogs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseLogs` + """ + model = BaseResponseLogs() + if include_optional: + return BaseResponseLogs( + status = True, + data = revengai.models.logs.Logs( + logs = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseLogs( + ) + """ + + def testBaseResponseLogs(self): + """Test BaseResponseLogs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_models_response.py b/test/test/test_base_response_models_response.py new file mode 100644 index 0000000..c995f98 --- /dev/null +++ b/test/test/test_base_response_models_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_models_response import BaseResponseModelsResponse + +class TestBaseResponseModelsResponse(unittest.TestCase): + """BaseResponseModelsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseModelsResponse: + """Test BaseResponseModelsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseModelsResponse` + """ + model = BaseResponseModelsResponse() + if include_optional: + return BaseResponseModelsResponse( + status = True, + data = revengai.models.models_response.ModelsResponse( + models = [ + '' + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseModelsResponse( + ) + """ + + def testBaseResponseModelsResponse(self): + """Test BaseResponseModelsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_nearest_neighbor_analysis.py b/test/test/test_base_response_nearest_neighbor_analysis.py new file mode 100644 index 0000000..2cf50df --- /dev/null +++ b/test/test/test_base_response_nearest_neighbor_analysis.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis + +class TestBaseResponseNearestNeighborAnalysis(unittest.TestCase): + """BaseResponseNearestNeighborAnalysis unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseNearestNeighborAnalysis: + """Test BaseResponseNearestNeighborAnalysis + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseNearestNeighborAnalysis` + """ + model = BaseResponseNearestNeighborAnalysis() + if include_optional: + return BaseResponseNearestNeighborAnalysis( + status = True, + data = { + 'key' : { + 'key' : revengai.models.nearest_neighbor.NearestNeighbor( + distance = 1.337, + nearest_neighbor_analysis_id = 56, + nearest_neighbor_analysis_name = '', + nearest_neighbor_function_name = '', + nearest_neighbor_function_name_mangled = '', + nearest_neighbor_binary_id = 56, + nearest_neighbor_sha_256_hash = '', + nearest_neighbor_debug = True, ) + } + }, + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseNearestNeighborAnalysis( + ) + """ + + def testBaseResponseNearestNeighborAnalysis(self): + """Test BaseResponseNearestNeighborAnalysis""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_network_overview_response.py b/test/test/test_base_response_network_overview_response.py new file mode 100644 index 0000000..c2d1965 --- /dev/null +++ b/test/test/test_base_response_network_overview_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse + +class TestBaseResponseNetworkOverviewResponse(unittest.TestCase): + """BaseResponseNetworkOverviewResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseNetworkOverviewResponse: + """Test BaseResponseNetworkOverviewResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseNetworkOverviewResponse` + """ + model = BaseResponseNetworkOverviewResponse() + if include_optional: + return BaseResponseNetworkOverviewResponse( + status = True, + data = revengai.models.network_overview_response.NetworkOverviewResponse( + dns = [ + revengai.models.network_overview_dns.NetworkOverviewDns( + host = '', + type = '', + answers = [ + revengai.models.network_overview_dns_answer.NetworkOverviewDnsAnswer( + type = '', + data = '', ) + ], ) + ], + metadata = [ + revengai.models.network_overview_metadata.NetworkOverviewMetadata( + host = '', + country_code = '', + asn = '', + type = 'metadata', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseNetworkOverviewResponse( + ) + """ + + def testBaseResponseNetworkOverviewResponse(self): + """Test BaseResponseNetworkOverviewResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_params.py b/test/test/test_base_response_params.py new file mode 100644 index 0000000..c160f36 --- /dev/null +++ b/test/test/test_base_response_params.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_params import BaseResponseParams + +class TestBaseResponseParams(unittest.TestCase): + """BaseResponseParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseParams: + """Test BaseResponseParams + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseParams` + """ + model = BaseResponseParams() + if include_optional: + return BaseResponseParams( + status = True, + data = revengai.models.params.Params( + debug_hash = '', + binary_size = 56, + architecture = '', + binary_type = '', + binary_format = '', + binary_dynamic = True, + model_name = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseParams( + ) + """ + + def testBaseResponseParams(self): + """Test BaseResponseParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_process_dumps.py b/test/test/test_base_response_process_dumps.py new file mode 100644 index 0000000..b689525 --- /dev/null +++ b/test/test/test_base_response_process_dumps.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_process_dumps import BaseResponseProcessDumps + +class TestBaseResponseProcessDumps(unittest.TestCase): + """BaseResponseProcessDumps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseProcessDumps: + """Test BaseResponseProcessDumps + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseProcessDumps` + """ + model = BaseResponseProcessDumps() + if include_optional: + return BaseResponseProcessDumps( + status = True, + data = revengai.models.process_dumps.ProcessDumps( + success = True, + data = revengai.models.process_dumps_data.ProcessDumpsData( + count = 56, + dumps = [ + revengai.models.process_dump.ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), ) + ], ), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseProcessDumps( + ) + """ + + def testBaseResponseProcessDumps(self): + """Test BaseResponseProcessDumps""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_process_registry.py b/test/test/test_base_response_process_registry.py new file mode 100644 index 0000000..e0a4f96 --- /dev/null +++ b/test/test/test_base_response_process_registry.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_process_registry import BaseResponseProcessRegistry + +class TestBaseResponseProcessRegistry(unittest.TestCase): + """BaseResponseProcessRegistry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseProcessRegistry: + """Test BaseResponseProcessRegistry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseProcessRegistry` + """ + model = BaseResponseProcessRegistry() + if include_optional: + return BaseResponseProcessRegistry( + status = True, + data = revengai.models.process_registry.ProcessRegistry( + success = True, + data = { + 'key' : [ + revengai.models.registry.Registry( + method = '', + key = '', + value_name = '', + value = '', ) + ] + }, ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseProcessRegistry( + ) + """ + + def testBaseResponseProcessRegistry(self): + """Test BaseResponseProcessRegistry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_process_tree.py b/test/test/test_base_response_process_tree.py new file mode 100644 index 0000000..1e5c56c --- /dev/null +++ b/test/test/test_base_response_process_tree.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_process_tree import BaseResponseProcessTree + +class TestBaseResponseProcessTree(unittest.TestCase): + """BaseResponseProcessTree unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseProcessTree: + """Test BaseResponseProcessTree + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseProcessTree` + """ + model = BaseResponseProcessTree() + if include_optional: + return BaseResponseProcessTree( + status = True, + data = revengai.models.process_tree.ProcessTree( + success = True, + data = [ + revengai.models.process.Process( + pid = 56, + procname = '', + executable_name = '', + args = [ + '' + ], + ts_from = 1.337, + ts_to = 1.337, + children = [ + null + ], ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseProcessTree( + ) + """ + + def testBaseResponseProcessTree(self): + """Test BaseResponseProcessTree""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_queued_security_checks_task_response.py b/test/test/test_base_response_queued_security_checks_task_response.py new file mode 100644 index 0000000..e744b28 --- /dev/null +++ b/test/test/test_base_response_queued_security_checks_task_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_queued_security_checks_task_response import BaseResponseQueuedSecurityChecksTaskResponse + +class TestBaseResponseQueuedSecurityChecksTaskResponse(unittest.TestCase): + """BaseResponseQueuedSecurityChecksTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseQueuedSecurityChecksTaskResponse: + """Test BaseResponseQueuedSecurityChecksTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseQueuedSecurityChecksTaskResponse` + """ + model = BaseResponseQueuedSecurityChecksTaskResponse() + if include_optional: + return BaseResponseQueuedSecurityChecksTaskResponse( + status = True, + data = revengai.models.queued_security_checks_task_response.QueuedSecurityChecksTaskResponse( + task_id = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseQueuedSecurityChecksTaskResponse( + ) + """ + + def testBaseResponseQueuedSecurityChecksTaskResponse(self): + """Test BaseResponseQueuedSecurityChecksTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_recent.py b/test/test/test_base_response_recent.py new file mode 100644 index 0000000..6b60a87 --- /dev/null +++ b/test/test/test_base_response_recent.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_recent import BaseResponseRecent + +class TestBaseResponseRecent(unittest.TestCase): + """BaseResponseRecent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseRecent: + """Test BaseResponseRecent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseRecent` + """ + model = BaseResponseRecent() + if include_optional: + return BaseResponseRecent( + status = True, + data = revengai.models.recent.Recent( + results = [ + revengai.models.analysis_record.AnalysisRecord( + analysis_id = 56, + analysis_scope = '', + binary_id = 56, + model_id = 56, + status = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_owner = True, + binary_name = '', + sha_256_hash = '', + binary_size = 56, + username = '', + dynamic_execution_status = 'PENDING', + dynamic_execution_task_id = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseRecent( + ) + """ + + def testBaseResponseRecent(self): + """Test BaseResponseRecent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_security_checks_response.py b/test/test/test_base_response_security_checks_response.py new file mode 100644 index 0000000..7b227d8 --- /dev/null +++ b/test/test/test_base_response_security_checks_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_security_checks_response import BaseResponseSecurityChecksResponse + +class TestBaseResponseSecurityChecksResponse(unittest.TestCase): + """BaseResponseSecurityChecksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseSecurityChecksResponse: + """Test BaseResponseSecurityChecksResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseSecurityChecksResponse` + """ + model = BaseResponseSecurityChecksResponse() + if include_optional: + return BaseResponseSecurityChecksResponse( + status = True, + data = revengai.models.security_checks_response.SecurityChecksResponse( + binary_id = 56, + total_results = 56, + results = [ + revengai.models.security_checks_result.SecurityChecksResult( + function_id = 56, + function_name = '', + name = '', + vuln_class = 'UNSAFE_FUNCTIONS', + description = '', + remediation = '', + confidence = 'FALSE_POSITIVE', + severity = 'CRITICAL', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseSecurityChecksResponse( + ) + """ + + def testBaseResponseSecurityChecksResponse(self): + """Test BaseResponseSecurityChecksResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_status.py b/test/test/test_base_response_status.py new file mode 100644 index 0000000..c143cea --- /dev/null +++ b/test/test/test_base_response_status.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_status import BaseResponseStatus + +class TestBaseResponseStatus(unittest.TestCase): + """BaseResponseStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseStatus: + """Test BaseResponseStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseStatus` + """ + model = BaseResponseStatus() + if include_optional: + return BaseResponseStatus( + status = True, + data = revengai.models.status.Status( + analysis_id = 56, + analysis_status = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseStatus( + ) + """ + + def testBaseResponseStatus(self): + """Test BaseResponseStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_str.py b/test/test/test_base_response_str.py new file mode 100644 index 0000000..f87d743 --- /dev/null +++ b/test/test/test_base_response_str.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_str import BaseResponseStr + +class TestBaseResponseStr(unittest.TestCase): + """BaseResponseStr unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseStr: + """Test BaseResponseStr + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseStr` + """ + model = BaseResponseStr() + if include_optional: + return BaseResponseStr( + status = True, + data = '', + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseStr( + ) + """ + + def testBaseResponseStr(self): + """Test BaseResponseStr""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_symbols_info.py b/test/test/test_base_response_symbols_info.py new file mode 100644 index 0000000..6c9c467 --- /dev/null +++ b/test/test/test_base_response_symbols_info.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_symbols_info import BaseResponseSymbolsInfo + +class TestBaseResponseSymbolsInfo(unittest.TestCase): + """BaseResponseSymbolsInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseSymbolsInfo: + """Test BaseResponseSymbolsInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseSymbolsInfo` + """ + model = BaseResponseSymbolsInfo() + if include_optional: + return BaseResponseSymbolsInfo( + status = True, + data = revengai.models.symbols_info.SymbolsInfo( + base_addr = 56, + provided_boundaries = revengai.models.boundary.Boundary( + start_addr = 56, + end_addr = 56, + name = '', ), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseSymbolsInfo( + ) + """ + + def testBaseResponseSymbolsInfo(self): + """Test BaseResponseSymbolsInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_tag_search_response.py b/test/test/test_base_response_tag_search_response.py new file mode 100644 index 0000000..3ab0804 --- /dev/null +++ b/test/test/test_base_response_tag_search_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse + +class TestBaseResponseTagSearchResponse(unittest.TestCase): + """BaseResponseTagSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseTagSearchResponse: + """Test BaseResponseTagSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseTagSearchResponse` + """ + model = BaseResponseTagSearchResponse() + if include_optional: + return BaseResponseTagSearchResponse( + status = True, + data = revengai.models.tag_search_response.TagSearchResponse( + results = [ + revengai.models.tag_search_result.TagSearchResult( + tag_id = 56, + tag = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseTagSearchResponse( + ) + """ + + def testBaseResponseTagSearchResponse(self): + """Test BaseResponseTagSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_task_response.py b/test/test/test_base_response_task_response.py new file mode 100644 index 0000000..1f23d94 --- /dev/null +++ b/test/test/test_base_response_task_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_task_response import BaseResponseTaskResponse + +class TestBaseResponseTaskResponse(unittest.TestCase): + """BaseResponseTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseTaskResponse: + """Test BaseResponseTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseTaskResponse` + """ + model = BaseResponseTaskResponse() + if include_optional: + return BaseResponseTaskResponse( + status = True, + data = revengai.models.task_response.TaskResponse( + status = 'UNINITIALISED', + error_message = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseTaskResponse( + ) + """ + + def testBaseResponseTaskResponse(self): + """Test BaseResponseTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_ttps.py b/test/test/test_base_response_ttps.py new file mode 100644 index 0000000..719eb69 --- /dev/null +++ b/test/test/test_base_response_ttps.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_ttps import BaseResponseTTPS + +class TestBaseResponseTTPS(unittest.TestCase): + """BaseResponseTTPS unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseTTPS: + """Test BaseResponseTTPS + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseTTPS` + """ + model = BaseResponseTTPS() + if include_optional: + return BaseResponseTTPS( + status = True, + data = revengai.models.ttps.TTPS( + success = True, + data = revengai.models.ttps_data.TTPS_Data( + score = 56, + ttps = [ + revengai.models.ttps_element.TTPS_Element( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, ) + ], ), ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseTTPS( + ) + """ + + def testBaseResponseTTPS(self): + """Test BaseResponseTTPS""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_upload_response.py b/test/test/test_base_response_upload_response.py new file mode 100644 index 0000000..54f4ed7 --- /dev/null +++ b/test/test/test_base_response_upload_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_upload_response import BaseResponseUploadResponse + +class TestBaseResponseUploadResponse(unittest.TestCase): + """BaseResponseUploadResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseUploadResponse: + """Test BaseResponseUploadResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseUploadResponse` + """ + model = BaseResponseUploadResponse() + if include_optional: + return BaseResponseUploadResponse( + status = True, + data = revengai.models.upload_response.UploadResponse( + sha_256_hash = '', + file_type = 'BINARY', + filename = '', ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseUploadResponse( + ) + """ + + def testBaseResponseUploadResponse(self): + """Test BaseResponseUploadResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_base_response_vulnerabilities.py b/test/test/test_base_response_vulnerabilities.py new file mode 100644 index 0000000..4caf040 --- /dev/null +++ b/test/test/test_base_response_vulnerabilities.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities + +class TestBaseResponseVulnerabilities(unittest.TestCase): + """BaseResponseVulnerabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseVulnerabilities: + """Test BaseResponseVulnerabilities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseVulnerabilities` + """ + model = BaseResponseVulnerabilities() + if include_optional: + return BaseResponseVulnerabilities( + status = True, + data = revengai.models.vulnerabilities.Vulnerabilities( + vulnerabilities = [ + revengai.models.vulnerability.Vulnerability( + vendor = '', + product = '', + version = '', + cve_number = '', + severity = 'CRITICAL', + source = '', + cvss_version = '', + cvss_vector = '', + remarks = '', + score = 1.337, + is_unknown = True, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseVulnerabilities( + ) + """ + + def testBaseResponseVulnerabilities(self): + """Test BaseResponseVulnerabilities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_basic.py b/test/test/test_basic.py new file mode 100644 index 0000000..2a7c7fe --- /dev/null +++ b/test/test/test_basic.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.basic import Basic + +class TestBasic(unittest.TestCase): + """Basic unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Basic: + """Test Basic + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Basic` + """ + model = Basic() + if include_optional: + return Basic( + binary_name = '', + binary_size = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sha_256_hash = '', + model_name = '', + owner_username = '', + analysis_scope = '', + is_owner = True, + debug = True, + function_count = 56, + is_advanced = True + ) + else: + return Basic( + binary_name = '', + binary_size = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sha_256_hash = '', + model_name = '', + owner_username = '', + analysis_scope = '', + is_owner = True, + debug = True, + function_count = 56, + is_advanced = True, + ) + """ + + def testBasic(self): + """Test Basic""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binaries_api.py b/test/test/test_binaries_api.py new file mode 100644 index 0000000..9bac202 --- /dev/null +++ b/test/test/test_binaries_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.binaries_api import BinariesApi + + +class TestBinariesApi(unittest.TestCase): + """BinariesApi unit test stubs""" + + def setUp(self) -> None: + self.api = BinariesApi() + + def tearDown(self) -> None: + pass + + def test_download_zipped_binary(self) -> None: + """Test case for download_zipped_binary + + Downloads a zipped binary with password protection + """ + pass + + def test_get_binary_additional_details(self) -> None: + """Test case for get_binary_additional_details + + Gets the additional details of a binary + """ + pass + + def test_get_binary_details(self) -> None: + """Test case for get_binary_details + + Gets the details of a binary + """ + pass + + def test_get_binary_die_info(self) -> None: + """Test case for get_binary_die_info + + Gets the die info of a binary + """ + pass + + def test_get_binary_externals(self) -> None: + """Test case for get_binary_externals + + Gets the external details of a binary + """ + pass + + def test_get_related_binaries(self) -> None: + """Test case for get_related_binaries + + Gets the related binaries of a binary. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_additional_details_data_response.py b/test/test/test_binary_additional_details_data_response.py new file mode 100644 index 0000000..a220ad3 --- /dev/null +++ b/test/test/test_binary_additional_details_data_response.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse + +class TestBinaryAdditionalDetailsDataResponse(unittest.TestCase): + """BinaryAdditionalDetailsDataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryAdditionalDetailsDataResponse: + """Test BinaryAdditionalDetailsDataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryAdditionalDetailsDataResponse` + """ + model = BinaryAdditionalDetailsDataResponse() + if include_optional: + return BinaryAdditionalDetailsDataResponse( + file = revengai.models.file_metadata.FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), ), + pe = revengai.models.pe_model.PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ), ), + elf = revengai.models.elf_model.ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + }, ) + ) + else: + return BinaryAdditionalDetailsDataResponse( + file = revengai.models.file_metadata.FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), ), + ) + """ + + def testBinaryAdditionalDetailsDataResponse(self): + """Test BinaryAdditionalDetailsDataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_additional_response.py b/test/test/test_binary_additional_response.py new file mode 100644 index 0000000..315551c --- /dev/null +++ b/test/test/test_binary_additional_response.py @@ -0,0 +1,441 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_additional_response import BinaryAdditionalResponse + +class TestBinaryAdditionalResponse(unittest.TestCase): + """BinaryAdditionalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryAdditionalResponse: + """Test BinaryAdditionalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryAdditionalResponse` + """ + model = BinaryAdditionalResponse() + if include_optional: + return BinaryAdditionalResponse( + binary_id = 56, + details = revengai.models.binary_additional_details_data_response.BinaryAdditionalDetailsDataResponse( + file = revengai.models.file_metadata.FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), ), + pe = revengai.models.pe_model.PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ), ), + elf = revengai.models.elf_model.ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + }, ), ), + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return BinaryAdditionalResponse( + binary_id = 56, + details = revengai.models.binary_additional_details_data_response.BinaryAdditionalDetailsDataResponse( + file = revengai.models.file_metadata.FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), ), + pe = revengai.models.pe_model.PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ), ), + elf = revengai.models.elf_model.ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + }, ), ), + ) + """ + + def testBinaryAdditionalResponse(self): + """Test BinaryAdditionalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_ann_form.py b/test/test/test_binary_ann_form.py new file mode 100644 index 0000000..42ee4be --- /dev/null +++ b/test/test/test_binary_ann_form.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_ann_form import BinaryAnnForm + +class TestBinaryAnnForm(unittest.TestCase): + """BinaryAnnForm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryAnnForm: + """Test BinaryAnnForm + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryAnnForm` + """ + model = BinaryAnnForm() + if include_optional: + return BinaryAnnForm( + confidence = 0.0, + nns = 1.0, + collection_ids = [ + 56 + ], + binary_ids = [ + 56 + ] + ) + else: + return BinaryAnnForm( + ) + """ + + def testBinaryAnnForm(self): + """Test BinaryAnnForm""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_ann_list_response.py b/test/test/test_binary_ann_list_response.py new file mode 100644 index 0000000..c316273 --- /dev/null +++ b/test/test/test_binary_ann_list_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_ann_list_response import BinaryAnnListResponse + +class TestBinaryAnnListResponse(unittest.TestCase): + """BinaryAnnListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryAnnListResponse: + """Test BinaryAnnListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryAnnListResponse` + """ + model = BinaryAnnListResponse() + if include_optional: + return BinaryAnnListResponse( + list = [ + revengai.models.exported_binary_ann_result.ExportedBinaryAnnResult( + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + analysis_scope = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + confidence = 1.337, + tags = [ + revengai.models.tag_item.TagItem( + tag = '', + origin = '', ) + ], ) + ] + ) + else: + return BinaryAnnListResponse( + list = [ + revengai.models.exported_binary_ann_result.ExportedBinaryAnnResult( + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + analysis_scope = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + confidence = 1.337, + tags = [ + revengai.models.tag_item.TagItem( + tag = '', + origin = '', ) + ], ) + ], + ) + """ + + def testBinaryAnnListResponse(self): + """Test BinaryAnnListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_config.py b/test/test/test_binary_config.py new file mode 100644 index 0000000..3a7a786 --- /dev/null +++ b/test/test/test_binary_config.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_config import BinaryConfig + +class TestBinaryConfig(unittest.TestCase): + """BinaryConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryConfig: + """Test BinaryConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryConfig` + """ + model = BinaryConfig() + if include_optional: + return BinaryConfig( + isa = 'x86', + platform = 'linux', + file_format = 'pe' + ) + else: + return BinaryConfig( + ) + """ + + def testBinaryConfig(self): + """Test BinaryConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_details_response.py b/test/test/test_binary_details_response.py new file mode 100644 index 0000000..1b924e3 --- /dev/null +++ b/test/test/test_binary_details_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_details_response import BinaryDetailsResponse + +class TestBinaryDetailsResponse(unittest.TestCase): + """BinaryDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryDetailsResponse: + """Test BinaryDetailsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryDetailsResponse` + """ + model = BinaryDetailsResponse() + if include_optional: + return BinaryDetailsResponse( + arch = '', + bits = 56, + crc32 = '', + var_class = '', + entropy = 1.337, + file_size = 56, + language = '', + md5 = '', + machine = '', + os = '', + sha1 = '', + sha256 = '', + ssdeep = '', + static = True, + stripped = True, + sub_sys = '', + tlsh = '', + type = '', + debug = True, + first_seen = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return BinaryDetailsResponse( + arch = '', + bits = 56, + crc32 = '', + var_class = '', + entropy = 1.337, + file_size = 56, + language = '', + md5 = '', + machine = '', + os = '', + sha1 = '', + sha256 = '', + ssdeep = '', + static = True, + stripped = True, + sub_sys = '', + tlsh = '', + type = '', + debug = True, + first_seen = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testBinaryDetailsResponse(self): + """Test BinaryDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_externals_response.py b/test/test/test_binary_externals_response.py new file mode 100644 index 0000000..45c73be --- /dev/null +++ b/test/test/test_binary_externals_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_externals_response import BinaryExternalsResponse + +class TestBinaryExternalsResponse(unittest.TestCase): + """BinaryExternalsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinaryExternalsResponse: + """Test BinaryExternalsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinaryExternalsResponse` + """ + model = BinaryExternalsResponse() + if include_optional: + return BinaryExternalsResponse( + sha_256_hash = '', + vt = { + 'key' : null + }, + vt_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + mb = { + 'key' : null + }, + mb_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return BinaryExternalsResponse( + sha_256_hash = '', + vt = { + 'key' : null + }, + vt_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + mb = { + 'key' : null + }, + mb_last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testBinaryExternalsResponse(self): + """Test BinaryExternalsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_search_response.py b/test/test/test_binary_search_response.py new file mode 100644 index 0000000..9bedab0 --- /dev/null +++ b/test/test/test_binary_search_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_search_response import BinarySearchResponse + +class TestBinarySearchResponse(unittest.TestCase): + """BinarySearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinarySearchResponse: + """Test BinarySearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinarySearchResponse` + """ + model = BinarySearchResponse() + if include_optional: + return BinarySearchResponse( + results = [ + revengai.models.binary_search_result.BinarySearchResult( + binary_id = 56, + binary_name = '', + analysis_id = 56, + sha_256_hash = '', + tags = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ] + ) + else: + return BinarySearchResponse( + results = [ + revengai.models.binary_search_result.BinarySearchResult( + binary_id = 56, + binary_name = '', + analysis_id = 56, + sha_256_hash = '', + tags = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ], + ) + """ + + def testBinarySearchResponse(self): + """Test BinarySearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_search_result.py b/test/test/test_binary_search_result.py new file mode 100644 index 0000000..8084c23 --- /dev/null +++ b/test/test/test_binary_search_result.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_search_result import BinarySearchResult + +class TestBinarySearchResult(unittest.TestCase): + """BinarySearchResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BinarySearchResult: + """Test BinarySearchResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BinarySearchResult` + """ + model = BinarySearchResult() + if include_optional: + return BinarySearchResult( + binary_id = 56, + binary_name = '', + analysis_id = 56, + sha_256_hash = '', + tags = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '' + ) + else: + return BinarySearchResult( + binary_id = 56, + binary_name = '', + analysis_id = 56, + sha_256_hash = '', + tags = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + ) + """ + + def testBinarySearchResult(self): + """Test BinarySearchResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_binary_task_status.py b/test/test/test_binary_task_status.py new file mode 100644 index 0000000..45016c7 --- /dev/null +++ b/test/test/test_binary_task_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.binary_task_status import BinaryTaskStatus + +class TestBinaryTaskStatus(unittest.TestCase): + """BinaryTaskStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBinaryTaskStatus(self): + """Test BinaryTaskStatus""" + # inst = BinaryTaskStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_block.py b/test/test/test_block.py new file mode 100644 index 0000000..cb0114a --- /dev/null +++ b/test/test/test_block.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.block import Block + +class TestBlock(unittest.TestCase): + """Block unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Block: + """Test Block + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Block` + """ + model = Block() + if include_optional: + return Block( + virtual_address = 56 + ) + else: + return Block( + virtual_address = 56, + ) + """ + + def testBlock(self): + """Test Block""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_block_comments_generation_for_function_response.py b/test/test/test_block_comments_generation_for_function_response.py new file mode 100644 index 0000000..48b7907 --- /dev/null +++ b/test/test/test_block_comments_generation_for_function_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse + +class TestBlockCommentsGenerationForFunctionResponse(unittest.TestCase): + """BlockCommentsGenerationForFunctionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockCommentsGenerationForFunctionResponse: + """Test BlockCommentsGenerationForFunctionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BlockCommentsGenerationForFunctionResponse` + """ + model = BlockCommentsGenerationForFunctionResponse() + if include_optional: + return BlockCommentsGenerationForFunctionResponse( + updated_blocks = 56 + ) + else: + return BlockCommentsGenerationForFunctionResponse( + updated_blocks = 56, + ) + """ + + def testBlockCommentsGenerationForFunctionResponse(self): + """Test BlockCommentsGenerationForFunctionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_boundary.py b/test/test/test_boundary.py new file mode 100644 index 0000000..d5c1000 --- /dev/null +++ b/test/test/test_boundary.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.boundary import Boundary + +class TestBoundary(unittest.TestCase): + """Boundary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Boundary: + """Test Boundary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Boundary` + """ + model = Boundary() + if include_optional: + return Boundary( + start_addr = 56, + end_addr = 56, + name = '' + ) + else: + return Boundary( + start_addr = 56, + end_addr = 56, + name = '', + ) + """ + + def testBoundary(self): + """Test Boundary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_box_plot_confidence.py b/test/test/test_box_plot_confidence.py new file mode 100644 index 0000000..a04e9e6 --- /dev/null +++ b/test/test/test_box_plot_confidence.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.box_plot_confidence import BoxPlotConfidence + +class TestBoxPlotConfidence(unittest.TestCase): + """BoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BoxPlotConfidence: + """Test BoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BoxPlotConfidence` + """ + model = BoxPlotConfidence() + if include_optional: + return BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56 + ) + else: + return BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, + ) + """ + + def testBoxPlotConfidence(self): + """Test BoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_callee_function_info.py b/test/test/test_callee_function_info.py new file mode 100644 index 0000000..14c4bd6 --- /dev/null +++ b/test/test/test_callee_function_info.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.callee_function_info import CalleeFunctionInfo + +class TestCalleeFunctionInfo(unittest.TestCase): + """CalleeFunctionInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CalleeFunctionInfo: + """Test CalleeFunctionInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CalleeFunctionInfo` + """ + model = CalleeFunctionInfo() + if include_optional: + return CalleeFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + callee_name = 'FUN_001e1370', + callee_vaddr = '1971056' + ) + else: + return CalleeFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + callee_name = 'FUN_001e1370', + callee_vaddr = '1971056', + ) + """ + + def testCalleeFunctionInfo(self): + """Test CalleeFunctionInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_callees_caller_functions_response.py b/test/test/test_callees_caller_functions_response.py new file mode 100644 index 0000000..8303384 --- /dev/null +++ b/test/test/test_callees_caller_functions_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse + +class TestCalleesCallerFunctionsResponse(unittest.TestCase): + """CalleesCallerFunctionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CalleesCallerFunctionsResponse: + """Test CalleesCallerFunctionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CalleesCallerFunctionsResponse` + """ + model = CalleesCallerFunctionsResponse() + if include_optional: + return CalleesCallerFunctionsResponse( + base_address = 56, + callees = [ + revengai.models.callee_function_info.CalleeFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + callee_name = 'FUN_001e1370', + callee_vaddr = '1971056', ) + ], + callers = [ + revengai.models.caller_function_info.CallerFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + caller_name = 'FUN_0002a5d8', + caller_vaddr = '173528', ) + ] + ) + else: + return CalleesCallerFunctionsResponse( + callees = [ + revengai.models.callee_function_info.CalleeFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + callee_name = 'FUN_001e1370', + callee_vaddr = '1971056', ) + ], + callers = [ + revengai.models.caller_function_info.CallerFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + caller_name = 'FUN_0002a5d8', + caller_vaddr = '173528', ) + ], + ) + """ + + def testCalleesCallerFunctionsResponse(self): + """Test CalleesCallerFunctionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_caller_function_info.py b/test/test/test_caller_function_info.py new file mode 100644 index 0000000..27e0207 --- /dev/null +++ b/test/test/test_caller_function_info.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.caller_function_info import CallerFunctionInfo + +class TestCallerFunctionInfo(unittest.TestCase): + """CallerFunctionInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CallerFunctionInfo: + """Test CallerFunctionInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CallerFunctionInfo` + """ + model = CallerFunctionInfo() + if include_optional: + return CallerFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + is_external = True, + caller_name = 'FUN_0002a5d8', + caller_vaddr = '173528' + ) + else: + return CallerFunctionInfo( + function_id = 56, + matched_function_id = 56, + dashboard_url = '', + caller_name = 'FUN_0002a5d8', + caller_vaddr = '173528', + ) + """ + + def testCallerFunctionInfo(self): + """Test CallerFunctionInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_capabilities.py b/test/test/test_capabilities.py new file mode 100644 index 0000000..860f298 --- /dev/null +++ b/test/test/test_capabilities.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.capabilities import Capabilities + +class TestCapabilities(unittest.TestCase): + """Capabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Capabilities: + """Test Capabilities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Capabilities` + """ + model = Capabilities() + if include_optional: + return Capabilities( + capabilities = [ + revengai.models.capability.Capability( + function_name = '', + function_vaddr = 56, + capabilities = [ + '' + ], ) + ] + ) + else: + return Capabilities( + capabilities = [ + revengai.models.capability.Capability( + function_name = '', + function_vaddr = 56, + capabilities = [ + '' + ], ) + ], + ) + """ + + def testCapabilities(self): + """Test Capabilities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_capability.py b/test/test/test_capability.py new file mode 100644 index 0000000..7dd055b --- /dev/null +++ b/test/test/test_capability.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.capability import Capability + +class TestCapability(unittest.TestCase): + """Capability unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Capability: + """Test Capability + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Capability` + """ + model = Capability() + if include_optional: + return Capability( + function_name = '', + function_vaddr = 56, + capabilities = [ + '' + ] + ) + else: + return Capability( + function_name = '', + function_vaddr = 56, + capabilities = [ + '' + ], + ) + """ + + def testCapability(self): + """Test Capability""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_check_security_checks_task_response.py b/test/test/test_check_security_checks_task_response.py new file mode 100644 index 0000000..a7d4645 --- /dev/null +++ b/test/test/test_check_security_checks_task_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.check_security_checks_task_response import CheckSecurityChecksTaskResponse + +class TestCheckSecurityChecksTaskResponse(unittest.TestCase): + """CheckSecurityChecksTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckSecurityChecksTaskResponse: + """Test CheckSecurityChecksTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckSecurityChecksTaskResponse` + """ + model = CheckSecurityChecksTaskResponse() + if include_optional: + return CheckSecurityChecksTaskResponse( + status = 'UNINITIALISED' + ) + else: + return CheckSecurityChecksTaskResponse( + status = 'UNINITIALISED', + ) + """ + + def testCheckSecurityChecksTaskResponse(self): + """Test CheckSecurityChecksTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_child_binaries_response.py b/test/test/test_child_binaries_response.py new file mode 100644 index 0000000..07025bf --- /dev/null +++ b/test/test/test_child_binaries_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.child_binaries_response import ChildBinariesResponse + +class TestChildBinariesResponse(unittest.TestCase): + """ChildBinariesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChildBinariesResponse: + """Test ChildBinariesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChildBinariesResponse` + """ + model = ChildBinariesResponse() + if include_optional: + return ChildBinariesResponse( + children = [ + revengai.models.relative_binary_response.RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', ) + ], + parent = revengai.models.relative_binary_response.RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', ) + ) + else: + return ChildBinariesResponse( + children = [ + revengai.models.relative_binary_response.RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', ) + ], + ) + """ + + def testChildBinariesResponse(self): + """Test ChildBinariesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_code_signature_model.py b/test/test/test_code_signature_model.py new file mode 100644 index 0000000..c0ae8a2 --- /dev/null +++ b/test/test/test_code_signature_model.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.code_signature_model import CodeSignatureModel + +class TestCodeSignatureModel(unittest.TestCase): + """CodeSignatureModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CodeSignatureModel: + """Test CodeSignatureModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CodeSignatureModel` + """ + model = CodeSignatureModel() + if include_optional: + return CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ] + ) + else: + return CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], + ) + """ + + def testCodeSignatureModel(self): + """Test CodeSignatureModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_binaries_update_request.py b/test/test/test_collection_binaries_update_request.py new file mode 100644 index 0000000..3a32365 --- /dev/null +++ b/test/test/test_collection_binaries_update_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest + +class TestCollectionBinariesUpdateRequest(unittest.TestCase): + """CollectionBinariesUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionBinariesUpdateRequest: + """Test CollectionBinariesUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionBinariesUpdateRequest` + """ + model = CollectionBinariesUpdateRequest() + if include_optional: + return CollectionBinariesUpdateRequest( + binaries = [ + 56 + ] + ) + else: + return CollectionBinariesUpdateRequest( + binaries = [ + 56 + ], + ) + """ + + def testCollectionBinariesUpdateRequest(self): + """Test CollectionBinariesUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_binaries_update_response.py b/test/test/test_collection_binaries_update_response.py new file mode 100644 index 0000000..64d3735 --- /dev/null +++ b/test/test/test_collection_binaries_update_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_binaries_update_response import CollectionBinariesUpdateResponse + +class TestCollectionBinariesUpdateResponse(unittest.TestCase): + """CollectionBinariesUpdateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionBinariesUpdateResponse: + """Test CollectionBinariesUpdateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionBinariesUpdateResponse` + """ + model = CollectionBinariesUpdateResponse() + if include_optional: + return CollectionBinariesUpdateResponse( + binaries = [ + revengai.models.collection_binary_response.CollectionBinaryResponse( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return CollectionBinariesUpdateResponse( + binaries = [ + revengai.models.collection_binary_response.CollectionBinaryResponse( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testCollectionBinariesUpdateResponse(self): + """Test CollectionBinariesUpdateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_binary_response.py b/test/test/test_collection_binary_response.py new file mode 100644 index 0000000..be10d05 --- /dev/null +++ b/test/test/test_collection_binary_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_binary_response import CollectionBinaryResponse + +class TestCollectionBinaryResponse(unittest.TestCase): + """CollectionBinaryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionBinaryResponse: + """Test CollectionBinaryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionBinaryResponse` + """ + model = CollectionBinaryResponse() + if include_optional: + return CollectionBinaryResponse( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CollectionBinaryResponse( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testCollectionBinaryResponse(self): + """Test CollectionBinaryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_create_request.py b/test/test/test_collection_create_request.py new file mode 100644 index 0000000..2a1698c --- /dev/null +++ b/test/test/test_collection_create_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_create_request import CollectionCreateRequest + +class TestCollectionCreateRequest(unittest.TestCase): + """CollectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionCreateRequest: + """Test CollectionCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionCreateRequest` + """ + model = CollectionCreateRequest() + if include_optional: + return CollectionCreateRequest( + collection_name = '', + description = '', + collection_scope = 'PRIVATE', + tags = [ + '' + ], + binaries = [ + 56 + ], + model_id = 56 + ) + else: + return CollectionCreateRequest( + collection_name = '', + description = '', + model_id = 56, + ) + """ + + def testCollectionCreateRequest(self): + """Test CollectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_list_item.py b/test/test/test_collection_list_item.py new file mode 100644 index 0000000..aa384bc --- /dev/null +++ b/test/test/test_collection_list_item.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_list_item import CollectionListItem + +class TestCollectionListItem(unittest.TestCase): + """CollectionListItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionListItem: + """Test CollectionListItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionListItem` + """ + model = CollectionListItem() + if include_optional: + return CollectionListItem( + collection_name = '', + description = '', + collection_scope = '', + collection_owner = '', + official_collection = True, + collection_tags = [ + '' + ], + collection_size = 56, + collection_id = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_name = '', + team_id = 56 + ) + else: + return CollectionListItem( + collection_name = '', + description = '', + collection_scope = '', + collection_owner = '', + official_collection = True, + collection_size = 56, + collection_id = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_name = '', + ) + """ + + def testCollectionListItem(self): + """Test CollectionListItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_response.py b/test/test/test_collection_response.py new file mode 100644 index 0000000..7b064c5 --- /dev/null +++ b/test/test/test_collection_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_response import CollectionResponse + +class TestCollectionResponse(unittest.TestCase): + """CollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionResponse: + """Test CollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionResponse` + """ + model = CollectionResponse() + if include_optional: + return CollectionResponse( + collection_id = 56, + collection_name = '', + description = '', + model_id = 56, + user_id = 56, + team_id = 56, + collection_scope = 'PRIVATE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tags = [ + '' + ], + binaries = [ + null + ] + ) + else: + return CollectionResponse( + collection_id = 56, + collection_name = '', + description = '', + model_id = 56, + user_id = 56, + collection_scope = 'PRIVATE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testCollectionResponse(self): + """Test CollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_response_binaries_inner.py b/test/test/test_collection_response_binaries_inner.py new file mode 100644 index 0000000..9599763 --- /dev/null +++ b/test/test/test_collection_response_binaries_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_response_binaries_inner import CollectionResponseBinariesInner + +class TestCollectionResponseBinariesInner(unittest.TestCase): + """CollectionResponseBinariesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionResponseBinariesInner: + """Test CollectionResponseBinariesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionResponseBinariesInner` + """ + model = CollectionResponseBinariesInner() + if include_optional: + return CollectionResponseBinariesInner( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CollectionResponseBinariesInner( + analysis_id = 56, + binary_id = 56, + binary_name = '', + owner_id = 56, + sha_256_hash = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testCollectionResponseBinariesInner(self): + """Test CollectionResponseBinariesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_scope.py b/test/test/test_collection_scope.py new file mode 100644 index 0000000..52b4c7d --- /dev/null +++ b/test/test/test_collection_scope.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_scope import CollectionScope + +class TestCollectionScope(unittest.TestCase): + """CollectionScope unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionScope(self): + """Test CollectionScope""" + # inst = CollectionScope() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_search_response.py b/test/test/test_collection_search_response.py new file mode 100644 index 0000000..ad4fbd8 --- /dev/null +++ b/test/test/test_collection_search_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_search_response import CollectionSearchResponse + +class TestCollectionSearchResponse(unittest.TestCase): + """CollectionSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionSearchResponse: + """Test CollectionSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionSearchResponse` + """ + model = CollectionSearchResponse() + if include_optional: + return CollectionSearchResponse( + results = [ + revengai.models.collection_search_result.CollectionSearchResult( + collection_id = 56, + collection_name = '', + scope = '', + last_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + tags = [ + '' + ], + size = 56, + description = '', + team_id = 56, ) + ] + ) + else: + return CollectionSearchResponse( + results = [ + revengai.models.collection_search_result.CollectionSearchResult( + collection_id = 56, + collection_name = '', + scope = '', + last_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + tags = [ + '' + ], + size = 56, + description = '', + team_id = 56, ) + ], + ) + """ + + def testCollectionSearchResponse(self): + """Test CollectionSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_search_result.py b/test/test/test_collection_search_result.py new file mode 100644 index 0000000..94170a1 --- /dev/null +++ b/test/test/test_collection_search_result.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_search_result import CollectionSearchResult + +class TestCollectionSearchResult(unittest.TestCase): + """CollectionSearchResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionSearchResult: + """Test CollectionSearchResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionSearchResult` + """ + model = CollectionSearchResult() + if include_optional: + return CollectionSearchResult( + collection_id = 56, + collection_name = '', + scope = '', + last_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + tags = [ + '' + ], + size = 56, + description = '', + team_id = 56 + ) + else: + return CollectionSearchResult( + collection_id = 56, + collection_name = '', + scope = '', + last_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + description = '', + ) + """ + + def testCollectionSearchResult(self): + """Test CollectionSearchResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_tags_update_request.py b/test/test/test_collection_tags_update_request.py new file mode 100644 index 0000000..58e48a1 --- /dev/null +++ b/test/test/test_collection_tags_update_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest + +class TestCollectionTagsUpdateRequest(unittest.TestCase): + """CollectionTagsUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionTagsUpdateRequest: + """Test CollectionTagsUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionTagsUpdateRequest` + """ + model = CollectionTagsUpdateRequest() + if include_optional: + return CollectionTagsUpdateRequest( + tags = [ + '' + ] + ) + else: + return CollectionTagsUpdateRequest( + tags = [ + '' + ], + ) + """ + + def testCollectionTagsUpdateRequest(self): + """Test CollectionTagsUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_tags_update_response.py b/test/test/test_collection_tags_update_response.py new file mode 100644 index 0000000..d71d5d3 --- /dev/null +++ b/test/test/test_collection_tags_update_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_tags_update_response import CollectionTagsUpdateResponse + +class TestCollectionTagsUpdateResponse(unittest.TestCase): + """CollectionTagsUpdateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionTagsUpdateResponse: + """Test CollectionTagsUpdateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionTagsUpdateResponse` + """ + model = CollectionTagsUpdateResponse() + if include_optional: + return CollectionTagsUpdateResponse( + tags = [ + '' + ] + ) + else: + return CollectionTagsUpdateResponse( + tags = [ + '' + ], + ) + """ + + def testCollectionTagsUpdateResponse(self): + """Test CollectionTagsUpdateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collection_update_request.py b/test/test/test_collection_update_request.py new file mode 100644 index 0000000..2e47c82 --- /dev/null +++ b/test/test/test_collection_update_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.collection_update_request import CollectionUpdateRequest + +class TestCollectionUpdateRequest(unittest.TestCase): + """CollectionUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CollectionUpdateRequest: + """Test CollectionUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionUpdateRequest` + """ + model = CollectionUpdateRequest() + if include_optional: + return CollectionUpdateRequest( + collection_name = '', + description = '', + collection_scope = 'PRIVATE' + ) + else: + return CollectionUpdateRequest( + ) + """ + + def testCollectionUpdateRequest(self): + """Test CollectionUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_collections_api.py b/test/test/test_collections_api.py new file mode 100644 index 0000000..ff900b8 --- /dev/null +++ b/test/test/test_collections_api.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.collections_api import CollectionsApi + + +class TestCollectionsApi(unittest.TestCase): + """CollectionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CollectionsApi() + + def tearDown(self) -> None: + pass + + def test_create_collection(self) -> None: + """Test case for create_collection + + Creates new collection information + """ + pass + + def test_delete_collection(self) -> None: + """Test case for delete_collection + + Deletes a collection + """ + pass + + def test_get_collection(self) -> None: + """Test case for get_collection + + Returns a collection + """ + pass + + def test_list_collections(self) -> None: + """Test case for list_collections + + Gets basic collections information + """ + pass + + def test_update_collection(self) -> None: + """Test case for update_collection + + Updates a collection + """ + pass + + def test_update_collection_binaries(self) -> None: + """Test case for update_collection_binaries + + Updates a collection binaries + """ + pass + + def test_update_collection_tags(self) -> None: + """Test case for update_collection_tags + + Updates a collection tags + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_comment_base.py b/test/test/test_comment_base.py new file mode 100644 index 0000000..f2ce330 --- /dev/null +++ b/test/test/test_comment_base.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.comment_base import CommentBase + +class TestCommentBase(unittest.TestCase): + """CommentBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommentBase: + """Test CommentBase + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommentBase` + """ + model = CommentBase() + if include_optional: + return CommentBase( + content = '' + ) + else: + return CommentBase( + content = '', + ) + """ + + def testCommentBase(self): + """Test CommentBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_comment_response.py b/test/test/test_comment_response.py new file mode 100644 index 0000000..1711c83 --- /dev/null +++ b/test/test/test_comment_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.comment_response import CommentResponse + +class TestCommentResponse(unittest.TestCase): + """CommentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommentResponse: + """Test CommentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommentResponse` + """ + model = CommentResponse() + if include_optional: + return CommentResponse( + content = '', + id = 56, + user_id = 56, + resource_type = '', + resource_id = '', + context = None, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CommentResponse( + content = '', + id = 56, + user_id = 56, + resource_type = '', + resource_id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testCommentResponse(self): + """Test CommentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_comment_update_request.py b/test/test/test_comment_update_request.py new file mode 100644 index 0000000..49d5945 --- /dev/null +++ b/test/test/test_comment_update_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.comment_update_request import CommentUpdateRequest + +class TestCommentUpdateRequest(unittest.TestCase): + """CommentUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommentUpdateRequest: + """Test CommentUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommentUpdateRequest` + """ + model = CommentUpdateRequest() + if include_optional: + return CommentUpdateRequest( + content = '' + ) + else: + return CommentUpdateRequest( + content = '', + ) + """ + + def testCommentUpdateRequest(self): + """Test CommentUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_communities.py b/test/test/test_communities.py new file mode 100644 index 0000000..a4bdfaf --- /dev/null +++ b/test/test/test_communities.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.communities import Communities + +class TestCommunities(unittest.TestCase): + """Communities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Communities: + """Test Communities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Communities` + """ + model = Communities() + if include_optional: + return Communities( + total_functions = 56, + total_matched_functions = 56, + direct_community_match_percentages = [ + revengai.models.community_match_percentages.CommunityMatchPercentages( + binary_name = '', + binary_id = 56, + matched_communities_percent = 1.337, + unmatched_communities_percent = 1.337, ) + ], + top_components = [ + { + 'key' : null + } + ] + ) + else: + return Communities( + total_functions = 56, + total_matched_functions = 56, + direct_community_match_percentages = [ + revengai.models.community_match_percentages.CommunityMatchPercentages( + binary_name = '', + binary_id = 56, + matched_communities_percent = 1.337, + unmatched_communities_percent = 1.337, ) + ], + top_components = [ + { + 'key' : null + } + ], + ) + """ + + def testCommunities(self): + """Test Communities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_community_match_percentages.py b/test/test/test_community_match_percentages.py new file mode 100644 index 0000000..0fd92d6 --- /dev/null +++ b/test/test/test_community_match_percentages.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.community_match_percentages import CommunityMatchPercentages + +class TestCommunityMatchPercentages(unittest.TestCase): + """CommunityMatchPercentages unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommunityMatchPercentages: + """Test CommunityMatchPercentages + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommunityMatchPercentages` + """ + model = CommunityMatchPercentages() + if include_optional: + return CommunityMatchPercentages( + binary_name = '', + binary_id = 56, + matched_communities_percent = 1.337, + unmatched_communities_percent = 1.337 + ) + else: + return CommunityMatchPercentages( + binary_name = '', + binary_id = 56, + matched_communities_percent = 1.337, + unmatched_communities_percent = 1.337, + ) + """ + + def testCommunityMatchPercentages(self): + """Test CommunityMatchPercentages""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_confidence_api.py b/test/test/test_confidence_api.py new file mode 100644 index 0000000..40a6e37 --- /dev/null +++ b/test/test/test_confidence_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.confidence_api import ConfidenceApi + + +class TestConfidenceApi(unittest.TestCase): + """ConfidenceApi unit test stubs""" + + def setUp(self) -> None: + self.api = ConfidenceApi() + + def tearDown(self) -> None: + pass + + def test_get_analysis_tag_score(self) -> None: + """Test case for get_analysis_tag_score + + Calculate Tag Confidence Score for an Analysis + """ + pass + + def test_get_analysis_threat_score(self) -> None: + """Test case for get_analysis_threat_score + + Calculate Threat Score for Binary + """ + pass + + def test_get_functions_name_score(self) -> None: + """Test case for get_functions_name_score + + Calculate function name confidence for a set of Functions + """ + pass + + def test_get_functions_threat_score(self) -> None: + """Test case for get_functions_threat_score + + Calculate Threat Score for a set of Functions + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_confidence_type.py b/test/test/test_confidence_type.py new file mode 100644 index 0000000..679a723 --- /dev/null +++ b/test/test/test_confidence_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.confidence_type import ConfidenceType + +class TestConfidenceType(unittest.TestCase): + """ConfidenceType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConfidenceType(self): + """Test ConfidenceType""" + # inst = ConfidenceType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_context.py b/test/test/test_context.py new file mode 100644 index 0000000..688ee3e --- /dev/null +++ b/test/test/test_context.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.context import Context + +class TestContext(unittest.TestCase): + """Context unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Context: + """Test Context + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Context` + """ + model = Context() + if include_optional: + return Context( + start_line = 56, + end_line = 56 + ) + else: + return Context( + start_line = 56, + end_line = 56, + ) + """ + + def testContext(self): + """Test Context""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_created.py b/test/test/test_created.py new file mode 100644 index 0000000..cb183d6 --- /dev/null +++ b/test/test/test_created.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.created import Created + +class TestCreated(unittest.TestCase): + """Created unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Created: + """Test Created + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Created` + """ + model = Created() + if include_optional: + return Created( + analysis_id = 56, + binary_id = 56, + reference = '' + ) + else: + return Created( + analysis_id = 56, + binary_id = 56, + reference = '', + ) + """ + + def testCreated(self): + """Test Created""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_decompilation_comment_context.py b/test/test/test_decompilation_comment_context.py new file mode 100644 index 0000000..9176534 --- /dev/null +++ b/test/test/test_decompilation_comment_context.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.decompilation_comment_context import DecompilationCommentContext + +class TestDecompilationCommentContext(unittest.TestCase): + """DecompilationCommentContext unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DecompilationCommentContext: + """Test DecompilationCommentContext + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DecompilationCommentContext` + """ + model = DecompilationCommentContext() + if include_optional: + return DecompilationCommentContext( + start_line = 56, + end_line = 56 + ) + else: + return DecompilationCommentContext( + start_line = 56, + end_line = 56, + ) + """ + + def testDecompilationCommentContext(self): + """Test DecompilationCommentContext""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_decompilation_response.py b/test/test/test_decompilation_response.py new file mode 100644 index 0000000..9515327 --- /dev/null +++ b/test/test/test_decompilation_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.decompilation_response import DecompilationResponse + +class TestDecompilationResponse(unittest.TestCase): + """DecompilationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DecompilationResponse: + """Test DecompilationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DecompilationResponse` + """ + model = DecompilationResponse() + if include_optional: + return DecompilationResponse( + function_id = 56, + decompilation = '', + calling_convention = '' + ) + else: + return DecompilationResponse( + function_id = 56, + decompilation = '', + calling_convention = '', + ) + """ + + def testDecompilationResponse(self): + """Test DecompilationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_die_match.py b/test/test/test_die_match.py new file mode 100644 index 0000000..fa0362a --- /dev/null +++ b/test/test/test_die_match.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.die_match import DieMatch + +class TestDieMatch(unittest.TestCase): + """DieMatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DieMatch: + """Test DieMatch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DieMatch` + """ + model = DieMatch() + if include_optional: + return DieMatch( + name = '', + type = '', + display = '', + version = '' + ) + else: + return DieMatch( + name = '', + type = '', + display = '', + version = '', + ) + """ + + def testDieMatch(self): + """Test DieMatch""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_dynamic_execution_status_input.py b/test/test/test_dynamic_execution_status_input.py new file mode 100644 index 0000000..135a195 --- /dev/null +++ b/test/test/test_dynamic_execution_status_input.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput + +class TestDynamicExecutionStatusInput(unittest.TestCase): + """DynamicExecutionStatusInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDynamicExecutionStatusInput(self): + """Test DynamicExecutionStatusInput""" + # inst = DynamicExecutionStatusInput() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_dynamic_entry.py b/test/test/test_elf_dynamic_entry.py new file mode 100644 index 0000000..803bdda --- /dev/null +++ b/test/test/test_elf_dynamic_entry.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_dynamic_entry import ElfDynamicEntry + +class TestElfDynamicEntry(unittest.TestCase): + """ElfDynamicEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ElfDynamicEntry: + """Test ElfDynamicEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ElfDynamicEntry` + """ + model = ElfDynamicEntry() + if include_optional: + return ElfDynamicEntry( + tag = '', + value = 56 + ) + else: + return ElfDynamicEntry( + tag = '', + value = 56, + ) + """ + + def testElfDynamicEntry(self): + """Test ElfDynamicEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_import_model.py b/test/test/test_elf_import_model.py new file mode 100644 index 0000000..2a41934 --- /dev/null +++ b/test/test/test_elf_import_model.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_import_model import ELFImportModel + +class TestELFImportModel(unittest.TestCase): + """ELFImportModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFImportModel: + """Test ELFImportModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFImportModel` + """ + model = ELFImportModel() + if include_optional: + return ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ] + ) + else: + return ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], + ) + """ + + def testELFImportModel(self): + """Test ELFImportModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_model.py b/test/test/test_elf_model.py new file mode 100644 index 0000000..0ca7b59 --- /dev/null +++ b/test/test/test_elf_model.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_model import ELFModel + +class TestELFModel(unittest.TestCase): + """ELFModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFModel: + """Test ELFModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFModel` + """ + model = ELFModel() + if include_optional: + return ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + } + ) + else: + return ELFModel( + file_type = '', + architecture = '', + endianness = '', + entry_point = 56, + entry_point_bytes = '', + import_hash = '', + export_hash = '', + build_id = '', + security = revengai.models.elf_security.ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, ), + sections = [ + revengai.models.elf_section.ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, ) + ], + segments = [ + revengai.models.elf_segment.ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, ) + ], + symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + dynamic_symbols = [ + revengai.models.elf_symbol.ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, ) + ], + relocations = [ + revengai.models.elf_relocation.ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, ) + ], + imports = revengai.models.elf_import_model.ELFImportModel( + number_of_imports = 56, + imports = [ + '' + ], ), + exported_functions = [ + '' + ], + dynamic_entries = [ + revengai.models.elf_dynamic_entry.ElfDynamicEntry( + tag = '', + value = 56, ) + ], + notes = [ + { + 'key' : null + } + ], + debug_info = { + 'key' : null + }, + version_info = { + 'key' : null + }, + ) + """ + + def testELFModel(self): + """Test ELFModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_relocation.py b/test/test/test_elf_relocation.py new file mode 100644 index 0000000..de96cb6 --- /dev/null +++ b/test/test/test_elf_relocation.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_relocation import ELFRelocation + +class TestELFRelocation(unittest.TestCase): + """ELFRelocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFRelocation: + """Test ELFRelocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFRelocation` + """ + model = ELFRelocation() + if include_optional: + return ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True + ) + else: + return ELFRelocation( + address = 56, + type = 56, + size = 56, + addend = 56, + symbol_name = '', + is_dynamic = True, + is_pltgot = True, + ) + """ + + def testELFRelocation(self): + """Test ELFRelocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_section.py b/test/test/test_elf_section.py new file mode 100644 index 0000000..31f2e0b --- /dev/null +++ b/test/test/test_elf_section.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_section import ELFSection + +class TestELFSection(unittest.TestCase): + """ELFSection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFSection: + """Test ELFSection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFSection` + """ + model = ELFSection() + if include_optional: + return ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56 + ) + else: + return ELFSection( + name = '', + type = '', + virtual_address = 56, + virtual_size = 56, + raw_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + entropy = 1.337, + alignment = 56, + ) + """ + + def testELFSection(self): + """Test ELFSection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_security.py b/test/test/test_elf_security.py new file mode 100644 index 0000000..acff890 --- /dev/null +++ b/test/test/test_elf_security.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_security import ELFSecurity + +class TestELFSecurity(unittest.TestCase): + """ELFSecurity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFSecurity: + """Test ELFSecurity + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFSecurity` + """ + model = ELFSecurity() + if include_optional: + return ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True + ) + else: + return ELFSecurity( + pie = True, + stripped = True, + canary = True, + nx = True, + relo = True, + ) + """ + + def testELFSecurity(self): + """Test ELFSecurity""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_segment.py b/test/test/test_elf_segment.py new file mode 100644 index 0000000..5567ade --- /dev/null +++ b/test/test/test_elf_segment.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_segment import ELFSegment + +class TestELFSegment(unittest.TestCase): + """ELFSegment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFSegment: + """Test ELFSegment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFSegment` + """ + model = ELFSegment() + if include_optional: + return ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56 + ) + else: + return ELFSegment( + type = '', + virtual_address = 56, + virtual_size = 56, + physical_address = 56, + physical_size = 56, + file_offset = 56, + flags = '', + flags_raw = 56, + alignment = 56, + ) + """ + + def testELFSegment(self): + """Test ELFSegment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_elf_symbol.py b/test/test/test_elf_symbol.py new file mode 100644 index 0000000..89baf6d --- /dev/null +++ b/test/test/test_elf_symbol.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.elf_symbol import ELFSymbol + +class TestELFSymbol(unittest.TestCase): + """ELFSymbol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ELFSymbol: + """Test ELFSymbol + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ELFSymbol` + """ + model = ELFSymbol() + if include_optional: + return ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56 + ) + else: + return ELFSymbol( + name = '', + value = 56, + size = 56, + type = '', + binding = '', + visibility = '', + section_index = 56, + ) + """ + + def testELFSymbol(self): + """Test ELFSymbol""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_entrypoint_model.py b/test/test/test_entrypoint_model.py new file mode 100644 index 0000000..e9b82c9 --- /dev/null +++ b/test/test/test_entrypoint_model.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.entrypoint_model import EntrypointModel + +class TestEntrypointModel(unittest.TestCase): + """EntrypointModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntrypointModel: + """Test EntrypointModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntrypointModel` + """ + model = EntrypointModel() + if include_optional: + return EntrypointModel( + address = 56, + first_bytes = '' + ) + else: + return EntrypointModel( + address = 56, + first_bytes = '', + ) + """ + + def testEntrypointModel(self): + """Test EntrypointModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_enumeration.py b/test/test/test_enumeration.py new file mode 100644 index 0000000..a29d317 --- /dev/null +++ b/test/test/test_enumeration.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.enumeration import Enumeration + +class TestEnumeration(unittest.TestCase): + """Enumeration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Enumeration: + """Test Enumeration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Enumeration` + """ + model = Enumeration() + if include_optional: + return Enumeration( + last_change = '', + name = '', + members = { + 'key' : 56 + }, + artifact_type = '' + ) + else: + return Enumeration( + name = '', + members = { + 'key' : 56 + }, + ) + """ + + def testEnumeration(self): + """Test Enumeration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_error_model.py b/test/test/test_error_model.py new file mode 100644 index 0000000..5a1583f --- /dev/null +++ b/test/test/test_error_model.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.error_model import ErrorModel + +class TestErrorModel(unittest.TestCase): + """ErrorModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ErrorModel: + """Test ErrorModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorModel` + """ + model = ErrorModel() + if include_optional: + return ErrorModel( + code = '', + message = '' + ) + else: + return ErrorModel( + code = '', + message = '', + ) + """ + + def testErrorModel(self): + """Test ErrorModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_export_model.py b/test/test/test_export_model.py new file mode 100644 index 0000000..c90cc38 --- /dev/null +++ b/test/test/test_export_model.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.export_model import ExportModel + +class TestExportModel(unittest.TestCase): + """ExportModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportModel: + """Test ExportModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportModel` + """ + model = ExportModel() + if include_optional: + return ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ] + ) + else: + return ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], + ) + """ + + def testExportModel(self): + """Test ExportModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_exported_binary_ann_result.py b/test/test/test_exported_binary_ann_result.py new file mode 100644 index 0000000..f26c2a5 --- /dev/null +++ b/test/test/test_exported_binary_ann_result.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.exported_binary_ann_result import ExportedBinaryAnnResult + +class TestExportedBinaryAnnResult(unittest.TestCase): + """ExportedBinaryAnnResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportedBinaryAnnResult: + """Test ExportedBinaryAnnResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportedBinaryAnnResult` + """ + model = ExportedBinaryAnnResult() + if include_optional: + return ExportedBinaryAnnResult( + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + analysis_scope = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + confidence = 1.337, + tags = [ + revengai.models.tag_item.TagItem( + tag = '', + origin = '', ) + ] + ) + else: + return ExportedBinaryAnnResult( + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + analysis_scope = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + confidence = 1.337, + ) + """ + + def testExportedBinaryAnnResult(self): + """Test ExportedBinaryAnnResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_external_response.py b/test/test/test_external_response.py new file mode 100644 index 0000000..9118abc --- /dev/null +++ b/test/test/test_external_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.external_response import ExternalResponse + +class TestExternalResponse(unittest.TestCase): + """ExternalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExternalResponse: + """Test ExternalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExternalResponse` + """ + model = ExternalResponse() + if include_optional: + return ExternalResponse( + sha_256_hash = '', + data = { + 'key' : null + }, + last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ExternalResponse( + sha_256_hash = '', + data = { + 'key' : null + }, + last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testExternalResponse(self): + """Test ExternalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_external_sources_api.py b/test/test/test_external_sources_api.py new file mode 100644 index 0000000..ab7de71 --- /dev/null +++ b/test/test/test_external_sources_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.external_sources_api import ExternalSourcesApi + + +class TestExternalSourcesApi(unittest.TestCase): + """ExternalSourcesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ExternalSourcesApi() + + def tearDown(self) -> None: + pass + + def test_create_external_task_mb(self) -> None: + """Test case for create_external_task_mb + + Pulls data from VirusTotal + """ + pass + + def test_create_external_task_vt(self) -> None: + """Test case for create_external_task_vt + + Pulls data from VirusTotal + """ + pass + + def test_get_mb_data(self) -> None: + """Test case for get_mb_data + + Get MalwareBazaar data + """ + pass + + def test_get_mb_task_status(self) -> None: + """Test case for get_mb_task_status + + Check the status of MalwareBazaar data retrieval + """ + pass + + def test_get_vt_data(self) -> None: + """Test case for get_vt_data + + Get VirusTotal data + """ + pass + + def test_get_vt_task_status(self) -> None: + """Test case for get_vt_task_status + + Check the status of VirusTotal data retrieval + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_file_format.py b/test/test/test_file_format.py new file mode 100644 index 0000000..27f1f4f --- /dev/null +++ b/test/test/test_file_format.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.file_format import FileFormat + +class TestFileFormat(unittest.TestCase): + """FileFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileFormat(self): + """Test FileFormat""" + # inst = FileFormat() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_file_hashes.py b/test/test/test_file_hashes.py new file mode 100644 index 0000000..68edbba --- /dev/null +++ b/test/test/test_file_hashes.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.file_hashes import FileHashes + +class TestFileHashes(unittest.TestCase): + """FileHashes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileHashes: + """Test FileHashes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileHashes` + """ + model = FileHashes() + if include_optional: + return FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '' + ) + else: + return FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', + ) + """ + + def testFileHashes(self): + """Test FileHashes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_file_metadata.py b/test/test/test_file_metadata.py new file mode 100644 index 0000000..2e8dffc --- /dev/null +++ b/test/test/test_file_metadata.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.file_metadata import FileMetadata + +class TestFileMetadata(unittest.TestCase): + """FileMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileMetadata: + """Test FileMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileMetadata` + """ + model = FileMetadata() + if include_optional: + return FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ) + ) + else: + return FileMetadata( + size = 56, + friendly_size = '', + entropy = 1.337, + hashes = revengai.models.file_hashes.FileHashes( + md5 = '', + sha1 = '', + sha256 = '', + sha512 = '', + sha3_224 = '', + sha3_256 = '', + sha3_384 = '', + sha3_512 = '', ), + ) + """ + + def testFileMetadata(self): + """Test FileMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_filters.py b/test/test/test_filters.py new file mode 100644 index 0000000..7bc7898 --- /dev/null +++ b/test/test/test_filters.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.filters import Filters + +class TestFilters(unittest.TestCase): + """Filters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFilters(self): + """Test Filters""" + # inst = Filters() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_firmware_api.py b/test/test/test_firmware_api.py new file mode 100644 index 0000000..2045784 --- /dev/null +++ b/test/test/test_firmware_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.firmware_api import FirmwareApi + + +class TestFirmwareApi(unittest.TestCase): + """FirmwareApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirmwareApi() + + def tearDown(self) -> None: + pass + + def test_get_binaries_for_firmware_task(self) -> None: + """Test case for get_binaries_for_firmware_task + + Upload firmware for unpacking + """ + pass + + def test_upload_firmware(self) -> None: + """Test case for upload_firmware + + Upload firmware for unpacking + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_analysis_threat_score_data.py b/test/test/test_function_analysis_threat_score_data.py new file mode 100644 index 0000000..8219d51 --- /dev/null +++ b/test/test/test_function_analysis_threat_score_data.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData + +class TestFunctionAnalysisThreatScoreData(unittest.TestCase): + """FunctionAnalysisThreatScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionAnalysisThreatScoreData: + """Test FunctionAnalysisThreatScoreData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionAnalysisThreatScoreData` + """ + model = FunctionAnalysisThreatScoreData() + if include_optional: + return FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56 + ) + else: + return FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, + ) + """ + + def testFunctionAnalysisThreatScoreData(self): + """Test FunctionAnalysisThreatScoreData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_block_destination_response.py b/test/test/test_function_block_destination_response.py new file mode 100644 index 0000000..41ddbbd --- /dev/null +++ b/test/test/test_function_block_destination_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse + +class TestFunctionBlockDestinationResponse(unittest.TestCase): + """FunctionBlockDestinationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionBlockDestinationResponse: + """Test FunctionBlockDestinationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionBlockDestinationResponse` + """ + model = FunctionBlockDestinationResponse() + if include_optional: + return FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '' + ) + else: + return FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', + ) + """ + + def testFunctionBlockDestinationResponse(self): + """Test FunctionBlockDestinationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_block_response.py b/test/test/test_function_block_response.py new file mode 100644 index 0000000..732dccc --- /dev/null +++ b/test/test/test_function_block_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_block_response import FunctionBlockResponse + +class TestFunctionBlockResponse(unittest.TestCase): + """FunctionBlockResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionBlockResponse: + """Test FunctionBlockResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionBlockResponse` + """ + model = FunctionBlockResponse() + if include_optional: + return FunctionBlockResponse( + asm = [ + '' + ], + id = 56, + min_addr = 56, + max_addr = 56, + destinations = [ + revengai.models.function_block_destination_response.FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', ) + ], + comment = '' + ) + else: + return FunctionBlockResponse( + asm = [ + '' + ], + id = 56, + min_addr = 56, + max_addr = 56, + destinations = [ + revengai.models.function_block_destination_response.FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', ) + ], + ) + """ + + def testFunctionBlockResponse(self): + """Test FunctionBlockResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_blocks_response.py b/test/test/test_function_blocks_response.py new file mode 100644 index 0000000..9a24809 --- /dev/null +++ b/test/test/test_function_blocks_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_blocks_response import FunctionBlocksResponse + +class TestFunctionBlocksResponse(unittest.TestCase): + """FunctionBlocksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionBlocksResponse: + """Test FunctionBlocksResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionBlocksResponse` + """ + model = FunctionBlocksResponse() + if include_optional: + return FunctionBlocksResponse( + blocks = [ + revengai.models.function_block_response.FunctionBlockResponse( + asm = [ + '' + ], + id = 56, + min_addr = 56, + max_addr = 56, + destinations = [ + revengai.models.function_block_destination_response.FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', ) + ], + comment = '', ) + ], + local_variables = [ + revengai.models.function_local_variable_response.FunctionLocalVariableResponse( + address = '', + d_type = '', + size = 56, + loc = '', + name = '', ) + ], + params = [ + revengai.models.function_param_response.FunctionParamResponse( + d_type = '', + loc = '', + addr = '', + length = 56, + name = '', ) + ], + overview_comment = '' + ) + else: + return FunctionBlocksResponse( + blocks = [ + revengai.models.function_block_response.FunctionBlockResponse( + asm = [ + '' + ], + id = 56, + min_addr = 56, + max_addr = 56, + destinations = [ + revengai.models.function_block_destination_response.FunctionBlockDestinationResponse( + destination_block_id = 56, + flowtype = '', + vaddr = '', ) + ], + comment = '', ) + ], + local_variables = [ + revengai.models.function_local_variable_response.FunctionLocalVariableResponse( + address = '', + d_type = '', + size = 56, + loc = '', + name = '', ) + ], + params = [ + revengai.models.function_param_response.FunctionParamResponse( + d_type = '', + loc = '', + addr = '', + length = 56, + name = '', ) + ], + overview_comment = '', + ) + """ + + def testFunctionBlocksResponse(self): + """Test FunctionBlocksResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_boundary.py b/test/test/test_function_boundary.py new file mode 100644 index 0000000..07cb72d --- /dev/null +++ b/test/test/test_function_boundary.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_boundary import FunctionBoundary + +class TestFunctionBoundary(unittest.TestCase): + """FunctionBoundary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionBoundary: + """Test FunctionBoundary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionBoundary` + """ + model = FunctionBoundary() + if include_optional: + return FunctionBoundary( + name = '', + start_address = 56, + end_address = 56 + ) + else: + return FunctionBoundary( + name = '', + start_address = 56, + end_address = 56, + ) + """ + + def testFunctionBoundary(self): + """Test FunctionBoundary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_box_plot_confidence.py b/test/test/test_function_box_plot_confidence.py new file mode 100644 index 0000000..54f0875 --- /dev/null +++ b/test/test/test_function_box_plot_confidence.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence + +class TestFunctionBoxPlotConfidence(unittest.TestCase): + """FunctionBoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionBoxPlotConfidence: + """Test FunctionBoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionBoxPlotConfidence` + """ + model = FunctionBoxPlotConfidence() + if include_optional: + return FunctionBoxPlotConfidence( + function_id = 56, + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ) + ) + else: + return FunctionBoxPlotConfidence( + function_id = 56, + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ), + ) + """ + + def testFunctionBoxPlotConfidence(self): + """Test FunctionBoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_capability_response.py b/test/test/test_function_capability_response.py new file mode 100644 index 0000000..5054c19 --- /dev/null +++ b/test/test/test_function_capability_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_capability_response import FunctionCapabilityResponse + +class TestFunctionCapabilityResponse(unittest.TestCase): + """FunctionCapabilityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionCapabilityResponse: + """Test FunctionCapabilityResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionCapabilityResponse` + """ + model = FunctionCapabilityResponse() + if include_optional: + return FunctionCapabilityResponse( + capabilities = [ + '' + ] + ) + else: + return FunctionCapabilityResponse( + capabilities = [ + '' + ], + ) + """ + + def testFunctionCapabilityResponse(self): + """Test FunctionCapabilityResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_comment_create_request.py b/test/test/test_function_comment_create_request.py new file mode 100644 index 0000000..b0e9de9 --- /dev/null +++ b/test/test/test_function_comment_create_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_comment_create_request import FunctionCommentCreateRequest + +class TestFunctionCommentCreateRequest(unittest.TestCase): + """FunctionCommentCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionCommentCreateRequest: + """Test FunctionCommentCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionCommentCreateRequest` + """ + model = FunctionCommentCreateRequest() + if include_optional: + return FunctionCommentCreateRequest( + content = '', + context = revengai.models.decompilation_comment_context.DecompilationCommentContext( + start_line = 56, + end_line = 56, ) + ) + else: + return FunctionCommentCreateRequest( + content = '', + ) + """ + + def testFunctionCommentCreateRequest(self): + """Test FunctionCommentCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_data_types.py b/test/test/test_function_data_types.py new file mode 100644 index 0000000..580a5dc --- /dev/null +++ b/test/test/test_function_data_types.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_data_types import FunctionDataTypes + +class TestFunctionDataTypes(unittest.TestCase): + """FunctionDataTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionDataTypes: + """Test FunctionDataTypes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionDataTypes` + """ + model = FunctionDataTypes() + if include_optional: + return FunctionDataTypes( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56 + ) + else: + return FunctionDataTypes( + completed = True, + status = '', + ) + """ + + def testFunctionDataTypes(self): + """Test FunctionDataTypes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_data_types_list.py b/test/test/test_function_data_types_list.py new file mode 100644 index 0000000..ff11497 --- /dev/null +++ b/test/test/test_function_data_types_list.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_data_types_list import FunctionDataTypesList + +class TestFunctionDataTypesList(unittest.TestCase): + """FunctionDataTypesList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionDataTypesList: + """Test FunctionDataTypesList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionDataTypesList` + """ + model = FunctionDataTypesList() + if include_optional: + return FunctionDataTypesList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_list_item.FunctionDataTypesListItem( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56, + function_id = 56, ) + ] + ) + else: + return FunctionDataTypesList( + items = [ + revengai.models.function_data_types_list_item.FunctionDataTypesListItem( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56, + function_id = 56, ) + ], + ) + """ + + def testFunctionDataTypesList(self): + """Test FunctionDataTypesList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_data_types_list_item.py b/test/test/test_function_data_types_list_item.py new file mode 100644 index 0000000..b8c369e --- /dev/null +++ b/test/test/test_function_data_types_list_item.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_data_types_list_item import FunctionDataTypesListItem + +class TestFunctionDataTypesListItem(unittest.TestCase): + """FunctionDataTypesListItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionDataTypesListItem: + """Test FunctionDataTypesListItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionDataTypesListItem` + """ + model = FunctionDataTypesListItem() + if include_optional: + return FunctionDataTypesListItem( + completed = True, + status = '', + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + data_types_version = 56, + function_id = 56 + ) + else: + return FunctionDataTypesListItem( + completed = True, + status = '', + function_id = 56, + ) + """ + + def testFunctionDataTypesListItem(self): + """Test FunctionDataTypesListItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_data_types_params.py b/test/test/test_function_data_types_params.py new file mode 100644 index 0000000..7d71387 --- /dev/null +++ b/test/test/test_function_data_types_params.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_data_types_params import FunctionDataTypesParams + +class TestFunctionDataTypesParams(unittest.TestCase): + """FunctionDataTypesParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionDataTypesParams: + """Test FunctionDataTypesParams + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionDataTypesParams` + """ + model = FunctionDataTypesParams() + if include_optional: + return FunctionDataTypesParams( + function_ids = [ + 56 + ] + ) + else: + return FunctionDataTypesParams( + function_ids = [ + 56 + ], + ) + """ + + def testFunctionDataTypesParams(self): + """Test FunctionDataTypesParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_data_types_status.py b/test/test/test_function_data_types_status.py new file mode 100644 index 0000000..76b2612 --- /dev/null +++ b/test/test/test_function_data_types_status.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_data_types_status import FunctionDataTypesStatus + +class TestFunctionDataTypesStatus(unittest.TestCase): + """FunctionDataTypesStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionDataTypesStatus: + """Test FunctionDataTypesStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionDataTypesStatus` + """ + model = FunctionDataTypesStatus() + if include_optional: + return FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '' + ) + else: + return FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', + ) + """ + + def testFunctionDataTypesStatus(self): + """Test FunctionDataTypesStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_header.py b/test/test/test_function_header.py new file mode 100644 index 0000000..6447206 --- /dev/null +++ b/test/test/test_function_header.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_header import FunctionHeader + +class TestFunctionHeader(unittest.TestCase): + """FunctionHeader unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionHeader: + """Test FunctionHeader + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionHeader` + """ + model = FunctionHeader() + if include_optional: + return FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + } + ) + else: + return FunctionHeader( + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, + ) + """ + + def testFunctionHeader(self): + """Test FunctionHeader""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_info_input.py b/test/test/test_function_info_input.py new file mode 100644 index 0000000..da8514b --- /dev/null +++ b/test/test/test_function_info_input.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_info_input import FunctionInfoInput + +class TestFunctionInfoInput(unittest.TestCase): + """FunctionInfoInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionInfoInput: + """Test FunctionInfoInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionInfoInput` + """ + model = FunctionInfoInput() + if include_optional: + return FunctionInfoInput( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ] + ) + else: + return FunctionInfoInput( + func_deps = [ + null + ], + ) + """ + + def testFunctionInfoInput(self): + """Test FunctionInfoInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_info_input_func_deps_inner.py b/test/test/test_function_info_input_func_deps_inner.py new file mode 100644 index 0000000..d10fa30 --- /dev/null +++ b/test/test/test_function_info_input_func_deps_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner + +class TestFunctionInfoInputFuncDepsInner(unittest.TestCase): + """FunctionInfoInputFuncDepsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionInfoInputFuncDepsInner: + """Test FunctionInfoInputFuncDepsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionInfoInputFuncDepsInner` + """ + model = FunctionInfoInputFuncDepsInner() + if include_optional: + return FunctionInfoInputFuncDepsInner( + last_change = '', + name = '', + size = 56, + members = { + 'key' : 56 + }, + artifact_type = '', + type = '', + addr = 56 + ) + else: + return FunctionInfoInputFuncDepsInner( + name = '', + size = 56, + members = { + 'key' : 56 + }, + type = '', + addr = 56, + ) + """ + + def testFunctionInfoInputFuncDepsInner(self): + """Test FunctionInfoInputFuncDepsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_info_output.py b/test/test/test_function_info_output.py new file mode 100644 index 0000000..ea3a7da --- /dev/null +++ b/test/test/test_function_info_output.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_info_output import FunctionInfoOutput + +class TestFunctionInfoOutput(unittest.TestCase): + """FunctionInfoOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionInfoOutput: + """Test FunctionInfoOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionInfoOutput` + """ + model = FunctionInfoOutput() + if include_optional: + return FunctionInfoOutput( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ] + ) + else: + return FunctionInfoOutput( + func_deps = [ + null + ], + ) + """ + + def testFunctionInfoOutput(self): + """Test FunctionInfoOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_local_variable_response.py b/test/test/test_function_local_variable_response.py new file mode 100644 index 0000000..dc5776f --- /dev/null +++ b/test/test/test_function_local_variable_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_local_variable_response import FunctionLocalVariableResponse + +class TestFunctionLocalVariableResponse(unittest.TestCase): + """FunctionLocalVariableResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionLocalVariableResponse: + """Test FunctionLocalVariableResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionLocalVariableResponse` + """ + model = FunctionLocalVariableResponse() + if include_optional: + return FunctionLocalVariableResponse( + address = '', + d_type = '', + size = 56, + loc = '', + name = '' + ) + else: + return FunctionLocalVariableResponse( + address = '', + d_type = '', + size = 56, + loc = '', + name = '', + ) + """ + + def testFunctionLocalVariableResponse(self): + """Test FunctionLocalVariableResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_mapping_full.py b/test/test/test_function_mapping_full.py new file mode 100644 index 0000000..cac82a1 --- /dev/null +++ b/test/test/test_function_mapping_full.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_mapping_full import FunctionMappingFull + +class TestFunctionMappingFull(unittest.TestCase): + """FunctionMappingFull unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionMappingFull: + """Test FunctionMappingFull + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionMappingFull` + """ + model = FunctionMappingFull() + if include_optional: + return FunctionMappingFull( + inverse_string_map = { + 'key' : revengai.models.inverse_string_map_item.InverseStringMapItem( + string = '', + addr = 56, ) + }, + inverse_function_map = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + unmatched_functions = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_types = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_strings = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_go_to_labels = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_function_pointers = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_variadic_lists = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + fields = { + 'key' : { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + } + } + ) + else: + return FunctionMappingFull( + inverse_string_map = { + 'key' : revengai.models.inverse_string_map_item.InverseStringMapItem( + string = '', + addr = 56, ) + }, + inverse_function_map = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + unmatched_functions = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_types = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_strings = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_go_to_labels = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_function_pointers = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_variadic_lists = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + fields = { + 'key' : { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + } + }, + ) + """ + + def testFunctionMappingFull(self): + """Test FunctionMappingFull""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_name_confidence_body.py b/test/test/test_function_name_confidence_body.py new file mode 100644 index 0000000..c5e5dbd --- /dev/null +++ b/test/test/test_function_name_confidence_body.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody + +class TestFunctionNameConfidenceBody(unittest.TestCase): + """FunctionNameConfidenceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionNameConfidenceBody: + """Test FunctionNameConfidenceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionNameConfidenceBody` + """ + model = FunctionNameConfidenceBody() + if include_optional: + return FunctionNameConfidenceBody( + functions = [ + revengai.models.function_name_input.FunctionNameInput( + function_id = 56, + function_name = '', ) + ], + is_debug = True + ) + else: + return FunctionNameConfidenceBody( + ) + """ + + def testFunctionNameConfidenceBody(self): + """Test FunctionNameConfidenceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_name_history.py b/test/test/test_function_name_history.py new file mode 100644 index 0000000..8457478 --- /dev/null +++ b/test/test/test_function_name_history.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_name_history import FunctionNameHistory + +class TestFunctionNameHistory(unittest.TestCase): + """FunctionNameHistory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionNameHistory: + """Test FunctionNameHistory + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionNameHistory` + """ + model = FunctionNameHistory() + if include_optional: + return FunctionNameHistory( + history_id = 56, + change_made_by = '', + function_name = '', + is_debug = True, + source_type = '', + created_at = '' + ) + else: + return FunctionNameHistory( + history_id = 56, + change_made_by = '', + function_name = '', + is_debug = True, + source_type = '', + created_at = '', + ) + """ + + def testFunctionNameHistory(self): + """Test FunctionNameHistory""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_name_input.py b/test/test/test_function_name_input.py new file mode 100644 index 0000000..4e0667c --- /dev/null +++ b/test/test/test_function_name_input.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_name_input import FunctionNameInput + +class TestFunctionNameInput(unittest.TestCase): + """FunctionNameInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionNameInput: + """Test FunctionNameInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionNameInput` + """ + model = FunctionNameInput() + if include_optional: + return FunctionNameInput( + function_id = 56, + function_name = '' + ) + else: + return FunctionNameInput( + function_id = 56, + function_name = '', + ) + """ + + def testFunctionNameInput(self): + """Test FunctionNameInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_param_response.py b/test/test/test_function_param_response.py new file mode 100644 index 0000000..43e3354 --- /dev/null +++ b/test/test/test_function_param_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_param_response import FunctionParamResponse + +class TestFunctionParamResponse(unittest.TestCase): + """FunctionParamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionParamResponse: + """Test FunctionParamResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionParamResponse` + """ + model = FunctionParamResponse() + if include_optional: + return FunctionParamResponse( + d_type = '', + loc = '', + addr = '', + length = 56, + name = '' + ) + else: + return FunctionParamResponse( + d_type = '', + loc = '', + addr = '', + length = 56, + name = '', + ) + """ + + def testFunctionParamResponse(self): + """Test FunctionParamResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_rename.py b/test/test/test_function_rename.py new file mode 100644 index 0000000..8169849 --- /dev/null +++ b/test/test/test_function_rename.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_rename import FunctionRename + +class TestFunctionRename(unittest.TestCase): + """FunctionRename unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionRename: + """Test FunctionRename + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionRename` + """ + model = FunctionRename() + if include_optional: + return FunctionRename( + new_name = '', + new_mangled_name = '' + ) + else: + return FunctionRename( + ) + """ + + def testFunctionRename(self): + """Test FunctionRename""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_rename_map.py b/test/test/test_function_rename_map.py new file mode 100644 index 0000000..a21be2b --- /dev/null +++ b/test/test/test_function_rename_map.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_rename_map import FunctionRenameMap + +class TestFunctionRenameMap(unittest.TestCase): + """FunctionRenameMap unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionRenameMap: + """Test FunctionRenameMap + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionRenameMap` + """ + model = FunctionRenameMap() + if include_optional: + return FunctionRenameMap( + function_id = 56, + new_name = '', + new_mangled_name = '' + ) + else: + return FunctionRenameMap( + function_id = 56, + ) + """ + + def testFunctionRenameMap(self): + """Test FunctionRenameMap""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_search_response.py b/test/test/test_function_search_response.py new file mode 100644 index 0000000..0ccc722 --- /dev/null +++ b/test/test/test_function_search_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_search_response import FunctionSearchResponse + +class TestFunctionSearchResponse(unittest.TestCase): + """FunctionSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionSearchResponse: + """Test FunctionSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionSearchResponse` + """ + model = FunctionSearchResponse() + if include_optional: + return FunctionSearchResponse( + results = [ + revengai.models.function_search_result.FunctionSearchResult( + function_id = 56, + function_name = '', + binary_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ] + ) + else: + return FunctionSearchResponse( + results = [ + revengai.models.function_search_result.FunctionSearchResult( + function_id = 56, + function_name = '', + binary_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', ) + ], + ) + """ + + def testFunctionSearchResponse(self): + """Test FunctionSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_search_result.py b/test/test/test_function_search_result.py new file mode 100644 index 0000000..0cbb475 --- /dev/null +++ b/test/test/test_function_search_result.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_search_result import FunctionSearchResult + +class TestFunctionSearchResult(unittest.TestCase): + """FunctionSearchResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionSearchResult: + """Test FunctionSearchResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionSearchResult` + """ + model = FunctionSearchResult() + if include_optional: + return FunctionSearchResult( + function_id = 56, + function_name = '', + binary_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '' + ) + else: + return FunctionSearchResult( + function_id = 56, + function_name = '', + binary_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_id = 56, + model_name = '', + owned_by = '', + ) + """ + + def testFunctionSearchResult(self): + """Test FunctionSearchResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_string.py b/test/test/test_function_string.py new file mode 100644 index 0000000..a8f668a --- /dev/null +++ b/test/test/test_function_string.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_string import FunctionString + +class TestFunctionString(unittest.TestCase): + """FunctionString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionString: + """Test FunctionString + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionString` + """ + model = FunctionString() + if include_optional: + return FunctionString( + value = '', + vaddr = 56 + ) + else: + return FunctionString( + value = '', + vaddr = 56, + ) + """ + + def testFunctionString(self): + """Test FunctionString""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_strings_response.py b/test/test/test_function_strings_response.py new file mode 100644 index 0000000..a0ca6f3 --- /dev/null +++ b/test/test/test_function_strings_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_strings_response import FunctionStringsResponse + +class TestFunctionStringsResponse(unittest.TestCase): + """FunctionStringsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionStringsResponse: + """Test FunctionStringsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionStringsResponse` + """ + model = FunctionStringsResponse() + if include_optional: + return FunctionStringsResponse( + strings = [ + revengai.models.function_string.FunctionString( + value = '', + vaddr = 56, ) + ], + total_strings = 56 + ) + else: + return FunctionStringsResponse( + strings = [ + revengai.models.function_string.FunctionString( + value = '', + vaddr = 56, ) + ], + total_strings = 56, + ) + """ + + def testFunctionStringsResponse(self): + """Test FunctionStringsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_task_response.py b/test/test/test_function_task_response.py new file mode 100644 index 0000000..e246c98 --- /dev/null +++ b/test/test/test_function_task_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_task_response import FunctionTaskResponse + +class TestFunctionTaskResponse(unittest.TestCase): + """FunctionTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionTaskResponse: + """Test FunctionTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionTaskResponse` + """ + model = FunctionTaskResponse() + if include_optional: + return FunctionTaskResponse( + status = 'UNINITIALISED', + error_message = '' + ) + else: + return FunctionTaskResponse( + ) + """ + + def testFunctionTaskResponse(self): + """Test FunctionTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_task_status.py b/test/test/test_function_task_status.py new file mode 100644 index 0000000..675643d --- /dev/null +++ b/test/test/test_function_task_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_task_status import FunctionTaskStatus + +class TestFunctionTaskStatus(unittest.TestCase): + """FunctionTaskStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFunctionTaskStatus(self): + """Test FunctionTaskStatus""" + # inst = FunctionTaskStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_threat_score.py b/test/test/test_function_threat_score.py new file mode 100644 index 0000000..e90c761 --- /dev/null +++ b/test/test/test_function_threat_score.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_threat_score import FunctionThreatScore + +class TestFunctionThreatScore(unittest.TestCase): + """FunctionThreatScore unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionThreatScore: + """Test FunctionThreatScore + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionThreatScore` + """ + model = FunctionThreatScore() + if include_optional: + return FunctionThreatScore( + results = { + 'key' : revengai.models.function_analysis_threat_score_data.FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, ) + } + ) + else: + return FunctionThreatScore( + results = { + 'key' : revengai.models.function_analysis_threat_score_data.FunctionAnalysisThreatScoreData( + min = 1.337, + max = 1.337, + average = 1.337, + upper = 1.337, + lower = 1.337, + malware_count = 56, + benign_count = 56, ) + }, + ) + """ + + def testFunctionThreatScore(self): + """Test FunctionThreatScore""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_type_input.py b/test/test/test_function_type_input.py new file mode 100644 index 0000000..051b5f9 --- /dev/null +++ b/test/test/test_function_type_input.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_type_input import FunctionTypeInput + +class TestFunctionTypeInput(unittest.TestCase): + """FunctionTypeInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionTypeInput: + """Test FunctionTypeInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionTypeInput` + """ + model = FunctionTypeInput() + if include_optional: + return FunctionTypeInput( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function' + ) + else: + return FunctionTypeInput( + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + name = '', + type = '', + ) + """ + + def testFunctionTypeInput(self): + """Test FunctionTypeInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_function_type_output.py b/test/test/test_function_type_output.py new file mode 100644 index 0000000..944c355 --- /dev/null +++ b/test/test/test_function_type_output.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.function_type_output import FunctionTypeOutput + +class TestFunctionTypeOutput(unittest.TestCase): + """FunctionTypeOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionTypeOutput: + """Test FunctionTypeOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionTypeOutput` + """ + model = FunctionTypeOutput() + if include_optional: + return FunctionTypeOutput( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function' + ) + else: + return FunctionTypeOutput( + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + name = '', + type = '', + ) + """ + + def testFunctionTypeOutput(self): + """Test FunctionTypeOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_ai_decompilation_api.py b/test/test/test_functions_ai_decompilation_api.py new file mode 100644 index 0000000..9bf5ee7 --- /dev/null +++ b/test/test/test_functions_ai_decompilation_api.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi + + +class TestFunctionsAIDecompilationApi(unittest.TestCase): + """FunctionsAIDecompilationApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsAIDecompilationApi() + + def tearDown(self) -> None: + pass + + def test_create_ai_decompilation_comment(self) -> None: + """Test case for create_ai_decompilation_comment + + Create a comment for this function + """ + pass + + def test_create_ai_decompilation_task(self) -> None: + """Test case for create_ai_decompilation_task + + Begins AI Decompilation Process + """ + pass + + def test_delete_ai_decompilation_comment(self) -> None: + """Test case for delete_ai_decompilation_comment + + Delete a comment + """ + pass + + def test_get_ai_decompilation_comments(self) -> None: + """Test case for get_ai_decompilation_comments + + Get comments for this function + """ + pass + + def test_get_ai_decompilation_rating(self) -> None: + """Test case for get_ai_decompilation_rating + + Get rating for AI decompilation + """ + pass + + def test_get_ai_decompilation_task_result(self) -> None: + """Test case for get_ai_decompilation_task_result + + Polls AI Decompilation Process + """ + pass + + def test_get_ai_decompilation_task_status(self) -> None: + """Test case for get_ai_decompilation_task_status + + Check the status of a function ai decompilation + """ + pass + + def test_update_ai_decompilation_comment(self) -> None: + """Test case for update_ai_decompilation_comment + + Update a comment + """ + pass + + def test_upsert_ai_decompilation_rating(self) -> None: + """Test case for upsert_ai_decompilation_rating + + Upsert rating for AI decompilation + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_block_comments_api.py b/test/test/test_functions_block_comments_api.py new file mode 100644 index 0000000..cc4ec01 --- /dev/null +++ b/test/test/test_functions_block_comments_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_block_comments_api import FunctionsBlockCommentsApi + + +class TestFunctionsBlockCommentsApi(unittest.TestCase): + """FunctionsBlockCommentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsBlockCommentsApi() + + def tearDown(self) -> None: + pass + + def test_generate_block_comments_for_block_in_function(self) -> None: + """Test case for generate_block_comments_for_block_in_function + + Generate block comments for a specific block in a function + """ + pass + + def test_generate_block_comments_for_function(self) -> None: + """Test case for generate_block_comments_for_function + + Generate block comments for a function + """ + pass + + def test_generate_overview_comment_for_function(self) -> None: + """Test case for generate_overview_comment_for_function + + Generate overview comment for a function + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_core_api.py b/test/test/test_functions_core_api.py new file mode 100644 index 0000000..4fedc5a --- /dev/null +++ b/test/test/test_functions_core_api.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_core_api import FunctionsCoreApi + + +class TestFunctionsCoreApi(unittest.TestCase): + """FunctionsCoreApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsCoreApi() + + def tearDown(self) -> None: + pass + + def test_ai_unstrip(self) -> None: + """Test case for ai_unstrip + + Performs matching and auto-unstrip for an analysis and its functions + """ + pass + + def test_auto_unstrip(self) -> None: + """Test case for auto_unstrip + + Performs matching and auto-unstrip for an analysis and its functions + """ + pass + + def test_cancel_ai_unstrip(self) -> None: + """Test case for cancel_ai_unstrip + + Cancels a running ai-unstrip + """ + pass + + def test_cancel_auto_unstrip(self) -> None: + """Test case for cancel_auto_unstrip + + Cancels a running auto-unstrip + """ + pass + + def test_get_analysis_strings(self) -> None: + """Test case for get_analysis_strings + + Get string information found in the Analysis + """ + pass + + def test_get_function_blocks(self) -> None: + """Test case for get_function_blocks + + Get disassembly blocks related to the function + """ + pass + + def test_get_function_callees_callers(self) -> None: + """Test case for get_function_callees_callers + + Get list of functions that call or are called by the specified function + """ + pass + + def test_get_function_capabilities(self) -> None: + """Test case for get_function_capabilities + + Retrieve a functions capabilities + """ + pass + + def test_get_function_details(self) -> None: + """Test case for get_function_details + + Get function details + """ + pass + + def test_get_function_strings(self) -> None: + """Test case for get_function_strings + + Get string information found in the function + """ + pass + + def test_get_similar_functions(self) -> None: + """Test case for get_similar_functions + + Get list of similar functions + """ + pass + + def test_unstrip(self) -> None: + """Test case for unstrip + + Performs matching and auto-unstrip for an analysis and its functions + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_data_types_api.py b/test/test/test_functions_data_types_api.py new file mode 100644 index 0000000..e305f42 --- /dev/null +++ b/test/test/test_functions_data_types_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_data_types_api import FunctionsDataTypesApi + + +class TestFunctionsDataTypesApi(unittest.TestCase): + """FunctionsDataTypesApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsDataTypesApi() + + def tearDown(self) -> None: + pass + + def test_generate_function_data_types_for_analysis(self) -> None: + """Test case for generate_function_data_types_for_analysis + + Generate Function Data Types + """ + pass + + def test_generate_function_data_types_for_functions(self) -> None: + """Test case for generate_function_data_types_for_functions + + Generate Function Data Types for an arbitrary list of functions + """ + pass + + def test_get_function_data_types(self) -> None: + """Test case for get_function_data_types + + Get Function Data Types + """ + pass + + def test_list_function_data_types_for_analysis(self) -> None: + """Test case for list_function_data_types_for_analysis + + List Function Data Types + """ + pass + + def test_list_function_data_types_for_functions(self) -> None: + """Test case for list_function_data_types_for_functions + + List Function Data Types + """ + pass + + def test_update_function_data_types(self) -> None: + """Test case for update_function_data_types + + Update Function Data Types + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_decompilation_api.py b/test/test/test_functions_decompilation_api.py new file mode 100644 index 0000000..82f79be --- /dev/null +++ b/test/test/test_functions_decompilation_api.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_decompilation_api import FunctionsDecompilationApi + + +class TestFunctionsDecompilationApi(unittest.TestCase): + """FunctionsDecompilationApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsDecompilationApi() + + def tearDown(self) -> None: + pass + + def test_check_function_decompilation_task(self) -> None: + """Test case for check_function_decompilation_task + + Check the status of a function decompilation + """ + pass + + def test_create_decompilation_comment(self) -> None: + """Test case for create_decompilation_comment + + Create a comment for this function + """ + pass + + def test_create_function_decompilation_task(self) -> None: + """Test case for create_function_decompilation_task + + Queues a function decompilation + """ + pass + + def test_delete_decompilation_comment(self) -> None: + """Test case for delete_decompilation_comment + + Delete a comment + """ + pass + + def test_get_decompilation_comments(self) -> None: + """Test case for get_decompilation_comments + + Get comments for this function + """ + pass + + def test_get_function_decompilation(self) -> None: + """Test case for get_function_decompilation + + Get decompilation result + """ + pass + + def test_update_decompilation_comment(self) -> None: + """Test case for update_decompilation_comment + + Update a comment + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_detail_response.py b/test/test/test_functions_detail_response.py new file mode 100644 index 0000000..f5dc26b --- /dev/null +++ b/test/test/test_functions_detail_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.functions_detail_response import FunctionsDetailResponse + +class TestFunctionsDetailResponse(unittest.TestCase): + """FunctionsDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionsDetailResponse: + """Test FunctionsDetailResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionsDetailResponse` + """ + model = FunctionsDetailResponse() + if include_optional: + return FunctionsDetailResponse( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + debug_hash = '', + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ] + ) + else: + return FunctionsDetailResponse( + function_id = 56, + function_name = '', + function_vaddr = 56, + function_size = 56, + analysis_id = 56, + binary_id = 56, + binary_name = '', + sha_256_hash = '', + debug_hash = '', + ) + """ + + def testFunctionsDetailResponse(self): + """Test FunctionsDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_list_rename.py b/test/test/test_functions_list_rename.py new file mode 100644 index 0000000..b75190d --- /dev/null +++ b/test/test/test_functions_list_rename.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.functions_list_rename import FunctionsListRename + +class TestFunctionsListRename(unittest.TestCase): + """FunctionsListRename unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FunctionsListRename: + """Test FunctionsListRename + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FunctionsListRename` + """ + model = FunctionsListRename() + if include_optional: + return FunctionsListRename( + functions = [ + revengai.models.function_rename_map.FunctionRenameMap( + function_id = 56, + new_name = '', + new_mangled_name = '', ) + ] + ) + else: + return FunctionsListRename( + functions = [ + revengai.models.function_rename_map.FunctionRenameMap( + function_id = 56, + new_name = '', + new_mangled_name = '', ) + ], + ) + """ + + def testFunctionsListRename(self): + """Test FunctionsListRename""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_renaming_history_api.py b/test/test/test_functions_renaming_history_api.py new file mode 100644 index 0000000..8193bbb --- /dev/null +++ b/test/test/test_functions_renaming_history_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi + + +class TestFunctionsRenamingHistoryApi(unittest.TestCase): + """FunctionsRenamingHistoryApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsRenamingHistoryApi() + + def tearDown(self) -> None: + pass + + def test_batch_rename_function(self) -> None: + """Test case for batch_rename_function + + Batch Rename Functions + """ + pass + + def test_get_function_name_history(self) -> None: + """Test case for get_function_name_history + + Get Function Name History + """ + pass + + def test_rename_function_id(self) -> None: + """Test case for rename_function_id + + Rename Function + """ + pass + + def test_revert_function_name(self) -> None: + """Test case for revert_function_name + + Revert the function name + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_functions_threat_score_api.py b/test/test/test_functions_threat_score_api.py new file mode 100644 index 0000000..fb12f7c --- /dev/null +++ b/test/test/test_functions_threat_score_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi + + +class TestFunctionsThreatScoreApi(unittest.TestCase): + """FunctionsThreatScoreApi unit test stubs""" + + def setUp(self) -> None: + self.api = FunctionsThreatScoreApi() + + def tearDown(self) -> None: + pass + + def test_get_all_function_threat_scores(self) -> None: + """Test case for get_all_function_threat_scores + + Gets the threat score for all functions + """ + pass + + def test_get_individual_function_threat_score(self) -> None: + """Test case for get_individual_function_threat_score + + Gets the threat score analysis + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_generate_function_data_types.py b/test/test/test_generate_function_data_types.py new file mode 100644 index 0000000..e064cae --- /dev/null +++ b/test/test/test_generate_function_data_types.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.generate_function_data_types import GenerateFunctionDataTypes + +class TestGenerateFunctionDataTypes(unittest.TestCase): + """GenerateFunctionDataTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GenerateFunctionDataTypes: + """Test GenerateFunctionDataTypes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GenerateFunctionDataTypes` + """ + model = GenerateFunctionDataTypes() + if include_optional: + return GenerateFunctionDataTypes( + queued = True, + reference = '', + data_types_list = revengai.models.generation_status_list.GenerationStatusList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ], ) + ) + else: + return GenerateFunctionDataTypes( + queued = True, + reference = '', + data_types_list = revengai.models.generation_status_list.GenerationStatusList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ], ), + ) + """ + + def testGenerateFunctionDataTypes(self): + """Test GenerateFunctionDataTypes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_generation_status_list.py b/test/test/test_generation_status_list.py new file mode 100644 index 0000000..1226e20 --- /dev/null +++ b/test/test/test_generation_status_list.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.generation_status_list import GenerationStatusList + +class TestGenerationStatusList(unittest.TestCase): + """GenerationStatusList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GenerationStatusList: + """Test GenerationStatusList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GenerationStatusList` + """ + model = GenerationStatusList() + if include_optional: + return GenerationStatusList( + total_count = 56, + total_data_types_count = 56, + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ] + ) + else: + return GenerationStatusList( + items = [ + revengai.models.function_data_types_status.FunctionDataTypesStatus( + function_id = 56, + completed = True, + status = '', ) + ], + ) + """ + + def testGenerationStatusList(self): + """Test GenerationStatusList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_get_ai_decompilation_rating_response.py b/test/test/test_get_ai_decompilation_rating_response.py new file mode 100644 index 0000000..64d93fc --- /dev/null +++ b/test/test/test_get_ai_decompilation_rating_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse + +class TestGetAiDecompilationRatingResponse(unittest.TestCase): + """GetAiDecompilationRatingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAiDecompilationRatingResponse: + """Test GetAiDecompilationRatingResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAiDecompilationRatingResponse` + """ + model = GetAiDecompilationRatingResponse() + if include_optional: + return GetAiDecompilationRatingResponse( + rating = 'POSITIVE' + ) + else: + return GetAiDecompilationRatingResponse( + rating = 'POSITIVE', + ) + """ + + def testGetAiDecompilationRatingResponse(self): + """Test GetAiDecompilationRatingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_get_ai_decompilation_task.py b/test/test/test_get_ai_decompilation_task.py new file mode 100644 index 0000000..1b16425 --- /dev/null +++ b/test/test/test_get_ai_decompilation_task.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask + +class TestGetAiDecompilationTask(unittest.TestCase): + """GetAiDecompilationTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAiDecompilationTask: + """Test GetAiDecompilationTask + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAiDecompilationTask` + """ + model = GetAiDecompilationTask() + if include_optional: + return GetAiDecompilationTask( + status = '', + decompilation = '', + raw_decompilation = '', + function_mapping = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + function_mapping_full = revengai.models.function_mapping_full.FunctionMappingFull( + inverse_string_map = { + 'key' : revengai.models.inverse_string_map_item.InverseStringMapItem( + string = '', + addr = 56, ) + }, + inverse_function_map = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + unmatched_functions = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_types = { + 'key' : + }, + unmatched_strings = { + 'key' : + }, + unmatched_vars = { + 'key' : + }, + unmatched_go_to_labels = { + 'key' : + }, + unmatched_custom_function_pointers = { + 'key' : + }, + unmatched_variadic_lists = { + 'key' : + }, + fields = { + 'key' : { + 'key' : + } + }, ), + summary = '', + ai_summary = '', + raw_ai_summary = '' + ) + else: + return GetAiDecompilationTask( + status = '', + decompilation = '', + raw_decompilation = '', + function_mapping = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + function_mapping_full = revengai.models.function_mapping_full.FunctionMappingFull( + inverse_string_map = { + 'key' : revengai.models.inverse_string_map_item.InverseStringMapItem( + string = '', + addr = 56, ) + }, + inverse_function_map = { + 'key' : revengai.models.inverse_function_map_item.InverseFunctionMapItem( + name = '', + addr = null, + is_external = True, ) + }, + unmatched_functions = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_external_vars = { + 'key' : revengai.models.inverse_value.InverseValue( + value = '', ) + }, + unmatched_custom_types = { + 'key' : + }, + unmatched_strings = { + 'key' : + }, + unmatched_vars = { + 'key' : + }, + unmatched_go_to_labels = { + 'key' : + }, + unmatched_custom_function_pointers = { + 'key' : + }, + unmatched_variadic_lists = { + 'key' : + }, + fields = { + 'key' : { + 'key' : + } + }, ), + ) + """ + + def testGetAiDecompilationTask(self): + """Test GetAiDecompilationTask""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_get_public_user_response.py b/test/test/test_get_public_user_response.py new file mode 100644 index 0000000..e4599ae --- /dev/null +++ b/test/test/test_get_public_user_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.get_public_user_response import GetPublicUserResponse + +class TestGetPublicUserResponse(unittest.TestCase): + """GetPublicUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetPublicUserResponse: + """Test GetPublicUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetPublicUserResponse` + """ + model = GetPublicUserResponse() + if include_optional: + return GetPublicUserResponse( + username = '', + user_id = 56 + ) + else: + return GetPublicUserResponse( + username = '', + user_id = 56, + ) + """ + + def testGetPublicUserResponse(self): + """Test GetPublicUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_get_user_response.py b/test/test/test_get_user_response.py new file mode 100644 index 0000000..cb42261 --- /dev/null +++ b/test/test/test_get_user_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.get_user_response import GetUserResponse + +class TestGetUserResponse(unittest.TestCase): + """GetUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetUserResponse: + """Test GetUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetUserResponse` + """ + model = GetUserResponse() + if include_optional: + return GetUserResponse( + username = '', + user_id = 56, + first_name = '', + last_name = '', + email = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tutorial_seen = True + ) + else: + return GetUserResponse( + username = '', + user_id = 56, + first_name = '', + last_name = '', + email = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tutorial_seen = True, + ) + """ + + def testGetUserResponse(self): + """Test GetUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_global_variable.py b/test/test/test_global_variable.py new file mode 100644 index 0000000..0144b49 --- /dev/null +++ b/test/test/test_global_variable.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.global_variable import GlobalVariable + +class TestGlobalVariable(unittest.TestCase): + """GlobalVariable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GlobalVariable: + """Test GlobalVariable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GlobalVariable` + """ + model = GlobalVariable() + if include_optional: + return GlobalVariable( + last_change = '', + addr = 56, + name = '', + type = '', + size = 56, + artifact_type = '' + ) + else: + return GlobalVariable( + addr = 56, + name = '', + type = '', + size = 56, + ) + """ + + def testGlobalVariable(self): + """Test GlobalVariable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_icon_model.py b/test/test/test_icon_model.py new file mode 100644 index 0000000..7172246 --- /dev/null +++ b/test/test/test_icon_model.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.icon_model import IconModel + +class TestIconModel(unittest.TestCase): + """IconModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IconModel: + """Test IconModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IconModel` + """ + model = IconModel() + if include_optional: + return IconModel( + content = '' + ) + else: + return IconModel( + content = '', + ) + """ + + def testIconModel(self): + """Test IconModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_import_model.py b/test/test/test_import_model.py new file mode 100644 index 0000000..0f2d6ef --- /dev/null +++ b/test/test/test_import_model.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.import_model import ImportModel + +class TestImportModel(unittest.TestCase): + """ImportModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImportModel: + """Test ImportModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImportModel` + """ + model = ImportModel() + if include_optional: + return ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ] + ) + else: + return ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], + ) + """ + + def testImportModel(self): + """Test ImportModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_inverse_function_map_item.py b/test/test/test_inverse_function_map_item.py new file mode 100644 index 0000000..4db836d --- /dev/null +++ b/test/test/test_inverse_function_map_item.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.inverse_function_map_item import InverseFunctionMapItem + +class TestInverseFunctionMapItem(unittest.TestCase): + """InverseFunctionMapItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InverseFunctionMapItem: + """Test InverseFunctionMapItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InverseFunctionMapItem` + """ + model = InverseFunctionMapItem() + if include_optional: + return InverseFunctionMapItem( + name = '', + addr = None, + is_external = True + ) + else: + return InverseFunctionMapItem( + name = '', + addr = None, + ) + """ + + def testInverseFunctionMapItem(self): + """Test InverseFunctionMapItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_inverse_string_map_item.py b/test/test/test_inverse_string_map_item.py new file mode 100644 index 0000000..46b5726 --- /dev/null +++ b/test/test/test_inverse_string_map_item.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.inverse_string_map_item import InverseStringMapItem + +class TestInverseStringMapItem(unittest.TestCase): + """InverseStringMapItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InverseStringMapItem: + """Test InverseStringMapItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InverseStringMapItem` + """ + model = InverseStringMapItem() + if include_optional: + return InverseStringMapItem( + string = '', + addr = 56 + ) + else: + return InverseStringMapItem( + string = '', + addr = 56, + ) + """ + + def testInverseStringMapItem(self): + """Test InverseStringMapItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_inverse_value.py b/test/test/test_inverse_value.py new file mode 100644 index 0000000..c8d867f --- /dev/null +++ b/test/test/test_inverse_value.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.inverse_value import InverseValue + +class TestInverseValue(unittest.TestCase): + """InverseValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InverseValue: + """Test InverseValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InverseValue` + """ + model = InverseValue() + if include_optional: + return InverseValue( + value = '' + ) + else: + return InverseValue( + value = '', + ) + """ + + def testInverseValue(self): + """Test InverseValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_isa.py b/test/test/test_isa.py new file mode 100644 index 0000000..7f98f3a --- /dev/null +++ b/test/test/test_isa.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.isa import ISA + +class TestISA(unittest.TestCase): + """ISA unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testISA(self): + """Test ISA""" + # inst = ISA() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_list_collection_results.py b/test/test/test_list_collection_results.py new file mode 100644 index 0000000..ed91f64 --- /dev/null +++ b/test/test/test_list_collection_results.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.list_collection_results import ListCollectionResults + +class TestListCollectionResults(unittest.TestCase): + """ListCollectionResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListCollectionResults: + """Test ListCollectionResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListCollectionResults` + """ + model = ListCollectionResults() + if include_optional: + return ListCollectionResults( + results = [ + revengai.models.collection_list_item.CollectionListItem( + collection_name = '', + description = '', + collection_scope = '', + collection_owner = '', + official_collection = True, + collection_tags = [ + '' + ], + collection_size = 56, + collection_id = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_name = '', + team_id = 56, ) + ] + ) + else: + return ListCollectionResults( + results = [ + revengai.models.collection_list_item.CollectionListItem( + collection_name = '', + description = '', + collection_scope = '', + collection_owner = '', + official_collection = True, + collection_tags = [ + '' + ], + collection_size = 56, + collection_id = 56, + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model_name = '', + team_id = 56, ) + ], + ) + """ + + def testListCollectionResults(self): + """Test ListCollectionResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_login_request.py b/test/test/test_login_request.py new file mode 100644 index 0000000..dce892b --- /dev/null +++ b/test/test/test_login_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.login_request import LoginRequest + +class TestLoginRequest(unittest.TestCase): + """LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginRequest: + """Test LoginRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginRequest` + """ + model = LoginRequest() + if include_optional: + return LoginRequest( + username = '0', + password = '0123456789' + ) + else: + return LoginRequest( + username = '0', + password = '0123456789', + ) + """ + + def testLoginRequest(self): + """Test LoginRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_login_response.py b/test/test/test_login_response.py new file mode 100644 index 0000000..35180ae --- /dev/null +++ b/test/test/test_login_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.login_response import LoginResponse + +class TestLoginResponse(unittest.TestCase): + """LoginResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResponse: + """Test LoginResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResponse` + """ + model = LoginResponse() + if include_optional: + return LoginResponse( + token = '' + ) + else: + return LoginResponse( + token = '', + ) + """ + + def testLoginResponse(self): + """Test LoginResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_logs.py b/test/test/test_logs.py new file mode 100644 index 0000000..df0849f --- /dev/null +++ b/test/test/test_logs.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.logs import Logs + +class TestLogs(unittest.TestCase): + """Logs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Logs: + """Test Logs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Logs` + """ + model = Logs() + if include_optional: + return Logs( + logs = '' + ) + else: + return Logs( + logs = '', + ) + """ + + def testLogs(self): + """Test Logs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_matched_function_group.py b/test/test/test_matched_function_group.py new file mode 100644 index 0000000..c3b0dec --- /dev/null +++ b/test/test/test_matched_function_group.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.matched_function_group import MatchedFunctionGroup + +class TestMatchedFunctionGroup(unittest.TestCase): + """MatchedFunctionGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MatchedFunctionGroup: + """Test MatchedFunctionGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MatchedFunctionGroup` + """ + model = MatchedFunctionGroup() + if include_optional: + return MatchedFunctionGroup( + function_group_name = '', + similarity = 1.337 + ) + else: + return MatchedFunctionGroup( + function_group_name = '', + similarity = 1.337, + ) + """ + + def testMatchedFunctionGroup(self): + """Test MatchedFunctionGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_matched_function_suggestion.py b/test/test/test_matched_function_suggestion.py new file mode 100644 index 0000000..3a7c922 --- /dev/null +++ b/test/test/test_matched_function_suggestion.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion + +class TestMatchedFunctionSuggestion(unittest.TestCase): + """MatchedFunctionSuggestion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MatchedFunctionSuggestion: + """Test MatchedFunctionSuggestion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MatchedFunctionSuggestion` + """ + model = MatchedFunctionSuggestion() + if include_optional: + return MatchedFunctionSuggestion( + function_id = 56, + function_vaddr = 56, + suggested_name = '' + ) + else: + return MatchedFunctionSuggestion( + function_id = 56, + function_vaddr = 56, + suggested_name = '', + ) + """ + + def testMatchedFunctionSuggestion(self): + """Test MatchedFunctionSuggestion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_meta_model.py b/test/test/test_meta_model.py new file mode 100644 index 0000000..8b65a24 --- /dev/null +++ b/test/test/test_meta_model.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.meta_model import MetaModel + +class TestMetaModel(unittest.TestCase): + """MetaModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetaModel: + """Test MetaModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MetaModel` + """ + model = MetaModel() + if include_optional: + return MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ) + ) + else: + return MetaModel( + ) + """ + + def testMetaModel(self): + """Test MetaModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_model_name.py b/test/test/test_model_name.py new file mode 100644 index 0000000..994a17c --- /dev/null +++ b/test/test/test_model_name.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.model_name import ModelName + +class TestModelName(unittest.TestCase): + """ModelName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testModelName(self): + """Test ModelName""" + # inst = ModelName() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_models_api.py b/test/test/test_models_api.py new file mode 100644 index 0000000..111fa8e --- /dev/null +++ b/test/test/test_models_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.models_api import ModelsApi + + +class TestModelsApi(unittest.TestCase): + """ModelsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ModelsApi() + + def tearDown(self) -> None: + pass + + def test_get_models(self) -> None: + """Test case for get_models + + Gets models + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_models_response.py b/test/test/test_models_response.py new file mode 100644 index 0000000..d0100d7 --- /dev/null +++ b/test/test/test_models_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.models_response import ModelsResponse + +class TestModelsResponse(unittest.TestCase): + """ModelsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelsResponse: + """Test ModelsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelsResponse` + """ + model = ModelsResponse() + if include_optional: + return ModelsResponse( + models = [ + '' + ] + ) + else: + return ModelsResponse( + models = [ + '' + ], + ) + """ + + def testModelsResponse(self): + """Test ModelsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_nearest_neighbor.py b/test/test/test_nearest_neighbor.py new file mode 100644 index 0000000..cf0dc25 --- /dev/null +++ b/test/test/test_nearest_neighbor.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.nearest_neighbor import NearestNeighbor + +class TestNearestNeighbor(unittest.TestCase): + """NearestNeighbor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NearestNeighbor: + """Test NearestNeighbor + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NearestNeighbor` + """ + model = NearestNeighbor() + if include_optional: + return NearestNeighbor( + distance = 1.337, + nearest_neighbor_analysis_id = 56, + nearest_neighbor_analysis_name = '', + nearest_neighbor_function_name = '', + nearest_neighbor_function_name_mangled = '', + nearest_neighbor_binary_id = 56, + nearest_neighbor_sha_256_hash = '', + nearest_neighbor_debug = True + ) + else: + return NearestNeighbor( + distance = 1.337, + nearest_neighbor_analysis_id = 56, + nearest_neighbor_analysis_name = '', + nearest_neighbor_function_name = '', + nearest_neighbor_function_name_mangled = '', + nearest_neighbor_binary_id = 56, + nearest_neighbor_sha_256_hash = '', + nearest_neighbor_debug = True, + ) + """ + + def testNearestNeighbor(self): + """Test NearestNeighbor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_network_overview_dns.py b/test/test/test_network_overview_dns.py new file mode 100644 index 0000000..f8f6487 --- /dev/null +++ b/test/test/test_network_overview_dns.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.network_overview_dns import NetworkOverviewDns + +class TestNetworkOverviewDns(unittest.TestCase): + """NetworkOverviewDns unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkOverviewDns: + """Test NetworkOverviewDns + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkOverviewDns` + """ + model = NetworkOverviewDns() + if include_optional: + return NetworkOverviewDns( + host = '', + type = '', + answers = [ + revengai.models.network_overview_dns_answer.NetworkOverviewDnsAnswer( + type = '', + data = '', ) + ] + ) + else: + return NetworkOverviewDns( + host = '', + type = '', + answers = [ + revengai.models.network_overview_dns_answer.NetworkOverviewDnsAnswer( + type = '', + data = '', ) + ], + ) + """ + + def testNetworkOverviewDns(self): + """Test NetworkOverviewDns""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_network_overview_dns_answer.py b/test/test/test_network_overview_dns_answer.py new file mode 100644 index 0000000..55e5e3f --- /dev/null +++ b/test/test/test_network_overview_dns_answer.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer + +class TestNetworkOverviewDnsAnswer(unittest.TestCase): + """NetworkOverviewDnsAnswer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkOverviewDnsAnswer: + """Test NetworkOverviewDnsAnswer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkOverviewDnsAnswer` + """ + model = NetworkOverviewDnsAnswer() + if include_optional: + return NetworkOverviewDnsAnswer( + type = '', + data = '' + ) + else: + return NetworkOverviewDnsAnswer( + type = '', + data = '', + ) + """ + + def testNetworkOverviewDnsAnswer(self): + """Test NetworkOverviewDnsAnswer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_network_overview_metadata.py b/test/test/test_network_overview_metadata.py new file mode 100644 index 0000000..8381e64 --- /dev/null +++ b/test/test/test_network_overview_metadata.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.network_overview_metadata import NetworkOverviewMetadata + +class TestNetworkOverviewMetadata(unittest.TestCase): + """NetworkOverviewMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkOverviewMetadata: + """Test NetworkOverviewMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkOverviewMetadata` + """ + model = NetworkOverviewMetadata() + if include_optional: + return NetworkOverviewMetadata( + host = '', + country_code = '', + asn = '', + type = 'metadata' + ) + else: + return NetworkOverviewMetadata( + host = '', + country_code = '', + asn = '', + type = 'metadata', + ) + """ + + def testNetworkOverviewMetadata(self): + """Test NetworkOverviewMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_network_overview_response.py b/test/test/test_network_overview_response.py new file mode 100644 index 0000000..ecc7896 --- /dev/null +++ b/test/test/test_network_overview_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.network_overview_response import NetworkOverviewResponse + +class TestNetworkOverviewResponse(unittest.TestCase): + """NetworkOverviewResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkOverviewResponse: + """Test NetworkOverviewResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkOverviewResponse` + """ + model = NetworkOverviewResponse() + if include_optional: + return NetworkOverviewResponse( + dns = [ + revengai.models.network_overview_dns.NetworkOverviewDns( + host = '', + type = '', + answers = [ + revengai.models.network_overview_dns_answer.NetworkOverviewDnsAnswer( + type = '', + data = '', ) + ], ) + ], + metadata = [ + revengai.models.network_overview_metadata.NetworkOverviewMetadata( + host = '', + country_code = '', + asn = '', + type = 'metadata', ) + ] + ) + else: + return NetworkOverviewResponse( + dns = [ + revengai.models.network_overview_dns.NetworkOverviewDns( + host = '', + type = '', + answers = [ + revengai.models.network_overview_dns_answer.NetworkOverviewDnsAnswer( + type = '', + data = '', ) + ], ) + ], + metadata = [ + revengai.models.network_overview_metadata.NetworkOverviewMetadata( + host = '', + country_code = '', + asn = '', + type = 'metadata', ) + ], + ) + """ + + def testNetworkOverviewResponse(self): + """Test NetworkOverviewResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_order.py b/test/test/test_order.py new file mode 100644 index 0000000..0db2c35 --- /dev/null +++ b/test/test/test_order.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.order import Order + +class TestOrder(unittest.TestCase): + """Order unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrder(self): + """Test Order""" + # inst = Order() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_origin.py b/test/test/test_origin.py new file mode 100644 index 0000000..55d3eb0 --- /dev/null +++ b/test/test/test_origin.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.origin import Origin + +class TestOrigin(unittest.TestCase): + """Origin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrigin(self): + """Test Origin""" + # inst = Origin() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_pagination_model.py b/test/test/test_pagination_model.py new file mode 100644 index 0000000..a81e39e --- /dev/null +++ b/test/test/test_pagination_model.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.pagination_model import PaginationModel + +class TestPaginationModel(unittest.TestCase): + """PaginationModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationModel: + """Test PaginationModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationModel` + """ + model = PaginationModel() + if include_optional: + return PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True + ) + else: + return PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, + ) + """ + + def testPaginationModel(self): + """Test PaginationModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_params.py b/test/test/test_params.py new file mode 100644 index 0000000..00970b3 --- /dev/null +++ b/test/test/test_params.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.params import Params + +class TestParams(unittest.TestCase): + """Params unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Params: + """Test Params + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Params` + """ + model = Params() + if include_optional: + return Params( + debug_hash = '', + binary_size = 56, + architecture = '', + binary_type = '', + binary_format = '', + binary_dynamic = True, + model_name = '' + ) + else: + return Params( + debug_hash = '', + binary_size = 56, + architecture = '', + binary_type = '', + binary_format = '', + binary_dynamic = True, + model_name = '', + ) + """ + + def testParams(self): + """Test Params""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_pdb_debug_model.py b/test/test/test_pdb_debug_model.py new file mode 100644 index 0000000..7353ae4 --- /dev/null +++ b/test/test/test_pdb_debug_model.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.pdb_debug_model import PDBDebugModel + +class TestPDBDebugModel(unittest.TestCase): + """PDBDebugModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PDBDebugModel: + """Test PDBDebugModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PDBDebugModel` + """ + model = PDBDebugModel() + if include_optional: + return PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ] + ) + else: + return PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], + ) + """ + + def testPDBDebugModel(self): + """Test PDBDebugModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_pe_model.py b/test/test/test_pe_model.py new file mode 100644 index 0000000..27b2242 --- /dev/null +++ b/test/test/test_pe_model.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.pe_model import PEModel + +class TestPEModel(unittest.TestCase): + """PEModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PEModel: + """Test PEModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PEModel` + """ + model = PEModel() + if include_optional: + return PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ) + ) + else: + return PEModel( + type = '', + timestamps = revengai.models.timestamp_model.TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, ), + architecture = '', + checksum = 56, + image_base = 56, + security = revengai.models.security_model.SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, ), + version_info = { + 'key' : null + }, + debug_info = revengai.models.pdb_debug_model.PDBDebugModel( + debug_entries = [ + revengai.models.single_pdb_entry_model.SinglePDBEntryModel( + guid = '', + age = 56, + path = '', ) + ], ), + number_of_resources = 56, + entry_point = revengai.models.entrypoint_model.EntrypointModel( + address = 56, + first_bytes = '', ), + signature = revengai.models.code_signature_model.CodeSignatureModel( + signed = True, + valid_signature = True, + signatures = [ + revengai.models.single_code_signature_model.SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', ) + ], ), + dotnet = True, + debug_stripped = True, + import_hash = '', + export_hash = '', + rich_header_hash = '', + sections = revengai.models.section_model.SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], ), + imports = revengai.models.import_model.ImportModel( + number_of_imports = 56, + imports = [ + { + 'key' : { + 'key' : 56 + } + } + ], ), + exports = revengai.models.export_model.ExportModel( + number_of_exports = 56, + exports = [ + { + 'key' : 56 + } + ], ), + icon_data = revengai.models.icon_model.IconModel( + content = '', ), + ) + """ + + def testPEModel(self): + """Test PEModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_platform.py b/test/test/test_platform.py new file mode 100644 index 0000000..1efd483 --- /dev/null +++ b/test/test/test_platform.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.platform import Platform + +class TestPlatform(unittest.TestCase): + """Platform unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPlatform(self): + """Test Platform""" + # inst = Platform() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process.py b/test/test/test_process.py new file mode 100644 index 0000000..6a97605 --- /dev/null +++ b/test/test/test_process.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process import Process + +class TestProcess(unittest.TestCase): + """Process unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Process: + """Test Process + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Process` + """ + model = Process() + if include_optional: + return Process( + pid = 56, + procname = '', + executable_name = '', + args = [ + '' + ], + ts_from = 1.337, + ts_to = 1.337, + children = [ + null + ] + ) + else: + return Process( + pid = 56, + procname = '', + executable_name = '', + args = [ + '' + ], + ts_from = 1.337, + ts_to = 1.337, + children = [ + null + ], + ) + """ + + def testProcess(self): + """Test Process""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_dump.py b/test/test/test_process_dump.py new file mode 100644 index 0000000..ea01fc8 --- /dev/null +++ b/test/test/test_process_dump.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_dump import ProcessDump + +class TestProcessDump(unittest.TestCase): + """ProcessDump unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessDump: + """Test ProcessDump + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessDump` + """ + model = ProcessDump() + if include_optional: + return ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ) + ) + else: + return ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), + ) + """ + + def testProcessDump(self): + """Test ProcessDump""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_dump_metadata.py b/test/test/test_process_dump_metadata.py new file mode 100644 index 0000000..645ce0e --- /dev/null +++ b/test/test/test_process_dump_metadata.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_dump_metadata import ProcessDumpMetadata + +class TestProcessDumpMetadata(unittest.TestCase): + """ProcessDumpMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessDumpMetadata: + """Test ProcessDumpMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessDumpMetadata` + """ + model = ProcessDumpMetadata() + if include_optional: + return ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56 + ) + else: + return ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, + ) + """ + + def testProcessDumpMetadata(self): + """Test ProcessDumpMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_dumps.py b/test/test/test_process_dumps.py new file mode 100644 index 0000000..76d8af1 --- /dev/null +++ b/test/test/test_process_dumps.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_dumps import ProcessDumps + +class TestProcessDumps(unittest.TestCase): + """ProcessDumps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessDumps: + """Test ProcessDumps + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessDumps` + """ + model = ProcessDumps() + if include_optional: + return ProcessDumps( + success = True, + data = revengai.models.process_dumps_data.ProcessDumpsData( + count = 56, + dumps = [ + revengai.models.process_dump.ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), ) + ], ) + ) + else: + return ProcessDumps( + success = True, + data = revengai.models.process_dumps_data.ProcessDumpsData( + count = 56, + dumps = [ + revengai.models.process_dump.ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), ) + ], ), + ) + """ + + def testProcessDumps(self): + """Test ProcessDumps""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_dumps_data.py b/test/test/test_process_dumps_data.py new file mode 100644 index 0000000..ef5003e --- /dev/null +++ b/test/test/test_process_dumps_data.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_dumps_data import ProcessDumpsData + +class TestProcessDumpsData(unittest.TestCase): + """ProcessDumpsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessDumpsData: + """Test ProcessDumpsData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessDumpsData` + """ + model = ProcessDumpsData() + if include_optional: + return ProcessDumpsData( + count = 56, + dumps = [ + revengai.models.process_dump.ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), ) + ] + ) + else: + return ProcessDumpsData( + count = 56, + dumps = [ + revengai.models.process_dump.ProcessDump( + base_address = 56, + actual_filename = '', + filename_friendly = '', + extended_metadata = revengai.models.process_dump_metadata.ProcessDumpMetadata( + sha256 = '', + type = '', + size = 56, ), ) + ], + ) + """ + + def testProcessDumpsData(self): + """Test ProcessDumpsData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_registry.py b/test/test/test_process_registry.py new file mode 100644 index 0000000..d99fae6 --- /dev/null +++ b/test/test/test_process_registry.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_registry import ProcessRegistry + +class TestProcessRegistry(unittest.TestCase): + """ProcessRegistry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessRegistry: + """Test ProcessRegistry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessRegistry` + """ + model = ProcessRegistry() + if include_optional: + return ProcessRegistry( + success = True, + data = { + 'key' : [ + revengai.models.registry.Registry( + method = '', + key = '', + value_name = '', + value = '', ) + ] + } + ) + else: + return ProcessRegistry( + success = True, + data = { + 'key' : [ + revengai.models.registry.Registry( + method = '', + key = '', + value_name = '', + value = '', ) + ] + }, + ) + """ + + def testProcessRegistry(self): + """Test ProcessRegistry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_process_tree.py b/test/test/test_process_tree.py new file mode 100644 index 0000000..60da834 --- /dev/null +++ b/test/test/test_process_tree.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.process_tree import ProcessTree + +class TestProcessTree(unittest.TestCase): + """ProcessTree unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessTree: + """Test ProcessTree + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessTree` + """ + model = ProcessTree() + if include_optional: + return ProcessTree( + success = True, + data = [ + revengai.models.process.Process( + pid = 56, + procname = '', + executable_name = '', + args = [ + '' + ], + ts_from = 1.337, + ts_to = 1.337, + children = [ + null + ], ) + ] + ) + else: + return ProcessTree( + success = True, + data = [ + revengai.models.process.Process( + pid = 56, + procname = '', + executable_name = '', + args = [ + '' + ], + ts_from = 1.337, + ts_to = 1.337, + children = [ + null + ], ) + ], + ) + """ + + def testProcessTree(self): + """Test ProcessTree""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_queued_security_checks_task_response.py b/test/test/test_queued_security_checks_task_response.py new file mode 100644 index 0000000..6be4f0c --- /dev/null +++ b/test/test/test_queued_security_checks_task_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse + +class TestQueuedSecurityChecksTaskResponse(unittest.TestCase): + """QueuedSecurityChecksTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueuedSecurityChecksTaskResponse: + """Test QueuedSecurityChecksTaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QueuedSecurityChecksTaskResponse` + """ + model = QueuedSecurityChecksTaskResponse() + if include_optional: + return QueuedSecurityChecksTaskResponse( + task_id = '' + ) + else: + return QueuedSecurityChecksTaskResponse( + task_id = '', + ) + """ + + def testQueuedSecurityChecksTaskResponse(self): + """Test QueuedSecurityChecksTaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_re_analysis_form.py b/test/test/test_re_analysis_form.py new file mode 100644 index 0000000..7500a62 --- /dev/null +++ b/test/test/test_re_analysis_form.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.re_analysis_form import ReAnalysisForm + +class TestReAnalysisForm(unittest.TestCase): + """ReAnalysisForm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReAnalysisForm: + """Test ReAnalysisForm + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReAnalysisForm` + """ + model = ReAnalysisForm() + if include_optional: + return ReAnalysisForm( + tags = [ + '' + ], + command_line_args = '', + priority = 56, + essential = True, + model_name = '', + no_cache = True + ) + else: + return ReAnalysisForm( + ) + """ + + def testReAnalysisForm(self): + """Test ReAnalysisForm""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_recent.py b/test/test/test_recent.py new file mode 100644 index 0000000..9de58bc --- /dev/null +++ b/test/test/test_recent.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.recent import Recent + +class TestRecent(unittest.TestCase): + """Recent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Recent: + """Test Recent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Recent` + """ + model = Recent() + if include_optional: + return Recent( + results = [ + revengai.models.analysis_record.AnalysisRecord( + analysis_id = 56, + analysis_scope = '', + binary_id = 56, + model_id = 56, + status = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_owner = True, + binary_name = '', + sha_256_hash = '', + binary_size = 56, + username = '', + dynamic_execution_status = 'PENDING', + dynamic_execution_task_id = 56, ) + ] + ) + else: + return Recent( + results = [ + revengai.models.analysis_record.AnalysisRecord( + analysis_id = 56, + analysis_scope = '', + binary_id = 56, + model_id = 56, + status = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_owner = True, + binary_name = '', + sha_256_hash = '', + binary_size = 56, + username = '', + dynamic_execution_status = 'PENDING', + dynamic_execution_task_id = 56, ) + ], + ) + """ + + def testRecent(self): + """Test Recent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_registry.py b/test/test/test_registry.py new file mode 100644 index 0000000..f83451e --- /dev/null +++ b/test/test/test_registry.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.registry import Registry + +class TestRegistry(unittest.TestCase): + """Registry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Registry: + """Test Registry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Registry` + """ + model = Registry() + if include_optional: + return Registry( + method = '', + key = '', + value_name = '', + value = '' + ) + else: + return Registry( + method = '', + key = '', + value_name = '', + value = '', + ) + """ + + def testRegistry(self): + """Test Registry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_relative_binary_response.py b/test/test/test_relative_binary_response.py new file mode 100644 index 0000000..1c8871d --- /dev/null +++ b/test/test/test_relative_binary_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.relative_binary_response import RelativeBinaryResponse + +class TestRelativeBinaryResponse(unittest.TestCase): + """RelativeBinaryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RelativeBinaryResponse: + """Test RelativeBinaryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RelativeBinaryResponse` + """ + model = RelativeBinaryResponse() + if include_optional: + return RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '' + ) + else: + return RelativeBinaryResponse( + binary_id = 56, + name = '', + sha256 = '', + ) + """ + + def testRelativeBinaryResponse(self): + """Test RelativeBinaryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_sandbox_options.py b/test/test/test_sandbox_options.py new file mode 100644 index 0000000..b189177 --- /dev/null +++ b/test/test/test_sandbox_options.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.sandbox_options import SandboxOptions + +class TestSandboxOptions(unittest.TestCase): + """SandboxOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SandboxOptions: + """Test SandboxOptions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SandboxOptions` + """ + model = SandboxOptions() + if include_optional: + return SandboxOptions( + enabled = True, + command_line_args = '' + ) + else: + return SandboxOptions( + ) + """ + + def testSandboxOptions(self): + """Test SandboxOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_sbom.py b/test/test/test_sbom.py new file mode 100644 index 0000000..8fc96e2 --- /dev/null +++ b/test/test/test_sbom.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.sbom import SBOM + +class TestSBOM(unittest.TestCase): + """SBOM unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SBOM: + """Test SBOM + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SBOM` + """ + model = SBOM() + if include_optional: + return SBOM( + packages = [ + revengai.models.sbom_package.SBOMPackage( + name = '', + version = '', ) + ], + imported_libs = [ + '' + ] + ) + else: + return SBOM( + packages = [ + revengai.models.sbom_package.SBOMPackage( + name = '', + version = '', ) + ], + imported_libs = [ + '' + ], + ) + """ + + def testSBOM(self): + """Test SBOM""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_sbom_package.py b/test/test/test_sbom_package.py new file mode 100644 index 0000000..7e0ca88 --- /dev/null +++ b/test/test/test_sbom_package.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.sbom_package import SBOMPackage + +class TestSBOMPackage(unittest.TestCase): + """SBOMPackage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SBOMPackage: + """Test SBOMPackage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SBOMPackage` + """ + model = SBOMPackage() + if include_optional: + return SBOMPackage( + name = '', + version = '' + ) + else: + return SBOMPackage( + name = '', + version = '', + ) + """ + + def testSBOMPackage(self): + """Test SBOMPackage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_scrape_third_party_config.py b/test/test/test_scrape_third_party_config.py new file mode 100644 index 0000000..5149a2e --- /dev/null +++ b/test/test/test_scrape_third_party_config.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig + +class TestScrapeThirdPartyConfig(unittest.TestCase): + """ScrapeThirdPartyConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ScrapeThirdPartyConfig: + """Test ScrapeThirdPartyConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScrapeThirdPartyConfig` + """ + model = ScrapeThirdPartyConfig() + if include_optional: + return ScrapeThirdPartyConfig( + enabled = True + ) + else: + return ScrapeThirdPartyConfig( + ) + """ + + def testScrapeThirdPartyConfig(self): + """Test ScrapeThirdPartyConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_search_api.py b/test/test/test_search_api.py new file mode 100644 index 0000000..3b50b3f --- /dev/null +++ b/test/test/test_search_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.search_api import SearchApi + + +class TestSearchApi(unittest.TestCase): + """SearchApi unit test stubs""" + + def setUp(self) -> None: + self.api = SearchApi() + + def tearDown(self) -> None: + pass + + def test_search_binaries(self) -> None: + """Test case for search_binaries + + Binaries search + """ + pass + + def test_search_collections(self) -> None: + """Test case for search_collections + + Collections search + """ + pass + + def test_search_functions(self) -> None: + """Test case for search_functions + + Functions search + """ + pass + + def test_search_tags(self) -> None: + """Test case for search_tags + + Tags search + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_search_binary_ids.py b/test/test/test_search_binary_ids.py new file mode 100644 index 0000000..664c2f2 --- /dev/null +++ b/test/test/test_search_binary_ids.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.search_binary_ids import SearchBinaryIds + +class TestSearchBinaryIds(unittest.TestCase): + """SearchBinaryIds unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchBinaryIds: + """Test SearchBinaryIds + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchBinaryIds` + """ + model = SearchBinaryIds() + if include_optional: + return SearchBinaryIds( + ) + else: + return SearchBinaryIds( + ) + """ + + def testSearchBinaryIds(self): + """Test SearchBinaryIds""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_search_function_ids.py b/test/test/test_search_function_ids.py new file mode 100644 index 0000000..d7dac9e --- /dev/null +++ b/test/test/test_search_function_ids.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.search_function_ids import SearchFunctionIds + +class TestSearchFunctionIds(unittest.TestCase): + """SearchFunctionIds unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchFunctionIds: + """Test SearchFunctionIds + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchFunctionIds` + """ + model = SearchFunctionIds() + if include_optional: + return SearchFunctionIds( + ) + else: + return SearchFunctionIds( + ) + """ + + def testSearchFunctionIds(self): + """Test SearchFunctionIds""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_section_model.py b/test/test/test_section_model.py new file mode 100644 index 0000000..a44bec3 --- /dev/null +++ b/test/test/test_section_model.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.section_model import SectionModel + +class TestSectionModel(unittest.TestCase): + """SectionModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SectionModel: + """Test SectionModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SectionModel` + """ + model = SectionModel() + if include_optional: + return SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ] + ) + else: + return SectionModel( + number_of_sections = 56, + sections = [ + revengai.models.single_section_model.SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', ) + ], + ) + """ + + def testSectionModel(self): + """Test SectionModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_security_checks_response.py b/test/test/test_security_checks_response.py new file mode 100644 index 0000000..5b3adf9 --- /dev/null +++ b/test/test/test_security_checks_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.security_checks_response import SecurityChecksResponse + +class TestSecurityChecksResponse(unittest.TestCase): + """SecurityChecksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SecurityChecksResponse: + """Test SecurityChecksResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SecurityChecksResponse` + """ + model = SecurityChecksResponse() + if include_optional: + return SecurityChecksResponse( + binary_id = 56, + total_results = 56, + results = [ + revengai.models.security_checks_result.SecurityChecksResult( + function_id = 56, + function_name = '', + name = '', + vuln_class = 'UNSAFE_FUNCTIONS', + description = '', + remediation = '', + confidence = 'FALSE_POSITIVE', + severity = 'CRITICAL', ) + ] + ) + else: + return SecurityChecksResponse( + binary_id = 56, + total_results = 56, + results = [ + revengai.models.security_checks_result.SecurityChecksResult( + function_id = 56, + function_name = '', + name = '', + vuln_class = 'UNSAFE_FUNCTIONS', + description = '', + remediation = '', + confidence = 'FALSE_POSITIVE', + severity = 'CRITICAL', ) + ], + ) + """ + + def testSecurityChecksResponse(self): + """Test SecurityChecksResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_security_checks_result.py b/test/test/test_security_checks_result.py new file mode 100644 index 0000000..04dc0cc --- /dev/null +++ b/test/test/test_security_checks_result.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.security_checks_result import SecurityChecksResult + +class TestSecurityChecksResult(unittest.TestCase): + """SecurityChecksResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SecurityChecksResult: + """Test SecurityChecksResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SecurityChecksResult` + """ + model = SecurityChecksResult() + if include_optional: + return SecurityChecksResult( + function_id = 56, + function_name = '', + name = '', + vuln_class = 'UNSAFE_FUNCTIONS', + description = '', + remediation = '', + confidence = 'FALSE_POSITIVE', + severity = 'CRITICAL' + ) + else: + return SecurityChecksResult( + function_id = 56, + function_name = '', + name = '', + vuln_class = 'UNSAFE_FUNCTIONS', + description = '', + remediation = '', + confidence = 'FALSE_POSITIVE', + severity = 'CRITICAL', + ) + """ + + def testSecurityChecksResult(self): + """Test SecurityChecksResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_security_model.py b/test/test/test_security_model.py new file mode 100644 index 0000000..915319f --- /dev/null +++ b/test/test/test_security_model.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.security_model import SecurityModel + +class TestSecurityModel(unittest.TestCase): + """SecurityModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SecurityModel: + """Test SecurityModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SecurityModel` + """ + model = SecurityModel() + if include_optional: + return SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True + ) + else: + return SecurityModel( + aslr = True, + dep = True, + cfg = True, + driver_model = True, + app_container = True, + terminal_server_aware = True, + image_isolation = True, + code_integrity = True, + high_entropy = True, + seh = True, + bound_image = True, + ) + """ + + def testSecurityModel(self): + """Test SecurityModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_severity_type.py b/test/test/test_severity_type.py new file mode 100644 index 0000000..a455ef5 --- /dev/null +++ b/test/test/test_severity_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.severity_type import SeverityType + +class TestSeverityType(unittest.TestCase): + """SeverityType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverityType(self): + """Test SeverityType""" + # inst = SeverityType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_similar_functions_response.py b/test/test/test_similar_functions_response.py new file mode 100644 index 0000000..f994035 --- /dev/null +++ b/test/test/test_similar_functions_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.similar_functions_response import SimilarFunctionsResponse + +class TestSimilarFunctionsResponse(unittest.TestCase): + """SimilarFunctionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimilarFunctionsResponse: + """Test SimilarFunctionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimilarFunctionsResponse` + """ + model = SimilarFunctionsResponse() + if include_optional: + return SimilarFunctionsResponse( + function_id = 56, + function_name = '', + binary_id = 56, + binary_name = '', + distance = 1.337, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + sha_256_hash = '' + ) + else: + return SimilarFunctionsResponse( + function_id = 56, + function_name = '', + binary_id = 56, + binary_name = '', + distance = 1.337, + embedding_3d = [ + 1.337 + ], + embedding_1d = [ + 1.337 + ], + sha_256_hash = '', + ) + """ + + def testSimilarFunctionsResponse(self): + """Test SimilarFunctionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_single_code_certificate_model.py b/test/test/test_single_code_certificate_model.py new file mode 100644 index 0000000..b0a5aaf --- /dev/null +++ b/test/test/test_single_code_certificate_model.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.single_code_certificate_model import SingleCodeCertificateModel + +class TestSingleCodeCertificateModel(unittest.TestCase): + """SingleCodeCertificateModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SingleCodeCertificateModel: + """Test SingleCodeCertificateModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SingleCodeCertificateModel` + """ + model = SingleCodeCertificateModel() + if include_optional: + return SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '' + ) + else: + return SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', + ) + """ + + def testSingleCodeCertificateModel(self): + """Test SingleCodeCertificateModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_single_code_signature_model.py b/test/test/test_single_code_signature_model.py new file mode 100644 index 0000000..93d1167 --- /dev/null +++ b/test/test/test_single_code_signature_model.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.single_code_signature_model import SingleCodeSignatureModel + +class TestSingleCodeSignatureModel(unittest.TestCase): + """SingleCodeSignatureModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SingleCodeSignatureModel: + """Test SingleCodeSignatureModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SingleCodeSignatureModel` + """ + model = SingleCodeSignatureModel() + if include_optional: + return SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '' + ) + else: + return SingleCodeSignatureModel( + certificates = [ + revengai.models.single_code_certificate_model.SingleCodeCertificateModel( + version = 56, + issued_on = '', + expires_on = '', + issuer_name = '', + serial_number = '', + subject_name = '', ) + ], + authenticode_digest = '', + ) + """ + + def testSingleCodeSignatureModel(self): + """Test SingleCodeSignatureModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_single_pdb_entry_model.py b/test/test/test_single_pdb_entry_model.py new file mode 100644 index 0000000..f403714 --- /dev/null +++ b/test/test/test_single_pdb_entry_model.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.single_pdb_entry_model import SinglePDBEntryModel + +class TestSinglePDBEntryModel(unittest.TestCase): + """SinglePDBEntryModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SinglePDBEntryModel: + """Test SinglePDBEntryModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SinglePDBEntryModel` + """ + model = SinglePDBEntryModel() + if include_optional: + return SinglePDBEntryModel( + guid = '', + age = 56, + path = '' + ) + else: + return SinglePDBEntryModel( + guid = '', + age = 56, + path = '', + ) + """ + + def testSinglePDBEntryModel(self): + """Test SinglePDBEntryModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_single_section_model.py b/test/test/test_single_section_model.py new file mode 100644 index 0000000..59569fa --- /dev/null +++ b/test/test/test_single_section_model.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.single_section_model import SingleSectionModel + +class TestSingleSectionModel(unittest.TestCase): + """SingleSectionModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SingleSectionModel: + """Test SingleSectionModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SingleSectionModel` + """ + model = SingleSectionModel() + if include_optional: + return SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '' + ) + else: + return SingleSectionModel( + name = '', + virtual_address = 56, + virtual_size = 56, + characteristics = '', + raw_size = 56, + entropy = 1.337, + sha3_256 = '', + ) + """ + + def testSingleSectionModel(self): + """Test SingleSectionModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_stack_variable.py b/test/test/test_stack_variable.py new file mode 100644 index 0000000..706d803 --- /dev/null +++ b/test/test/test_stack_variable.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.stack_variable import StackVariable + +class TestStackVariable(unittest.TestCase): + """StackVariable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StackVariable: + """Test StackVariable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StackVariable` + """ + model = StackVariable() + if include_optional: + return StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56 + ) + else: + return StackVariable( + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, + ) + """ + + def testStackVariable(self): + """Test StackVariable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_status_input.py b/test/test/test_status_input.py new file mode 100644 index 0000000..cb24544 --- /dev/null +++ b/test/test/test_status_input.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.status_input import StatusInput + +class TestStatusInput(unittest.TestCase): + """StatusInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatusInput(self): + """Test StatusInput""" + # inst = StatusInput() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_status_output.py b/test/test/test_status_output.py new file mode 100644 index 0000000..b106d6d --- /dev/null +++ b/test/test/test_status_output.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.status_output import StatusOutput + +class TestStatusOutput(unittest.TestCase): + """StatusOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StatusOutput: + """Test StatusOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StatusOutput` + """ + model = StatusOutput() + if include_optional: + return StatusOutput( + analysis_id = 56, + analysis_status = '' + ) + else: + return StatusOutput( + analysis_id = 56, + analysis_status = '', + ) + """ + + def testStatusOutput(self): + """Test StatusOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_string_functions.py b/test/test/test_string_functions.py new file mode 100644 index 0000000..88b1102 --- /dev/null +++ b/test/test/test_string_functions.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.string_functions import StringFunctions + +class TestStringFunctions(unittest.TestCase): + """StringFunctions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StringFunctions: + """Test StringFunctions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StringFunctions` + """ + model = StringFunctions() + if include_optional: + return StringFunctions( + value = '', + functions = [ + revengai.models.function.Function( + function_id = 56, + function_vaddr = 56, ) + ] + ) + else: + return StringFunctions( + value = '', + functions = [ + revengai.models.function.Function( + function_id = 56, + function_vaddr = 56, ) + ], + ) + """ + + def testStringFunctions(self): + """Test StringFunctions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_structure.py b/test/test/test_structure.py new file mode 100644 index 0000000..d2aa5a6 --- /dev/null +++ b/test/test/test_structure.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.structure import Structure + +class TestStructure(unittest.TestCase): + """Structure unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Structure: + """Test Structure + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Structure` + """ + model = Structure() + if include_optional: + return Structure( + last_change = '', + name = '', + size = 56, + members = { + 'key' : revengai.models.structure_member.StructureMember( + last_change = '', + name = '', + offset = 56, + type = '', + size = 56, ) + }, + artifact_type = '' + ) + else: + return Structure( + name = '', + members = { + 'key' : revengai.models.structure_member.StructureMember( + last_change = '', + name = '', + offset = 56, + type = '', + size = 56, ) + }, + ) + """ + + def testStructure(self): + """Test Structure""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_structure_member.py b/test/test/test_structure_member.py new file mode 100644 index 0000000..0fff26e --- /dev/null +++ b/test/test/test_structure_member.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.structure_member import StructureMember + +class TestStructureMember(unittest.TestCase): + """StructureMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StructureMember: + """Test StructureMember + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StructureMember` + """ + model = StructureMember() + if include_optional: + return StructureMember( + last_change = '', + name = '', + offset = 56, + type = '', + size = 56 + ) + else: + return StructureMember( + name = '', + offset = 56, + type = '', + size = 56, + ) + """ + + def testStructureMember(self): + """Test StructureMember""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_symbols.py b/test/test/test_symbols.py new file mode 100644 index 0000000..aed1958 --- /dev/null +++ b/test/test/test_symbols.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.symbols import Symbols + +class TestSymbols(unittest.TestCase): + """Symbols unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Symbols: + """Test Symbols + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Symbols` + """ + model = Symbols() + if include_optional: + return Symbols( + base_address = 56, + function_boundaries = [ + revengai.models.function_boundary.FunctionBoundary( + name = '', + start_address = 56, + end_address = 56, ) + ] + ) + else: + return Symbols( + ) + """ + + def testSymbols(self): + """Test Symbols""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_symbols_info.py b/test/test/test_symbols_info.py new file mode 100644 index 0000000..5577392 --- /dev/null +++ b/test/test/test_symbols_info.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.symbols_info import SymbolsInfo + +class TestSymbolsInfo(unittest.TestCase): + """SymbolsInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SymbolsInfo: + """Test SymbolsInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SymbolsInfo` + """ + model = SymbolsInfo() + if include_optional: + return SymbolsInfo( + base_addr = 56, + provided_boundaries = revengai.models.boundary.Boundary( + start_addr = 56, + end_addr = 56, + name = '', ) + ) + else: + return SymbolsInfo( + ) + """ + + def testSymbolsInfo(self): + """Test SymbolsInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag.py b/test/test/test_tag.py new file mode 100644 index 0000000..5b381ff --- /dev/null +++ b/test/test/test_tag.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag import Tag + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Tag: + """Test Tag + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Tag` + """ + model = Tag() + if include_optional: + return Tag( + name = '' + ) + else: + return Tag( + name = '', + ) + """ + + def testTag(self): + """Test Tag""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag_confidence_body.py b/test/test/test_tag_confidence_body.py new file mode 100644 index 0000000..978d072 --- /dev/null +++ b/test/test/test_tag_confidence_body.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag_confidence_body import TagConfidenceBody + +class TestTagConfidenceBody(unittest.TestCase): + """TagConfidenceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagConfidenceBody: + """Test TagConfidenceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagConfidenceBody` + """ + model = TagConfidenceBody() + if include_optional: + return TagConfidenceBody( + tags = [ + revengai.models.tags.Tags( + tag = '', + origin = 'RevEng-Malware', ) + ] + ) + else: + return TagConfidenceBody( + tags = [ + revengai.models.tags.Tags( + tag = '', + origin = 'RevEng-Malware', ) + ], + ) + """ + + def testTagConfidenceBody(self): + """Test TagConfidenceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag_origin_box_plot_confidence.py b/test/test/test_tag_origin_box_plot_confidence.py new file mode 100644 index 0000000..c0f55c4 --- /dev/null +++ b/test/test/test_tag_origin_box_plot_confidence.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence + +class TestTagOriginBoxPlotConfidence(unittest.TestCase): + """TagOriginBoxPlotConfidence unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagOriginBoxPlotConfidence: + """Test TagOriginBoxPlotConfidence + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagOriginBoxPlotConfidence` + """ + model = TagOriginBoxPlotConfidence() + if include_optional: + return TagOriginBoxPlotConfidence( + tag = revengai.models.tags.Tags( + tag = '', + origin = 'RevEng-Malware', ), + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ) + ) + else: + return TagOriginBoxPlotConfidence( + tag = revengai.models.tags.Tags( + tag = '', + origin = 'RevEng-Malware', ), + box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( + min = 1.337, + max = 1.337, + average = 1.337, + upper_quartile = 1.337, + lower_quartile = 1.337, + positive_count = 56, + negative_count = 56, ), + ) + """ + + def testTagOriginBoxPlotConfidence(self): + """Test TagOriginBoxPlotConfidence""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag_response.py b/test/test/test_tag_response.py new file mode 100644 index 0000000..c8ca434 --- /dev/null +++ b/test/test/test_tag_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag_response import TagResponse + +class TestTagResponse(unittest.TestCase): + """TagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagResponse: + """Test TagResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagResponse` + """ + model = TagResponse() + if include_optional: + return TagResponse( + name = '', + origin = '' + ) + else: + return TagResponse( + name = '', + origin = '', + ) + """ + + def testTagResponse(self): + """Test TagResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag_search_response.py b/test/test/test_tag_search_response.py new file mode 100644 index 0000000..5046861 --- /dev/null +++ b/test/test/test_tag_search_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag_search_response import TagSearchResponse + +class TestTagSearchResponse(unittest.TestCase): + """TagSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagSearchResponse: + """Test TagSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagSearchResponse` + """ + model = TagSearchResponse() + if include_optional: + return TagSearchResponse( + results = [ + revengai.models.tag_search_result.TagSearchResult( + tag_id = 56, + tag = '', ) + ] + ) + else: + return TagSearchResponse( + results = [ + revengai.models.tag_search_result.TagSearchResult( + tag_id = 56, + tag = '', ) + ], + ) + """ + + def testTagSearchResponse(self): + """Test TagSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tag_search_result.py b/test/test/test_tag_search_result.py new file mode 100644 index 0000000..e90c135 --- /dev/null +++ b/test/test/test_tag_search_result.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tag_search_result import TagSearchResult + +class TestTagSearchResult(unittest.TestCase): + """TagSearchResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagSearchResult: + """Test TagSearchResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagSearchResult` + """ + model = TagSearchResult() + if include_optional: + return TagSearchResult( + tag_id = 56, + tag = '' + ) + else: + return TagSearchResult( + tag_id = 56, + tag = '', + ) + """ + + def testTagSearchResult(self): + """Test TagSearchResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_tags.py b/test/test/test_tags.py new file mode 100644 index 0000000..335ab3e --- /dev/null +++ b/test/test/test_tags.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.tags import Tags + +class TestTags(unittest.TestCase): + """Tags unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Tags: + """Test Tags + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Tags` + """ + model = Tags() + if include_optional: + return Tags( + tag = '', + origin = 'RevEng-Malware' + ) + else: + return Tags( + tag = '', + origin = 'RevEng-Malware', + ) + """ + + def testTags(self): + """Test Tags""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_task_response.py b/test/test/test_task_response.py new file mode 100644 index 0000000..3c0e4ec --- /dev/null +++ b/test/test/test_task_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.task_response import TaskResponse + +class TestTaskResponse(unittest.TestCase): + """TaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TaskResponse: + """Test TaskResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TaskResponse` + """ + model = TaskResponse() + if include_optional: + return TaskResponse( + status = 'UNINITIALISED', + error_message = '' + ) + else: + return TaskResponse( + ) + """ + + def testTaskResponse(self): + """Test TaskResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_task_status.py b/test/test/test_task_status.py new file mode 100644 index 0000000..9b5771d --- /dev/null +++ b/test/test/test_task_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.task_status import TaskStatus + +class TestTaskStatus(unittest.TestCase): + """TaskStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaskStatus(self): + """Test TaskStatus""" + # inst = TaskStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_threat_score_function_body.py b/test/test/test_threat_score_function_body.py new file mode 100644 index 0000000..3e7bba6 --- /dev/null +++ b/test/test/test_threat_score_function_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.threat_score_function_body import ThreatScoreFunctionBody + +class TestThreatScoreFunctionBody(unittest.TestCase): + """ThreatScoreFunctionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreatScoreFunctionBody: + """Test ThreatScoreFunctionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreatScoreFunctionBody` + """ + model = ThreatScoreFunctionBody() + if include_optional: + return ThreatScoreFunctionBody( + function_ids = [ + 56 + ] + ) + else: + return ThreatScoreFunctionBody( + ) + """ + + def testThreatScoreFunctionBody(self): + """Test ThreatScoreFunctionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_timestamp_model.py b/test/test/test_timestamp_model.py new file mode 100644 index 0000000..7b46fde --- /dev/null +++ b/test/test/test_timestamp_model.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.timestamp_model import TimestampModel + +class TestTimestampModel(unittest.TestCase): + """TimestampModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TimestampModel: + """Test TimestampModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TimestampModel` + """ + model = TimestampModel() + if include_optional: + return TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56 + ) + else: + return TimestampModel( + pe_timestamp = 56, + export_timestamp = 56, + debug_timestamp = 56, + ) + """ + + def testTimestampModel(self): + """Test TimestampModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ttps.py b/test/test/test_ttps.py new file mode 100644 index 0000000..1533f6a --- /dev/null +++ b/test/test/test_ttps.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ttps import TTPS + +class TestTTPS(unittest.TestCase): + """TTPS unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TTPS: + """Test TTPS + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TTPS` + """ + model = TTPS() + if include_optional: + return TTPS( + success = True, + data = revengai.models.ttps_data.TTPS_Data( + score = 56, + ttps = [ + revengai.models.ttps_element.TTPS_Element( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, ) + ], ) + ) + else: + return TTPS( + success = True, + data = revengai.models.ttps_data.TTPS_Data( + score = 56, + ttps = [ + revengai.models.ttps_element.TTPS_Element( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, ) + ], ), + ) + """ + + def testTTPS(self): + """Test TTPS""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ttps_attack.py b/test/test/test_ttps_attack.py new file mode 100644 index 0000000..1090968 --- /dev/null +++ b/test/test/test_ttps_attack.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ttps_attack import TTPSAttack + +class TestTTPSAttack(unittest.TestCase): + """TTPSAttack unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TTPSAttack: + """Test TTPSAttack + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TTPSAttack` + """ + model = TTPSAttack() + if include_optional: + return TTPSAttack( + id = '', + name = '' + ) + else: + return TTPSAttack( + id = '', + name = '', + ) + """ + + def testTTPSAttack(self): + """Test TTPSAttack""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ttps_data.py b/test/test/test_ttps_data.py new file mode 100644 index 0000000..3806858 --- /dev/null +++ b/test/test/test_ttps_data.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ttps_data import TTPSData + +class TestTTPSData(unittest.TestCase): + """TTPSData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TTPSData: + """Test TTPSData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TTPSData` + """ + model = TTPSData() + if include_optional: + return TTPSData( + score = 56, + ttps = [ + revengai.models.ttps_element.TTPS_Element( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, ) + ] + ) + else: + return TTPSData( + score = 56, + ttps = [ + revengai.models.ttps_element.TTPS_Element( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, ) + ], + ) + """ + + def testTTPSData(self): + """Test TTPSData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ttps_element.py b/test/test/test_ttps_element.py new file mode 100644 index 0000000..4abba5d --- /dev/null +++ b/test/test/test_ttps_element.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ttps_element import TTPSElement + +class TestTTPSElement(unittest.TestCase): + """TTPSElement unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TTPSElement: + """Test TTPSElement + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TTPSElement` + """ + model = TTPSElement() + if include_optional: + return TTPSElement( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56 + ) + else: + return TTPSElement( + name = '', + attack = [ + revengai.models.ttps_attack.TTPS_Attack( + id = '', + name = '', ) + ], + occurrences = [ + revengai.models.ttps_occurance.TTPS_Occurance( + ppid = 56, + pid = 56, ) + ], + score = 56, + ) + """ + + def testTTPSElement(self): + """Test TTPSElement""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_ttps_occurance.py b/test/test/test_ttps_occurance.py new file mode 100644 index 0000000..34ebcf4 --- /dev/null +++ b/test/test/test_ttps_occurance.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.ttps_occurance import TTPSOccurance + +class TestTTPSOccurance(unittest.TestCase): + """TTPSOccurance unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TTPSOccurance: + """Test TTPSOccurance + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TTPSOccurance` + """ + model = TTPSOccurance() + if include_optional: + return TTPSOccurance( + ppid = 56, + pid = 56 + ) + else: + return TTPSOccurance( + ppid = 56, + pid = 56, + ) + """ + + def testTTPSOccurance(self): + """Test TTPSOccurance""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_type_definition.py b/test/test/test_type_definition.py new file mode 100644 index 0000000..0b6371d --- /dev/null +++ b/test/test/test_type_definition.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.type_definition import TypeDefinition + +class TestTypeDefinition(unittest.TestCase): + """TypeDefinition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TypeDefinition: + """Test TypeDefinition + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TypeDefinition` + """ + model = TypeDefinition() + if include_optional: + return TypeDefinition( + last_change = '', + name = '', + type = '', + artifact_type = '' + ) + else: + return TypeDefinition( + name = '', + type = '', + ) + """ + + def testTypeDefinition(self): + """Test TypeDefinition""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_unstrip_request.py b/test/test/test_unstrip_request.py new file mode 100644 index 0000000..9be130a --- /dev/null +++ b/test/test/test_unstrip_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.unstrip_request import UnstripRequest + +class TestUnstripRequest(unittest.TestCase): + """UnstripRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnstripRequest: + """Test UnstripRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnstripRequest` + """ + model = UnstripRequest() + if include_optional: + return UnstripRequest( + min_similarity = 0.0, + limit = 1.0, + apply = True + ) + else: + return UnstripRequest( + ) + """ + + def testUnstripRequest(self): + """Test UnstripRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_update_function_data_types.py b/test/test/test_update_function_data_types.py new file mode 100644 index 0000000..fc6c8b9 --- /dev/null +++ b/test/test/test_update_function_data_types.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.update_function_data_types import UpdateFunctionDataTypes + +class TestUpdateFunctionDataTypes(unittest.TestCase): + """UpdateFunctionDataTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateFunctionDataTypes: + """Test UpdateFunctionDataTypes + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateFunctionDataTypes` + """ + model = UpdateFunctionDataTypes() + if include_optional: + return UpdateFunctionDataTypes( + data_types_version = 56, + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ) + ) + else: + return UpdateFunctionDataTypes( + data_types_version = 56, + data_types = revengai.models.function_info.FunctionInfo( + func_types = revengai.models.function_type.FunctionType( + last_change = '', + addr = 56, + size = 56, + header = revengai.models.function_header.FunctionHeader( + last_change = '', + name = '', + addr = 56, + type = '', + args = { + 'key' : revengai.models.argument.Argument( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, ) + }, ), + stack_vars = { + 'key' : revengai.models.stack_variable.StackVariable( + last_change = '', + offset = 56, + name = '', + type = '', + size = 56, + addr = 56, ) + }, + name = '', + type = '', + artifact_type = 'Function', ), + func_deps = [ + null + ], ), + ) + """ + + def testUpdateFunctionDataTypes(self): + """Test UpdateFunctionDataTypes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_upload_file_type.py b/test/test/test_upload_file_type.py new file mode 100644 index 0000000..66ac61d --- /dev/null +++ b/test/test/test_upload_file_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.upload_file_type import UploadFileType + +class TestUploadFileType(unittest.TestCase): + """UploadFileType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUploadFileType(self): + """Test UploadFileType""" + # inst = UploadFileType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_upload_response.py b/test/test/test_upload_response.py new file mode 100644 index 0000000..192a82e --- /dev/null +++ b/test/test/test_upload_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.upload_response import UploadResponse + +class TestUploadResponse(unittest.TestCase): + """UploadResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UploadResponse: + """Test UploadResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UploadResponse` + """ + model = UploadResponse() + if include_optional: + return UploadResponse( + sha_256_hash = '', + file_type = 'BINARY', + filename = '' + ) + else: + return UploadResponse( + sha_256_hash = '', + file_type = 'BINARY', + filename = '', + ) + """ + + def testUploadResponse(self): + """Test UploadResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_upsert_ai_decomplation_rating_request.py b/test/test/test_upsert_ai_decomplation_rating_request.py new file mode 100644 index 0000000..55b8826 --- /dev/null +++ b/test/test/test_upsert_ai_decomplation_rating_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest + +class TestUpsertAiDecomplationRatingRequest(unittest.TestCase): + """UpsertAiDecomplationRatingRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpsertAiDecomplationRatingRequest: + """Test UpsertAiDecomplationRatingRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpsertAiDecomplationRatingRequest` + """ + model = UpsertAiDecomplationRatingRequest() + if include_optional: + return UpsertAiDecomplationRatingRequest( + rating = 'POSITIVE' + ) + else: + return UpsertAiDecomplationRatingRequest( + rating = 'POSITIVE', + ) + """ + + def testUpsertAiDecomplationRatingRequest(self): + """Test UpsertAiDecomplationRatingRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_user_activity_response.py b/test/test/test_user_activity_response.py new file mode 100644 index 0000000..c045e16 --- /dev/null +++ b/test/test/test_user_activity_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.user_activity_response import UserActivityResponse + +class TestUserActivityResponse(unittest.TestCase): + """UserActivityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserActivityResponse: + """Test UserActivityResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserActivityResponse` + """ + model = UserActivityResponse() + if include_optional: + return UserActivityResponse( + actions = '', + activity_scope = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', + sources = '', + username = '' + ) + else: + return UserActivityResponse( + actions = '', + activity_scope = '', + creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', + sources = '', + username = '', + ) + """ + + def testUserActivityResponse(self): + """Test UserActivityResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_vulnerabilities.py b/test/test/test_vulnerabilities.py new file mode 100644 index 0000000..0fb9163 --- /dev/null +++ b/test/test/test_vulnerabilities.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.vulnerabilities import Vulnerabilities + +class TestVulnerabilities(unittest.TestCase): + """Vulnerabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Vulnerabilities: + """Test Vulnerabilities + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Vulnerabilities` + """ + model = Vulnerabilities() + if include_optional: + return Vulnerabilities( + vulnerabilities = [ + revengai.models.vulnerability.Vulnerability( + vendor = '', + product = '', + version = '', + cve_number = '', + severity = 'CRITICAL', + source = '', + cvss_version = '', + cvss_vector = '', + remarks = '', + score = 1.337, + is_unknown = True, ) + ] + ) + else: + return Vulnerabilities( + vulnerabilities = [ + revengai.models.vulnerability.Vulnerability( + vendor = '', + product = '', + version = '', + cve_number = '', + severity = 'CRITICAL', + source = '', + cvss_version = '', + cvss_vector = '', + remarks = '', + score = 1.337, + is_unknown = True, ) + ], + ) + """ + + def testVulnerabilities(self): + """Test Vulnerabilities""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_vulnerability.py b/test/test/test_vulnerability.py new file mode 100644 index 0000000..16e6720 --- /dev/null +++ b/test/test/test_vulnerability.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.vulnerability import Vulnerability + +class TestVulnerability(unittest.TestCase): + """Vulnerability unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Vulnerability: + """Test Vulnerability + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Vulnerability` + """ + model = Vulnerability() + if include_optional: + return Vulnerability( + vendor = '', + product = '', + version = '', + cve_number = '', + severity = 'CRITICAL', + source = '', + cvss_version = '', + cvss_vector = '', + remarks = '', + score = 1.337, + is_unknown = True + ) + else: + return Vulnerability( + vendor = '', + product = '', + version = '', + cve_number = '', + severity = 'CRITICAL', + source = '', + cvss_version = '', + cvss_vector = '', + remarks = '', + score = 1.337, + ) + """ + + def testVulnerability(self): + """Test Vulnerability""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_vulnerability_type.py b/test/test/test_vulnerability_type.py new file mode 100644 index 0000000..05a31e6 --- /dev/null +++ b/test/test/test_vulnerability_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.vulnerability_type import VulnerabilityType + +class TestVulnerabilityType(unittest.TestCase): + """VulnerabilityType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVulnerabilityType(self): + """Test VulnerabilityType""" + # inst = VulnerabilityType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test/test_workspace.py b/test/test/test_workspace.py new file mode 100644 index 0000000..bb3d34b --- /dev/null +++ b/test/test/test_workspace.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is Similarity Search Engine for executable binaries + + The version of the OpenAPI document: v1.72.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.workspace import Workspace + +class TestWorkspace(unittest.TestCase): + """Workspace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWorkspace(self): + """Test Workspace""" + # inst = Workspace() + +if __name__ == '__main__': + unittest.main()