revengai 2.74.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- revengai/__init__.py +647 -0
- revengai/api/__init__.py +22 -0
- revengai/api/analyses_comments_api.py +1198 -0
- revengai/api/analyses_core_api.py +3870 -0
- revengai/api/analyses_dynamic_execution_api.py +1884 -0
- revengai/api/analyses_results_metadata_api.py +2240 -0
- revengai/api/analyses_security_checks_api.py +862 -0
- revengai/api/authentication_users_api.py +1323 -0
- revengai/api/binaries_api.py +1610 -0
- revengai/api/collections_api.py +2167 -0
- revengai/api/external_sources_api.py +827 -0
- revengai/api/firmware_api.py +592 -0
- revengai/api/functions_ai_decompilation_api.py +2592 -0
- revengai/api/functions_block_comments_api.py +849 -0
- revengai/api/functions_core_api.py +3430 -0
- revengai/api/functions_data_types_api.py +1746 -0
- revengai/api/functions_decompilation_api.py +1198 -0
- revengai/api/functions_renaming_history_api.py +1151 -0
- revengai/api/models_api.py +284 -0
- revengai/api/search_api.py +1454 -0
- revengai/api_client.py +803 -0
- revengai/api_response.py +21 -0
- revengai/configuration.py +605 -0
- revengai/exceptions.py +215 -0
- revengai/models/__init__.py +298 -0
- revengai/models/addr.py +143 -0
- revengai/models/ai_decompilation_rating.py +37 -0
- revengai/models/ai_unstrip_request.py +86 -0
- revengai/models/analysis_access_info.py +88 -0
- revengai/models/analysis_config.py +106 -0
- revengai/models/analysis_create_request.py +131 -0
- revengai/models/analysis_create_response.py +88 -0
- revengai/models/analysis_detail_response.py +121 -0
- revengai/models/analysis_function_mapping.py +90 -0
- revengai/models/analysis_function_matching_request.py +110 -0
- revengai/models/analysis_functions.py +94 -0
- revengai/models/analysis_functions_list.py +94 -0
- revengai/models/analysis_record.py +128 -0
- revengai/models/analysis_scope.py +36 -0
- revengai/models/analysis_strings_response.py +96 -0
- revengai/models/analysis_tags.py +94 -0
- revengai/models/analysis_update_request.py +108 -0
- revengai/models/analysis_update_tags_request.py +86 -0
- revengai/models/analysis_update_tags_response.py +94 -0
- revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +38 -0
- revengai/models/app_api_rest_v2_analyses_enums_order_by.py +37 -0
- revengai/models/app_api_rest_v2_collections_enums_order_by.py +40 -0
- revengai/models/app_api_rest_v2_functions_responses_function.py +93 -0
- revengai/models/app_api_rest_v2_functions_types_function.py +110 -0
- revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +86 -0
- revengai/models/argument.py +99 -0
- revengai/models/auto_unstrip_request.py +99 -0
- revengai/models/auto_unstrip_response.py +129 -0
- revengai/models/base_response.py +124 -0
- revengai/models/base_response_analysis_create_response.py +125 -0
- revengai/models/base_response_analysis_detail_response.py +125 -0
- revengai/models/base_response_analysis_function_mapping.py +125 -0
- revengai/models/base_response_analysis_functions.py +125 -0
- revengai/models/base_response_analysis_functions_list.py +125 -0
- revengai/models/base_response_analysis_strings_response.py +125 -0
- revengai/models/base_response_analysis_tags.py +125 -0
- revengai/models/base_response_analysis_update_tags_response.py +125 -0
- revengai/models/base_response_basic.py +125 -0
- revengai/models/base_response_binary_additional_response.py +125 -0
- revengai/models/base_response_binary_details_response.py +125 -0
- revengai/models/base_response_binary_externals_response.py +125 -0
- revengai/models/base_response_binary_search_response.py +125 -0
- revengai/models/base_response_block_comments_generation_for_function_response.py +125 -0
- revengai/models/base_response_block_comments_overview_generation_response.py +116 -0
- revengai/models/base_response_bool.py +121 -0
- revengai/models/base_response_callees_caller_functions_response.py +125 -0
- revengai/models/base_response_capabilities.py +125 -0
- revengai/models/base_response_check_security_checks_task_response.py +125 -0
- revengai/models/base_response_child_binaries_response.py +125 -0
- revengai/models/base_response_collection_binaries_update_response.py +125 -0
- revengai/models/base_response_collection_response.py +125 -0
- revengai/models/base_response_collection_search_response.py +125 -0
- revengai/models/base_response_collection_tags_update_response.py +125 -0
- revengai/models/base_response_comment_response.py +125 -0
- revengai/models/base_response_communities.py +125 -0
- revengai/models/base_response_created.py +125 -0
- revengai/models/base_response_dict.py +121 -0
- revengai/models/base_response_dynamic_execution_status.py +125 -0
- revengai/models/base_response_external_response.py +125 -0
- revengai/models/base_response_function_blocks_response.py +125 -0
- revengai/models/base_response_function_capability_response.py +125 -0
- revengai/models/base_response_function_data_types.py +125 -0
- revengai/models/base_response_function_data_types_list.py +125 -0
- revengai/models/base_response_function_search_response.py +125 -0
- revengai/models/base_response_function_strings_response.py +125 -0
- revengai/models/base_response_function_task_response.py +125 -0
- revengai/models/base_response_functions_detail_response.py +125 -0
- revengai/models/base_response_generate_function_data_types.py +125 -0
- revengai/models/base_response_generation_status_list.py +125 -0
- revengai/models/base_response_get_ai_decompilation_rating_response.py +125 -0
- revengai/models/base_response_get_ai_decompilation_task.py +125 -0
- revengai/models/base_response_get_me_response.py +125 -0
- revengai/models/base_response_get_public_user_response.py +125 -0
- revengai/models/base_response_list_collection_results.py +125 -0
- revengai/models/base_response_list_comment_response.py +129 -0
- revengai/models/base_response_list_die_match.py +129 -0
- revengai/models/base_response_list_function_name_history.py +129 -0
- revengai/models/base_response_list_sbom.py +129 -0
- revengai/models/base_response_list_user_activity_response.py +129 -0
- revengai/models/base_response_login_response.py +125 -0
- revengai/models/base_response_logs.py +125 -0
- revengai/models/base_response_models_response.py +125 -0
- revengai/models/base_response_network_overview_response.py +125 -0
- revengai/models/base_response_params.py +125 -0
- revengai/models/base_response_process_dumps.py +125 -0
- revengai/models/base_response_process_registry.py +125 -0
- revengai/models/base_response_process_tree.py +125 -0
- revengai/models/base_response_queued_security_checks_task_response.py +125 -0
- revengai/models/base_response_recent.py +125 -0
- revengai/models/base_response_security_checks_response.py +125 -0
- revengai/models/base_response_status.py +125 -0
- revengai/models/base_response_str.py +121 -0
- revengai/models/base_response_tag_search_response.py +125 -0
- revengai/models/base_response_task_response.py +125 -0
- revengai/models/base_response_ttps.py +125 -0
- revengai/models/base_response_upload_response.py +125 -0
- revengai/models/base_response_vulnerabilities.py +125 -0
- revengai/models/basic.py +116 -0
- revengai/models/binary_additional_details_data_response.py +112 -0
- revengai/models/binary_additional_response.py +105 -0
- revengai/models/binary_config.py +108 -0
- revengai/models/binary_details_response.py +125 -0
- revengai/models/binary_externals_response.py +95 -0
- revengai/models/binary_search_response.py +94 -0
- revengai/models/binary_search_result.py +108 -0
- revengai/models/binary_task_status.py +39 -0
- revengai/models/block.py +86 -0
- revengai/models/block_comments_generation_for_function_response.py +86 -0
- revengai/models/callee_function_info.py +106 -0
- revengai/models/callees_caller_functions_response.py +106 -0
- revengai/models/caller_function_info.py +106 -0
- revengai/models/capabilities.py +94 -0
- revengai/models/capability.py +90 -0
- revengai/models/check_security_checks_task_response.py +87 -0
- revengai/models/child_binaries_response.py +104 -0
- revengai/models/code_signature_model.py +98 -0
- revengai/models/collection_binaries_update_request.py +86 -0
- revengai/models/collection_binaries_update_response.py +94 -0
- revengai/models/collection_binary_response.py +97 -0
- revengai/models/collection_create_request.py +107 -0
- revengai/models/collection_list_item.py +112 -0
- revengai/models/collection_response.py +131 -0
- revengai/models/collection_response_binaries_inner.py +135 -0
- revengai/models/collection_scope.py +38 -0
- revengai/models/collection_search_response.py +94 -0
- revengai/models/collection_search_result.py +124 -0
- revengai/models/collection_tags_update_request.py +86 -0
- revengai/models/collection_tags_update_response.py +86 -0
- revengai/models/collection_update_request.py +106 -0
- revengai/models/comment_base.py +86 -0
- revengai/models/comment_response.py +110 -0
- revengai/models/comment_update_request.py +86 -0
- revengai/models/communities.py +100 -0
- revengai/models/community_match_percentages.py +92 -0
- revengai/models/confidence_type.py +39 -0
- revengai/models/context.py +141 -0
- revengai/models/created.py +90 -0
- revengai/models/decompilation_comment_context.py +98 -0
- revengai/models/die_match.py +92 -0
- revengai/models/dynamic_execution_status_input.py +38 -0
- revengai/models/elf_dynamic_entry.py +88 -0
- revengai/models/elf_import_model.py +88 -0
- revengai/models/elf_model.py +179 -0
- revengai/models/elf_relocation.py +98 -0
- revengai/models/elf_section.py +104 -0
- revengai/models/elf_security.py +94 -0
- revengai/models/elf_segment.py +102 -0
- revengai/models/elf_symbol.py +98 -0
- revengai/models/entrypoint_model.py +88 -0
- revengai/models/enumeration.py +97 -0
- revengai/models/error_model.py +88 -0
- revengai/models/export_model.py +88 -0
- revengai/models/external_response.py +91 -0
- revengai/models/file_format.py +37 -0
- revengai/models/file_hashes.py +140 -0
- revengai/models/file_metadata.py +96 -0
- revengai/models/filters.py +39 -0
- revengai/models/function_block_destination_response.py +95 -0
- revengai/models/function_block_response.py +109 -0
- revengai/models/function_blocks_response.py +121 -0
- revengai/models/function_boundary.py +90 -0
- revengai/models/function_capability_response.py +86 -0
- revengai/models/function_comment_create_request.py +92 -0
- revengai/models/function_data_types.py +106 -0
- revengai/models/function_data_types_list.py +98 -0
- revengai/models/function_data_types_list_item.py +108 -0
- revengai/models/function_data_types_params.py +86 -0
- revengai/models/function_data_types_status.py +90 -0
- revengai/models/function_header.py +112 -0
- revengai/models/function_info_input.py +105 -0
- revengai/models/function_info_input_func_deps_inner.py +163 -0
- revengai/models/function_info_output.py +105 -0
- revengai/models/function_list_item.py +96 -0
- revengai/models/function_local_variable_response.py +94 -0
- revengai/models/function_mapping.py +90 -0
- revengai/models/function_mapping_full.py +275 -0
- revengai/models/function_match.py +111 -0
- revengai/models/function_matching_filters.py +103 -0
- revengai/models/function_matching_request.py +114 -0
- revengai/models/function_matching_response.py +157 -0
- revengai/models/function_name_history.py +99 -0
- revengai/models/function_param_response.py +94 -0
- revengai/models/function_rename.py +88 -0
- revengai/models/function_rename_map.py +90 -0
- revengai/models/function_search_response.py +94 -0
- revengai/models/function_search_result.py +99 -0
- revengai/models/function_source_type.py +39 -0
- revengai/models/function_string.py +88 -0
- revengai/models/function_strings_response.py +96 -0
- revengai/models/function_task_response.py +94 -0
- revengai/models/function_task_status.py +39 -0
- revengai/models/function_type_input.py +127 -0
- revengai/models/function_type_output.py +127 -0
- revengai/models/functions_detail_response.py +125 -0
- revengai/models/functions_list_rename.py +94 -0
- revengai/models/generate_function_data_types.py +94 -0
- revengai/models/generation_status_list.py +98 -0
- revengai/models/get_ai_decompilation_rating_response.py +94 -0
- revengai/models/get_ai_decompilation_task.py +159 -0
- revengai/models/get_me_response.py +108 -0
- revengai/models/get_public_user_response.py +88 -0
- revengai/models/global_variable.py +101 -0
- revengai/models/icon_model.py +91 -0
- revengai/models/import_model.py +88 -0
- revengai/models/inverse_function_map_item.py +99 -0
- revengai/models/inverse_string_map_item.py +93 -0
- revengai/models/inverse_value.py +86 -0
- revengai/models/isa.py +37 -0
- revengai/models/list_collection_results.py +94 -0
- revengai/models/login_request.py +89 -0
- revengai/models/login_response.py +86 -0
- revengai/models/logs.py +86 -0
- revengai/models/matched_function.py +116 -0
- revengai/models/matched_function_suggestion.py +97 -0
- revengai/models/meta_model.py +95 -0
- revengai/models/model_name.py +40 -0
- revengai/models/models_response.py +86 -0
- revengai/models/name_confidence.py +89 -0
- revengai/models/network_overview_dns.py +98 -0
- revengai/models/network_overview_dns_answer.py +88 -0
- revengai/models/network_overview_metadata.py +99 -0
- revengai/models/network_overview_response.py +104 -0
- revengai/models/order.py +36 -0
- revengai/models/pagination_model.py +90 -0
- revengai/models/params.py +103 -0
- revengai/models/pdb_debug_model.py +94 -0
- revengai/models/pe_model.py +215 -0
- revengai/models/platform.py +36 -0
- revengai/models/process.py +103 -0
- revengai/models/process_dump.py +96 -0
- revengai/models/process_dump_metadata.py +90 -0
- revengai/models/process_dumps.py +92 -0
- revengai/models/process_dumps_data.py +96 -0
- revengai/models/process_registry.py +105 -0
- revengai/models/process_tree.py +96 -0
- revengai/models/queued_security_checks_task_response.py +86 -0
- revengai/models/re_analysis_form.py +101 -0
- revengai/models/recent.py +94 -0
- revengai/models/registry.py +102 -0
- revengai/models/relative_binary_response.py +90 -0
- revengai/models/sandbox_options.py +88 -0
- revengai/models/sbom.py +96 -0
- revengai/models/sbom_package.py +88 -0
- revengai/models/scrape_third_party_config.py +86 -0
- revengai/models/section_model.py +96 -0
- revengai/models/security_checks_response.py +98 -0
- revengai/models/security_checks_result.py +103 -0
- revengai/models/security_model.py +106 -0
- revengai/models/severity_type.py +40 -0
- revengai/models/single_code_certificate_model.py +96 -0
- revengai/models/single_code_signature_model.py +96 -0
- revengai/models/single_pdb_entry_model.py +90 -0
- revengai/models/single_section_model.py +98 -0
- revengai/models/stack_variable.py +101 -0
- revengai/models/status_input.py +40 -0
- revengai/models/status_output.py +88 -0
- revengai/models/string_functions.py +96 -0
- revengai/models/structure.py +117 -0
- revengai/models/structure_member.py +99 -0
- revengai/models/symbols.py +96 -0
- revengai/models/tag.py +86 -0
- revengai/models/tag_item.py +95 -0
- revengai/models/tag_response.py +88 -0
- revengai/models/tag_search_response.py +94 -0
- revengai/models/tag_search_result.py +88 -0
- revengai/models/task_response.py +94 -0
- revengai/models/task_status.py +39 -0
- revengai/models/timestamp_model.py +90 -0
- revengai/models/ttps.py +92 -0
- revengai/models/ttps_attack.py +88 -0
- revengai/models/ttps_data.py +96 -0
- revengai/models/ttps_element.py +108 -0
- revengai/models/ttps_occurance.py +88 -0
- revengai/models/type_definition.py +97 -0
- revengai/models/update_function_data_types.py +92 -0
- revengai/models/upload_file_type.py +38 -0
- revengai/models/upload_response.py +91 -0
- revengai/models/upsert_ai_decomplation_rating_request.py +94 -0
- revengai/models/user_activity_response.py +97 -0
- revengai/models/vulnerabilities.py +94 -0
- revengai/models/vulnerability.py +113 -0
- revengai/models/vulnerability_type.py +40 -0
- revengai/models/workspace.py +37 -0
- revengai/py.typed +0 -0
- revengai/rest.py +257 -0
- revengai-2.74.0.dist-info/METADATA +447 -0
- revengai-2.74.0.dist-info/RECORD +314 -0
- revengai-2.74.0.dist-info/WHEEL +4 -0
- revengai-2.74.0.dist-info/licenses/LICENSE.md +19 -0
|
@@ -0,0 +1,3870 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
RevEng.AI API
|
|
5
|
+
|
|
6
|
+
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
+
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
|
|
19
|
+
from typing import Any, List, Optional, Tuple, Union
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from revengai.models.analysis_create_request import AnalysisCreateRequest
|
|
22
|
+
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
23
|
+
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
24
|
+
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
|
|
25
|
+
from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
|
|
26
|
+
from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
|
|
27
|
+
from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
|
|
28
|
+
from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse
|
|
29
|
+
from revengai.models.base_response_basic import BaseResponseBasic
|
|
30
|
+
from revengai.models.base_response_created import BaseResponseCreated
|
|
31
|
+
from revengai.models.base_response_dict import BaseResponseDict
|
|
32
|
+
from revengai.models.base_response_logs import BaseResponseLogs
|
|
33
|
+
from revengai.models.base_response_params import BaseResponseParams
|
|
34
|
+
from revengai.models.base_response_recent import BaseResponseRecent
|
|
35
|
+
from revengai.models.base_response_status import BaseResponseStatus
|
|
36
|
+
from revengai.models.base_response_upload_response import BaseResponseUploadResponse
|
|
37
|
+
from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput
|
|
38
|
+
from revengai.models.model_name import ModelName
|
|
39
|
+
from revengai.models.order import Order
|
|
40
|
+
from revengai.models.re_analysis_form import ReAnalysisForm
|
|
41
|
+
from revengai.models.status_input import StatusInput
|
|
42
|
+
from revengai.models.upload_file_type import UploadFileType
|
|
43
|
+
from revengai.models.workspace import Workspace
|
|
44
|
+
|
|
45
|
+
from revengai.api_client import ApiClient, RequestSerialized
|
|
46
|
+
from revengai.api_response import ApiResponse
|
|
47
|
+
from revengai.rest import RESTResponseType
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class AnalysesCoreApi:
|
|
51
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
52
|
+
Ref: https://openapi-generator.tech
|
|
53
|
+
|
|
54
|
+
Do not edit the class manually.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
def __init__(self, api_client=None) -> None:
|
|
58
|
+
if api_client is None:
|
|
59
|
+
api_client = ApiClient.get_default()
|
|
60
|
+
self.api_client = api_client
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@validate_call
|
|
64
|
+
def create_analysis(
|
|
65
|
+
self,
|
|
66
|
+
analysis_create_request: AnalysisCreateRequest,
|
|
67
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
68
|
+
_request_timeout: Union[
|
|
69
|
+
None,
|
|
70
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
71
|
+
Tuple[
|
|
72
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
73
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
74
|
+
]
|
|
75
|
+
] = None,
|
|
76
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
77
|
+
_content_type: Optional[StrictStr] = None,
|
|
78
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
79
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
80
|
+
) -> BaseResponseAnalysisCreateResponse:
|
|
81
|
+
"""Create Analysis
|
|
82
|
+
|
|
83
|
+
Begins an analysis
|
|
84
|
+
|
|
85
|
+
:param analysis_create_request: (required)
|
|
86
|
+
:type analysis_create_request: AnalysisCreateRequest
|
|
87
|
+
:param x_rev_eng_application:
|
|
88
|
+
:type x_rev_eng_application: str
|
|
89
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
90
|
+
number provided, it will be total request
|
|
91
|
+
timeout. It can also be a pair (tuple) of
|
|
92
|
+
(connection, read) timeouts.
|
|
93
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
94
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
95
|
+
request; this effectively ignores the
|
|
96
|
+
authentication in the spec for a single request.
|
|
97
|
+
:type _request_auth: dict, optional
|
|
98
|
+
:param _content_type: force content-type for the request.
|
|
99
|
+
:type _content_type: str, Optional
|
|
100
|
+
:param _headers: set to override the headers for a single
|
|
101
|
+
request; this effectively ignores the headers
|
|
102
|
+
in the spec for a single request.
|
|
103
|
+
:type _headers: dict, optional
|
|
104
|
+
:param _host_index: set to override the host_index for a single
|
|
105
|
+
request; this effectively ignores the host_index
|
|
106
|
+
in the spec for a single request.
|
|
107
|
+
:type _host_index: int, optional
|
|
108
|
+
:return: Returns the result object.
|
|
109
|
+
""" # noqa: E501
|
|
110
|
+
|
|
111
|
+
_param = self._create_analysis_serialize(
|
|
112
|
+
analysis_create_request=analysis_create_request,
|
|
113
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
114
|
+
_request_auth=_request_auth,
|
|
115
|
+
_content_type=_content_type,
|
|
116
|
+
_headers=_headers,
|
|
117
|
+
_host_index=_host_index
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
121
|
+
'201': "BaseResponseAnalysisCreateResponse",
|
|
122
|
+
'422': "BaseResponse",
|
|
123
|
+
'404': "BaseResponse",
|
|
124
|
+
'400': "BaseResponse",
|
|
125
|
+
}
|
|
126
|
+
response_data = self.api_client.call_api(
|
|
127
|
+
*_param,
|
|
128
|
+
_request_timeout=_request_timeout
|
|
129
|
+
)
|
|
130
|
+
response_data.read()
|
|
131
|
+
return self.api_client.response_deserialize(
|
|
132
|
+
response_data=response_data,
|
|
133
|
+
response_types_map=_response_types_map,
|
|
134
|
+
).data
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@validate_call
|
|
138
|
+
def create_analysis_with_http_info(
|
|
139
|
+
self,
|
|
140
|
+
analysis_create_request: AnalysisCreateRequest,
|
|
141
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
142
|
+
_request_timeout: Union[
|
|
143
|
+
None,
|
|
144
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
145
|
+
Tuple[
|
|
146
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
147
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
148
|
+
]
|
|
149
|
+
] = None,
|
|
150
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
151
|
+
_content_type: Optional[StrictStr] = None,
|
|
152
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
153
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
154
|
+
) -> ApiResponse[BaseResponseAnalysisCreateResponse]:
|
|
155
|
+
"""Create Analysis
|
|
156
|
+
|
|
157
|
+
Begins an analysis
|
|
158
|
+
|
|
159
|
+
:param analysis_create_request: (required)
|
|
160
|
+
:type analysis_create_request: AnalysisCreateRequest
|
|
161
|
+
:param x_rev_eng_application:
|
|
162
|
+
:type x_rev_eng_application: str
|
|
163
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
164
|
+
number provided, it will be total request
|
|
165
|
+
timeout. It can also be a pair (tuple) of
|
|
166
|
+
(connection, read) timeouts.
|
|
167
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
168
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
169
|
+
request; this effectively ignores the
|
|
170
|
+
authentication in the spec for a single request.
|
|
171
|
+
:type _request_auth: dict, optional
|
|
172
|
+
:param _content_type: force content-type for the request.
|
|
173
|
+
:type _content_type: str, Optional
|
|
174
|
+
:param _headers: set to override the headers for a single
|
|
175
|
+
request; this effectively ignores the headers
|
|
176
|
+
in the spec for a single request.
|
|
177
|
+
:type _headers: dict, optional
|
|
178
|
+
:param _host_index: set to override the host_index for a single
|
|
179
|
+
request; this effectively ignores the host_index
|
|
180
|
+
in the spec for a single request.
|
|
181
|
+
:type _host_index: int, optional
|
|
182
|
+
:return: Returns the result object.
|
|
183
|
+
""" # noqa: E501
|
|
184
|
+
|
|
185
|
+
_param = self._create_analysis_serialize(
|
|
186
|
+
analysis_create_request=analysis_create_request,
|
|
187
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
188
|
+
_request_auth=_request_auth,
|
|
189
|
+
_content_type=_content_type,
|
|
190
|
+
_headers=_headers,
|
|
191
|
+
_host_index=_host_index
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
195
|
+
'201': "BaseResponseAnalysisCreateResponse",
|
|
196
|
+
'422': "BaseResponse",
|
|
197
|
+
'404': "BaseResponse",
|
|
198
|
+
'400': "BaseResponse",
|
|
199
|
+
}
|
|
200
|
+
response_data = self.api_client.call_api(
|
|
201
|
+
*_param,
|
|
202
|
+
_request_timeout=_request_timeout
|
|
203
|
+
)
|
|
204
|
+
response_data.read()
|
|
205
|
+
return self.api_client.response_deserialize(
|
|
206
|
+
response_data=response_data,
|
|
207
|
+
response_types_map=_response_types_map,
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
@validate_call
|
|
212
|
+
def create_analysis_without_preload_content(
|
|
213
|
+
self,
|
|
214
|
+
analysis_create_request: AnalysisCreateRequest,
|
|
215
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
216
|
+
_request_timeout: Union[
|
|
217
|
+
None,
|
|
218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
219
|
+
Tuple[
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
221
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
222
|
+
]
|
|
223
|
+
] = None,
|
|
224
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
225
|
+
_content_type: Optional[StrictStr] = None,
|
|
226
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
227
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
228
|
+
) -> RESTResponseType:
|
|
229
|
+
"""Create Analysis
|
|
230
|
+
|
|
231
|
+
Begins an analysis
|
|
232
|
+
|
|
233
|
+
:param analysis_create_request: (required)
|
|
234
|
+
:type analysis_create_request: AnalysisCreateRequest
|
|
235
|
+
:param x_rev_eng_application:
|
|
236
|
+
:type x_rev_eng_application: str
|
|
237
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
238
|
+
number provided, it will be total request
|
|
239
|
+
timeout. It can also be a pair (tuple) of
|
|
240
|
+
(connection, read) timeouts.
|
|
241
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
242
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
243
|
+
request; this effectively ignores the
|
|
244
|
+
authentication in the spec for a single request.
|
|
245
|
+
:type _request_auth: dict, optional
|
|
246
|
+
:param _content_type: force content-type for the request.
|
|
247
|
+
:type _content_type: str, Optional
|
|
248
|
+
:param _headers: set to override the headers for a single
|
|
249
|
+
request; this effectively ignores the headers
|
|
250
|
+
in the spec for a single request.
|
|
251
|
+
:type _headers: dict, optional
|
|
252
|
+
:param _host_index: set to override the host_index for a single
|
|
253
|
+
request; this effectively ignores the host_index
|
|
254
|
+
in the spec for a single request.
|
|
255
|
+
:type _host_index: int, optional
|
|
256
|
+
:return: Returns the result object.
|
|
257
|
+
""" # noqa: E501
|
|
258
|
+
|
|
259
|
+
_param = self._create_analysis_serialize(
|
|
260
|
+
analysis_create_request=analysis_create_request,
|
|
261
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
262
|
+
_request_auth=_request_auth,
|
|
263
|
+
_content_type=_content_type,
|
|
264
|
+
_headers=_headers,
|
|
265
|
+
_host_index=_host_index
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
269
|
+
'201': "BaseResponseAnalysisCreateResponse",
|
|
270
|
+
'422': "BaseResponse",
|
|
271
|
+
'404': "BaseResponse",
|
|
272
|
+
'400': "BaseResponse",
|
|
273
|
+
}
|
|
274
|
+
response_data = self.api_client.call_api(
|
|
275
|
+
*_param,
|
|
276
|
+
_request_timeout=_request_timeout
|
|
277
|
+
)
|
|
278
|
+
return response_data.response
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def _create_analysis_serialize(
|
|
282
|
+
self,
|
|
283
|
+
analysis_create_request,
|
|
284
|
+
x_rev_eng_application,
|
|
285
|
+
_request_auth,
|
|
286
|
+
_content_type,
|
|
287
|
+
_headers,
|
|
288
|
+
_host_index,
|
|
289
|
+
) -> RequestSerialized:
|
|
290
|
+
|
|
291
|
+
_host = None
|
|
292
|
+
|
|
293
|
+
_collection_formats: Dict[str, str] = {
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
_path_params: Dict[str, str] = {}
|
|
297
|
+
_query_params: List[Tuple[str, str]] = []
|
|
298
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
299
|
+
_form_params: List[Tuple[str, str]] = []
|
|
300
|
+
_files: Dict[
|
|
301
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
302
|
+
] = {}
|
|
303
|
+
_body_params: Optional[bytes] = None
|
|
304
|
+
|
|
305
|
+
# process the path parameters
|
|
306
|
+
# process the query parameters
|
|
307
|
+
# process the header parameters
|
|
308
|
+
if x_rev_eng_application is not None:
|
|
309
|
+
_header_params['X-RevEng-Application'] = x_rev_eng_application
|
|
310
|
+
# process the form parameters
|
|
311
|
+
# process the body parameter
|
|
312
|
+
if analysis_create_request is not None:
|
|
313
|
+
_body_params = analysis_create_request
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
# set the HTTP header `Accept`
|
|
317
|
+
if 'Accept' not in _header_params:
|
|
318
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
319
|
+
[
|
|
320
|
+
'application/json'
|
|
321
|
+
]
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
# set the HTTP header `Content-Type`
|
|
325
|
+
if _content_type:
|
|
326
|
+
_header_params['Content-Type'] = _content_type
|
|
327
|
+
else:
|
|
328
|
+
_default_content_type = (
|
|
329
|
+
self.api_client.select_header_content_type(
|
|
330
|
+
[
|
|
331
|
+
'application/json'
|
|
332
|
+
]
|
|
333
|
+
)
|
|
334
|
+
)
|
|
335
|
+
if _default_content_type is not None:
|
|
336
|
+
_header_params['Content-Type'] = _default_content_type
|
|
337
|
+
|
|
338
|
+
# authentication setting
|
|
339
|
+
_auth_settings: List[str] = [
|
|
340
|
+
'APIKey'
|
|
341
|
+
]
|
|
342
|
+
|
|
343
|
+
return self.api_client.param_serialize(
|
|
344
|
+
method='POST',
|
|
345
|
+
resource_path='/v2/analyses',
|
|
346
|
+
path_params=_path_params,
|
|
347
|
+
query_params=_query_params,
|
|
348
|
+
header_params=_header_params,
|
|
349
|
+
body=_body_params,
|
|
350
|
+
post_params=_form_params,
|
|
351
|
+
files=_files,
|
|
352
|
+
auth_settings=_auth_settings,
|
|
353
|
+
collection_formats=_collection_formats,
|
|
354
|
+
_host=_host,
|
|
355
|
+
_request_auth=_request_auth
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
@validate_call
|
|
362
|
+
def delete_analysis(
|
|
363
|
+
self,
|
|
364
|
+
analysis_id: StrictInt,
|
|
365
|
+
_request_timeout: Union[
|
|
366
|
+
None,
|
|
367
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
368
|
+
Tuple[
|
|
369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
370
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
371
|
+
]
|
|
372
|
+
] = None,
|
|
373
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
374
|
+
_content_type: Optional[StrictStr] = None,
|
|
375
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
376
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
377
|
+
) -> BaseResponseDict:
|
|
378
|
+
"""Delete Analysis
|
|
379
|
+
|
|
380
|
+
Deletes an analysis based on the provided analysis ID.
|
|
381
|
+
|
|
382
|
+
:param analysis_id: (required)
|
|
383
|
+
:type analysis_id: int
|
|
384
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
385
|
+
number provided, it will be total request
|
|
386
|
+
timeout. It can also be a pair (tuple) of
|
|
387
|
+
(connection, read) timeouts.
|
|
388
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
389
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
390
|
+
request; this effectively ignores the
|
|
391
|
+
authentication in the spec for a single request.
|
|
392
|
+
:type _request_auth: dict, optional
|
|
393
|
+
:param _content_type: force content-type for the request.
|
|
394
|
+
:type _content_type: str, Optional
|
|
395
|
+
:param _headers: set to override the headers for a single
|
|
396
|
+
request; this effectively ignores the headers
|
|
397
|
+
in the spec for a single request.
|
|
398
|
+
:type _headers: dict, optional
|
|
399
|
+
:param _host_index: set to override the host_index for a single
|
|
400
|
+
request; this effectively ignores the host_index
|
|
401
|
+
in the spec for a single request.
|
|
402
|
+
:type _host_index: int, optional
|
|
403
|
+
:return: Returns the result object.
|
|
404
|
+
""" # noqa: E501
|
|
405
|
+
|
|
406
|
+
_param = self._delete_analysis_serialize(
|
|
407
|
+
analysis_id=analysis_id,
|
|
408
|
+
_request_auth=_request_auth,
|
|
409
|
+
_content_type=_content_type,
|
|
410
|
+
_headers=_headers,
|
|
411
|
+
_host_index=_host_index
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
415
|
+
'200': "BaseResponseDict",
|
|
416
|
+
'422': "BaseResponse",
|
|
417
|
+
'404': "BaseResponse",
|
|
418
|
+
'403': "BaseResponse",
|
|
419
|
+
}
|
|
420
|
+
response_data = self.api_client.call_api(
|
|
421
|
+
*_param,
|
|
422
|
+
_request_timeout=_request_timeout
|
|
423
|
+
)
|
|
424
|
+
response_data.read()
|
|
425
|
+
return self.api_client.response_deserialize(
|
|
426
|
+
response_data=response_data,
|
|
427
|
+
response_types_map=_response_types_map,
|
|
428
|
+
).data
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
@validate_call
|
|
432
|
+
def delete_analysis_with_http_info(
|
|
433
|
+
self,
|
|
434
|
+
analysis_id: StrictInt,
|
|
435
|
+
_request_timeout: Union[
|
|
436
|
+
None,
|
|
437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
438
|
+
Tuple[
|
|
439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
441
|
+
]
|
|
442
|
+
] = None,
|
|
443
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
444
|
+
_content_type: Optional[StrictStr] = None,
|
|
445
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
446
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
447
|
+
) -> ApiResponse[BaseResponseDict]:
|
|
448
|
+
"""Delete Analysis
|
|
449
|
+
|
|
450
|
+
Deletes an analysis based on the provided analysis ID.
|
|
451
|
+
|
|
452
|
+
:param analysis_id: (required)
|
|
453
|
+
:type analysis_id: int
|
|
454
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
455
|
+
number provided, it will be total request
|
|
456
|
+
timeout. It can also be a pair (tuple) of
|
|
457
|
+
(connection, read) timeouts.
|
|
458
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
459
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
460
|
+
request; this effectively ignores the
|
|
461
|
+
authentication in the spec for a single request.
|
|
462
|
+
:type _request_auth: dict, optional
|
|
463
|
+
:param _content_type: force content-type for the request.
|
|
464
|
+
:type _content_type: str, Optional
|
|
465
|
+
:param _headers: set to override the headers for a single
|
|
466
|
+
request; this effectively ignores the headers
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _headers: dict, optional
|
|
469
|
+
:param _host_index: set to override the host_index for a single
|
|
470
|
+
request; this effectively ignores the host_index
|
|
471
|
+
in the spec for a single request.
|
|
472
|
+
:type _host_index: int, optional
|
|
473
|
+
:return: Returns the result object.
|
|
474
|
+
""" # noqa: E501
|
|
475
|
+
|
|
476
|
+
_param = self._delete_analysis_serialize(
|
|
477
|
+
analysis_id=analysis_id,
|
|
478
|
+
_request_auth=_request_auth,
|
|
479
|
+
_content_type=_content_type,
|
|
480
|
+
_headers=_headers,
|
|
481
|
+
_host_index=_host_index
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
485
|
+
'200': "BaseResponseDict",
|
|
486
|
+
'422': "BaseResponse",
|
|
487
|
+
'404': "BaseResponse",
|
|
488
|
+
'403': "BaseResponse",
|
|
489
|
+
}
|
|
490
|
+
response_data = self.api_client.call_api(
|
|
491
|
+
*_param,
|
|
492
|
+
_request_timeout=_request_timeout
|
|
493
|
+
)
|
|
494
|
+
response_data.read()
|
|
495
|
+
return self.api_client.response_deserialize(
|
|
496
|
+
response_data=response_data,
|
|
497
|
+
response_types_map=_response_types_map,
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
@validate_call
|
|
502
|
+
def delete_analysis_without_preload_content(
|
|
503
|
+
self,
|
|
504
|
+
analysis_id: StrictInt,
|
|
505
|
+
_request_timeout: Union[
|
|
506
|
+
None,
|
|
507
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
508
|
+
Tuple[
|
|
509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
510
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
511
|
+
]
|
|
512
|
+
] = None,
|
|
513
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
514
|
+
_content_type: Optional[StrictStr] = None,
|
|
515
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
516
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
517
|
+
) -> RESTResponseType:
|
|
518
|
+
"""Delete Analysis
|
|
519
|
+
|
|
520
|
+
Deletes an analysis based on the provided analysis ID.
|
|
521
|
+
|
|
522
|
+
:param analysis_id: (required)
|
|
523
|
+
:type analysis_id: int
|
|
524
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
525
|
+
number provided, it will be total request
|
|
526
|
+
timeout. It can also be a pair (tuple) of
|
|
527
|
+
(connection, read) timeouts.
|
|
528
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
529
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
530
|
+
request; this effectively ignores the
|
|
531
|
+
authentication in the spec for a single request.
|
|
532
|
+
:type _request_auth: dict, optional
|
|
533
|
+
:param _content_type: force content-type for the request.
|
|
534
|
+
:type _content_type: str, Optional
|
|
535
|
+
:param _headers: set to override the headers for a single
|
|
536
|
+
request; this effectively ignores the headers
|
|
537
|
+
in the spec for a single request.
|
|
538
|
+
:type _headers: dict, optional
|
|
539
|
+
:param _host_index: set to override the host_index for a single
|
|
540
|
+
request; this effectively ignores the host_index
|
|
541
|
+
in the spec for a single request.
|
|
542
|
+
:type _host_index: int, optional
|
|
543
|
+
:return: Returns the result object.
|
|
544
|
+
""" # noqa: E501
|
|
545
|
+
|
|
546
|
+
_param = self._delete_analysis_serialize(
|
|
547
|
+
analysis_id=analysis_id,
|
|
548
|
+
_request_auth=_request_auth,
|
|
549
|
+
_content_type=_content_type,
|
|
550
|
+
_headers=_headers,
|
|
551
|
+
_host_index=_host_index
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
555
|
+
'200': "BaseResponseDict",
|
|
556
|
+
'422': "BaseResponse",
|
|
557
|
+
'404': "BaseResponse",
|
|
558
|
+
'403': "BaseResponse",
|
|
559
|
+
}
|
|
560
|
+
response_data = self.api_client.call_api(
|
|
561
|
+
*_param,
|
|
562
|
+
_request_timeout=_request_timeout
|
|
563
|
+
)
|
|
564
|
+
return response_data.response
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
def _delete_analysis_serialize(
|
|
568
|
+
self,
|
|
569
|
+
analysis_id,
|
|
570
|
+
_request_auth,
|
|
571
|
+
_content_type,
|
|
572
|
+
_headers,
|
|
573
|
+
_host_index,
|
|
574
|
+
) -> RequestSerialized:
|
|
575
|
+
|
|
576
|
+
_host = None
|
|
577
|
+
|
|
578
|
+
_collection_formats: Dict[str, str] = {
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
_path_params: Dict[str, str] = {}
|
|
582
|
+
_query_params: List[Tuple[str, str]] = []
|
|
583
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
584
|
+
_form_params: List[Tuple[str, str]] = []
|
|
585
|
+
_files: Dict[
|
|
586
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
587
|
+
] = {}
|
|
588
|
+
_body_params: Optional[bytes] = None
|
|
589
|
+
|
|
590
|
+
# process the path parameters
|
|
591
|
+
if analysis_id is not None:
|
|
592
|
+
_path_params['analysis_id'] = analysis_id
|
|
593
|
+
# process the query parameters
|
|
594
|
+
# process the header parameters
|
|
595
|
+
# process the form parameters
|
|
596
|
+
# process the body parameter
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
# set the HTTP header `Accept`
|
|
600
|
+
if 'Accept' not in _header_params:
|
|
601
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
602
|
+
[
|
|
603
|
+
'application/json'
|
|
604
|
+
]
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
# authentication setting
|
|
609
|
+
_auth_settings: List[str] = [
|
|
610
|
+
'APIKey'
|
|
611
|
+
]
|
|
612
|
+
|
|
613
|
+
return self.api_client.param_serialize(
|
|
614
|
+
method='DELETE',
|
|
615
|
+
resource_path='/v2/analyses/{analysis_id}',
|
|
616
|
+
path_params=_path_params,
|
|
617
|
+
query_params=_query_params,
|
|
618
|
+
header_params=_header_params,
|
|
619
|
+
body=_body_params,
|
|
620
|
+
post_params=_form_params,
|
|
621
|
+
files=_files,
|
|
622
|
+
auth_settings=_auth_settings,
|
|
623
|
+
collection_formats=_collection_formats,
|
|
624
|
+
_host=_host,
|
|
625
|
+
_request_auth=_request_auth
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
@validate_call
|
|
632
|
+
def get_analysis_basic_info(
|
|
633
|
+
self,
|
|
634
|
+
analysis_id: StrictInt,
|
|
635
|
+
_request_timeout: Union[
|
|
636
|
+
None,
|
|
637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
638
|
+
Tuple[
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
641
|
+
]
|
|
642
|
+
] = None,
|
|
643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_content_type: Optional[StrictStr] = None,
|
|
645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
647
|
+
) -> BaseResponseBasic:
|
|
648
|
+
"""Gets basic analysis information
|
|
649
|
+
|
|
650
|
+
Returns basic analysis information for an analysis
|
|
651
|
+
|
|
652
|
+
:param analysis_id: (required)
|
|
653
|
+
:type analysis_id: int
|
|
654
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
655
|
+
number provided, it will be total request
|
|
656
|
+
timeout. It can also be a pair (tuple) of
|
|
657
|
+
(connection, read) timeouts.
|
|
658
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
659
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
660
|
+
request; this effectively ignores the
|
|
661
|
+
authentication in the spec for a single request.
|
|
662
|
+
:type _request_auth: dict, optional
|
|
663
|
+
:param _content_type: force content-type for the request.
|
|
664
|
+
:type _content_type: str, Optional
|
|
665
|
+
:param _headers: set to override the headers for a single
|
|
666
|
+
request; this effectively ignores the headers
|
|
667
|
+
in the spec for a single request.
|
|
668
|
+
:type _headers: dict, optional
|
|
669
|
+
:param _host_index: set to override the host_index for a single
|
|
670
|
+
request; this effectively ignores the host_index
|
|
671
|
+
in the spec for a single request.
|
|
672
|
+
:type _host_index: int, optional
|
|
673
|
+
:return: Returns the result object.
|
|
674
|
+
""" # noqa: E501
|
|
675
|
+
|
|
676
|
+
_param = self._get_analysis_basic_info_serialize(
|
|
677
|
+
analysis_id=analysis_id,
|
|
678
|
+
_request_auth=_request_auth,
|
|
679
|
+
_content_type=_content_type,
|
|
680
|
+
_headers=_headers,
|
|
681
|
+
_host_index=_host_index
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
685
|
+
'200': "BaseResponseBasic",
|
|
686
|
+
'422': "BaseResponse",
|
|
687
|
+
}
|
|
688
|
+
response_data = self.api_client.call_api(
|
|
689
|
+
*_param,
|
|
690
|
+
_request_timeout=_request_timeout
|
|
691
|
+
)
|
|
692
|
+
response_data.read()
|
|
693
|
+
return self.api_client.response_deserialize(
|
|
694
|
+
response_data=response_data,
|
|
695
|
+
response_types_map=_response_types_map,
|
|
696
|
+
).data
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
@validate_call
|
|
700
|
+
def get_analysis_basic_info_with_http_info(
|
|
701
|
+
self,
|
|
702
|
+
analysis_id: StrictInt,
|
|
703
|
+
_request_timeout: Union[
|
|
704
|
+
None,
|
|
705
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
706
|
+
Tuple[
|
|
707
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
708
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
709
|
+
]
|
|
710
|
+
] = None,
|
|
711
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
712
|
+
_content_type: Optional[StrictStr] = None,
|
|
713
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
714
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
715
|
+
) -> ApiResponse[BaseResponseBasic]:
|
|
716
|
+
"""Gets basic analysis information
|
|
717
|
+
|
|
718
|
+
Returns basic analysis information for an analysis
|
|
719
|
+
|
|
720
|
+
:param analysis_id: (required)
|
|
721
|
+
:type analysis_id: int
|
|
722
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
723
|
+
number provided, it will be total request
|
|
724
|
+
timeout. It can also be a pair (tuple) of
|
|
725
|
+
(connection, read) timeouts.
|
|
726
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
727
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
728
|
+
request; this effectively ignores the
|
|
729
|
+
authentication in the spec for a single request.
|
|
730
|
+
:type _request_auth: dict, optional
|
|
731
|
+
:param _content_type: force content-type for the request.
|
|
732
|
+
:type _content_type: str, Optional
|
|
733
|
+
:param _headers: set to override the headers for a single
|
|
734
|
+
request; this effectively ignores the headers
|
|
735
|
+
in the spec for a single request.
|
|
736
|
+
:type _headers: dict, optional
|
|
737
|
+
:param _host_index: set to override the host_index for a single
|
|
738
|
+
request; this effectively ignores the host_index
|
|
739
|
+
in the spec for a single request.
|
|
740
|
+
:type _host_index: int, optional
|
|
741
|
+
:return: Returns the result object.
|
|
742
|
+
""" # noqa: E501
|
|
743
|
+
|
|
744
|
+
_param = self._get_analysis_basic_info_serialize(
|
|
745
|
+
analysis_id=analysis_id,
|
|
746
|
+
_request_auth=_request_auth,
|
|
747
|
+
_content_type=_content_type,
|
|
748
|
+
_headers=_headers,
|
|
749
|
+
_host_index=_host_index
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
753
|
+
'200': "BaseResponseBasic",
|
|
754
|
+
'422': "BaseResponse",
|
|
755
|
+
}
|
|
756
|
+
response_data = self.api_client.call_api(
|
|
757
|
+
*_param,
|
|
758
|
+
_request_timeout=_request_timeout
|
|
759
|
+
)
|
|
760
|
+
response_data.read()
|
|
761
|
+
return self.api_client.response_deserialize(
|
|
762
|
+
response_data=response_data,
|
|
763
|
+
response_types_map=_response_types_map,
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
@validate_call
|
|
768
|
+
def get_analysis_basic_info_without_preload_content(
|
|
769
|
+
self,
|
|
770
|
+
analysis_id: StrictInt,
|
|
771
|
+
_request_timeout: Union[
|
|
772
|
+
None,
|
|
773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
774
|
+
Tuple[
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
776
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
777
|
+
]
|
|
778
|
+
] = None,
|
|
779
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
780
|
+
_content_type: Optional[StrictStr] = None,
|
|
781
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
782
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
783
|
+
) -> RESTResponseType:
|
|
784
|
+
"""Gets basic analysis information
|
|
785
|
+
|
|
786
|
+
Returns basic analysis information for an analysis
|
|
787
|
+
|
|
788
|
+
:param analysis_id: (required)
|
|
789
|
+
:type analysis_id: int
|
|
790
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
791
|
+
number provided, it will be total request
|
|
792
|
+
timeout. It can also be a pair (tuple) of
|
|
793
|
+
(connection, read) timeouts.
|
|
794
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
795
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
796
|
+
request; this effectively ignores the
|
|
797
|
+
authentication in the spec for a single request.
|
|
798
|
+
:type _request_auth: dict, optional
|
|
799
|
+
:param _content_type: force content-type for the request.
|
|
800
|
+
:type _content_type: str, Optional
|
|
801
|
+
:param _headers: set to override the headers for a single
|
|
802
|
+
request; this effectively ignores the headers
|
|
803
|
+
in the spec for a single request.
|
|
804
|
+
:type _headers: dict, optional
|
|
805
|
+
:param _host_index: set to override the host_index for a single
|
|
806
|
+
request; this effectively ignores the host_index
|
|
807
|
+
in the spec for a single request.
|
|
808
|
+
:type _host_index: int, optional
|
|
809
|
+
:return: Returns the result object.
|
|
810
|
+
""" # noqa: E501
|
|
811
|
+
|
|
812
|
+
_param = self._get_analysis_basic_info_serialize(
|
|
813
|
+
analysis_id=analysis_id,
|
|
814
|
+
_request_auth=_request_auth,
|
|
815
|
+
_content_type=_content_type,
|
|
816
|
+
_headers=_headers,
|
|
817
|
+
_host_index=_host_index
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
821
|
+
'200': "BaseResponseBasic",
|
|
822
|
+
'422': "BaseResponse",
|
|
823
|
+
}
|
|
824
|
+
response_data = self.api_client.call_api(
|
|
825
|
+
*_param,
|
|
826
|
+
_request_timeout=_request_timeout
|
|
827
|
+
)
|
|
828
|
+
return response_data.response
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
def _get_analysis_basic_info_serialize(
|
|
832
|
+
self,
|
|
833
|
+
analysis_id,
|
|
834
|
+
_request_auth,
|
|
835
|
+
_content_type,
|
|
836
|
+
_headers,
|
|
837
|
+
_host_index,
|
|
838
|
+
) -> RequestSerialized:
|
|
839
|
+
|
|
840
|
+
_host = None
|
|
841
|
+
|
|
842
|
+
_collection_formats: Dict[str, str] = {
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
_path_params: Dict[str, str] = {}
|
|
846
|
+
_query_params: List[Tuple[str, str]] = []
|
|
847
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
848
|
+
_form_params: List[Tuple[str, str]] = []
|
|
849
|
+
_files: Dict[
|
|
850
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
851
|
+
] = {}
|
|
852
|
+
_body_params: Optional[bytes] = None
|
|
853
|
+
|
|
854
|
+
# process the path parameters
|
|
855
|
+
if analysis_id is not None:
|
|
856
|
+
_path_params['analysis_id'] = analysis_id
|
|
857
|
+
# process the query parameters
|
|
858
|
+
# process the header parameters
|
|
859
|
+
# process the form parameters
|
|
860
|
+
# process the body parameter
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
# set the HTTP header `Accept`
|
|
864
|
+
if 'Accept' not in _header_params:
|
|
865
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
866
|
+
[
|
|
867
|
+
'application/json'
|
|
868
|
+
]
|
|
869
|
+
)
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
# authentication setting
|
|
873
|
+
_auth_settings: List[str] = [
|
|
874
|
+
'APIKey'
|
|
875
|
+
]
|
|
876
|
+
|
|
877
|
+
return self.api_client.param_serialize(
|
|
878
|
+
method='GET',
|
|
879
|
+
resource_path='/v2/analyses/{analysis_id}/basic',
|
|
880
|
+
path_params=_path_params,
|
|
881
|
+
query_params=_query_params,
|
|
882
|
+
header_params=_header_params,
|
|
883
|
+
body=_body_params,
|
|
884
|
+
post_params=_form_params,
|
|
885
|
+
files=_files,
|
|
886
|
+
auth_settings=_auth_settings,
|
|
887
|
+
collection_formats=_collection_formats,
|
|
888
|
+
_host=_host,
|
|
889
|
+
_request_auth=_request_auth
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
@validate_call
|
|
896
|
+
def get_analysis_function_map(
|
|
897
|
+
self,
|
|
898
|
+
analysis_id: StrictInt,
|
|
899
|
+
_request_timeout: Union[
|
|
900
|
+
None,
|
|
901
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
902
|
+
Tuple[
|
|
903
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
904
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
905
|
+
]
|
|
906
|
+
] = None,
|
|
907
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
908
|
+
_content_type: Optional[StrictStr] = None,
|
|
909
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
910
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
911
|
+
) -> BaseResponseAnalysisFunctionMapping:
|
|
912
|
+
"""Get Analysis Function Map
|
|
913
|
+
|
|
914
|
+
Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
|
|
915
|
+
|
|
916
|
+
:param analysis_id: (required)
|
|
917
|
+
:type analysis_id: int
|
|
918
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
919
|
+
number provided, it will be total request
|
|
920
|
+
timeout. It can also be a pair (tuple) of
|
|
921
|
+
(connection, read) timeouts.
|
|
922
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
923
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
924
|
+
request; this effectively ignores the
|
|
925
|
+
authentication in the spec for a single request.
|
|
926
|
+
:type _request_auth: dict, optional
|
|
927
|
+
:param _content_type: force content-type for the request.
|
|
928
|
+
:type _content_type: str, Optional
|
|
929
|
+
:param _headers: set to override the headers for a single
|
|
930
|
+
request; this effectively ignores the headers
|
|
931
|
+
in the spec for a single request.
|
|
932
|
+
:type _headers: dict, optional
|
|
933
|
+
:param _host_index: set to override the host_index for a single
|
|
934
|
+
request; this effectively ignores the host_index
|
|
935
|
+
in the spec for a single request.
|
|
936
|
+
:type _host_index: int, optional
|
|
937
|
+
:return: Returns the result object.
|
|
938
|
+
""" # noqa: E501
|
|
939
|
+
|
|
940
|
+
_param = self._get_analysis_function_map_serialize(
|
|
941
|
+
analysis_id=analysis_id,
|
|
942
|
+
_request_auth=_request_auth,
|
|
943
|
+
_content_type=_content_type,
|
|
944
|
+
_headers=_headers,
|
|
945
|
+
_host_index=_host_index
|
|
946
|
+
)
|
|
947
|
+
|
|
948
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
949
|
+
'200': "BaseResponseAnalysisFunctionMapping",
|
|
950
|
+
'422': "BaseResponse",
|
|
951
|
+
}
|
|
952
|
+
response_data = self.api_client.call_api(
|
|
953
|
+
*_param,
|
|
954
|
+
_request_timeout=_request_timeout
|
|
955
|
+
)
|
|
956
|
+
response_data.read()
|
|
957
|
+
return self.api_client.response_deserialize(
|
|
958
|
+
response_data=response_data,
|
|
959
|
+
response_types_map=_response_types_map,
|
|
960
|
+
).data
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
@validate_call
|
|
964
|
+
def get_analysis_function_map_with_http_info(
|
|
965
|
+
self,
|
|
966
|
+
analysis_id: StrictInt,
|
|
967
|
+
_request_timeout: Union[
|
|
968
|
+
None,
|
|
969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
970
|
+
Tuple[
|
|
971
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
972
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
973
|
+
]
|
|
974
|
+
] = None,
|
|
975
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
976
|
+
_content_type: Optional[StrictStr] = None,
|
|
977
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
978
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
979
|
+
) -> ApiResponse[BaseResponseAnalysisFunctionMapping]:
|
|
980
|
+
"""Get Analysis Function Map
|
|
981
|
+
|
|
982
|
+
Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
|
|
983
|
+
|
|
984
|
+
:param analysis_id: (required)
|
|
985
|
+
:type analysis_id: int
|
|
986
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
987
|
+
number provided, it will be total request
|
|
988
|
+
timeout. It can also be a pair (tuple) of
|
|
989
|
+
(connection, read) timeouts.
|
|
990
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
991
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
992
|
+
request; this effectively ignores the
|
|
993
|
+
authentication in the spec for a single request.
|
|
994
|
+
:type _request_auth: dict, optional
|
|
995
|
+
:param _content_type: force content-type for the request.
|
|
996
|
+
:type _content_type: str, Optional
|
|
997
|
+
:param _headers: set to override the headers for a single
|
|
998
|
+
request; this effectively ignores the headers
|
|
999
|
+
in the spec for a single request.
|
|
1000
|
+
:type _headers: dict, optional
|
|
1001
|
+
:param _host_index: set to override the host_index for a single
|
|
1002
|
+
request; this effectively ignores the host_index
|
|
1003
|
+
in the spec for a single request.
|
|
1004
|
+
:type _host_index: int, optional
|
|
1005
|
+
:return: Returns the result object.
|
|
1006
|
+
""" # noqa: E501
|
|
1007
|
+
|
|
1008
|
+
_param = self._get_analysis_function_map_serialize(
|
|
1009
|
+
analysis_id=analysis_id,
|
|
1010
|
+
_request_auth=_request_auth,
|
|
1011
|
+
_content_type=_content_type,
|
|
1012
|
+
_headers=_headers,
|
|
1013
|
+
_host_index=_host_index
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1017
|
+
'200': "BaseResponseAnalysisFunctionMapping",
|
|
1018
|
+
'422': "BaseResponse",
|
|
1019
|
+
}
|
|
1020
|
+
response_data = self.api_client.call_api(
|
|
1021
|
+
*_param,
|
|
1022
|
+
_request_timeout=_request_timeout
|
|
1023
|
+
)
|
|
1024
|
+
response_data.read()
|
|
1025
|
+
return self.api_client.response_deserialize(
|
|
1026
|
+
response_data=response_data,
|
|
1027
|
+
response_types_map=_response_types_map,
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
@validate_call
|
|
1032
|
+
def get_analysis_function_map_without_preload_content(
|
|
1033
|
+
self,
|
|
1034
|
+
analysis_id: StrictInt,
|
|
1035
|
+
_request_timeout: Union[
|
|
1036
|
+
None,
|
|
1037
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1038
|
+
Tuple[
|
|
1039
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1041
|
+
]
|
|
1042
|
+
] = None,
|
|
1043
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1044
|
+
_content_type: Optional[StrictStr] = None,
|
|
1045
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1046
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1047
|
+
) -> RESTResponseType:
|
|
1048
|
+
"""Get Analysis Function Map
|
|
1049
|
+
|
|
1050
|
+
Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
|
|
1051
|
+
|
|
1052
|
+
:param analysis_id: (required)
|
|
1053
|
+
:type analysis_id: int
|
|
1054
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1055
|
+
number provided, it will be total request
|
|
1056
|
+
timeout. It can also be a pair (tuple) of
|
|
1057
|
+
(connection, read) timeouts.
|
|
1058
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1059
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1060
|
+
request; this effectively ignores the
|
|
1061
|
+
authentication in the spec for a single request.
|
|
1062
|
+
:type _request_auth: dict, optional
|
|
1063
|
+
:param _content_type: force content-type for the request.
|
|
1064
|
+
:type _content_type: str, Optional
|
|
1065
|
+
:param _headers: set to override the headers for a single
|
|
1066
|
+
request; this effectively ignores the headers
|
|
1067
|
+
in the spec for a single request.
|
|
1068
|
+
:type _headers: dict, optional
|
|
1069
|
+
:param _host_index: set to override the host_index for a single
|
|
1070
|
+
request; this effectively ignores the host_index
|
|
1071
|
+
in the spec for a single request.
|
|
1072
|
+
:type _host_index: int, optional
|
|
1073
|
+
:return: Returns the result object.
|
|
1074
|
+
""" # noqa: E501
|
|
1075
|
+
|
|
1076
|
+
_param = self._get_analysis_function_map_serialize(
|
|
1077
|
+
analysis_id=analysis_id,
|
|
1078
|
+
_request_auth=_request_auth,
|
|
1079
|
+
_content_type=_content_type,
|
|
1080
|
+
_headers=_headers,
|
|
1081
|
+
_host_index=_host_index
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1085
|
+
'200': "BaseResponseAnalysisFunctionMapping",
|
|
1086
|
+
'422': "BaseResponse",
|
|
1087
|
+
}
|
|
1088
|
+
response_data = self.api_client.call_api(
|
|
1089
|
+
*_param,
|
|
1090
|
+
_request_timeout=_request_timeout
|
|
1091
|
+
)
|
|
1092
|
+
return response_data.response
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
def _get_analysis_function_map_serialize(
|
|
1096
|
+
self,
|
|
1097
|
+
analysis_id,
|
|
1098
|
+
_request_auth,
|
|
1099
|
+
_content_type,
|
|
1100
|
+
_headers,
|
|
1101
|
+
_host_index,
|
|
1102
|
+
) -> RequestSerialized:
|
|
1103
|
+
|
|
1104
|
+
_host = None
|
|
1105
|
+
|
|
1106
|
+
_collection_formats: Dict[str, str] = {
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
_path_params: Dict[str, str] = {}
|
|
1110
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1111
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1112
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1113
|
+
_files: Dict[
|
|
1114
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1115
|
+
] = {}
|
|
1116
|
+
_body_params: Optional[bytes] = None
|
|
1117
|
+
|
|
1118
|
+
# process the path parameters
|
|
1119
|
+
if analysis_id is not None:
|
|
1120
|
+
_path_params['analysis_id'] = analysis_id
|
|
1121
|
+
# process the query parameters
|
|
1122
|
+
# process the header parameters
|
|
1123
|
+
# process the form parameters
|
|
1124
|
+
# process the body parameter
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
# set the HTTP header `Accept`
|
|
1128
|
+
if 'Accept' not in _header_params:
|
|
1129
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1130
|
+
[
|
|
1131
|
+
'application/json'
|
|
1132
|
+
]
|
|
1133
|
+
)
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
# authentication setting
|
|
1137
|
+
_auth_settings: List[str] = [
|
|
1138
|
+
'APIKey'
|
|
1139
|
+
]
|
|
1140
|
+
|
|
1141
|
+
return self.api_client.param_serialize(
|
|
1142
|
+
method='GET',
|
|
1143
|
+
resource_path='/v2/analyses/{analysis_id}/func_maps',
|
|
1144
|
+
path_params=_path_params,
|
|
1145
|
+
query_params=_query_params,
|
|
1146
|
+
header_params=_header_params,
|
|
1147
|
+
body=_body_params,
|
|
1148
|
+
post_params=_form_params,
|
|
1149
|
+
files=_files,
|
|
1150
|
+
auth_settings=_auth_settings,
|
|
1151
|
+
collection_formats=_collection_formats,
|
|
1152
|
+
_host=_host,
|
|
1153
|
+
_request_auth=_request_auth
|
|
1154
|
+
)
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
@validate_call
|
|
1160
|
+
def get_analysis_logs(
|
|
1161
|
+
self,
|
|
1162
|
+
analysis_id: StrictInt,
|
|
1163
|
+
_request_timeout: Union[
|
|
1164
|
+
None,
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1166
|
+
Tuple[
|
|
1167
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1169
|
+
]
|
|
1170
|
+
] = None,
|
|
1171
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1172
|
+
_content_type: Optional[StrictStr] = None,
|
|
1173
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1174
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1175
|
+
) -> BaseResponseLogs:
|
|
1176
|
+
"""Gets the logs of an analysis
|
|
1177
|
+
|
|
1178
|
+
Given an analysis ID gets the current logs of an analysis
|
|
1179
|
+
|
|
1180
|
+
:param analysis_id: (required)
|
|
1181
|
+
:type analysis_id: int
|
|
1182
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1183
|
+
number provided, it will be total request
|
|
1184
|
+
timeout. It can also be a pair (tuple) of
|
|
1185
|
+
(connection, read) timeouts.
|
|
1186
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1187
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1188
|
+
request; this effectively ignores the
|
|
1189
|
+
authentication in the spec for a single request.
|
|
1190
|
+
:type _request_auth: dict, optional
|
|
1191
|
+
:param _content_type: force content-type for the request.
|
|
1192
|
+
:type _content_type: str, Optional
|
|
1193
|
+
:param _headers: set to override the headers for a single
|
|
1194
|
+
request; this effectively ignores the headers
|
|
1195
|
+
in the spec for a single request.
|
|
1196
|
+
:type _headers: dict, optional
|
|
1197
|
+
:param _host_index: set to override the host_index for a single
|
|
1198
|
+
request; this effectively ignores the host_index
|
|
1199
|
+
in the spec for a single request.
|
|
1200
|
+
:type _host_index: int, optional
|
|
1201
|
+
:return: Returns the result object.
|
|
1202
|
+
""" # noqa: E501
|
|
1203
|
+
|
|
1204
|
+
_param = self._get_analysis_logs_serialize(
|
|
1205
|
+
analysis_id=analysis_id,
|
|
1206
|
+
_request_auth=_request_auth,
|
|
1207
|
+
_content_type=_content_type,
|
|
1208
|
+
_headers=_headers,
|
|
1209
|
+
_host_index=_host_index
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1213
|
+
'200': "BaseResponseLogs",
|
|
1214
|
+
'422': "BaseResponse",
|
|
1215
|
+
}
|
|
1216
|
+
response_data = self.api_client.call_api(
|
|
1217
|
+
*_param,
|
|
1218
|
+
_request_timeout=_request_timeout
|
|
1219
|
+
)
|
|
1220
|
+
response_data.read()
|
|
1221
|
+
return self.api_client.response_deserialize(
|
|
1222
|
+
response_data=response_data,
|
|
1223
|
+
response_types_map=_response_types_map,
|
|
1224
|
+
).data
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
@validate_call
|
|
1228
|
+
def get_analysis_logs_with_http_info(
|
|
1229
|
+
self,
|
|
1230
|
+
analysis_id: StrictInt,
|
|
1231
|
+
_request_timeout: Union[
|
|
1232
|
+
None,
|
|
1233
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1234
|
+
Tuple[
|
|
1235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1236
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1237
|
+
]
|
|
1238
|
+
] = None,
|
|
1239
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1240
|
+
_content_type: Optional[StrictStr] = None,
|
|
1241
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1242
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1243
|
+
) -> ApiResponse[BaseResponseLogs]:
|
|
1244
|
+
"""Gets the logs of an analysis
|
|
1245
|
+
|
|
1246
|
+
Given an analysis ID gets the current logs of an analysis
|
|
1247
|
+
|
|
1248
|
+
:param analysis_id: (required)
|
|
1249
|
+
:type analysis_id: int
|
|
1250
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1251
|
+
number provided, it will be total request
|
|
1252
|
+
timeout. It can also be a pair (tuple) of
|
|
1253
|
+
(connection, read) timeouts.
|
|
1254
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1255
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1256
|
+
request; this effectively ignores the
|
|
1257
|
+
authentication in the spec for a single request.
|
|
1258
|
+
:type _request_auth: dict, optional
|
|
1259
|
+
:param _content_type: force content-type for the request.
|
|
1260
|
+
:type _content_type: str, Optional
|
|
1261
|
+
:param _headers: set to override the headers for a single
|
|
1262
|
+
request; this effectively ignores the headers
|
|
1263
|
+
in the spec for a single request.
|
|
1264
|
+
:type _headers: dict, optional
|
|
1265
|
+
:param _host_index: set to override the host_index for a single
|
|
1266
|
+
request; this effectively ignores the host_index
|
|
1267
|
+
in the spec for a single request.
|
|
1268
|
+
:type _host_index: int, optional
|
|
1269
|
+
:return: Returns the result object.
|
|
1270
|
+
""" # noqa: E501
|
|
1271
|
+
|
|
1272
|
+
_param = self._get_analysis_logs_serialize(
|
|
1273
|
+
analysis_id=analysis_id,
|
|
1274
|
+
_request_auth=_request_auth,
|
|
1275
|
+
_content_type=_content_type,
|
|
1276
|
+
_headers=_headers,
|
|
1277
|
+
_host_index=_host_index
|
|
1278
|
+
)
|
|
1279
|
+
|
|
1280
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1281
|
+
'200': "BaseResponseLogs",
|
|
1282
|
+
'422': "BaseResponse",
|
|
1283
|
+
}
|
|
1284
|
+
response_data = self.api_client.call_api(
|
|
1285
|
+
*_param,
|
|
1286
|
+
_request_timeout=_request_timeout
|
|
1287
|
+
)
|
|
1288
|
+
response_data.read()
|
|
1289
|
+
return self.api_client.response_deserialize(
|
|
1290
|
+
response_data=response_data,
|
|
1291
|
+
response_types_map=_response_types_map,
|
|
1292
|
+
)
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
@validate_call
|
|
1296
|
+
def get_analysis_logs_without_preload_content(
|
|
1297
|
+
self,
|
|
1298
|
+
analysis_id: StrictInt,
|
|
1299
|
+
_request_timeout: Union[
|
|
1300
|
+
None,
|
|
1301
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1302
|
+
Tuple[
|
|
1303
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1304
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1305
|
+
]
|
|
1306
|
+
] = None,
|
|
1307
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1308
|
+
_content_type: Optional[StrictStr] = None,
|
|
1309
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1310
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1311
|
+
) -> RESTResponseType:
|
|
1312
|
+
"""Gets the logs of an analysis
|
|
1313
|
+
|
|
1314
|
+
Given an analysis ID gets the current logs of an analysis
|
|
1315
|
+
|
|
1316
|
+
:param analysis_id: (required)
|
|
1317
|
+
:type analysis_id: int
|
|
1318
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1319
|
+
number provided, it will be total request
|
|
1320
|
+
timeout. It can also be a pair (tuple) of
|
|
1321
|
+
(connection, read) timeouts.
|
|
1322
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1323
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1324
|
+
request; this effectively ignores the
|
|
1325
|
+
authentication in the spec for a single request.
|
|
1326
|
+
:type _request_auth: dict, optional
|
|
1327
|
+
:param _content_type: force content-type for the request.
|
|
1328
|
+
:type _content_type: str, Optional
|
|
1329
|
+
:param _headers: set to override the headers for a single
|
|
1330
|
+
request; this effectively ignores the headers
|
|
1331
|
+
in the spec for a single request.
|
|
1332
|
+
:type _headers: dict, optional
|
|
1333
|
+
:param _host_index: set to override the host_index for a single
|
|
1334
|
+
request; this effectively ignores the host_index
|
|
1335
|
+
in the spec for a single request.
|
|
1336
|
+
:type _host_index: int, optional
|
|
1337
|
+
:return: Returns the result object.
|
|
1338
|
+
""" # noqa: E501
|
|
1339
|
+
|
|
1340
|
+
_param = self._get_analysis_logs_serialize(
|
|
1341
|
+
analysis_id=analysis_id,
|
|
1342
|
+
_request_auth=_request_auth,
|
|
1343
|
+
_content_type=_content_type,
|
|
1344
|
+
_headers=_headers,
|
|
1345
|
+
_host_index=_host_index
|
|
1346
|
+
)
|
|
1347
|
+
|
|
1348
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1349
|
+
'200': "BaseResponseLogs",
|
|
1350
|
+
'422': "BaseResponse",
|
|
1351
|
+
}
|
|
1352
|
+
response_data = self.api_client.call_api(
|
|
1353
|
+
*_param,
|
|
1354
|
+
_request_timeout=_request_timeout
|
|
1355
|
+
)
|
|
1356
|
+
return response_data.response
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
def _get_analysis_logs_serialize(
|
|
1360
|
+
self,
|
|
1361
|
+
analysis_id,
|
|
1362
|
+
_request_auth,
|
|
1363
|
+
_content_type,
|
|
1364
|
+
_headers,
|
|
1365
|
+
_host_index,
|
|
1366
|
+
) -> RequestSerialized:
|
|
1367
|
+
|
|
1368
|
+
_host = None
|
|
1369
|
+
|
|
1370
|
+
_collection_formats: Dict[str, str] = {
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
_path_params: Dict[str, str] = {}
|
|
1374
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1375
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1376
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1377
|
+
_files: Dict[
|
|
1378
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1379
|
+
] = {}
|
|
1380
|
+
_body_params: Optional[bytes] = None
|
|
1381
|
+
|
|
1382
|
+
# process the path parameters
|
|
1383
|
+
if analysis_id is not None:
|
|
1384
|
+
_path_params['analysis_id'] = analysis_id
|
|
1385
|
+
# process the query parameters
|
|
1386
|
+
# process the header parameters
|
|
1387
|
+
# process the form parameters
|
|
1388
|
+
# process the body parameter
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
# set the HTTP header `Accept`
|
|
1392
|
+
if 'Accept' not in _header_params:
|
|
1393
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1394
|
+
[
|
|
1395
|
+
'application/json'
|
|
1396
|
+
]
|
|
1397
|
+
)
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
# authentication setting
|
|
1401
|
+
_auth_settings: List[str] = [
|
|
1402
|
+
'APIKey'
|
|
1403
|
+
]
|
|
1404
|
+
|
|
1405
|
+
return self.api_client.param_serialize(
|
|
1406
|
+
method='GET',
|
|
1407
|
+
resource_path='/v2/analyses/{analysis_id}/logs',
|
|
1408
|
+
path_params=_path_params,
|
|
1409
|
+
query_params=_query_params,
|
|
1410
|
+
header_params=_header_params,
|
|
1411
|
+
body=_body_params,
|
|
1412
|
+
post_params=_form_params,
|
|
1413
|
+
files=_files,
|
|
1414
|
+
auth_settings=_auth_settings,
|
|
1415
|
+
collection_formats=_collection_formats,
|
|
1416
|
+
_host=_host,
|
|
1417
|
+
_request_auth=_request_auth
|
|
1418
|
+
)
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
@validate_call
|
|
1424
|
+
def get_analysis_params(
|
|
1425
|
+
self,
|
|
1426
|
+
analysis_id: StrictInt,
|
|
1427
|
+
_request_timeout: Union[
|
|
1428
|
+
None,
|
|
1429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1430
|
+
Tuple[
|
|
1431
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1432
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1433
|
+
]
|
|
1434
|
+
] = None,
|
|
1435
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1436
|
+
_content_type: Optional[StrictStr] = None,
|
|
1437
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1438
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1439
|
+
) -> BaseResponseParams:
|
|
1440
|
+
"""Gets analysis param information
|
|
1441
|
+
|
|
1442
|
+
Gets the params that the analysis was run with
|
|
1443
|
+
|
|
1444
|
+
:param analysis_id: (required)
|
|
1445
|
+
:type analysis_id: int
|
|
1446
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1447
|
+
number provided, it will be total request
|
|
1448
|
+
timeout. It can also be a pair (tuple) of
|
|
1449
|
+
(connection, read) timeouts.
|
|
1450
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1451
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1452
|
+
request; this effectively ignores the
|
|
1453
|
+
authentication in the spec for a single request.
|
|
1454
|
+
:type _request_auth: dict, optional
|
|
1455
|
+
:param _content_type: force content-type for the request.
|
|
1456
|
+
:type _content_type: str, Optional
|
|
1457
|
+
:param _headers: set to override the headers for a single
|
|
1458
|
+
request; this effectively ignores the headers
|
|
1459
|
+
in the spec for a single request.
|
|
1460
|
+
:type _headers: dict, optional
|
|
1461
|
+
:param _host_index: set to override the host_index for a single
|
|
1462
|
+
request; this effectively ignores the host_index
|
|
1463
|
+
in the spec for a single request.
|
|
1464
|
+
:type _host_index: int, optional
|
|
1465
|
+
:return: Returns the result object.
|
|
1466
|
+
""" # noqa: E501
|
|
1467
|
+
|
|
1468
|
+
_param = self._get_analysis_params_serialize(
|
|
1469
|
+
analysis_id=analysis_id,
|
|
1470
|
+
_request_auth=_request_auth,
|
|
1471
|
+
_content_type=_content_type,
|
|
1472
|
+
_headers=_headers,
|
|
1473
|
+
_host_index=_host_index
|
|
1474
|
+
)
|
|
1475
|
+
|
|
1476
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1477
|
+
'200': "BaseResponseParams",
|
|
1478
|
+
'422': "BaseResponse",
|
|
1479
|
+
}
|
|
1480
|
+
response_data = self.api_client.call_api(
|
|
1481
|
+
*_param,
|
|
1482
|
+
_request_timeout=_request_timeout
|
|
1483
|
+
)
|
|
1484
|
+
response_data.read()
|
|
1485
|
+
return self.api_client.response_deserialize(
|
|
1486
|
+
response_data=response_data,
|
|
1487
|
+
response_types_map=_response_types_map,
|
|
1488
|
+
).data
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
@validate_call
|
|
1492
|
+
def get_analysis_params_with_http_info(
|
|
1493
|
+
self,
|
|
1494
|
+
analysis_id: StrictInt,
|
|
1495
|
+
_request_timeout: Union[
|
|
1496
|
+
None,
|
|
1497
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1498
|
+
Tuple[
|
|
1499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1500
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1501
|
+
]
|
|
1502
|
+
] = None,
|
|
1503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1504
|
+
_content_type: Optional[StrictStr] = None,
|
|
1505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1507
|
+
) -> ApiResponse[BaseResponseParams]:
|
|
1508
|
+
"""Gets analysis param information
|
|
1509
|
+
|
|
1510
|
+
Gets the params that the analysis was run with
|
|
1511
|
+
|
|
1512
|
+
:param analysis_id: (required)
|
|
1513
|
+
:type analysis_id: int
|
|
1514
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1515
|
+
number provided, it will be total request
|
|
1516
|
+
timeout. It can also be a pair (tuple) of
|
|
1517
|
+
(connection, read) timeouts.
|
|
1518
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1519
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1520
|
+
request; this effectively ignores the
|
|
1521
|
+
authentication in the spec for a single request.
|
|
1522
|
+
:type _request_auth: dict, optional
|
|
1523
|
+
:param _content_type: force content-type for the request.
|
|
1524
|
+
:type _content_type: str, Optional
|
|
1525
|
+
:param _headers: set to override the headers for a single
|
|
1526
|
+
request; this effectively ignores the headers
|
|
1527
|
+
in the spec for a single request.
|
|
1528
|
+
:type _headers: dict, optional
|
|
1529
|
+
:param _host_index: set to override the host_index for a single
|
|
1530
|
+
request; this effectively ignores the host_index
|
|
1531
|
+
in the spec for a single request.
|
|
1532
|
+
:type _host_index: int, optional
|
|
1533
|
+
:return: Returns the result object.
|
|
1534
|
+
""" # noqa: E501
|
|
1535
|
+
|
|
1536
|
+
_param = self._get_analysis_params_serialize(
|
|
1537
|
+
analysis_id=analysis_id,
|
|
1538
|
+
_request_auth=_request_auth,
|
|
1539
|
+
_content_type=_content_type,
|
|
1540
|
+
_headers=_headers,
|
|
1541
|
+
_host_index=_host_index
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1544
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1545
|
+
'200': "BaseResponseParams",
|
|
1546
|
+
'422': "BaseResponse",
|
|
1547
|
+
}
|
|
1548
|
+
response_data = self.api_client.call_api(
|
|
1549
|
+
*_param,
|
|
1550
|
+
_request_timeout=_request_timeout
|
|
1551
|
+
)
|
|
1552
|
+
response_data.read()
|
|
1553
|
+
return self.api_client.response_deserialize(
|
|
1554
|
+
response_data=response_data,
|
|
1555
|
+
response_types_map=_response_types_map,
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
@validate_call
|
|
1560
|
+
def get_analysis_params_without_preload_content(
|
|
1561
|
+
self,
|
|
1562
|
+
analysis_id: StrictInt,
|
|
1563
|
+
_request_timeout: Union[
|
|
1564
|
+
None,
|
|
1565
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1566
|
+
Tuple[
|
|
1567
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1568
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1569
|
+
]
|
|
1570
|
+
] = None,
|
|
1571
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1572
|
+
_content_type: Optional[StrictStr] = None,
|
|
1573
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1574
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1575
|
+
) -> RESTResponseType:
|
|
1576
|
+
"""Gets analysis param information
|
|
1577
|
+
|
|
1578
|
+
Gets the params that the analysis was run with
|
|
1579
|
+
|
|
1580
|
+
:param analysis_id: (required)
|
|
1581
|
+
:type analysis_id: int
|
|
1582
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1583
|
+
number provided, it will be total request
|
|
1584
|
+
timeout. It can also be a pair (tuple) of
|
|
1585
|
+
(connection, read) timeouts.
|
|
1586
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1587
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1588
|
+
request; this effectively ignores the
|
|
1589
|
+
authentication in the spec for a single request.
|
|
1590
|
+
:type _request_auth: dict, optional
|
|
1591
|
+
:param _content_type: force content-type for the request.
|
|
1592
|
+
:type _content_type: str, Optional
|
|
1593
|
+
:param _headers: set to override the headers for a single
|
|
1594
|
+
request; this effectively ignores the headers
|
|
1595
|
+
in the spec for a single request.
|
|
1596
|
+
:type _headers: dict, optional
|
|
1597
|
+
:param _host_index: set to override the host_index for a single
|
|
1598
|
+
request; this effectively ignores the host_index
|
|
1599
|
+
in the spec for a single request.
|
|
1600
|
+
:type _host_index: int, optional
|
|
1601
|
+
:return: Returns the result object.
|
|
1602
|
+
""" # noqa: E501
|
|
1603
|
+
|
|
1604
|
+
_param = self._get_analysis_params_serialize(
|
|
1605
|
+
analysis_id=analysis_id,
|
|
1606
|
+
_request_auth=_request_auth,
|
|
1607
|
+
_content_type=_content_type,
|
|
1608
|
+
_headers=_headers,
|
|
1609
|
+
_host_index=_host_index
|
|
1610
|
+
)
|
|
1611
|
+
|
|
1612
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1613
|
+
'200': "BaseResponseParams",
|
|
1614
|
+
'422': "BaseResponse",
|
|
1615
|
+
}
|
|
1616
|
+
response_data = self.api_client.call_api(
|
|
1617
|
+
*_param,
|
|
1618
|
+
_request_timeout=_request_timeout
|
|
1619
|
+
)
|
|
1620
|
+
return response_data.response
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
def _get_analysis_params_serialize(
|
|
1624
|
+
self,
|
|
1625
|
+
analysis_id,
|
|
1626
|
+
_request_auth,
|
|
1627
|
+
_content_type,
|
|
1628
|
+
_headers,
|
|
1629
|
+
_host_index,
|
|
1630
|
+
) -> RequestSerialized:
|
|
1631
|
+
|
|
1632
|
+
_host = None
|
|
1633
|
+
|
|
1634
|
+
_collection_formats: Dict[str, str] = {
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
_path_params: Dict[str, str] = {}
|
|
1638
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1639
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1640
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1641
|
+
_files: Dict[
|
|
1642
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1643
|
+
] = {}
|
|
1644
|
+
_body_params: Optional[bytes] = None
|
|
1645
|
+
|
|
1646
|
+
# process the path parameters
|
|
1647
|
+
if analysis_id is not None:
|
|
1648
|
+
_path_params['analysis_id'] = analysis_id
|
|
1649
|
+
# process the query parameters
|
|
1650
|
+
# process the header parameters
|
|
1651
|
+
# process the form parameters
|
|
1652
|
+
# process the body parameter
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
# set the HTTP header `Accept`
|
|
1656
|
+
if 'Accept' not in _header_params:
|
|
1657
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1658
|
+
[
|
|
1659
|
+
'application/json'
|
|
1660
|
+
]
|
|
1661
|
+
)
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
# authentication setting
|
|
1665
|
+
_auth_settings: List[str] = [
|
|
1666
|
+
'APIKey'
|
|
1667
|
+
]
|
|
1668
|
+
|
|
1669
|
+
return self.api_client.param_serialize(
|
|
1670
|
+
method='GET',
|
|
1671
|
+
resource_path='/v2/analyses/{analysis_id}/params',
|
|
1672
|
+
path_params=_path_params,
|
|
1673
|
+
query_params=_query_params,
|
|
1674
|
+
header_params=_header_params,
|
|
1675
|
+
body=_body_params,
|
|
1676
|
+
post_params=_form_params,
|
|
1677
|
+
files=_files,
|
|
1678
|
+
auth_settings=_auth_settings,
|
|
1679
|
+
collection_formats=_collection_formats,
|
|
1680
|
+
_host=_host,
|
|
1681
|
+
_request_auth=_request_auth
|
|
1682
|
+
)
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
@validate_call
|
|
1688
|
+
def get_analysis_status(
|
|
1689
|
+
self,
|
|
1690
|
+
analysis_id: StrictInt,
|
|
1691
|
+
_request_timeout: Union[
|
|
1692
|
+
None,
|
|
1693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1694
|
+
Tuple[
|
|
1695
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1696
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1697
|
+
]
|
|
1698
|
+
] = None,
|
|
1699
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1700
|
+
_content_type: Optional[StrictStr] = None,
|
|
1701
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1702
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1703
|
+
) -> BaseResponseStatus:
|
|
1704
|
+
"""Gets the status of an analysis
|
|
1705
|
+
|
|
1706
|
+
Given an analysis ID gets the current status of the analysis
|
|
1707
|
+
|
|
1708
|
+
:param analysis_id: (required)
|
|
1709
|
+
:type analysis_id: int
|
|
1710
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1711
|
+
number provided, it will be total request
|
|
1712
|
+
timeout. It can also be a pair (tuple) of
|
|
1713
|
+
(connection, read) timeouts.
|
|
1714
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1715
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1716
|
+
request; this effectively ignores the
|
|
1717
|
+
authentication in the spec for a single request.
|
|
1718
|
+
:type _request_auth: dict, optional
|
|
1719
|
+
:param _content_type: force content-type for the request.
|
|
1720
|
+
:type _content_type: str, Optional
|
|
1721
|
+
:param _headers: set to override the headers for a single
|
|
1722
|
+
request; this effectively ignores the headers
|
|
1723
|
+
in the spec for a single request.
|
|
1724
|
+
:type _headers: dict, optional
|
|
1725
|
+
:param _host_index: set to override the host_index for a single
|
|
1726
|
+
request; this effectively ignores the host_index
|
|
1727
|
+
in the spec for a single request.
|
|
1728
|
+
:type _host_index: int, optional
|
|
1729
|
+
:return: Returns the result object.
|
|
1730
|
+
""" # noqa: E501
|
|
1731
|
+
|
|
1732
|
+
_param = self._get_analysis_status_serialize(
|
|
1733
|
+
analysis_id=analysis_id,
|
|
1734
|
+
_request_auth=_request_auth,
|
|
1735
|
+
_content_type=_content_type,
|
|
1736
|
+
_headers=_headers,
|
|
1737
|
+
_host_index=_host_index
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1741
|
+
'200': "BaseResponseStatus",
|
|
1742
|
+
'422': "BaseResponse",
|
|
1743
|
+
}
|
|
1744
|
+
response_data = self.api_client.call_api(
|
|
1745
|
+
*_param,
|
|
1746
|
+
_request_timeout=_request_timeout
|
|
1747
|
+
)
|
|
1748
|
+
response_data.read()
|
|
1749
|
+
return self.api_client.response_deserialize(
|
|
1750
|
+
response_data=response_data,
|
|
1751
|
+
response_types_map=_response_types_map,
|
|
1752
|
+
).data
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
@validate_call
|
|
1756
|
+
def get_analysis_status_with_http_info(
|
|
1757
|
+
self,
|
|
1758
|
+
analysis_id: StrictInt,
|
|
1759
|
+
_request_timeout: Union[
|
|
1760
|
+
None,
|
|
1761
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1762
|
+
Tuple[
|
|
1763
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1764
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1765
|
+
]
|
|
1766
|
+
] = None,
|
|
1767
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1768
|
+
_content_type: Optional[StrictStr] = None,
|
|
1769
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1770
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1771
|
+
) -> ApiResponse[BaseResponseStatus]:
|
|
1772
|
+
"""Gets the status of an analysis
|
|
1773
|
+
|
|
1774
|
+
Given an analysis ID gets the current status of the analysis
|
|
1775
|
+
|
|
1776
|
+
:param analysis_id: (required)
|
|
1777
|
+
:type analysis_id: int
|
|
1778
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1779
|
+
number provided, it will be total request
|
|
1780
|
+
timeout. It can also be a pair (tuple) of
|
|
1781
|
+
(connection, read) timeouts.
|
|
1782
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1783
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1784
|
+
request; this effectively ignores the
|
|
1785
|
+
authentication in the spec for a single request.
|
|
1786
|
+
:type _request_auth: dict, optional
|
|
1787
|
+
:param _content_type: force content-type for the request.
|
|
1788
|
+
:type _content_type: str, Optional
|
|
1789
|
+
:param _headers: set to override the headers for a single
|
|
1790
|
+
request; this effectively ignores the headers
|
|
1791
|
+
in the spec for a single request.
|
|
1792
|
+
:type _headers: dict, optional
|
|
1793
|
+
:param _host_index: set to override the host_index for a single
|
|
1794
|
+
request; this effectively ignores the host_index
|
|
1795
|
+
in the spec for a single request.
|
|
1796
|
+
:type _host_index: int, optional
|
|
1797
|
+
:return: Returns the result object.
|
|
1798
|
+
""" # noqa: E501
|
|
1799
|
+
|
|
1800
|
+
_param = self._get_analysis_status_serialize(
|
|
1801
|
+
analysis_id=analysis_id,
|
|
1802
|
+
_request_auth=_request_auth,
|
|
1803
|
+
_content_type=_content_type,
|
|
1804
|
+
_headers=_headers,
|
|
1805
|
+
_host_index=_host_index
|
|
1806
|
+
)
|
|
1807
|
+
|
|
1808
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1809
|
+
'200': "BaseResponseStatus",
|
|
1810
|
+
'422': "BaseResponse",
|
|
1811
|
+
}
|
|
1812
|
+
response_data = self.api_client.call_api(
|
|
1813
|
+
*_param,
|
|
1814
|
+
_request_timeout=_request_timeout
|
|
1815
|
+
)
|
|
1816
|
+
response_data.read()
|
|
1817
|
+
return self.api_client.response_deserialize(
|
|
1818
|
+
response_data=response_data,
|
|
1819
|
+
response_types_map=_response_types_map,
|
|
1820
|
+
)
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
@validate_call
|
|
1824
|
+
def get_analysis_status_without_preload_content(
|
|
1825
|
+
self,
|
|
1826
|
+
analysis_id: StrictInt,
|
|
1827
|
+
_request_timeout: Union[
|
|
1828
|
+
None,
|
|
1829
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1830
|
+
Tuple[
|
|
1831
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1832
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1833
|
+
]
|
|
1834
|
+
] = None,
|
|
1835
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1836
|
+
_content_type: Optional[StrictStr] = None,
|
|
1837
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1838
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1839
|
+
) -> RESTResponseType:
|
|
1840
|
+
"""Gets the status of an analysis
|
|
1841
|
+
|
|
1842
|
+
Given an analysis ID gets the current status of the analysis
|
|
1843
|
+
|
|
1844
|
+
:param analysis_id: (required)
|
|
1845
|
+
:type analysis_id: int
|
|
1846
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1847
|
+
number provided, it will be total request
|
|
1848
|
+
timeout. It can also be a pair (tuple) of
|
|
1849
|
+
(connection, read) timeouts.
|
|
1850
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1851
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1852
|
+
request; this effectively ignores the
|
|
1853
|
+
authentication in the spec for a single request.
|
|
1854
|
+
:type _request_auth: dict, optional
|
|
1855
|
+
:param _content_type: force content-type for the request.
|
|
1856
|
+
:type _content_type: str, Optional
|
|
1857
|
+
:param _headers: set to override the headers for a single
|
|
1858
|
+
request; this effectively ignores the headers
|
|
1859
|
+
in the spec for a single request.
|
|
1860
|
+
:type _headers: dict, optional
|
|
1861
|
+
:param _host_index: set to override the host_index for a single
|
|
1862
|
+
request; this effectively ignores the host_index
|
|
1863
|
+
in the spec for a single request.
|
|
1864
|
+
:type _host_index: int, optional
|
|
1865
|
+
:return: Returns the result object.
|
|
1866
|
+
""" # noqa: E501
|
|
1867
|
+
|
|
1868
|
+
_param = self._get_analysis_status_serialize(
|
|
1869
|
+
analysis_id=analysis_id,
|
|
1870
|
+
_request_auth=_request_auth,
|
|
1871
|
+
_content_type=_content_type,
|
|
1872
|
+
_headers=_headers,
|
|
1873
|
+
_host_index=_host_index
|
|
1874
|
+
)
|
|
1875
|
+
|
|
1876
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1877
|
+
'200': "BaseResponseStatus",
|
|
1878
|
+
'422': "BaseResponse",
|
|
1879
|
+
}
|
|
1880
|
+
response_data = self.api_client.call_api(
|
|
1881
|
+
*_param,
|
|
1882
|
+
_request_timeout=_request_timeout
|
|
1883
|
+
)
|
|
1884
|
+
return response_data.response
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
def _get_analysis_status_serialize(
|
|
1888
|
+
self,
|
|
1889
|
+
analysis_id,
|
|
1890
|
+
_request_auth,
|
|
1891
|
+
_content_type,
|
|
1892
|
+
_headers,
|
|
1893
|
+
_host_index,
|
|
1894
|
+
) -> RequestSerialized:
|
|
1895
|
+
|
|
1896
|
+
_host = None
|
|
1897
|
+
|
|
1898
|
+
_collection_formats: Dict[str, str] = {
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
_path_params: Dict[str, str] = {}
|
|
1902
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1903
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1904
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1905
|
+
_files: Dict[
|
|
1906
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1907
|
+
] = {}
|
|
1908
|
+
_body_params: Optional[bytes] = None
|
|
1909
|
+
|
|
1910
|
+
# process the path parameters
|
|
1911
|
+
if analysis_id is not None:
|
|
1912
|
+
_path_params['analysis_id'] = analysis_id
|
|
1913
|
+
# process the query parameters
|
|
1914
|
+
# process the header parameters
|
|
1915
|
+
# process the form parameters
|
|
1916
|
+
# process the body parameter
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
# set the HTTP header `Accept`
|
|
1920
|
+
if 'Accept' not in _header_params:
|
|
1921
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1922
|
+
[
|
|
1923
|
+
'application/json'
|
|
1924
|
+
]
|
|
1925
|
+
)
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
# authentication setting
|
|
1929
|
+
_auth_settings: List[str] = [
|
|
1930
|
+
'APIKey'
|
|
1931
|
+
]
|
|
1932
|
+
|
|
1933
|
+
return self.api_client.param_serialize(
|
|
1934
|
+
method='GET',
|
|
1935
|
+
resource_path='/v2/analyses/{analysis_id}/status',
|
|
1936
|
+
path_params=_path_params,
|
|
1937
|
+
query_params=_query_params,
|
|
1938
|
+
header_params=_header_params,
|
|
1939
|
+
body=_body_params,
|
|
1940
|
+
post_params=_form_params,
|
|
1941
|
+
files=_files,
|
|
1942
|
+
auth_settings=_auth_settings,
|
|
1943
|
+
collection_formats=_collection_formats,
|
|
1944
|
+
_host=_host,
|
|
1945
|
+
_request_auth=_request_auth
|
|
1946
|
+
)
|
|
1947
|
+
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
@validate_call
|
|
1952
|
+
def list_analyses(
|
|
1953
|
+
self,
|
|
1954
|
+
search_term: Optional[StrictStr] = None,
|
|
1955
|
+
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
|
|
1956
|
+
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
|
|
1957
|
+
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
|
|
1958
|
+
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
|
|
1959
|
+
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
|
|
1960
|
+
sha256_hash: Optional[StrictStr] = None,
|
|
1961
|
+
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
|
|
1962
|
+
offset: Optional[StrictInt] = None,
|
|
1963
|
+
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
|
|
1964
|
+
order: Optional[Order] = None,
|
|
1965
|
+
_request_timeout: Union[
|
|
1966
|
+
None,
|
|
1967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1968
|
+
Tuple[
|
|
1969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1970
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1971
|
+
]
|
|
1972
|
+
] = None,
|
|
1973
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1974
|
+
_content_type: Optional[StrictStr] = None,
|
|
1975
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1976
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1977
|
+
) -> BaseResponseRecent:
|
|
1978
|
+
"""Gets the most recent analyses
|
|
1979
|
+
|
|
1980
|
+
Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit
|
|
1981
|
+
|
|
1982
|
+
:param search_term:
|
|
1983
|
+
:type search_term: str
|
|
1984
|
+
:param workspace: The workspace to be viewed
|
|
1985
|
+
:type workspace: List[Workspace]
|
|
1986
|
+
:param status: The status of the analysis
|
|
1987
|
+
:type status: List[StatusInput]
|
|
1988
|
+
:param model_name: Show analysis belonging to the model
|
|
1989
|
+
:type model_name: List[ModelName]
|
|
1990
|
+
:param dynamic_execution_status: Show analysis that have a dynamic execution with the given status
|
|
1991
|
+
:type dynamic_execution_status: DynamicExecutionStatusInput
|
|
1992
|
+
:param usernames: Show analysis belonging to the user
|
|
1993
|
+
:type usernames: List[Optional[str]]
|
|
1994
|
+
:param sha256_hash:
|
|
1995
|
+
:type sha256_hash: str
|
|
1996
|
+
:param limit:
|
|
1997
|
+
:type limit: int
|
|
1998
|
+
:param offset:
|
|
1999
|
+
:type offset: int
|
|
2000
|
+
:param order_by:
|
|
2001
|
+
:type order_by: AppApiRestV2AnalysesEnumsOrderBy
|
|
2002
|
+
:param order:
|
|
2003
|
+
:type order: Order
|
|
2004
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2005
|
+
number provided, it will be total request
|
|
2006
|
+
timeout. It can also be a pair (tuple) of
|
|
2007
|
+
(connection, read) timeouts.
|
|
2008
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2009
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2010
|
+
request; this effectively ignores the
|
|
2011
|
+
authentication in the spec for a single request.
|
|
2012
|
+
:type _request_auth: dict, optional
|
|
2013
|
+
:param _content_type: force content-type for the request.
|
|
2014
|
+
:type _content_type: str, Optional
|
|
2015
|
+
:param _headers: set to override the headers for a single
|
|
2016
|
+
request; this effectively ignores the headers
|
|
2017
|
+
in the spec for a single request.
|
|
2018
|
+
:type _headers: dict, optional
|
|
2019
|
+
:param _host_index: set to override the host_index for a single
|
|
2020
|
+
request; this effectively ignores the host_index
|
|
2021
|
+
in the spec for a single request.
|
|
2022
|
+
:type _host_index: int, optional
|
|
2023
|
+
:return: Returns the result object.
|
|
2024
|
+
""" # noqa: E501
|
|
2025
|
+
|
|
2026
|
+
_param = self._list_analyses_serialize(
|
|
2027
|
+
search_term=search_term,
|
|
2028
|
+
workspace=workspace,
|
|
2029
|
+
status=status,
|
|
2030
|
+
model_name=model_name,
|
|
2031
|
+
dynamic_execution_status=dynamic_execution_status,
|
|
2032
|
+
usernames=usernames,
|
|
2033
|
+
sha256_hash=sha256_hash,
|
|
2034
|
+
limit=limit,
|
|
2035
|
+
offset=offset,
|
|
2036
|
+
order_by=order_by,
|
|
2037
|
+
order=order,
|
|
2038
|
+
_request_auth=_request_auth,
|
|
2039
|
+
_content_type=_content_type,
|
|
2040
|
+
_headers=_headers,
|
|
2041
|
+
_host_index=_host_index
|
|
2042
|
+
)
|
|
2043
|
+
|
|
2044
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2045
|
+
'200': "BaseResponseRecent",
|
|
2046
|
+
'422': "BaseResponse",
|
|
2047
|
+
}
|
|
2048
|
+
response_data = self.api_client.call_api(
|
|
2049
|
+
*_param,
|
|
2050
|
+
_request_timeout=_request_timeout
|
|
2051
|
+
)
|
|
2052
|
+
response_data.read()
|
|
2053
|
+
return self.api_client.response_deserialize(
|
|
2054
|
+
response_data=response_data,
|
|
2055
|
+
response_types_map=_response_types_map,
|
|
2056
|
+
).data
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
@validate_call
|
|
2060
|
+
def list_analyses_with_http_info(
|
|
2061
|
+
self,
|
|
2062
|
+
search_term: Optional[StrictStr] = None,
|
|
2063
|
+
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
|
|
2064
|
+
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
|
|
2065
|
+
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
|
|
2066
|
+
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
|
|
2067
|
+
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
|
|
2068
|
+
sha256_hash: Optional[StrictStr] = None,
|
|
2069
|
+
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
|
|
2070
|
+
offset: Optional[StrictInt] = None,
|
|
2071
|
+
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
|
|
2072
|
+
order: Optional[Order] = None,
|
|
2073
|
+
_request_timeout: Union[
|
|
2074
|
+
None,
|
|
2075
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2076
|
+
Tuple[
|
|
2077
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2078
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2079
|
+
]
|
|
2080
|
+
] = None,
|
|
2081
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2082
|
+
_content_type: Optional[StrictStr] = None,
|
|
2083
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2084
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2085
|
+
) -> ApiResponse[BaseResponseRecent]:
|
|
2086
|
+
"""Gets the most recent analyses
|
|
2087
|
+
|
|
2088
|
+
Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit
|
|
2089
|
+
|
|
2090
|
+
:param search_term:
|
|
2091
|
+
:type search_term: str
|
|
2092
|
+
:param workspace: The workspace to be viewed
|
|
2093
|
+
:type workspace: List[Workspace]
|
|
2094
|
+
:param status: The status of the analysis
|
|
2095
|
+
:type status: List[StatusInput]
|
|
2096
|
+
:param model_name: Show analysis belonging to the model
|
|
2097
|
+
:type model_name: List[ModelName]
|
|
2098
|
+
:param dynamic_execution_status: Show analysis that have a dynamic execution with the given status
|
|
2099
|
+
:type dynamic_execution_status: DynamicExecutionStatusInput
|
|
2100
|
+
:param usernames: Show analysis belonging to the user
|
|
2101
|
+
:type usernames: List[Optional[str]]
|
|
2102
|
+
:param sha256_hash:
|
|
2103
|
+
:type sha256_hash: str
|
|
2104
|
+
:param limit:
|
|
2105
|
+
:type limit: int
|
|
2106
|
+
:param offset:
|
|
2107
|
+
:type offset: int
|
|
2108
|
+
:param order_by:
|
|
2109
|
+
:type order_by: AppApiRestV2AnalysesEnumsOrderBy
|
|
2110
|
+
:param order:
|
|
2111
|
+
:type order: Order
|
|
2112
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2113
|
+
number provided, it will be total request
|
|
2114
|
+
timeout. It can also be a pair (tuple) of
|
|
2115
|
+
(connection, read) timeouts.
|
|
2116
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2117
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2118
|
+
request; this effectively ignores the
|
|
2119
|
+
authentication in the spec for a single request.
|
|
2120
|
+
:type _request_auth: dict, optional
|
|
2121
|
+
:param _content_type: force content-type for the request.
|
|
2122
|
+
:type _content_type: str, Optional
|
|
2123
|
+
:param _headers: set to override the headers for a single
|
|
2124
|
+
request; this effectively ignores the headers
|
|
2125
|
+
in the spec for a single request.
|
|
2126
|
+
:type _headers: dict, optional
|
|
2127
|
+
:param _host_index: set to override the host_index for a single
|
|
2128
|
+
request; this effectively ignores the host_index
|
|
2129
|
+
in the spec for a single request.
|
|
2130
|
+
:type _host_index: int, optional
|
|
2131
|
+
:return: Returns the result object.
|
|
2132
|
+
""" # noqa: E501
|
|
2133
|
+
|
|
2134
|
+
_param = self._list_analyses_serialize(
|
|
2135
|
+
search_term=search_term,
|
|
2136
|
+
workspace=workspace,
|
|
2137
|
+
status=status,
|
|
2138
|
+
model_name=model_name,
|
|
2139
|
+
dynamic_execution_status=dynamic_execution_status,
|
|
2140
|
+
usernames=usernames,
|
|
2141
|
+
sha256_hash=sha256_hash,
|
|
2142
|
+
limit=limit,
|
|
2143
|
+
offset=offset,
|
|
2144
|
+
order_by=order_by,
|
|
2145
|
+
order=order,
|
|
2146
|
+
_request_auth=_request_auth,
|
|
2147
|
+
_content_type=_content_type,
|
|
2148
|
+
_headers=_headers,
|
|
2149
|
+
_host_index=_host_index
|
|
2150
|
+
)
|
|
2151
|
+
|
|
2152
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2153
|
+
'200': "BaseResponseRecent",
|
|
2154
|
+
'422': "BaseResponse",
|
|
2155
|
+
}
|
|
2156
|
+
response_data = self.api_client.call_api(
|
|
2157
|
+
*_param,
|
|
2158
|
+
_request_timeout=_request_timeout
|
|
2159
|
+
)
|
|
2160
|
+
response_data.read()
|
|
2161
|
+
return self.api_client.response_deserialize(
|
|
2162
|
+
response_data=response_data,
|
|
2163
|
+
response_types_map=_response_types_map,
|
|
2164
|
+
)
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
@validate_call
|
|
2168
|
+
def list_analyses_without_preload_content(
|
|
2169
|
+
self,
|
|
2170
|
+
search_term: Optional[StrictStr] = None,
|
|
2171
|
+
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
|
|
2172
|
+
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
|
|
2173
|
+
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
|
|
2174
|
+
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
|
|
2175
|
+
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
|
|
2176
|
+
sha256_hash: Optional[StrictStr] = None,
|
|
2177
|
+
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
|
|
2178
|
+
offset: Optional[StrictInt] = None,
|
|
2179
|
+
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
|
|
2180
|
+
order: Optional[Order] = None,
|
|
2181
|
+
_request_timeout: Union[
|
|
2182
|
+
None,
|
|
2183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2184
|
+
Tuple[
|
|
2185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2186
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2187
|
+
]
|
|
2188
|
+
] = None,
|
|
2189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2190
|
+
_content_type: Optional[StrictStr] = None,
|
|
2191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2193
|
+
) -> RESTResponseType:
|
|
2194
|
+
"""Gets the most recent analyses
|
|
2195
|
+
|
|
2196
|
+
Gets the most recent analyses provided a scope, this is then paginated, if pages and limit doesnt fit, it increases the limit
|
|
2197
|
+
|
|
2198
|
+
:param search_term:
|
|
2199
|
+
:type search_term: str
|
|
2200
|
+
:param workspace: The workspace to be viewed
|
|
2201
|
+
:type workspace: List[Workspace]
|
|
2202
|
+
:param status: The status of the analysis
|
|
2203
|
+
:type status: List[StatusInput]
|
|
2204
|
+
:param model_name: Show analysis belonging to the model
|
|
2205
|
+
:type model_name: List[ModelName]
|
|
2206
|
+
:param dynamic_execution_status: Show analysis that have a dynamic execution with the given status
|
|
2207
|
+
:type dynamic_execution_status: DynamicExecutionStatusInput
|
|
2208
|
+
:param usernames: Show analysis belonging to the user
|
|
2209
|
+
:type usernames: List[Optional[str]]
|
|
2210
|
+
:param sha256_hash:
|
|
2211
|
+
:type sha256_hash: str
|
|
2212
|
+
:param limit:
|
|
2213
|
+
:type limit: int
|
|
2214
|
+
:param offset:
|
|
2215
|
+
:type offset: int
|
|
2216
|
+
:param order_by:
|
|
2217
|
+
:type order_by: AppApiRestV2AnalysesEnumsOrderBy
|
|
2218
|
+
:param order:
|
|
2219
|
+
:type order: Order
|
|
2220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2221
|
+
number provided, it will be total request
|
|
2222
|
+
timeout. It can also be a pair (tuple) of
|
|
2223
|
+
(connection, read) timeouts.
|
|
2224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2226
|
+
request; this effectively ignores the
|
|
2227
|
+
authentication in the spec for a single request.
|
|
2228
|
+
:type _request_auth: dict, optional
|
|
2229
|
+
:param _content_type: force content-type for the request.
|
|
2230
|
+
:type _content_type: str, Optional
|
|
2231
|
+
:param _headers: set to override the headers for a single
|
|
2232
|
+
request; this effectively ignores the headers
|
|
2233
|
+
in the spec for a single request.
|
|
2234
|
+
:type _headers: dict, optional
|
|
2235
|
+
:param _host_index: set to override the host_index for a single
|
|
2236
|
+
request; this effectively ignores the host_index
|
|
2237
|
+
in the spec for a single request.
|
|
2238
|
+
:type _host_index: int, optional
|
|
2239
|
+
:return: Returns the result object.
|
|
2240
|
+
""" # noqa: E501
|
|
2241
|
+
|
|
2242
|
+
_param = self._list_analyses_serialize(
|
|
2243
|
+
search_term=search_term,
|
|
2244
|
+
workspace=workspace,
|
|
2245
|
+
status=status,
|
|
2246
|
+
model_name=model_name,
|
|
2247
|
+
dynamic_execution_status=dynamic_execution_status,
|
|
2248
|
+
usernames=usernames,
|
|
2249
|
+
sha256_hash=sha256_hash,
|
|
2250
|
+
limit=limit,
|
|
2251
|
+
offset=offset,
|
|
2252
|
+
order_by=order_by,
|
|
2253
|
+
order=order,
|
|
2254
|
+
_request_auth=_request_auth,
|
|
2255
|
+
_content_type=_content_type,
|
|
2256
|
+
_headers=_headers,
|
|
2257
|
+
_host_index=_host_index
|
|
2258
|
+
)
|
|
2259
|
+
|
|
2260
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2261
|
+
'200': "BaseResponseRecent",
|
|
2262
|
+
'422': "BaseResponse",
|
|
2263
|
+
}
|
|
2264
|
+
response_data = self.api_client.call_api(
|
|
2265
|
+
*_param,
|
|
2266
|
+
_request_timeout=_request_timeout
|
|
2267
|
+
)
|
|
2268
|
+
return response_data.response
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
def _list_analyses_serialize(
|
|
2272
|
+
self,
|
|
2273
|
+
search_term,
|
|
2274
|
+
workspace,
|
|
2275
|
+
status,
|
|
2276
|
+
model_name,
|
|
2277
|
+
dynamic_execution_status,
|
|
2278
|
+
usernames,
|
|
2279
|
+
sha256_hash,
|
|
2280
|
+
limit,
|
|
2281
|
+
offset,
|
|
2282
|
+
order_by,
|
|
2283
|
+
order,
|
|
2284
|
+
_request_auth,
|
|
2285
|
+
_content_type,
|
|
2286
|
+
_headers,
|
|
2287
|
+
_host_index,
|
|
2288
|
+
) -> RequestSerialized:
|
|
2289
|
+
|
|
2290
|
+
_host = None
|
|
2291
|
+
|
|
2292
|
+
_collection_formats: Dict[str, str] = {
|
|
2293
|
+
'workspace': 'multi',
|
|
2294
|
+
'status': 'multi',
|
|
2295
|
+
'model_name': 'multi',
|
|
2296
|
+
'usernames': 'multi',
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
_path_params: Dict[str, str] = {}
|
|
2300
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2301
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2302
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2303
|
+
_files: Dict[
|
|
2304
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2305
|
+
] = {}
|
|
2306
|
+
_body_params: Optional[bytes] = None
|
|
2307
|
+
|
|
2308
|
+
# process the path parameters
|
|
2309
|
+
# process the query parameters
|
|
2310
|
+
if search_term is not None:
|
|
2311
|
+
|
|
2312
|
+
_query_params.append(('search_term', search_term))
|
|
2313
|
+
|
|
2314
|
+
if workspace is not None:
|
|
2315
|
+
|
|
2316
|
+
_query_params.append(('workspace', workspace))
|
|
2317
|
+
|
|
2318
|
+
if status is not None:
|
|
2319
|
+
|
|
2320
|
+
_query_params.append(('status', status))
|
|
2321
|
+
|
|
2322
|
+
if model_name is not None:
|
|
2323
|
+
|
|
2324
|
+
_query_params.append(('model_name', model_name))
|
|
2325
|
+
|
|
2326
|
+
if dynamic_execution_status is not None:
|
|
2327
|
+
|
|
2328
|
+
_query_params.append(('dynamic_execution_status', dynamic_execution_status.value))
|
|
2329
|
+
|
|
2330
|
+
if usernames is not None:
|
|
2331
|
+
|
|
2332
|
+
_query_params.append(('usernames', usernames))
|
|
2333
|
+
|
|
2334
|
+
if sha256_hash is not None:
|
|
2335
|
+
|
|
2336
|
+
_query_params.append(('sha256_hash', sha256_hash))
|
|
2337
|
+
|
|
2338
|
+
if limit is not None:
|
|
2339
|
+
|
|
2340
|
+
_query_params.append(('limit', limit))
|
|
2341
|
+
|
|
2342
|
+
if offset is not None:
|
|
2343
|
+
|
|
2344
|
+
_query_params.append(('offset', offset))
|
|
2345
|
+
|
|
2346
|
+
if order_by is not None:
|
|
2347
|
+
|
|
2348
|
+
_query_params.append(('order_by', order_by.value))
|
|
2349
|
+
|
|
2350
|
+
if order is not None:
|
|
2351
|
+
|
|
2352
|
+
_query_params.append(('order', order.value))
|
|
2353
|
+
|
|
2354
|
+
# process the header parameters
|
|
2355
|
+
# process the form parameters
|
|
2356
|
+
# process the body parameter
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
# set the HTTP header `Accept`
|
|
2360
|
+
if 'Accept' not in _header_params:
|
|
2361
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2362
|
+
[
|
|
2363
|
+
'application/json'
|
|
2364
|
+
]
|
|
2365
|
+
)
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
# authentication setting
|
|
2369
|
+
_auth_settings: List[str] = [
|
|
2370
|
+
'APIKey'
|
|
2371
|
+
]
|
|
2372
|
+
|
|
2373
|
+
return self.api_client.param_serialize(
|
|
2374
|
+
method='GET',
|
|
2375
|
+
resource_path='/v2/analyses/list',
|
|
2376
|
+
path_params=_path_params,
|
|
2377
|
+
query_params=_query_params,
|
|
2378
|
+
header_params=_header_params,
|
|
2379
|
+
body=_body_params,
|
|
2380
|
+
post_params=_form_params,
|
|
2381
|
+
files=_files,
|
|
2382
|
+
auth_settings=_auth_settings,
|
|
2383
|
+
collection_formats=_collection_formats,
|
|
2384
|
+
_host=_host,
|
|
2385
|
+
_request_auth=_request_auth
|
|
2386
|
+
)
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
@validate_call
|
|
2392
|
+
def lookup_binary_id(
|
|
2393
|
+
self,
|
|
2394
|
+
binary_id: StrictInt,
|
|
2395
|
+
_request_timeout: Union[
|
|
2396
|
+
None,
|
|
2397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2398
|
+
Tuple[
|
|
2399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2400
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2401
|
+
]
|
|
2402
|
+
] = None,
|
|
2403
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2404
|
+
_content_type: Optional[StrictStr] = None,
|
|
2405
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2406
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2407
|
+
) -> object:
|
|
2408
|
+
"""Gets the analysis ID from binary ID
|
|
2409
|
+
|
|
2410
|
+
Given an binary ID gets the ID of an analysis
|
|
2411
|
+
|
|
2412
|
+
:param binary_id: (required)
|
|
2413
|
+
:type binary_id: int
|
|
2414
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2415
|
+
number provided, it will be total request
|
|
2416
|
+
timeout. It can also be a pair (tuple) of
|
|
2417
|
+
(connection, read) timeouts.
|
|
2418
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2419
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2420
|
+
request; this effectively ignores the
|
|
2421
|
+
authentication in the spec for a single request.
|
|
2422
|
+
:type _request_auth: dict, optional
|
|
2423
|
+
:param _content_type: force content-type for the request.
|
|
2424
|
+
:type _content_type: str, Optional
|
|
2425
|
+
:param _headers: set to override the headers for a single
|
|
2426
|
+
request; this effectively ignores the headers
|
|
2427
|
+
in the spec for a single request.
|
|
2428
|
+
:type _headers: dict, optional
|
|
2429
|
+
:param _host_index: set to override the host_index for a single
|
|
2430
|
+
request; this effectively ignores the host_index
|
|
2431
|
+
in the spec for a single request.
|
|
2432
|
+
:type _host_index: int, optional
|
|
2433
|
+
:return: Returns the result object.
|
|
2434
|
+
""" # noqa: E501
|
|
2435
|
+
|
|
2436
|
+
_param = self._lookup_binary_id_serialize(
|
|
2437
|
+
binary_id=binary_id,
|
|
2438
|
+
_request_auth=_request_auth,
|
|
2439
|
+
_content_type=_content_type,
|
|
2440
|
+
_headers=_headers,
|
|
2441
|
+
_host_index=_host_index
|
|
2442
|
+
)
|
|
2443
|
+
|
|
2444
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2445
|
+
'200': "object",
|
|
2446
|
+
'422': "BaseResponse",
|
|
2447
|
+
}
|
|
2448
|
+
response_data = self.api_client.call_api(
|
|
2449
|
+
*_param,
|
|
2450
|
+
_request_timeout=_request_timeout
|
|
2451
|
+
)
|
|
2452
|
+
response_data.read()
|
|
2453
|
+
return self.api_client.response_deserialize(
|
|
2454
|
+
response_data=response_data,
|
|
2455
|
+
response_types_map=_response_types_map,
|
|
2456
|
+
).data
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
@validate_call
|
|
2460
|
+
def lookup_binary_id_with_http_info(
|
|
2461
|
+
self,
|
|
2462
|
+
binary_id: StrictInt,
|
|
2463
|
+
_request_timeout: Union[
|
|
2464
|
+
None,
|
|
2465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2466
|
+
Tuple[
|
|
2467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2468
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2469
|
+
]
|
|
2470
|
+
] = None,
|
|
2471
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2472
|
+
_content_type: Optional[StrictStr] = None,
|
|
2473
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2474
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2475
|
+
) -> ApiResponse[object]:
|
|
2476
|
+
"""Gets the analysis ID from binary ID
|
|
2477
|
+
|
|
2478
|
+
Given an binary ID gets the ID of an analysis
|
|
2479
|
+
|
|
2480
|
+
:param binary_id: (required)
|
|
2481
|
+
:type binary_id: int
|
|
2482
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2483
|
+
number provided, it will be total request
|
|
2484
|
+
timeout. It can also be a pair (tuple) of
|
|
2485
|
+
(connection, read) timeouts.
|
|
2486
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2487
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2488
|
+
request; this effectively ignores the
|
|
2489
|
+
authentication in the spec for a single request.
|
|
2490
|
+
:type _request_auth: dict, optional
|
|
2491
|
+
:param _content_type: force content-type for the request.
|
|
2492
|
+
:type _content_type: str, Optional
|
|
2493
|
+
:param _headers: set to override the headers for a single
|
|
2494
|
+
request; this effectively ignores the headers
|
|
2495
|
+
in the spec for a single request.
|
|
2496
|
+
:type _headers: dict, optional
|
|
2497
|
+
:param _host_index: set to override the host_index for a single
|
|
2498
|
+
request; this effectively ignores the host_index
|
|
2499
|
+
in the spec for a single request.
|
|
2500
|
+
:type _host_index: int, optional
|
|
2501
|
+
:return: Returns the result object.
|
|
2502
|
+
""" # noqa: E501
|
|
2503
|
+
|
|
2504
|
+
_param = self._lookup_binary_id_serialize(
|
|
2505
|
+
binary_id=binary_id,
|
|
2506
|
+
_request_auth=_request_auth,
|
|
2507
|
+
_content_type=_content_type,
|
|
2508
|
+
_headers=_headers,
|
|
2509
|
+
_host_index=_host_index
|
|
2510
|
+
)
|
|
2511
|
+
|
|
2512
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2513
|
+
'200': "object",
|
|
2514
|
+
'422': "BaseResponse",
|
|
2515
|
+
}
|
|
2516
|
+
response_data = self.api_client.call_api(
|
|
2517
|
+
*_param,
|
|
2518
|
+
_request_timeout=_request_timeout
|
|
2519
|
+
)
|
|
2520
|
+
response_data.read()
|
|
2521
|
+
return self.api_client.response_deserialize(
|
|
2522
|
+
response_data=response_data,
|
|
2523
|
+
response_types_map=_response_types_map,
|
|
2524
|
+
)
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
@validate_call
|
|
2528
|
+
def lookup_binary_id_without_preload_content(
|
|
2529
|
+
self,
|
|
2530
|
+
binary_id: StrictInt,
|
|
2531
|
+
_request_timeout: Union[
|
|
2532
|
+
None,
|
|
2533
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2534
|
+
Tuple[
|
|
2535
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2536
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2537
|
+
]
|
|
2538
|
+
] = None,
|
|
2539
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2540
|
+
_content_type: Optional[StrictStr] = None,
|
|
2541
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2542
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2543
|
+
) -> RESTResponseType:
|
|
2544
|
+
"""Gets the analysis ID from binary ID
|
|
2545
|
+
|
|
2546
|
+
Given an binary ID gets the ID of an analysis
|
|
2547
|
+
|
|
2548
|
+
:param binary_id: (required)
|
|
2549
|
+
:type binary_id: int
|
|
2550
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2551
|
+
number provided, it will be total request
|
|
2552
|
+
timeout. It can also be a pair (tuple) of
|
|
2553
|
+
(connection, read) timeouts.
|
|
2554
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2555
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2556
|
+
request; this effectively ignores the
|
|
2557
|
+
authentication in the spec for a single request.
|
|
2558
|
+
:type _request_auth: dict, optional
|
|
2559
|
+
:param _content_type: force content-type for the request.
|
|
2560
|
+
:type _content_type: str, Optional
|
|
2561
|
+
:param _headers: set to override the headers for a single
|
|
2562
|
+
request; this effectively ignores the headers
|
|
2563
|
+
in the spec for a single request.
|
|
2564
|
+
:type _headers: dict, optional
|
|
2565
|
+
:param _host_index: set to override the host_index for a single
|
|
2566
|
+
request; this effectively ignores the host_index
|
|
2567
|
+
in the spec for a single request.
|
|
2568
|
+
:type _host_index: int, optional
|
|
2569
|
+
:return: Returns the result object.
|
|
2570
|
+
""" # noqa: E501
|
|
2571
|
+
|
|
2572
|
+
_param = self._lookup_binary_id_serialize(
|
|
2573
|
+
binary_id=binary_id,
|
|
2574
|
+
_request_auth=_request_auth,
|
|
2575
|
+
_content_type=_content_type,
|
|
2576
|
+
_headers=_headers,
|
|
2577
|
+
_host_index=_host_index
|
|
2578
|
+
)
|
|
2579
|
+
|
|
2580
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2581
|
+
'200': "object",
|
|
2582
|
+
'422': "BaseResponse",
|
|
2583
|
+
}
|
|
2584
|
+
response_data = self.api_client.call_api(
|
|
2585
|
+
*_param,
|
|
2586
|
+
_request_timeout=_request_timeout
|
|
2587
|
+
)
|
|
2588
|
+
return response_data.response
|
|
2589
|
+
|
|
2590
|
+
|
|
2591
|
+
def _lookup_binary_id_serialize(
|
|
2592
|
+
self,
|
|
2593
|
+
binary_id,
|
|
2594
|
+
_request_auth,
|
|
2595
|
+
_content_type,
|
|
2596
|
+
_headers,
|
|
2597
|
+
_host_index,
|
|
2598
|
+
) -> RequestSerialized:
|
|
2599
|
+
|
|
2600
|
+
_host = None
|
|
2601
|
+
|
|
2602
|
+
_collection_formats: Dict[str, str] = {
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
_path_params: Dict[str, str] = {}
|
|
2606
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2607
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2608
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2609
|
+
_files: Dict[
|
|
2610
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2611
|
+
] = {}
|
|
2612
|
+
_body_params: Optional[bytes] = None
|
|
2613
|
+
|
|
2614
|
+
# process the path parameters
|
|
2615
|
+
if binary_id is not None:
|
|
2616
|
+
_path_params['binary_id'] = binary_id
|
|
2617
|
+
# process the query parameters
|
|
2618
|
+
# process the header parameters
|
|
2619
|
+
# process the form parameters
|
|
2620
|
+
# process the body parameter
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
# set the HTTP header `Accept`
|
|
2624
|
+
if 'Accept' not in _header_params:
|
|
2625
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2626
|
+
[
|
|
2627
|
+
'application/json'
|
|
2628
|
+
]
|
|
2629
|
+
)
|
|
2630
|
+
|
|
2631
|
+
|
|
2632
|
+
# authentication setting
|
|
2633
|
+
_auth_settings: List[str] = [
|
|
2634
|
+
'APIKey'
|
|
2635
|
+
]
|
|
2636
|
+
|
|
2637
|
+
return self.api_client.param_serialize(
|
|
2638
|
+
method='GET',
|
|
2639
|
+
resource_path='/v2/analyses/lookup/{binary_id}',
|
|
2640
|
+
path_params=_path_params,
|
|
2641
|
+
query_params=_query_params,
|
|
2642
|
+
header_params=_header_params,
|
|
2643
|
+
body=_body_params,
|
|
2644
|
+
post_params=_form_params,
|
|
2645
|
+
files=_files,
|
|
2646
|
+
auth_settings=_auth_settings,
|
|
2647
|
+
collection_formats=_collection_formats,
|
|
2648
|
+
_host=_host,
|
|
2649
|
+
_request_auth=_request_auth
|
|
2650
|
+
)
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
@validate_call
|
|
2656
|
+
def requeue_analysis(
|
|
2657
|
+
self,
|
|
2658
|
+
analysis_id: StrictInt,
|
|
2659
|
+
re_analysis_form: ReAnalysisForm,
|
|
2660
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
2661
|
+
_request_timeout: Union[
|
|
2662
|
+
None,
|
|
2663
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2664
|
+
Tuple[
|
|
2665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2666
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2667
|
+
]
|
|
2668
|
+
] = None,
|
|
2669
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2670
|
+
_content_type: Optional[StrictStr] = None,
|
|
2671
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2672
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2673
|
+
) -> BaseResponseCreated:
|
|
2674
|
+
"""Requeue Analysis
|
|
2675
|
+
|
|
2676
|
+
Re-queues an already uploaded analysis
|
|
2677
|
+
|
|
2678
|
+
:param analysis_id: (required)
|
|
2679
|
+
:type analysis_id: int
|
|
2680
|
+
:param re_analysis_form: (required)
|
|
2681
|
+
:type re_analysis_form: ReAnalysisForm
|
|
2682
|
+
:param x_rev_eng_application:
|
|
2683
|
+
:type x_rev_eng_application: str
|
|
2684
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2685
|
+
number provided, it will be total request
|
|
2686
|
+
timeout. It can also be a pair (tuple) of
|
|
2687
|
+
(connection, read) timeouts.
|
|
2688
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2689
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2690
|
+
request; this effectively ignores the
|
|
2691
|
+
authentication in the spec for a single request.
|
|
2692
|
+
:type _request_auth: dict, optional
|
|
2693
|
+
:param _content_type: force content-type for the request.
|
|
2694
|
+
:type _content_type: str, Optional
|
|
2695
|
+
:param _headers: set to override the headers for a single
|
|
2696
|
+
request; this effectively ignores the headers
|
|
2697
|
+
in the spec for a single request.
|
|
2698
|
+
:type _headers: dict, optional
|
|
2699
|
+
:param _host_index: set to override the host_index for a single
|
|
2700
|
+
request; this effectively ignores the host_index
|
|
2701
|
+
in the spec for a single request.
|
|
2702
|
+
:type _host_index: int, optional
|
|
2703
|
+
:return: Returns the result object.
|
|
2704
|
+
""" # noqa: E501
|
|
2705
|
+
|
|
2706
|
+
_param = self._requeue_analysis_serialize(
|
|
2707
|
+
analysis_id=analysis_id,
|
|
2708
|
+
re_analysis_form=re_analysis_form,
|
|
2709
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
2710
|
+
_request_auth=_request_auth,
|
|
2711
|
+
_content_type=_content_type,
|
|
2712
|
+
_headers=_headers,
|
|
2713
|
+
_host_index=_host_index
|
|
2714
|
+
)
|
|
2715
|
+
|
|
2716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2717
|
+
'201': "BaseResponseCreated",
|
|
2718
|
+
'422': "BaseResponse",
|
|
2719
|
+
'404': "BaseResponse",
|
|
2720
|
+
'400': "BaseResponse",
|
|
2721
|
+
}
|
|
2722
|
+
response_data = self.api_client.call_api(
|
|
2723
|
+
*_param,
|
|
2724
|
+
_request_timeout=_request_timeout
|
|
2725
|
+
)
|
|
2726
|
+
response_data.read()
|
|
2727
|
+
return self.api_client.response_deserialize(
|
|
2728
|
+
response_data=response_data,
|
|
2729
|
+
response_types_map=_response_types_map,
|
|
2730
|
+
).data
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
@validate_call
|
|
2734
|
+
def requeue_analysis_with_http_info(
|
|
2735
|
+
self,
|
|
2736
|
+
analysis_id: StrictInt,
|
|
2737
|
+
re_analysis_form: ReAnalysisForm,
|
|
2738
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
2739
|
+
_request_timeout: Union[
|
|
2740
|
+
None,
|
|
2741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2742
|
+
Tuple[
|
|
2743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2744
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2745
|
+
]
|
|
2746
|
+
] = None,
|
|
2747
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2748
|
+
_content_type: Optional[StrictStr] = None,
|
|
2749
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2750
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2751
|
+
) -> ApiResponse[BaseResponseCreated]:
|
|
2752
|
+
"""Requeue Analysis
|
|
2753
|
+
|
|
2754
|
+
Re-queues an already uploaded analysis
|
|
2755
|
+
|
|
2756
|
+
:param analysis_id: (required)
|
|
2757
|
+
:type analysis_id: int
|
|
2758
|
+
:param re_analysis_form: (required)
|
|
2759
|
+
:type re_analysis_form: ReAnalysisForm
|
|
2760
|
+
:param x_rev_eng_application:
|
|
2761
|
+
:type x_rev_eng_application: str
|
|
2762
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2763
|
+
number provided, it will be total request
|
|
2764
|
+
timeout. It can also be a pair (tuple) of
|
|
2765
|
+
(connection, read) timeouts.
|
|
2766
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2767
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2768
|
+
request; this effectively ignores the
|
|
2769
|
+
authentication in the spec for a single request.
|
|
2770
|
+
:type _request_auth: dict, optional
|
|
2771
|
+
:param _content_type: force content-type for the request.
|
|
2772
|
+
:type _content_type: str, Optional
|
|
2773
|
+
:param _headers: set to override the headers for a single
|
|
2774
|
+
request; this effectively ignores the headers
|
|
2775
|
+
in the spec for a single request.
|
|
2776
|
+
:type _headers: dict, optional
|
|
2777
|
+
:param _host_index: set to override the host_index for a single
|
|
2778
|
+
request; this effectively ignores the host_index
|
|
2779
|
+
in the spec for a single request.
|
|
2780
|
+
:type _host_index: int, optional
|
|
2781
|
+
:return: Returns the result object.
|
|
2782
|
+
""" # noqa: E501
|
|
2783
|
+
|
|
2784
|
+
_param = self._requeue_analysis_serialize(
|
|
2785
|
+
analysis_id=analysis_id,
|
|
2786
|
+
re_analysis_form=re_analysis_form,
|
|
2787
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
2788
|
+
_request_auth=_request_auth,
|
|
2789
|
+
_content_type=_content_type,
|
|
2790
|
+
_headers=_headers,
|
|
2791
|
+
_host_index=_host_index
|
|
2792
|
+
)
|
|
2793
|
+
|
|
2794
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2795
|
+
'201': "BaseResponseCreated",
|
|
2796
|
+
'422': "BaseResponse",
|
|
2797
|
+
'404': "BaseResponse",
|
|
2798
|
+
'400': "BaseResponse",
|
|
2799
|
+
}
|
|
2800
|
+
response_data = self.api_client.call_api(
|
|
2801
|
+
*_param,
|
|
2802
|
+
_request_timeout=_request_timeout
|
|
2803
|
+
)
|
|
2804
|
+
response_data.read()
|
|
2805
|
+
return self.api_client.response_deserialize(
|
|
2806
|
+
response_data=response_data,
|
|
2807
|
+
response_types_map=_response_types_map,
|
|
2808
|
+
)
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
@validate_call
|
|
2812
|
+
def requeue_analysis_without_preload_content(
|
|
2813
|
+
self,
|
|
2814
|
+
analysis_id: StrictInt,
|
|
2815
|
+
re_analysis_form: ReAnalysisForm,
|
|
2816
|
+
x_rev_eng_application: Optional[StrictStr] = None,
|
|
2817
|
+
_request_timeout: Union[
|
|
2818
|
+
None,
|
|
2819
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2820
|
+
Tuple[
|
|
2821
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2822
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2823
|
+
]
|
|
2824
|
+
] = None,
|
|
2825
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2826
|
+
_content_type: Optional[StrictStr] = None,
|
|
2827
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2828
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2829
|
+
) -> RESTResponseType:
|
|
2830
|
+
"""Requeue Analysis
|
|
2831
|
+
|
|
2832
|
+
Re-queues an already uploaded analysis
|
|
2833
|
+
|
|
2834
|
+
:param analysis_id: (required)
|
|
2835
|
+
:type analysis_id: int
|
|
2836
|
+
:param re_analysis_form: (required)
|
|
2837
|
+
:type re_analysis_form: ReAnalysisForm
|
|
2838
|
+
:param x_rev_eng_application:
|
|
2839
|
+
:type x_rev_eng_application: str
|
|
2840
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2841
|
+
number provided, it will be total request
|
|
2842
|
+
timeout. It can also be a pair (tuple) of
|
|
2843
|
+
(connection, read) timeouts.
|
|
2844
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2845
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2846
|
+
request; this effectively ignores the
|
|
2847
|
+
authentication in the spec for a single request.
|
|
2848
|
+
:type _request_auth: dict, optional
|
|
2849
|
+
:param _content_type: force content-type for the request.
|
|
2850
|
+
:type _content_type: str, Optional
|
|
2851
|
+
:param _headers: set to override the headers for a single
|
|
2852
|
+
request; this effectively ignores the headers
|
|
2853
|
+
in the spec for a single request.
|
|
2854
|
+
:type _headers: dict, optional
|
|
2855
|
+
:param _host_index: set to override the host_index for a single
|
|
2856
|
+
request; this effectively ignores the host_index
|
|
2857
|
+
in the spec for a single request.
|
|
2858
|
+
:type _host_index: int, optional
|
|
2859
|
+
:return: Returns the result object.
|
|
2860
|
+
""" # noqa: E501
|
|
2861
|
+
|
|
2862
|
+
_param = self._requeue_analysis_serialize(
|
|
2863
|
+
analysis_id=analysis_id,
|
|
2864
|
+
re_analysis_form=re_analysis_form,
|
|
2865
|
+
x_rev_eng_application=x_rev_eng_application,
|
|
2866
|
+
_request_auth=_request_auth,
|
|
2867
|
+
_content_type=_content_type,
|
|
2868
|
+
_headers=_headers,
|
|
2869
|
+
_host_index=_host_index
|
|
2870
|
+
)
|
|
2871
|
+
|
|
2872
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2873
|
+
'201': "BaseResponseCreated",
|
|
2874
|
+
'422': "BaseResponse",
|
|
2875
|
+
'404': "BaseResponse",
|
|
2876
|
+
'400': "BaseResponse",
|
|
2877
|
+
}
|
|
2878
|
+
response_data = self.api_client.call_api(
|
|
2879
|
+
*_param,
|
|
2880
|
+
_request_timeout=_request_timeout
|
|
2881
|
+
)
|
|
2882
|
+
return response_data.response
|
|
2883
|
+
|
|
2884
|
+
|
|
2885
|
+
def _requeue_analysis_serialize(
|
|
2886
|
+
self,
|
|
2887
|
+
analysis_id,
|
|
2888
|
+
re_analysis_form,
|
|
2889
|
+
x_rev_eng_application,
|
|
2890
|
+
_request_auth,
|
|
2891
|
+
_content_type,
|
|
2892
|
+
_headers,
|
|
2893
|
+
_host_index,
|
|
2894
|
+
) -> RequestSerialized:
|
|
2895
|
+
|
|
2896
|
+
_host = None
|
|
2897
|
+
|
|
2898
|
+
_collection_formats: Dict[str, str] = {
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
_path_params: Dict[str, str] = {}
|
|
2902
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2903
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2904
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2905
|
+
_files: Dict[
|
|
2906
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2907
|
+
] = {}
|
|
2908
|
+
_body_params: Optional[bytes] = None
|
|
2909
|
+
|
|
2910
|
+
# process the path parameters
|
|
2911
|
+
if analysis_id is not None:
|
|
2912
|
+
_path_params['analysis_id'] = analysis_id
|
|
2913
|
+
# process the query parameters
|
|
2914
|
+
# process the header parameters
|
|
2915
|
+
if x_rev_eng_application is not None:
|
|
2916
|
+
_header_params['X-RevEng-Application'] = x_rev_eng_application
|
|
2917
|
+
# process the form parameters
|
|
2918
|
+
# process the body parameter
|
|
2919
|
+
if re_analysis_form is not None:
|
|
2920
|
+
_body_params = re_analysis_form
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
# set the HTTP header `Accept`
|
|
2924
|
+
if 'Accept' not in _header_params:
|
|
2925
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2926
|
+
[
|
|
2927
|
+
'application/json'
|
|
2928
|
+
]
|
|
2929
|
+
)
|
|
2930
|
+
|
|
2931
|
+
# set the HTTP header `Content-Type`
|
|
2932
|
+
if _content_type:
|
|
2933
|
+
_header_params['Content-Type'] = _content_type
|
|
2934
|
+
else:
|
|
2935
|
+
_default_content_type = (
|
|
2936
|
+
self.api_client.select_header_content_type(
|
|
2937
|
+
[
|
|
2938
|
+
'application/json'
|
|
2939
|
+
]
|
|
2940
|
+
)
|
|
2941
|
+
)
|
|
2942
|
+
if _default_content_type is not None:
|
|
2943
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2944
|
+
|
|
2945
|
+
# authentication setting
|
|
2946
|
+
_auth_settings: List[str] = [
|
|
2947
|
+
'APIKey'
|
|
2948
|
+
]
|
|
2949
|
+
|
|
2950
|
+
return self.api_client.param_serialize(
|
|
2951
|
+
method='POST',
|
|
2952
|
+
resource_path='/v2/analyses/{analysis_id}/requeue',
|
|
2953
|
+
path_params=_path_params,
|
|
2954
|
+
query_params=_query_params,
|
|
2955
|
+
header_params=_header_params,
|
|
2956
|
+
body=_body_params,
|
|
2957
|
+
post_params=_form_params,
|
|
2958
|
+
files=_files,
|
|
2959
|
+
auth_settings=_auth_settings,
|
|
2960
|
+
collection_formats=_collection_formats,
|
|
2961
|
+
_host=_host,
|
|
2962
|
+
_request_auth=_request_auth
|
|
2963
|
+
)
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
@validate_call
|
|
2969
|
+
def update_analysis(
|
|
2970
|
+
self,
|
|
2971
|
+
analysis_id: StrictInt,
|
|
2972
|
+
analysis_update_request: AnalysisUpdateRequest,
|
|
2973
|
+
_request_timeout: Union[
|
|
2974
|
+
None,
|
|
2975
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2976
|
+
Tuple[
|
|
2977
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2978
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2979
|
+
]
|
|
2980
|
+
] = None,
|
|
2981
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2982
|
+
_content_type: Optional[StrictStr] = None,
|
|
2983
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2984
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2985
|
+
) -> BaseResponseAnalysisDetailResponse:
|
|
2986
|
+
"""Update Analysis
|
|
2987
|
+
|
|
2988
|
+
Updates analysis attributes (binary_name, analysis_scope). User must be the owner.
|
|
2989
|
+
|
|
2990
|
+
:param analysis_id: (required)
|
|
2991
|
+
:type analysis_id: int
|
|
2992
|
+
:param analysis_update_request: (required)
|
|
2993
|
+
:type analysis_update_request: AnalysisUpdateRequest
|
|
2994
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2995
|
+
number provided, it will be total request
|
|
2996
|
+
timeout. It can also be a pair (tuple) of
|
|
2997
|
+
(connection, read) timeouts.
|
|
2998
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2999
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3000
|
+
request; this effectively ignores the
|
|
3001
|
+
authentication in the spec for a single request.
|
|
3002
|
+
:type _request_auth: dict, optional
|
|
3003
|
+
:param _content_type: force content-type for the request.
|
|
3004
|
+
:type _content_type: str, Optional
|
|
3005
|
+
:param _headers: set to override the headers for a single
|
|
3006
|
+
request; this effectively ignores the headers
|
|
3007
|
+
in the spec for a single request.
|
|
3008
|
+
:type _headers: dict, optional
|
|
3009
|
+
:param _host_index: set to override the host_index for a single
|
|
3010
|
+
request; this effectively ignores the host_index
|
|
3011
|
+
in the spec for a single request.
|
|
3012
|
+
:type _host_index: int, optional
|
|
3013
|
+
:return: Returns the result object.
|
|
3014
|
+
""" # noqa: E501
|
|
3015
|
+
|
|
3016
|
+
_param = self._update_analysis_serialize(
|
|
3017
|
+
analysis_id=analysis_id,
|
|
3018
|
+
analysis_update_request=analysis_update_request,
|
|
3019
|
+
_request_auth=_request_auth,
|
|
3020
|
+
_content_type=_content_type,
|
|
3021
|
+
_headers=_headers,
|
|
3022
|
+
_host_index=_host_index
|
|
3023
|
+
)
|
|
3024
|
+
|
|
3025
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3026
|
+
'200': "BaseResponseAnalysisDetailResponse",
|
|
3027
|
+
'422': "BaseResponse",
|
|
3028
|
+
}
|
|
3029
|
+
response_data = self.api_client.call_api(
|
|
3030
|
+
*_param,
|
|
3031
|
+
_request_timeout=_request_timeout
|
|
3032
|
+
)
|
|
3033
|
+
response_data.read()
|
|
3034
|
+
return self.api_client.response_deserialize(
|
|
3035
|
+
response_data=response_data,
|
|
3036
|
+
response_types_map=_response_types_map,
|
|
3037
|
+
).data
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
@validate_call
|
|
3041
|
+
def update_analysis_with_http_info(
|
|
3042
|
+
self,
|
|
3043
|
+
analysis_id: StrictInt,
|
|
3044
|
+
analysis_update_request: AnalysisUpdateRequest,
|
|
3045
|
+
_request_timeout: Union[
|
|
3046
|
+
None,
|
|
3047
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3048
|
+
Tuple[
|
|
3049
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3050
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3051
|
+
]
|
|
3052
|
+
] = None,
|
|
3053
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3054
|
+
_content_type: Optional[StrictStr] = None,
|
|
3055
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3056
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3057
|
+
) -> ApiResponse[BaseResponseAnalysisDetailResponse]:
|
|
3058
|
+
"""Update Analysis
|
|
3059
|
+
|
|
3060
|
+
Updates analysis attributes (binary_name, analysis_scope). User must be the owner.
|
|
3061
|
+
|
|
3062
|
+
:param analysis_id: (required)
|
|
3063
|
+
:type analysis_id: int
|
|
3064
|
+
:param analysis_update_request: (required)
|
|
3065
|
+
:type analysis_update_request: AnalysisUpdateRequest
|
|
3066
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3067
|
+
number provided, it will be total request
|
|
3068
|
+
timeout. It can also be a pair (tuple) of
|
|
3069
|
+
(connection, read) timeouts.
|
|
3070
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3071
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3072
|
+
request; this effectively ignores the
|
|
3073
|
+
authentication in the spec for a single request.
|
|
3074
|
+
:type _request_auth: dict, optional
|
|
3075
|
+
:param _content_type: force content-type for the request.
|
|
3076
|
+
:type _content_type: str, Optional
|
|
3077
|
+
:param _headers: set to override the headers for a single
|
|
3078
|
+
request; this effectively ignores the headers
|
|
3079
|
+
in the spec for a single request.
|
|
3080
|
+
:type _headers: dict, optional
|
|
3081
|
+
:param _host_index: set to override the host_index for a single
|
|
3082
|
+
request; this effectively ignores the host_index
|
|
3083
|
+
in the spec for a single request.
|
|
3084
|
+
:type _host_index: int, optional
|
|
3085
|
+
:return: Returns the result object.
|
|
3086
|
+
""" # noqa: E501
|
|
3087
|
+
|
|
3088
|
+
_param = self._update_analysis_serialize(
|
|
3089
|
+
analysis_id=analysis_id,
|
|
3090
|
+
analysis_update_request=analysis_update_request,
|
|
3091
|
+
_request_auth=_request_auth,
|
|
3092
|
+
_content_type=_content_type,
|
|
3093
|
+
_headers=_headers,
|
|
3094
|
+
_host_index=_host_index
|
|
3095
|
+
)
|
|
3096
|
+
|
|
3097
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3098
|
+
'200': "BaseResponseAnalysisDetailResponse",
|
|
3099
|
+
'422': "BaseResponse",
|
|
3100
|
+
}
|
|
3101
|
+
response_data = self.api_client.call_api(
|
|
3102
|
+
*_param,
|
|
3103
|
+
_request_timeout=_request_timeout
|
|
3104
|
+
)
|
|
3105
|
+
response_data.read()
|
|
3106
|
+
return self.api_client.response_deserialize(
|
|
3107
|
+
response_data=response_data,
|
|
3108
|
+
response_types_map=_response_types_map,
|
|
3109
|
+
)
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
@validate_call
|
|
3113
|
+
def update_analysis_without_preload_content(
|
|
3114
|
+
self,
|
|
3115
|
+
analysis_id: StrictInt,
|
|
3116
|
+
analysis_update_request: AnalysisUpdateRequest,
|
|
3117
|
+
_request_timeout: Union[
|
|
3118
|
+
None,
|
|
3119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3120
|
+
Tuple[
|
|
3121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3123
|
+
]
|
|
3124
|
+
] = None,
|
|
3125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3126
|
+
_content_type: Optional[StrictStr] = None,
|
|
3127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3129
|
+
) -> RESTResponseType:
|
|
3130
|
+
"""Update Analysis
|
|
3131
|
+
|
|
3132
|
+
Updates analysis attributes (binary_name, analysis_scope). User must be the owner.
|
|
3133
|
+
|
|
3134
|
+
:param analysis_id: (required)
|
|
3135
|
+
:type analysis_id: int
|
|
3136
|
+
:param analysis_update_request: (required)
|
|
3137
|
+
:type analysis_update_request: AnalysisUpdateRequest
|
|
3138
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3139
|
+
number provided, it will be total request
|
|
3140
|
+
timeout. It can also be a pair (tuple) of
|
|
3141
|
+
(connection, read) timeouts.
|
|
3142
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3143
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3144
|
+
request; this effectively ignores the
|
|
3145
|
+
authentication in the spec for a single request.
|
|
3146
|
+
:type _request_auth: dict, optional
|
|
3147
|
+
:param _content_type: force content-type for the request.
|
|
3148
|
+
:type _content_type: str, Optional
|
|
3149
|
+
:param _headers: set to override the headers for a single
|
|
3150
|
+
request; this effectively ignores the headers
|
|
3151
|
+
in the spec for a single request.
|
|
3152
|
+
:type _headers: dict, optional
|
|
3153
|
+
:param _host_index: set to override the host_index for a single
|
|
3154
|
+
request; this effectively ignores the host_index
|
|
3155
|
+
in the spec for a single request.
|
|
3156
|
+
:type _host_index: int, optional
|
|
3157
|
+
:return: Returns the result object.
|
|
3158
|
+
""" # noqa: E501
|
|
3159
|
+
|
|
3160
|
+
_param = self._update_analysis_serialize(
|
|
3161
|
+
analysis_id=analysis_id,
|
|
3162
|
+
analysis_update_request=analysis_update_request,
|
|
3163
|
+
_request_auth=_request_auth,
|
|
3164
|
+
_content_type=_content_type,
|
|
3165
|
+
_headers=_headers,
|
|
3166
|
+
_host_index=_host_index
|
|
3167
|
+
)
|
|
3168
|
+
|
|
3169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3170
|
+
'200': "BaseResponseAnalysisDetailResponse",
|
|
3171
|
+
'422': "BaseResponse",
|
|
3172
|
+
}
|
|
3173
|
+
response_data = self.api_client.call_api(
|
|
3174
|
+
*_param,
|
|
3175
|
+
_request_timeout=_request_timeout
|
|
3176
|
+
)
|
|
3177
|
+
return response_data.response
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
def _update_analysis_serialize(
|
|
3181
|
+
self,
|
|
3182
|
+
analysis_id,
|
|
3183
|
+
analysis_update_request,
|
|
3184
|
+
_request_auth,
|
|
3185
|
+
_content_type,
|
|
3186
|
+
_headers,
|
|
3187
|
+
_host_index,
|
|
3188
|
+
) -> RequestSerialized:
|
|
3189
|
+
|
|
3190
|
+
_host = None
|
|
3191
|
+
|
|
3192
|
+
_collection_formats: Dict[str, str] = {
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
_path_params: Dict[str, str] = {}
|
|
3196
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3197
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3198
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3199
|
+
_files: Dict[
|
|
3200
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3201
|
+
] = {}
|
|
3202
|
+
_body_params: Optional[bytes] = None
|
|
3203
|
+
|
|
3204
|
+
# process the path parameters
|
|
3205
|
+
if analysis_id is not None:
|
|
3206
|
+
_path_params['analysis_id'] = analysis_id
|
|
3207
|
+
# process the query parameters
|
|
3208
|
+
# process the header parameters
|
|
3209
|
+
# process the form parameters
|
|
3210
|
+
# process the body parameter
|
|
3211
|
+
if analysis_update_request is not None:
|
|
3212
|
+
_body_params = analysis_update_request
|
|
3213
|
+
|
|
3214
|
+
|
|
3215
|
+
# set the HTTP header `Accept`
|
|
3216
|
+
if 'Accept' not in _header_params:
|
|
3217
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3218
|
+
[
|
|
3219
|
+
'application/json'
|
|
3220
|
+
]
|
|
3221
|
+
)
|
|
3222
|
+
|
|
3223
|
+
# set the HTTP header `Content-Type`
|
|
3224
|
+
if _content_type:
|
|
3225
|
+
_header_params['Content-Type'] = _content_type
|
|
3226
|
+
else:
|
|
3227
|
+
_default_content_type = (
|
|
3228
|
+
self.api_client.select_header_content_type(
|
|
3229
|
+
[
|
|
3230
|
+
'application/json'
|
|
3231
|
+
]
|
|
3232
|
+
)
|
|
3233
|
+
)
|
|
3234
|
+
if _default_content_type is not None:
|
|
3235
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3236
|
+
|
|
3237
|
+
# authentication setting
|
|
3238
|
+
_auth_settings: List[str] = [
|
|
3239
|
+
'APIKey'
|
|
3240
|
+
]
|
|
3241
|
+
|
|
3242
|
+
return self.api_client.param_serialize(
|
|
3243
|
+
method='PATCH',
|
|
3244
|
+
resource_path='/v2/analyses/{analysis_id}',
|
|
3245
|
+
path_params=_path_params,
|
|
3246
|
+
query_params=_query_params,
|
|
3247
|
+
header_params=_header_params,
|
|
3248
|
+
body=_body_params,
|
|
3249
|
+
post_params=_form_params,
|
|
3250
|
+
files=_files,
|
|
3251
|
+
auth_settings=_auth_settings,
|
|
3252
|
+
collection_formats=_collection_formats,
|
|
3253
|
+
_host=_host,
|
|
3254
|
+
_request_auth=_request_auth
|
|
3255
|
+
)
|
|
3256
|
+
|
|
3257
|
+
|
|
3258
|
+
|
|
3259
|
+
|
|
3260
|
+
@validate_call
|
|
3261
|
+
def update_analysis_tags(
|
|
3262
|
+
self,
|
|
3263
|
+
analysis_id: StrictInt,
|
|
3264
|
+
analysis_update_tags_request: AnalysisUpdateTagsRequest,
|
|
3265
|
+
_request_timeout: Union[
|
|
3266
|
+
None,
|
|
3267
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3268
|
+
Tuple[
|
|
3269
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3270
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3271
|
+
]
|
|
3272
|
+
] = None,
|
|
3273
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3274
|
+
_content_type: Optional[StrictStr] = None,
|
|
3275
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3276
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3277
|
+
) -> BaseResponseAnalysisUpdateTagsResponse:
|
|
3278
|
+
"""Update Analysis Tags
|
|
3279
|
+
|
|
3280
|
+
Updates analysis tags. User must be the owner.
|
|
3281
|
+
|
|
3282
|
+
:param analysis_id: (required)
|
|
3283
|
+
:type analysis_id: int
|
|
3284
|
+
:param analysis_update_tags_request: (required)
|
|
3285
|
+
:type analysis_update_tags_request: AnalysisUpdateTagsRequest
|
|
3286
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3287
|
+
number provided, it will be total request
|
|
3288
|
+
timeout. It can also be a pair (tuple) of
|
|
3289
|
+
(connection, read) timeouts.
|
|
3290
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3291
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3292
|
+
request; this effectively ignores the
|
|
3293
|
+
authentication in the spec for a single request.
|
|
3294
|
+
:type _request_auth: dict, optional
|
|
3295
|
+
:param _content_type: force content-type for the request.
|
|
3296
|
+
:type _content_type: str, Optional
|
|
3297
|
+
:param _headers: set to override the headers for a single
|
|
3298
|
+
request; this effectively ignores the headers
|
|
3299
|
+
in the spec for a single request.
|
|
3300
|
+
:type _headers: dict, optional
|
|
3301
|
+
:param _host_index: set to override the host_index for a single
|
|
3302
|
+
request; this effectively ignores the host_index
|
|
3303
|
+
in the spec for a single request.
|
|
3304
|
+
:type _host_index: int, optional
|
|
3305
|
+
:return: Returns the result object.
|
|
3306
|
+
""" # noqa: E501
|
|
3307
|
+
|
|
3308
|
+
_param = self._update_analysis_tags_serialize(
|
|
3309
|
+
analysis_id=analysis_id,
|
|
3310
|
+
analysis_update_tags_request=analysis_update_tags_request,
|
|
3311
|
+
_request_auth=_request_auth,
|
|
3312
|
+
_content_type=_content_type,
|
|
3313
|
+
_headers=_headers,
|
|
3314
|
+
_host_index=_host_index
|
|
3315
|
+
)
|
|
3316
|
+
|
|
3317
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3318
|
+
'200': "BaseResponseAnalysisUpdateTagsResponse",
|
|
3319
|
+
'422': "BaseResponse",
|
|
3320
|
+
}
|
|
3321
|
+
response_data = self.api_client.call_api(
|
|
3322
|
+
*_param,
|
|
3323
|
+
_request_timeout=_request_timeout
|
|
3324
|
+
)
|
|
3325
|
+
response_data.read()
|
|
3326
|
+
return self.api_client.response_deserialize(
|
|
3327
|
+
response_data=response_data,
|
|
3328
|
+
response_types_map=_response_types_map,
|
|
3329
|
+
).data
|
|
3330
|
+
|
|
3331
|
+
|
|
3332
|
+
@validate_call
|
|
3333
|
+
def update_analysis_tags_with_http_info(
|
|
3334
|
+
self,
|
|
3335
|
+
analysis_id: StrictInt,
|
|
3336
|
+
analysis_update_tags_request: AnalysisUpdateTagsRequest,
|
|
3337
|
+
_request_timeout: Union[
|
|
3338
|
+
None,
|
|
3339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3340
|
+
Tuple[
|
|
3341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3342
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3343
|
+
]
|
|
3344
|
+
] = None,
|
|
3345
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3346
|
+
_content_type: Optional[StrictStr] = None,
|
|
3347
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3348
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3349
|
+
) -> ApiResponse[BaseResponseAnalysisUpdateTagsResponse]:
|
|
3350
|
+
"""Update Analysis Tags
|
|
3351
|
+
|
|
3352
|
+
Updates analysis tags. User must be the owner.
|
|
3353
|
+
|
|
3354
|
+
:param analysis_id: (required)
|
|
3355
|
+
:type analysis_id: int
|
|
3356
|
+
:param analysis_update_tags_request: (required)
|
|
3357
|
+
:type analysis_update_tags_request: AnalysisUpdateTagsRequest
|
|
3358
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3359
|
+
number provided, it will be total request
|
|
3360
|
+
timeout. It can also be a pair (tuple) of
|
|
3361
|
+
(connection, read) timeouts.
|
|
3362
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3363
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3364
|
+
request; this effectively ignores the
|
|
3365
|
+
authentication in the spec for a single request.
|
|
3366
|
+
:type _request_auth: dict, optional
|
|
3367
|
+
:param _content_type: force content-type for the request.
|
|
3368
|
+
:type _content_type: str, Optional
|
|
3369
|
+
:param _headers: set to override the headers for a single
|
|
3370
|
+
request; this effectively ignores the headers
|
|
3371
|
+
in the spec for a single request.
|
|
3372
|
+
:type _headers: dict, optional
|
|
3373
|
+
:param _host_index: set to override the host_index for a single
|
|
3374
|
+
request; this effectively ignores the host_index
|
|
3375
|
+
in the spec for a single request.
|
|
3376
|
+
:type _host_index: int, optional
|
|
3377
|
+
:return: Returns the result object.
|
|
3378
|
+
""" # noqa: E501
|
|
3379
|
+
|
|
3380
|
+
_param = self._update_analysis_tags_serialize(
|
|
3381
|
+
analysis_id=analysis_id,
|
|
3382
|
+
analysis_update_tags_request=analysis_update_tags_request,
|
|
3383
|
+
_request_auth=_request_auth,
|
|
3384
|
+
_content_type=_content_type,
|
|
3385
|
+
_headers=_headers,
|
|
3386
|
+
_host_index=_host_index
|
|
3387
|
+
)
|
|
3388
|
+
|
|
3389
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3390
|
+
'200': "BaseResponseAnalysisUpdateTagsResponse",
|
|
3391
|
+
'422': "BaseResponse",
|
|
3392
|
+
}
|
|
3393
|
+
response_data = self.api_client.call_api(
|
|
3394
|
+
*_param,
|
|
3395
|
+
_request_timeout=_request_timeout
|
|
3396
|
+
)
|
|
3397
|
+
response_data.read()
|
|
3398
|
+
return self.api_client.response_deserialize(
|
|
3399
|
+
response_data=response_data,
|
|
3400
|
+
response_types_map=_response_types_map,
|
|
3401
|
+
)
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
@validate_call
|
|
3405
|
+
def update_analysis_tags_without_preload_content(
|
|
3406
|
+
self,
|
|
3407
|
+
analysis_id: StrictInt,
|
|
3408
|
+
analysis_update_tags_request: AnalysisUpdateTagsRequest,
|
|
3409
|
+
_request_timeout: Union[
|
|
3410
|
+
None,
|
|
3411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3412
|
+
Tuple[
|
|
3413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3414
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3415
|
+
]
|
|
3416
|
+
] = None,
|
|
3417
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3418
|
+
_content_type: Optional[StrictStr] = None,
|
|
3419
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3420
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3421
|
+
) -> RESTResponseType:
|
|
3422
|
+
"""Update Analysis Tags
|
|
3423
|
+
|
|
3424
|
+
Updates analysis tags. User must be the owner.
|
|
3425
|
+
|
|
3426
|
+
:param analysis_id: (required)
|
|
3427
|
+
:type analysis_id: int
|
|
3428
|
+
:param analysis_update_tags_request: (required)
|
|
3429
|
+
:type analysis_update_tags_request: AnalysisUpdateTagsRequest
|
|
3430
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3431
|
+
number provided, it will be total request
|
|
3432
|
+
timeout. It can also be a pair (tuple) of
|
|
3433
|
+
(connection, read) timeouts.
|
|
3434
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3436
|
+
request; this effectively ignores the
|
|
3437
|
+
authentication in the spec for a single request.
|
|
3438
|
+
:type _request_auth: dict, optional
|
|
3439
|
+
:param _content_type: force content-type for the request.
|
|
3440
|
+
:type _content_type: str, Optional
|
|
3441
|
+
:param _headers: set to override the headers for a single
|
|
3442
|
+
request; this effectively ignores the headers
|
|
3443
|
+
in the spec for a single request.
|
|
3444
|
+
:type _headers: dict, optional
|
|
3445
|
+
:param _host_index: set to override the host_index for a single
|
|
3446
|
+
request; this effectively ignores the host_index
|
|
3447
|
+
in the spec for a single request.
|
|
3448
|
+
:type _host_index: int, optional
|
|
3449
|
+
:return: Returns the result object.
|
|
3450
|
+
""" # noqa: E501
|
|
3451
|
+
|
|
3452
|
+
_param = self._update_analysis_tags_serialize(
|
|
3453
|
+
analysis_id=analysis_id,
|
|
3454
|
+
analysis_update_tags_request=analysis_update_tags_request,
|
|
3455
|
+
_request_auth=_request_auth,
|
|
3456
|
+
_content_type=_content_type,
|
|
3457
|
+
_headers=_headers,
|
|
3458
|
+
_host_index=_host_index
|
|
3459
|
+
)
|
|
3460
|
+
|
|
3461
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3462
|
+
'200': "BaseResponseAnalysisUpdateTagsResponse",
|
|
3463
|
+
'422': "BaseResponse",
|
|
3464
|
+
}
|
|
3465
|
+
response_data = self.api_client.call_api(
|
|
3466
|
+
*_param,
|
|
3467
|
+
_request_timeout=_request_timeout
|
|
3468
|
+
)
|
|
3469
|
+
return response_data.response
|
|
3470
|
+
|
|
3471
|
+
|
|
3472
|
+
def _update_analysis_tags_serialize(
|
|
3473
|
+
self,
|
|
3474
|
+
analysis_id,
|
|
3475
|
+
analysis_update_tags_request,
|
|
3476
|
+
_request_auth,
|
|
3477
|
+
_content_type,
|
|
3478
|
+
_headers,
|
|
3479
|
+
_host_index,
|
|
3480
|
+
) -> RequestSerialized:
|
|
3481
|
+
|
|
3482
|
+
_host = None
|
|
3483
|
+
|
|
3484
|
+
_collection_formats: Dict[str, str] = {
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
_path_params: Dict[str, str] = {}
|
|
3488
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3489
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3490
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3491
|
+
_files: Dict[
|
|
3492
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3493
|
+
] = {}
|
|
3494
|
+
_body_params: Optional[bytes] = None
|
|
3495
|
+
|
|
3496
|
+
# process the path parameters
|
|
3497
|
+
if analysis_id is not None:
|
|
3498
|
+
_path_params['analysis_id'] = analysis_id
|
|
3499
|
+
# process the query parameters
|
|
3500
|
+
# process the header parameters
|
|
3501
|
+
# process the form parameters
|
|
3502
|
+
# process the body parameter
|
|
3503
|
+
if analysis_update_tags_request is not None:
|
|
3504
|
+
_body_params = analysis_update_tags_request
|
|
3505
|
+
|
|
3506
|
+
|
|
3507
|
+
# set the HTTP header `Accept`
|
|
3508
|
+
if 'Accept' not in _header_params:
|
|
3509
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3510
|
+
[
|
|
3511
|
+
'application/json'
|
|
3512
|
+
]
|
|
3513
|
+
)
|
|
3514
|
+
|
|
3515
|
+
# set the HTTP header `Content-Type`
|
|
3516
|
+
if _content_type:
|
|
3517
|
+
_header_params['Content-Type'] = _content_type
|
|
3518
|
+
else:
|
|
3519
|
+
_default_content_type = (
|
|
3520
|
+
self.api_client.select_header_content_type(
|
|
3521
|
+
[
|
|
3522
|
+
'application/json'
|
|
3523
|
+
]
|
|
3524
|
+
)
|
|
3525
|
+
)
|
|
3526
|
+
if _default_content_type is not None:
|
|
3527
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3528
|
+
|
|
3529
|
+
# authentication setting
|
|
3530
|
+
_auth_settings: List[str] = [
|
|
3531
|
+
'APIKey'
|
|
3532
|
+
]
|
|
3533
|
+
|
|
3534
|
+
return self.api_client.param_serialize(
|
|
3535
|
+
method='PATCH',
|
|
3536
|
+
resource_path='/v2/analyses/{analysis_id}/tags',
|
|
3537
|
+
path_params=_path_params,
|
|
3538
|
+
query_params=_query_params,
|
|
3539
|
+
header_params=_header_params,
|
|
3540
|
+
body=_body_params,
|
|
3541
|
+
post_params=_form_params,
|
|
3542
|
+
files=_files,
|
|
3543
|
+
auth_settings=_auth_settings,
|
|
3544
|
+
collection_formats=_collection_formats,
|
|
3545
|
+
_host=_host,
|
|
3546
|
+
_request_auth=_request_auth
|
|
3547
|
+
)
|
|
3548
|
+
|
|
3549
|
+
|
|
3550
|
+
|
|
3551
|
+
|
|
3552
|
+
@validate_call
|
|
3553
|
+
def upload_file(
|
|
3554
|
+
self,
|
|
3555
|
+
upload_file_type: UploadFileType,
|
|
3556
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
3557
|
+
packed_password: Optional[StrictStr] = None,
|
|
3558
|
+
force_overwrite: Optional[StrictBool] = None,
|
|
3559
|
+
_request_timeout: Union[
|
|
3560
|
+
None,
|
|
3561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3562
|
+
Tuple[
|
|
3563
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3564
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3565
|
+
]
|
|
3566
|
+
] = None,
|
|
3567
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3568
|
+
_content_type: Optional[StrictStr] = None,
|
|
3569
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3570
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3571
|
+
) -> BaseResponseUploadResponse:
|
|
3572
|
+
"""Upload File
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
:param upload_file_type: (required)
|
|
3576
|
+
:type upload_file_type: UploadFileType
|
|
3577
|
+
:param file: (required)
|
|
3578
|
+
:type file: bytearray
|
|
3579
|
+
:param packed_password:
|
|
3580
|
+
:type packed_password: str
|
|
3581
|
+
:param force_overwrite:
|
|
3582
|
+
:type force_overwrite: bool
|
|
3583
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3584
|
+
number provided, it will be total request
|
|
3585
|
+
timeout. It can also be a pair (tuple) of
|
|
3586
|
+
(connection, read) timeouts.
|
|
3587
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3588
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3589
|
+
request; this effectively ignores the
|
|
3590
|
+
authentication in the spec for a single request.
|
|
3591
|
+
:type _request_auth: dict, optional
|
|
3592
|
+
:param _content_type: force content-type for the request.
|
|
3593
|
+
:type _content_type: str, Optional
|
|
3594
|
+
:param _headers: set to override the headers for a single
|
|
3595
|
+
request; this effectively ignores the headers
|
|
3596
|
+
in the spec for a single request.
|
|
3597
|
+
:type _headers: dict, optional
|
|
3598
|
+
:param _host_index: set to override the host_index for a single
|
|
3599
|
+
request; this effectively ignores the host_index
|
|
3600
|
+
in the spec for a single request.
|
|
3601
|
+
:type _host_index: int, optional
|
|
3602
|
+
:return: Returns the result object.
|
|
3603
|
+
""" # noqa: E501
|
|
3604
|
+
|
|
3605
|
+
_param = self._upload_file_serialize(
|
|
3606
|
+
upload_file_type=upload_file_type,
|
|
3607
|
+
file=file,
|
|
3608
|
+
packed_password=packed_password,
|
|
3609
|
+
force_overwrite=force_overwrite,
|
|
3610
|
+
_request_auth=_request_auth,
|
|
3611
|
+
_content_type=_content_type,
|
|
3612
|
+
_headers=_headers,
|
|
3613
|
+
_host_index=_host_index
|
|
3614
|
+
)
|
|
3615
|
+
|
|
3616
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3617
|
+
'200': "BaseResponseUploadResponse",
|
|
3618
|
+
'422': "BaseResponse",
|
|
3619
|
+
}
|
|
3620
|
+
response_data = self.api_client.call_api(
|
|
3621
|
+
*_param,
|
|
3622
|
+
_request_timeout=_request_timeout
|
|
3623
|
+
)
|
|
3624
|
+
response_data.read()
|
|
3625
|
+
return self.api_client.response_deserialize(
|
|
3626
|
+
response_data=response_data,
|
|
3627
|
+
response_types_map=_response_types_map,
|
|
3628
|
+
).data
|
|
3629
|
+
|
|
3630
|
+
|
|
3631
|
+
@validate_call
|
|
3632
|
+
def upload_file_with_http_info(
|
|
3633
|
+
self,
|
|
3634
|
+
upload_file_type: UploadFileType,
|
|
3635
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
3636
|
+
packed_password: Optional[StrictStr] = None,
|
|
3637
|
+
force_overwrite: Optional[StrictBool] = None,
|
|
3638
|
+
_request_timeout: Union[
|
|
3639
|
+
None,
|
|
3640
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3641
|
+
Tuple[
|
|
3642
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3643
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3644
|
+
]
|
|
3645
|
+
] = None,
|
|
3646
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3647
|
+
_content_type: Optional[StrictStr] = None,
|
|
3648
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3649
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3650
|
+
) -> ApiResponse[BaseResponseUploadResponse]:
|
|
3651
|
+
"""Upload File
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
:param upload_file_type: (required)
|
|
3655
|
+
:type upload_file_type: UploadFileType
|
|
3656
|
+
:param file: (required)
|
|
3657
|
+
:type file: bytearray
|
|
3658
|
+
:param packed_password:
|
|
3659
|
+
:type packed_password: str
|
|
3660
|
+
:param force_overwrite:
|
|
3661
|
+
:type force_overwrite: bool
|
|
3662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3663
|
+
number provided, it will be total request
|
|
3664
|
+
timeout. It can also be a pair (tuple) of
|
|
3665
|
+
(connection, read) timeouts.
|
|
3666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3668
|
+
request; this effectively ignores the
|
|
3669
|
+
authentication in the spec for a single request.
|
|
3670
|
+
:type _request_auth: dict, optional
|
|
3671
|
+
:param _content_type: force content-type for the request.
|
|
3672
|
+
:type _content_type: str, Optional
|
|
3673
|
+
:param _headers: set to override the headers for a single
|
|
3674
|
+
request; this effectively ignores the headers
|
|
3675
|
+
in the spec for a single request.
|
|
3676
|
+
:type _headers: dict, optional
|
|
3677
|
+
:param _host_index: set to override the host_index for a single
|
|
3678
|
+
request; this effectively ignores the host_index
|
|
3679
|
+
in the spec for a single request.
|
|
3680
|
+
:type _host_index: int, optional
|
|
3681
|
+
:return: Returns the result object.
|
|
3682
|
+
""" # noqa: E501
|
|
3683
|
+
|
|
3684
|
+
_param = self._upload_file_serialize(
|
|
3685
|
+
upload_file_type=upload_file_type,
|
|
3686
|
+
file=file,
|
|
3687
|
+
packed_password=packed_password,
|
|
3688
|
+
force_overwrite=force_overwrite,
|
|
3689
|
+
_request_auth=_request_auth,
|
|
3690
|
+
_content_type=_content_type,
|
|
3691
|
+
_headers=_headers,
|
|
3692
|
+
_host_index=_host_index
|
|
3693
|
+
)
|
|
3694
|
+
|
|
3695
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3696
|
+
'200': "BaseResponseUploadResponse",
|
|
3697
|
+
'422': "BaseResponse",
|
|
3698
|
+
}
|
|
3699
|
+
response_data = self.api_client.call_api(
|
|
3700
|
+
*_param,
|
|
3701
|
+
_request_timeout=_request_timeout
|
|
3702
|
+
)
|
|
3703
|
+
response_data.read()
|
|
3704
|
+
return self.api_client.response_deserialize(
|
|
3705
|
+
response_data=response_data,
|
|
3706
|
+
response_types_map=_response_types_map,
|
|
3707
|
+
)
|
|
3708
|
+
|
|
3709
|
+
|
|
3710
|
+
@validate_call
|
|
3711
|
+
def upload_file_without_preload_content(
|
|
3712
|
+
self,
|
|
3713
|
+
upload_file_type: UploadFileType,
|
|
3714
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
3715
|
+
packed_password: Optional[StrictStr] = None,
|
|
3716
|
+
force_overwrite: Optional[StrictBool] = None,
|
|
3717
|
+
_request_timeout: Union[
|
|
3718
|
+
None,
|
|
3719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3720
|
+
Tuple[
|
|
3721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3723
|
+
]
|
|
3724
|
+
] = None,
|
|
3725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3726
|
+
_content_type: Optional[StrictStr] = None,
|
|
3727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3729
|
+
) -> RESTResponseType:
|
|
3730
|
+
"""Upload File
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
:param upload_file_type: (required)
|
|
3734
|
+
:type upload_file_type: UploadFileType
|
|
3735
|
+
:param file: (required)
|
|
3736
|
+
:type file: bytearray
|
|
3737
|
+
:param packed_password:
|
|
3738
|
+
:type packed_password: str
|
|
3739
|
+
:param force_overwrite:
|
|
3740
|
+
:type force_overwrite: bool
|
|
3741
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3742
|
+
number provided, it will be total request
|
|
3743
|
+
timeout. It can also be a pair (tuple) of
|
|
3744
|
+
(connection, read) timeouts.
|
|
3745
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3746
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3747
|
+
request; this effectively ignores the
|
|
3748
|
+
authentication in the spec for a single request.
|
|
3749
|
+
:type _request_auth: dict, optional
|
|
3750
|
+
:param _content_type: force content-type for the request.
|
|
3751
|
+
:type _content_type: str, Optional
|
|
3752
|
+
:param _headers: set to override the headers for a single
|
|
3753
|
+
request; this effectively ignores the headers
|
|
3754
|
+
in the spec for a single request.
|
|
3755
|
+
:type _headers: dict, optional
|
|
3756
|
+
:param _host_index: set to override the host_index for a single
|
|
3757
|
+
request; this effectively ignores the host_index
|
|
3758
|
+
in the spec for a single request.
|
|
3759
|
+
:type _host_index: int, optional
|
|
3760
|
+
:return: Returns the result object.
|
|
3761
|
+
""" # noqa: E501
|
|
3762
|
+
|
|
3763
|
+
_param = self._upload_file_serialize(
|
|
3764
|
+
upload_file_type=upload_file_type,
|
|
3765
|
+
file=file,
|
|
3766
|
+
packed_password=packed_password,
|
|
3767
|
+
force_overwrite=force_overwrite,
|
|
3768
|
+
_request_auth=_request_auth,
|
|
3769
|
+
_content_type=_content_type,
|
|
3770
|
+
_headers=_headers,
|
|
3771
|
+
_host_index=_host_index
|
|
3772
|
+
)
|
|
3773
|
+
|
|
3774
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3775
|
+
'200': "BaseResponseUploadResponse",
|
|
3776
|
+
'422': "BaseResponse",
|
|
3777
|
+
}
|
|
3778
|
+
response_data = self.api_client.call_api(
|
|
3779
|
+
*_param,
|
|
3780
|
+
_request_timeout=_request_timeout
|
|
3781
|
+
)
|
|
3782
|
+
return response_data.response
|
|
3783
|
+
|
|
3784
|
+
|
|
3785
|
+
def _upload_file_serialize(
|
|
3786
|
+
self,
|
|
3787
|
+
upload_file_type,
|
|
3788
|
+
file,
|
|
3789
|
+
packed_password,
|
|
3790
|
+
force_overwrite,
|
|
3791
|
+
_request_auth,
|
|
3792
|
+
_content_type,
|
|
3793
|
+
_headers,
|
|
3794
|
+
_host_index,
|
|
3795
|
+
) -> RequestSerialized:
|
|
3796
|
+
|
|
3797
|
+
_host = None
|
|
3798
|
+
|
|
3799
|
+
_collection_formats: Dict[str, str] = {
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
_path_params: Dict[str, str] = {}
|
|
3803
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3804
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3805
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3806
|
+
_files: Dict[
|
|
3807
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3808
|
+
] = {}
|
|
3809
|
+
_body_params: Optional[bytes] = None
|
|
3810
|
+
|
|
3811
|
+
# process the path parameters
|
|
3812
|
+
# process the query parameters
|
|
3813
|
+
if packed_password is not None:
|
|
3814
|
+
|
|
3815
|
+
_query_params.append(('packed_password', packed_password))
|
|
3816
|
+
|
|
3817
|
+
# process the header parameters
|
|
3818
|
+
# process the form parameters
|
|
3819
|
+
if upload_file_type is not None:
|
|
3820
|
+
_form_params.append(('upload_file_type', upload_file_type))
|
|
3821
|
+
if file is not None:
|
|
3822
|
+
_files['file'] = file
|
|
3823
|
+
if force_overwrite is not None:
|
|
3824
|
+
_form_params.append(('force_overwrite', force_overwrite))
|
|
3825
|
+
# process the body parameter
|
|
3826
|
+
|
|
3827
|
+
|
|
3828
|
+
# set the HTTP header `Accept`
|
|
3829
|
+
if 'Accept' not in _header_params:
|
|
3830
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3831
|
+
[
|
|
3832
|
+
'application/json'
|
|
3833
|
+
]
|
|
3834
|
+
)
|
|
3835
|
+
|
|
3836
|
+
# set the HTTP header `Content-Type`
|
|
3837
|
+
if _content_type:
|
|
3838
|
+
_header_params['Content-Type'] = _content_type
|
|
3839
|
+
else:
|
|
3840
|
+
_default_content_type = (
|
|
3841
|
+
self.api_client.select_header_content_type(
|
|
3842
|
+
[
|
|
3843
|
+
'multipart/form-data'
|
|
3844
|
+
]
|
|
3845
|
+
)
|
|
3846
|
+
)
|
|
3847
|
+
if _default_content_type is not None:
|
|
3848
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3849
|
+
|
|
3850
|
+
# authentication setting
|
|
3851
|
+
_auth_settings: List[str] = [
|
|
3852
|
+
'APIKey'
|
|
3853
|
+
]
|
|
3854
|
+
|
|
3855
|
+
return self.api_client.param_serialize(
|
|
3856
|
+
method='POST',
|
|
3857
|
+
resource_path='/v2/upload',
|
|
3858
|
+
path_params=_path_params,
|
|
3859
|
+
query_params=_query_params,
|
|
3860
|
+
header_params=_header_params,
|
|
3861
|
+
body=_body_params,
|
|
3862
|
+
post_params=_form_params,
|
|
3863
|
+
files=_files,
|
|
3864
|
+
auth_settings=_auth_settings,
|
|
3865
|
+
collection_formats=_collection_formats,
|
|
3866
|
+
_host=_host,
|
|
3867
|
+
_request_auth=_request_auth
|
|
3868
|
+
)
|
|
3869
|
+
|
|
3870
|
+
|