diff --git a/.sdk-version b/.sdk-version index 75a91e0..1d0f469 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.70.0 +v3.70.2 diff --git a/README.md b/README.md index d160758..06596e4 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,12 @@ Class | Method | HTTP request | Description *AgentApi* | [**get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get**](docs/AgentApi.md#get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities | Get Capabilities Result *AgentApi* | [**get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get**](docs/AgentApi.md#get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis | Get Report Analysis Result *AgentApi* | [**get_triage_result_v2_analyses_analysis_id_agent_triage_get**](docs/AgentApi.md#get_triage_result_v2_analyses_analysis_id_agent_triage_get) | **GET** /v2/analyses/{analysis_id}/agent/triage | Get Triage Result +*AnalysesBulkActionsApi* | [**bulk_add_analysis_tags**](docs/AnalysesBulkActionsApi.md#bulk_add_analysis_tags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags +*AnalysesBulkActionsApi* | [**bulk_delete_analyses**](docs/AnalysesBulkActionsApi.md#bulk_delete_analyses) | **PATCH** /v2/analyses/delete | Bulk Delete Analyses *AnalysesCommentsApi* | [**create_analysis_comment**](docs/AnalysesCommentsApi.md#create_analysis_comment) | **POST** /v2/analyses/{analysis_id}/comments | Create a comment for this analysis *AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment *AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis *AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment -*AnalysesCoreApi* | [**bulk_add_analysis_tags**](docs/AnalysesCoreApi.md#bulk_add_analysis_tags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags -*AnalysesCoreApi* | [**bulk_delete_analyses**](docs/AnalysesCoreApi.md#bulk_delete_analyses) | **PATCH** /v2/analyses/delete | Bulk Delete Analyses *AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis *AnalysesCoreApi* | [**get_analysis_basic_info**](docs/AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information diff --git a/docs/AnalysesBulkActionsApi.md b/docs/AnalysesBulkActionsApi.md new file mode 100644 index 0000000..4538a24 --- /dev/null +++ b/docs/AnalysesBulkActionsApi.md @@ -0,0 +1,198 @@ +# revengai.AnalysesBulkActionsApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**bulk_add_analysis_tags**](AnalysesBulkActionsApi.md#bulk_add_analysis_tags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags +[**bulk_delete_analyses**](AnalysesBulkActionsApi.md#bulk_delete_analyses) | **PATCH** /v2/analyses/delete | Bulk Delete Analyses + + +# **bulk_add_analysis_tags** +> BaseResponseAnalysisBulkAddTagsResponse bulk_add_analysis_tags(analysis_bulk_add_tags_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) + +Bulk Add Analysis Tags + +Updates analysis tags for multiple analyses. User must be the owner. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest +from revengai.models.base_response_analysis_bulk_add_tags_response import BaseResponseAnalysisBulkAddTagsResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesBulkActionsApi(api_client) + analysis_bulk_add_tags_request = revengai.AnalysisBulkAddTagsRequest() # AnalysisBulkAddTagsRequest | + endpoint_url = 'endpoint_url_example' # str | (optional) + local_cache_dir = 'local_cache_dir_example' # str | (optional) + local_cache_max_size_mb = 56 # int | (optional) + customer_samples_bucket = 'customer_samples_bucket_example' # str | (optional) + firmware_samples_bucket = 'firmware_samples_bucket_example' # str | (optional) + max_retry_attempts = 5 # int | (optional) (default to 5) + + try: + # Bulk Add Analysis Tags + api_response = api_instance.bulk_add_analysis_tags(analysis_bulk_add_tags_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) + print("The response of AnalysesBulkActionsApi->bulk_add_analysis_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesBulkActionsApi->bulk_add_analysis_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_bulk_add_tags_request** | [**AnalysisBulkAddTagsRequest**](AnalysisBulkAddTagsRequest.md)| | + **endpoint_url** | **str**| | [optional] + **local_cache_dir** | **str**| | [optional] + **local_cache_max_size_mb** | **int**| | [optional] + **customer_samples_bucket** | **str**| | [optional] + **firmware_samples_bucket** | **str**| | [optional] + **max_retry_attempts** | **int**| | [optional] [default to 5] + +### Return type + +[**BaseResponseAnalysisBulkAddTagsResponse**](BaseResponseAnalysisBulkAddTagsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_delete_analyses** +> BaseResponseDict bulk_delete_analyses(bulk_delete_analyses_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) + +Bulk Delete Analyses + +Deletes multiple analyses. User must be the owner of all analyses. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_dict import BaseResponseDict +from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesBulkActionsApi(api_client) + bulk_delete_analyses_request = revengai.BulkDeleteAnalysesRequest() # BulkDeleteAnalysesRequest | + endpoint_url = 'endpoint_url_example' # str | (optional) + local_cache_dir = 'local_cache_dir_example' # str | (optional) + local_cache_max_size_mb = 56 # int | (optional) + customer_samples_bucket = 'customer_samples_bucket_example' # str | (optional) + firmware_samples_bucket = 'firmware_samples_bucket_example' # str | (optional) + max_retry_attempts = 5 # int | (optional) (default to 5) + + try: + # Bulk Delete Analyses + api_response = api_instance.bulk_delete_analyses(bulk_delete_analyses_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) + print("The response of AnalysesBulkActionsApi->bulk_delete_analyses:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesBulkActionsApi->bulk_delete_analyses: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulk_delete_analyses_request** | [**BulkDeleteAnalysesRequest**](BulkDeleteAnalysesRequest.md)| | + **endpoint_url** | **str**| | [optional] + **local_cache_dir** | **str**| | [optional] + **local_cache_max_size_mb** | **int**| | [optional] + **customer_samples_bucket** | **str**| | [optional] + **firmware_samples_bucket** | **str**| | [optional] + **max_retry_attempts** | **int**| | [optional] [default to 5] + +### Return type + +[**BaseResponseDict**](BaseResponseDict.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | +**404** | Not Found | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 55c9754..bb7909c 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -4,8 +4,6 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- -[**bulk_add_analysis_tags**](AnalysesCoreApi.md#bulk_add_analysis_tags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags -[**bulk_delete_analyses**](AnalysesCoreApi.md#bulk_delete_analyses) | **PATCH** /v2/analyses/delete | Bulk Delete Analyses [**create_analysis**](AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis [**delete_analysis**](AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis [**get_analysis_basic_info**](AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information @@ -23,194 +21,6 @@ Method | HTTP request | Description [**upload_file**](AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File -# **bulk_add_analysis_tags** -> BaseResponseAnalysisBulkAddTagsResponse bulk_add_analysis_tags(analysis_bulk_add_tags_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) - -Bulk Add Analysis Tags - -Updates analysis tags for multiple analyses. User must be the owner. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest -from revengai.models.base_response_analysis_bulk_add_tags_response import BaseResponseAnalysisBulkAddTagsResponse -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesCoreApi(api_client) - analysis_bulk_add_tags_request = revengai.AnalysisBulkAddTagsRequest() # AnalysisBulkAddTagsRequest | - endpoint_url = 'endpoint_url_example' # str | (optional) - local_cache_dir = 'local_cache_dir_example' # str | (optional) - local_cache_max_size_mb = 56 # int | (optional) - customer_samples_bucket = 'customer_samples_bucket_example' # str | (optional) - firmware_samples_bucket = 'firmware_samples_bucket_example' # str | (optional) - max_retry_attempts = 5 # int | (optional) (default to 5) - - try: - # Bulk Add Analysis Tags - api_response = api_instance.bulk_add_analysis_tags(analysis_bulk_add_tags_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) - print("The response of AnalysesCoreApi->bulk_add_analysis_tags:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->bulk_add_analysis_tags: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_bulk_add_tags_request** | [**AnalysisBulkAddTagsRequest**](AnalysisBulkAddTagsRequest.md)| | - **endpoint_url** | **str**| | [optional] - **local_cache_dir** | **str**| | [optional] - **local_cache_max_size_mb** | **int**| | [optional] - **customer_samples_bucket** | **str**| | [optional] - **firmware_samples_bucket** | **str**| | [optional] - **max_retry_attempts** | **int**| | [optional] [default to 5] - -### Return type - -[**BaseResponseAnalysisBulkAddTagsResponse**](BaseResponseAnalysisBulkAddTagsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **bulk_delete_analyses** -> BaseResponseDict bulk_delete_analyses(bulk_delete_analyses_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) - -Bulk Delete Analyses - -Deletes multiple analyses. User must be the owner of all analyses. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_dict import BaseResponseDict -from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesCoreApi(api_client) - bulk_delete_analyses_request = revengai.BulkDeleteAnalysesRequest() # BulkDeleteAnalysesRequest | - endpoint_url = 'endpoint_url_example' # str | (optional) - local_cache_dir = 'local_cache_dir_example' # str | (optional) - local_cache_max_size_mb = 56 # int | (optional) - customer_samples_bucket = 'customer_samples_bucket_example' # str | (optional) - firmware_samples_bucket = 'firmware_samples_bucket_example' # str | (optional) - max_retry_attempts = 5 # int | (optional) (default to 5) - - try: - # Bulk Delete Analyses - api_response = api_instance.bulk_delete_analyses(bulk_delete_analyses_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts) - print("The response of AnalysesCoreApi->bulk_delete_analyses:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->bulk_delete_analyses: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bulk_delete_analyses_request** | [**BulkDeleteAnalysesRequest**](BulkDeleteAnalysesRequest.md)| | - **endpoint_url** | **str**| | [optional] - **local_cache_dir** | **str**| | [optional] - **local_cache_max_size_mb** | **int**| | [optional] - **customer_samples_bucket** | **str**| | [optional] - **firmware_samples_bucket** | **str**| | [optional] - **max_retry_attempts** | **int**| | [optional] [default to 5] - -### Return type - -[**BaseResponseDict**](BaseResponseDict.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | -**404** | Not Found | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **create_analysis** > BaseResponseAnalysisCreateResponse create_analysis(analysis_create_request, endpoint_url=endpoint_url, local_cache_dir=local_cache_dir, local_cache_max_size_mb=local_cache_max_size_mb, customer_samples_bucket=customer_samples_bucket, firmware_samples_bucket=firmware_samples_bucket, max_retry_attempts=max_retry_attempts, x_rev_eng_application=x_rev_eng_application) diff --git a/revengai/__init__.py b/revengai/__init__.py index 8d6330d..81a1e09 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,11 +13,12 @@ """ # noqa: E501 -__version__ = "v3.70.0" +__version__ = "v3.70.2" # Define package exports __all__ = [ "AgentApi", + "AnalysesBulkActionsApi", "AnalysesCommentsApi", "AnalysesCoreApi", "AnalysesDynamicExecutionApi", @@ -366,6 +367,7 @@ # import apis into sdk package from revengai.api.agent_api import AgentApi as AgentApi +from revengai.api.analyses_bulk_actions_api import AnalysesBulkActionsApi as AnalysesBulkActionsApi from revengai.api.analyses_comments_api import AnalysesCommentsApi as AnalysesCommentsApi from revengai.api.analyses_core_api import AnalysesCoreApi as AnalysesCoreApi from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi as AnalysesDynamicExecutionApi diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index 9f7f5aa..d7c8510 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -2,6 +2,7 @@ # import apis into api package from revengai.api.agent_api import AgentApi +from revengai.api.analyses_bulk_actions_api import AnalysesBulkActionsApi from revengai.api.analyses_comments_api import AnalysesCommentsApi from revengai.api.analyses_core_api import AnalysesCoreApi from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi diff --git a/revengai/api/analyses_bulk_actions_api.py b/revengai/api/analyses_bulk_actions_api.py new file mode 100644 index 0000000..c8b1328 --- /dev/null +++ b/revengai/api/analyses_bulk_actions_api.py @@ -0,0 +1,804 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest +from revengai.models.base_response_analysis_bulk_add_tags_response import BaseResponseAnalysisBulkAddTagsResponse +from revengai.models.base_response_dict import BaseResponseDict +from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysesBulkActionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def bulk_add_analysis_tags( + self, + analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseAnalysisBulkAddTagsResponse: + """Bulk Add Analysis Tags + + Updates analysis tags for multiple analyses. User must be the owner. + + :param analysis_bulk_add_tags_request: (required) + :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_add_analysis_tags_serialize( + analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisBulkAddTagsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def bulk_add_analysis_tags_with_http_info( + self, + analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseAnalysisBulkAddTagsResponse]: + """Bulk Add Analysis Tags + + Updates analysis tags for multiple analyses. User must be the owner. + + :param analysis_bulk_add_tags_request: (required) + :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_add_analysis_tags_serialize( + analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisBulkAddTagsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def bulk_add_analysis_tags_without_preload_content( + self, + analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk Add Analysis Tags + + Updates analysis tags for multiple analyses. User must be the owner. + + :param analysis_bulk_add_tags_request: (required) + :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_add_analysis_tags_serialize( + analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisBulkAddTagsResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_add_analysis_tags_serialize( + self, + analysis_bulk_add_tags_request, + endpoint_url, + local_cache_dir, + local_cache_max_size_mb, + customer_samples_bucket, + firmware_samples_bucket, + max_retry_attempts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if endpoint_url is not None: + + _query_params.append(('endpoint_url', endpoint_url)) + + if local_cache_dir is not None: + + _query_params.append(('local_cache_dir', local_cache_dir)) + + if local_cache_max_size_mb is not None: + + _query_params.append(('local_cache_max_size_mb', local_cache_max_size_mb)) + + if customer_samples_bucket is not None: + + _query_params.append(('customer_samples_bucket', customer_samples_bucket)) + + if firmware_samples_bucket is not None: + + _query_params.append(('firmware_samples_bucket', firmware_samples_bucket)) + + if max_retry_attempts is not None: + + _query_params.append(('max_retry_attempts', max_retry_attempts)) + + # process the header parameters + # process the form parameters + # process the body parameter + if analysis_bulk_add_tags_request is not None: + _body_params = analysis_bulk_add_tags_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/analyses/tags/add', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def bulk_delete_analyses( + self, + bulk_delete_analyses_request: BulkDeleteAnalysesRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseDict: + """Bulk Delete Analyses + + Deletes multiple analyses. User must be the owner of all analyses. + + :param bulk_delete_analyses_request: (required) + :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_analyses_serialize( + bulk_delete_analyses_request=bulk_delete_analyses_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def bulk_delete_analyses_with_http_info( + self, + bulk_delete_analyses_request: BulkDeleteAnalysesRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseDict]: + """Bulk Delete Analyses + + Deletes multiple analyses. User must be the owner of all analyses. + + :param bulk_delete_analyses_request: (required) + :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_analyses_serialize( + bulk_delete_analyses_request=bulk_delete_analyses_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def bulk_delete_analyses_without_preload_content( + self, + bulk_delete_analyses_request: BulkDeleteAnalysesRequest, + endpoint_url: Optional[StrictStr] = None, + local_cache_dir: Optional[StrictStr] = None, + local_cache_max_size_mb: Optional[StrictInt] = None, + customer_samples_bucket: Optional[StrictStr] = None, + firmware_samples_bucket: Optional[StrictStr] = None, + max_retry_attempts: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk Delete Analyses + + Deletes multiple analyses. User must be the owner of all analyses. + + :param bulk_delete_analyses_request: (required) + :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest + :param endpoint_url: + :type endpoint_url: str + :param local_cache_dir: + :type local_cache_dir: str + :param local_cache_max_size_mb: + :type local_cache_max_size_mb: int + :param customer_samples_bucket: + :type customer_samples_bucket: str + :param firmware_samples_bucket: + :type firmware_samples_bucket: str + :param max_retry_attempts: + :type max_retry_attempts: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_analyses_serialize( + bulk_delete_analyses_request=bulk_delete_analyses_request, + endpoint_url=endpoint_url, + local_cache_dir=local_cache_dir, + local_cache_max_size_mb=local_cache_max_size_mb, + customer_samples_bucket=customer_samples_bucket, + firmware_samples_bucket=firmware_samples_bucket, + max_retry_attempts=max_retry_attempts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseDict", + '422': "BaseResponse", + '404': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_delete_analyses_serialize( + self, + bulk_delete_analyses_request, + endpoint_url, + local_cache_dir, + local_cache_max_size_mb, + customer_samples_bucket, + firmware_samples_bucket, + max_retry_attempts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if endpoint_url is not None: + + _query_params.append(('endpoint_url', endpoint_url)) + + if local_cache_dir is not None: + + _query_params.append(('local_cache_dir', local_cache_dir)) + + if local_cache_max_size_mb is not None: + + _query_params.append(('local_cache_max_size_mb', local_cache_max_size_mb)) + + if customer_samples_bucket is not None: + + _query_params.append(('customer_samples_bucket', customer_samples_bucket)) + + if firmware_samples_bucket is not None: + + _query_params.append(('firmware_samples_bucket', firmware_samples_bucket)) + + if max_retry_attempts is not None: + + _query_params.append(('max_retry_attempts', max_retry_attempts)) + + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_delete_analyses_request is not None: + _body_params = bulk_delete_analyses_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v2/analyses/delete', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 460a554..745e5be 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -18,13 +18,11 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr from typing import Any, List, Optional, Tuple, Union from typing_extensions import Annotated -from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest from revengai.models.analysis_create_request import AnalysisCreateRequest from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.base_response import BaseResponse -from revengai.models.base_response_analysis_bulk_add_tags_response import BaseResponseAnalysisBulkAddTagsResponse from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping @@ -37,7 +35,6 @@ from revengai.models.base_response_recent import BaseResponseRecent from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_upload_response import BaseResponseUploadResponse -from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest from revengai.models.model_name import ModelName @@ -66,770 +63,6 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client - @validate_call - def bulk_add_analysis_tags( - self, - analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseAnalysisBulkAddTagsResponse: - """Bulk Add Analysis Tags - - Updates analysis tags for multiple analyses. User must be the owner. - - :param analysis_bulk_add_tags_request: (required) - :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_add_analysis_tags_serialize( - analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisBulkAddTagsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def bulk_add_analysis_tags_with_http_info( - self, - analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseAnalysisBulkAddTagsResponse]: - """Bulk Add Analysis Tags - - Updates analysis tags for multiple analyses. User must be the owner. - - :param analysis_bulk_add_tags_request: (required) - :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_add_analysis_tags_serialize( - analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisBulkAddTagsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def bulk_add_analysis_tags_without_preload_content( - self, - analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Bulk Add Analysis Tags - - Updates analysis tags for multiple analyses. User must be the owner. - - :param analysis_bulk_add_tags_request: (required) - :type analysis_bulk_add_tags_request: AnalysisBulkAddTagsRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_add_analysis_tags_serialize( - analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisBulkAddTagsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _bulk_add_analysis_tags_serialize( - self, - analysis_bulk_add_tags_request, - endpoint_url, - local_cache_dir, - local_cache_max_size_mb, - customer_samples_bucket, - firmware_samples_bucket, - max_retry_attempts, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if endpoint_url is not None: - - _query_params.append(('endpoint_url', endpoint_url)) - - if local_cache_dir is not None: - - _query_params.append(('local_cache_dir', local_cache_dir)) - - if local_cache_max_size_mb is not None: - - _query_params.append(('local_cache_max_size_mb', local_cache_max_size_mb)) - - if customer_samples_bucket is not None: - - _query_params.append(('customer_samples_bucket', customer_samples_bucket)) - - if firmware_samples_bucket is not None: - - _query_params.append(('firmware_samples_bucket', firmware_samples_bucket)) - - if max_retry_attempts is not None: - - _query_params.append(('max_retry_attempts', max_retry_attempts)) - - # process the header parameters - # process the form parameters - # process the body parameter - if analysis_bulk_add_tags_request is not None: - _body_params = analysis_bulk_add_tags_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/analyses/tags/add', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def bulk_delete_analyses( - self, - bulk_delete_analyses_request: BulkDeleteAnalysesRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseDict: - """Bulk Delete Analyses - - Deletes multiple analyses. User must be the owner of all analyses. - - :param bulk_delete_analyses_request: (required) - :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_delete_analyses_serialize( - bulk_delete_analyses_request=bulk_delete_analyses_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDict", - '422': "BaseResponse", - '404': "BaseResponse", - '403': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def bulk_delete_analyses_with_http_info( - self, - bulk_delete_analyses_request: BulkDeleteAnalysesRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseDict]: - """Bulk Delete Analyses - - Deletes multiple analyses. User must be the owner of all analyses. - - :param bulk_delete_analyses_request: (required) - :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_delete_analyses_serialize( - bulk_delete_analyses_request=bulk_delete_analyses_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDict", - '422': "BaseResponse", - '404': "BaseResponse", - '403': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def bulk_delete_analyses_without_preload_content( - self, - bulk_delete_analyses_request: BulkDeleteAnalysesRequest, - endpoint_url: Optional[StrictStr] = None, - local_cache_dir: Optional[StrictStr] = None, - local_cache_max_size_mb: Optional[StrictInt] = None, - customer_samples_bucket: Optional[StrictStr] = None, - firmware_samples_bucket: Optional[StrictStr] = None, - max_retry_attempts: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Bulk Delete Analyses - - Deletes multiple analyses. User must be the owner of all analyses. - - :param bulk_delete_analyses_request: (required) - :type bulk_delete_analyses_request: BulkDeleteAnalysesRequest - :param endpoint_url: - :type endpoint_url: str - :param local_cache_dir: - :type local_cache_dir: str - :param local_cache_max_size_mb: - :type local_cache_max_size_mb: int - :param customer_samples_bucket: - :type customer_samples_bucket: str - :param firmware_samples_bucket: - :type firmware_samples_bucket: str - :param max_retry_attempts: - :type max_retry_attempts: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._bulk_delete_analyses_serialize( - bulk_delete_analyses_request=bulk_delete_analyses_request, - endpoint_url=endpoint_url, - local_cache_dir=local_cache_dir, - local_cache_max_size_mb=local_cache_max_size_mb, - customer_samples_bucket=customer_samples_bucket, - firmware_samples_bucket=firmware_samples_bucket, - max_retry_attempts=max_retry_attempts, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDict", - '422': "BaseResponse", - '404': "BaseResponse", - '403': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _bulk_delete_analyses_serialize( - self, - bulk_delete_analyses_request, - endpoint_url, - local_cache_dir, - local_cache_max_size_mb, - customer_samples_bucket, - firmware_samples_bucket, - max_retry_attempts, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if endpoint_url is not None: - - _query_params.append(('endpoint_url', endpoint_url)) - - if local_cache_dir is not None: - - _query_params.append(('local_cache_dir', local_cache_dir)) - - if local_cache_max_size_mb is not None: - - _query_params.append(('local_cache_max_size_mb', local_cache_max_size_mb)) - - if customer_samples_bucket is not None: - - _query_params.append(('customer_samples_bucket', customer_samples_bucket)) - - if firmware_samples_bucket is not None: - - _query_params.append(('firmware_samples_bucket', firmware_samples_bucket)) - - if max_retry_attempts is not None: - - _query_params.append(('max_retry_attempts', max_retry_attempts)) - - # process the header parameters - # process the form parameters - # process the body parameter - if bulk_delete_analyses_request is not None: - _body_params = bulk_delete_analyses_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/analyses/delete', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def create_analysis( self, diff --git a/revengai/api_client.py b/revengai/api_client.py index eaa0ba1..1148f2c 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.70.0/python' + self.user_agent = 'OpenAPI-Generator/v3.70.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index a9f7683..80d32d4 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.70.0\n"\ - "SDK Package Version: v3.70.0".\ + "Version of the API: v3.70.2\n"\ + "SDK Package Version: v3.70.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/test/test_analyses_bulk_actions_api.py b/test/test_analyses_bulk_actions_api.py new file mode 100644 index 0000000..065dff6 --- /dev/null +++ b/test/test_analyses_bulk_actions_api.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analyses_bulk_actions_api import AnalysesBulkActionsApi + + +class TestAnalysesBulkActionsApi(unittest.TestCase): + """AnalysesBulkActionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysesBulkActionsApi() + + def tearDown(self) -> None: + pass + + def test_bulk_add_analysis_tags(self) -> None: + """Test case for bulk_add_analysis_tags + + Bulk Add Analysis Tags + """ + pass + + def test_bulk_delete_analyses(self) -> None: + """Test case for bulk_delete_analyses + + Bulk Delete Analyses + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_analyses_core_api.py b/test/test_analyses_core_api.py index 68e991b..675d9b9 100644 --- a/test/test_analyses_core_api.py +++ b/test/test_analyses_core_api.py @@ -25,20 +25,6 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_bulk_add_analysis_tags(self) -> None: - """Test case for bulk_add_analysis_tags - - Bulk Add Analysis Tags - """ - pass - - def test_bulk_delete_analyses(self) -> None: - """Test case for bulk_delete_analyses - - Bulk Delete Analyses - """ - pass - def test_create_analysis(self) -> None: """Test case for create_analysis