hiddenlayer-sdk 2.0.9__py3-none-any.whl → 3.0.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.
- hiddenlayer/__init__.py +109 -105
- hiddenlayer/_base_client.py +1995 -0
- hiddenlayer/_client.py +761 -0
- hiddenlayer/_compat.py +219 -0
- hiddenlayer/_constants.py +14 -0
- hiddenlayer/_exceptions.py +108 -0
- hiddenlayer/_files.py +123 -0
- hiddenlayer/_models.py +835 -0
- hiddenlayer/_oauth2.py +118 -0
- hiddenlayer/_qs.py +150 -0
- hiddenlayer/_resource.py +43 -0
- hiddenlayer/_response.py +832 -0
- hiddenlayer/_streaming.py +333 -0
- hiddenlayer/_types.py +260 -0
- hiddenlayer/_utils/__init__.py +64 -0
- hiddenlayer/_utils/_compat.py +45 -0
- hiddenlayer/_utils/_datetime_parse.py +136 -0
- hiddenlayer/_utils/_logs.py +25 -0
- hiddenlayer/_utils/_proxy.py +65 -0
- hiddenlayer/_utils/_reflection.py +42 -0
- hiddenlayer/_utils/_resources_proxy.py +24 -0
- hiddenlayer/_utils/_streams.py +12 -0
- hiddenlayer/_utils/_sync.py +86 -0
- hiddenlayer/_utils/_transform.py +457 -0
- hiddenlayer/_utils/_typing.py +156 -0
- hiddenlayer/_utils/_utils.py +421 -0
- hiddenlayer/_version.py +4 -0
- hiddenlayer/lib/.keep +4 -0
- hiddenlayer/lib/__init__.py +6 -0
- hiddenlayer/lib/community_scan.py +174 -0
- hiddenlayer/lib/model_scan.py +752 -0
- hiddenlayer/lib/scan_utils.py +142 -0
- hiddenlayer/pagination.py +127 -0
- hiddenlayer/resources/__init__.py +75 -0
- hiddenlayer/resources/interactions.py +205 -0
- hiddenlayer/resources/models/__init__.py +33 -0
- hiddenlayer/resources/models/cards.py +259 -0
- hiddenlayer/resources/models/models.py +284 -0
- hiddenlayer/resources/prompt_analyzer.py +207 -0
- hiddenlayer/resources/scans/__init__.py +61 -0
- hiddenlayer/resources/scans/jobs.py +499 -0
- hiddenlayer/resources/scans/results.py +169 -0
- hiddenlayer/resources/scans/scans.py +166 -0
- hiddenlayer/resources/scans/upload/__init__.py +33 -0
- hiddenlayer/resources/scans/upload/file.py +279 -0
- hiddenlayer/resources/scans/upload/upload.py +340 -0
- hiddenlayer/resources/sensors.py +575 -0
- hiddenlayer/types/__init__.py +16 -0
- hiddenlayer/types/interaction_analyze_params.py +62 -0
- hiddenlayer/types/interaction_analyze_response.py +199 -0
- hiddenlayer/types/model_retrieve_response.py +50 -0
- hiddenlayer/types/models/__init__.py +6 -0
- hiddenlayer/types/models/card_list_params.py +65 -0
- hiddenlayer/types/models/card_list_response.py +50 -0
- hiddenlayer/types/prompt_analyzer_create_params.py +23 -0
- hiddenlayer/types/prompt_analyzer_create_response.py +381 -0
- hiddenlayer/types/scans/__init__.py +14 -0
- hiddenlayer/types/scans/job_list_params.py +75 -0
- hiddenlayer/types/scans/job_list_response.py +22 -0
- hiddenlayer/types/scans/job_request_params.py +49 -0
- hiddenlayer/types/scans/job_retrieve_params.py +16 -0
- hiddenlayer/types/scans/result_sarif_response.py +7 -0
- hiddenlayer/types/scans/scan_job.py +46 -0
- hiddenlayer/types/scans/scan_report.py +367 -0
- hiddenlayer/types/scans/upload/__init__.py +6 -0
- hiddenlayer/types/scans/upload/file_add_response.py +24 -0
- hiddenlayer/types/scans/upload/file_complete_response.py +12 -0
- hiddenlayer/types/scans/upload_complete_all_response.py +12 -0
- hiddenlayer/types/scans/upload_start_params.py +34 -0
- hiddenlayer/types/scans/upload_start_response.py +12 -0
- hiddenlayer/types/sensor_create_params.py +24 -0
- hiddenlayer/types/sensor_create_response.py +33 -0
- hiddenlayer/types/sensor_query_params.py +39 -0
- hiddenlayer/types/sensor_query_response.py +43 -0
- hiddenlayer/types/sensor_retrieve_response.py +33 -0
- hiddenlayer/types/sensor_update_params.py +20 -0
- hiddenlayer/types/sensor_update_response.py +9 -0
- hiddenlayer_sdk-3.0.0.dist-info/METADATA +431 -0
- hiddenlayer_sdk-3.0.0.dist-info/RECORD +82 -0
- {hiddenlayer_sdk-2.0.9.dist-info → hiddenlayer_sdk-3.0.0.dist-info}/WHEEL +1 -2
- {hiddenlayer_sdk-2.0.9.dist-info → hiddenlayer_sdk-3.0.0.dist-info}/licenses/LICENSE +1 -1
- hiddenlayer/sdk/constants.py +0 -26
- hiddenlayer/sdk/exceptions.py +0 -12
- hiddenlayer/sdk/models.py +0 -58
- hiddenlayer/sdk/rest/__init__.py +0 -135
- hiddenlayer/sdk/rest/api/__init__.py +0 -10
- hiddenlayer/sdk/rest/api/aidr_predictive_api.py +0 -308
- hiddenlayer/sdk/rest/api/health_api.py +0 -272
- hiddenlayer/sdk/rest/api/model_api.py +0 -559
- hiddenlayer/sdk/rest/api/model_supply_chain_api.py +0 -4063
- hiddenlayer/sdk/rest/api/readiness_api.py +0 -272
- hiddenlayer/sdk/rest/api/sensor_api.py +0 -1432
- hiddenlayer/sdk/rest/api_client.py +0 -770
- hiddenlayer/sdk/rest/api_response.py +0 -21
- hiddenlayer/sdk/rest/configuration.py +0 -445
- hiddenlayer/sdk/rest/exceptions.py +0 -199
- hiddenlayer/sdk/rest/models/__init__.py +0 -113
- hiddenlayer/sdk/rest/models/address.py +0 -110
- hiddenlayer/sdk/rest/models/artifact.py +0 -155
- hiddenlayer/sdk/rest/models/artifact_change.py +0 -108
- hiddenlayer/sdk/rest/models/artifact_content.py +0 -101
- hiddenlayer/sdk/rest/models/artifact_location.py +0 -109
- hiddenlayer/sdk/rest/models/attachment.py +0 -129
- hiddenlayer/sdk/rest/models/begin_multi_file_upload200_response.py +0 -87
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response.py +0 -97
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response_parts_inner.py +0 -94
- hiddenlayer/sdk/rest/models/code_flow.py +0 -113
- hiddenlayer/sdk/rest/models/configuration_override.py +0 -108
- hiddenlayer/sdk/rest/models/conversion.py +0 -114
- hiddenlayer/sdk/rest/models/create_sensor_request.py +0 -95
- hiddenlayer/sdk/rest/models/edge.py +0 -108
- hiddenlayer/sdk/rest/models/edge_traversal.py +0 -122
- hiddenlayer/sdk/rest/models/errors_inner.py +0 -91
- hiddenlayer/sdk/rest/models/exception.py +0 -113
- hiddenlayer/sdk/rest/models/external_properties.py +0 -273
- hiddenlayer/sdk/rest/models/external_property_file_reference.py +0 -102
- hiddenlayer/sdk/rest/models/external_property_file_references.py +0 -240
- hiddenlayer/sdk/rest/models/file_details_v3.py +0 -139
- hiddenlayer/sdk/rest/models/file_result_v3.py +0 -117
- hiddenlayer/sdk/rest/models/file_scan_report_v3.py +0 -132
- hiddenlayer/sdk/rest/models/file_scan_reports_v3.py +0 -95
- hiddenlayer/sdk/rest/models/fix.py +0 -113
- hiddenlayer/sdk/rest/models/get_condensed_model_scan_reports200_response.py +0 -102
- hiddenlayer/sdk/rest/models/graph.py +0 -123
- hiddenlayer/sdk/rest/models/graph_traversal.py +0 -97
- hiddenlayer/sdk/rest/models/inventory_v3.py +0 -101
- hiddenlayer/sdk/rest/models/invocation.py +0 -199
- hiddenlayer/sdk/rest/models/location.py +0 -146
- hiddenlayer/sdk/rest/models/location_inner.py +0 -138
- hiddenlayer/sdk/rest/models/location_relationship.py +0 -107
- hiddenlayer/sdk/rest/models/logical_location.py +0 -104
- hiddenlayer/sdk/rest/models/message.py +0 -92
- hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +0 -110
- hiddenlayer/sdk/rest/models/model.py +0 -103
- hiddenlayer/sdk/rest/models/model_inventory_info.py +0 -103
- hiddenlayer/sdk/rest/models/model_version.py +0 -97
- hiddenlayer/sdk/rest/models/multi_file_upload_request_v3.py +0 -97
- hiddenlayer/sdk/rest/models/multiformat_message_string.py +0 -95
- hiddenlayer/sdk/rest/models/node.py +0 -122
- hiddenlayer/sdk/rest/models/notification.py +0 -157
- hiddenlayer/sdk/rest/models/notify_model_scan_completed200_response.py +0 -87
- hiddenlayer/sdk/rest/models/paged_response_with_total.py +0 -94
- hiddenlayer/sdk/rest/models/pagination_v3.py +0 -95
- hiddenlayer/sdk/rest/models/physical_location.py +0 -94
- hiddenlayer/sdk/rest/models/problem_details.py +0 -103
- hiddenlayer/sdk/rest/models/property_bag.py +0 -101
- hiddenlayer/sdk/rest/models/rectangle.py +0 -110
- hiddenlayer/sdk/rest/models/region.py +0 -127
- hiddenlayer/sdk/rest/models/replacement.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_configuration.py +0 -113
- hiddenlayer/sdk/rest/models/reporting_descriptor.py +0 -162
- hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +0 -115
- hiddenlayer/sdk/rest/models/result.py +0 -312
- hiddenlayer/sdk/rest/models/result_provenance.py +0 -133
- hiddenlayer/sdk/rest/models/rule_details_inner.py +0 -102
- hiddenlayer/sdk/rest/models/run.py +0 -318
- hiddenlayer/sdk/rest/models/run_automation_details.py +0 -129
- hiddenlayer/sdk/rest/models/sarif210.py +0 -123
- hiddenlayer/sdk/rest/models/scan_create_request.py +0 -87
- hiddenlayer/sdk/rest/models/scan_detection_v3.py +0 -159
- hiddenlayer/sdk/rest/models/scan_detection_v31.py +0 -158
- hiddenlayer/sdk/rest/models/scan_header_v3.py +0 -129
- hiddenlayer/sdk/rest/models/scan_job.py +0 -115
- hiddenlayer/sdk/rest/models/scan_job_access.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_details_v3.py +0 -99
- hiddenlayer/sdk/rest/models/scan_model_details_v31.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +0 -89
- hiddenlayer/sdk/rest/models/scan_report_v3.py +0 -139
- hiddenlayer/sdk/rest/models/scan_results_map_v3.py +0 -105
- hiddenlayer/sdk/rest/models/scan_results_v3.py +0 -120
- hiddenlayer/sdk/rest/models/security_posture.py +0 -89
- hiddenlayer/sdk/rest/models/sensor.py +0 -100
- hiddenlayer/sdk/rest/models/sensor_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +0 -127
- hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +0 -108
- hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +0 -109
- hiddenlayer/sdk/rest/models/special_locations.py +0 -97
- hiddenlayer/sdk/rest/models/stack.py +0 -113
- hiddenlayer/sdk/rest/models/stack_frame.py +0 -104
- hiddenlayer/sdk/rest/models/submission_response.py +0 -95
- hiddenlayer/sdk/rest/models/submission_v2.py +0 -109
- hiddenlayer/sdk/rest/models/suppression.py +0 -133
- hiddenlayer/sdk/rest/models/thread_flow.py +0 -144
- hiddenlayer/sdk/rest/models/thread_flow_location.py +0 -166
- hiddenlayer/sdk/rest/models/tool.py +0 -107
- hiddenlayer/sdk/rest/models/tool_component.py +0 -251
- hiddenlayer/sdk/rest/models/tool_component_reference.py +0 -108
- hiddenlayer/sdk/rest/models/translation_metadata.py +0 -110
- hiddenlayer/sdk/rest/models/validation_error_model.py +0 -99
- hiddenlayer/sdk/rest/models/version_control_details.py +0 -108
- hiddenlayer/sdk/rest/models/web_request.py +0 -112
- hiddenlayer/sdk/rest/models/web_response.py +0 -112
- hiddenlayer/sdk/rest/rest.py +0 -257
- hiddenlayer/sdk/services/__init__.py +0 -0
- hiddenlayer/sdk/services/aidr_predictive.py +0 -130
- hiddenlayer/sdk/services/model_scan.py +0 -505
- hiddenlayer/sdk/utils.py +0 -92
- hiddenlayer/sdk/version.py +0 -1
- hiddenlayer_sdk-2.0.9.dist-info/METADATA +0 -368
- hiddenlayer_sdk-2.0.9.dist-info/RECORD +0 -126
- hiddenlayer_sdk-2.0.9.dist-info/top_level.txt +0 -1
- /hiddenlayer/{sdk/__init__.py → py.typed} +0 -0
@@ -1,4063 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
import warnings
|
15
|
-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
-
from typing_extensions import Annotated
|
18
|
-
|
19
|
-
from datetime import datetime
|
20
|
-
from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
|
21
|
-
from typing import List, Optional
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from hiddenlayer.sdk.rest.models.begin_multi_file_upload200_response import BeginMultiFileUpload200Response
|
24
|
-
from hiddenlayer.sdk.rest.models.begin_multipart_file_upload200_response import BeginMultipartFileUpload200Response
|
25
|
-
from hiddenlayer.sdk.rest.models.get_condensed_model_scan_reports200_response import GetCondensedModelScanReports200Response
|
26
|
-
from hiddenlayer.sdk.rest.models.multi_file_upload_request_v3 import MultiFileUploadRequestV3
|
27
|
-
from hiddenlayer.sdk.rest.models.notify_model_scan_completed200_response import NotifyModelScanCompleted200Response
|
28
|
-
from hiddenlayer.sdk.rest.models.scan_create_request import ScanCreateRequest
|
29
|
-
from hiddenlayer.sdk.rest.models.scan_job import ScanJob
|
30
|
-
from hiddenlayer.sdk.rest.models.scan_report_v3 import ScanReportV3
|
31
|
-
from hiddenlayer.sdk.rest.models.scan_results_map_v3 import ScanResultsMapV3
|
32
|
-
|
33
|
-
from hiddenlayer.sdk.rest.api_client import ApiClient, RequestSerialized
|
34
|
-
from hiddenlayer.sdk.rest.api_response import ApiResponse
|
35
|
-
from hiddenlayer.sdk.rest.rest import RESTResponseType
|
36
|
-
|
37
|
-
|
38
|
-
class ModelSupplyChainApi:
|
39
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
40
|
-
Ref: https://openapi-generator.tech
|
41
|
-
|
42
|
-
Do not edit the class manually.
|
43
|
-
"""
|
44
|
-
|
45
|
-
def __init__(self, api_client=None) -> None:
|
46
|
-
if api_client is None:
|
47
|
-
api_client = ApiClient.get_default()
|
48
|
-
self.api_client = api_client
|
49
|
-
|
50
|
-
|
51
|
-
@validate_call
|
52
|
-
def begin_multi_file_upload(
|
53
|
-
self,
|
54
|
-
multi_file_upload_request_v3: Annotated[MultiFileUploadRequestV3, Field(description="Request body for create")],
|
55
|
-
_request_timeout: Union[
|
56
|
-
None,
|
57
|
-
Annotated[StrictFloat, Field(gt=0)],
|
58
|
-
Tuple[
|
59
|
-
Annotated[StrictFloat, Field(gt=0)],
|
60
|
-
Annotated[StrictFloat, Field(gt=0)]
|
61
|
-
]
|
62
|
-
] = None,
|
63
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
64
|
-
_content_type: Optional[StrictStr] = None,
|
65
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
66
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
67
|
-
) -> BeginMultiFileUpload200Response:
|
68
|
-
"""Start V3 Upload
|
69
|
-
|
70
|
-
|
71
|
-
:param multi_file_upload_request_v3: Request body for create (required)
|
72
|
-
:type multi_file_upload_request_v3: MultiFileUploadRequestV3
|
73
|
-
:param _request_timeout: timeout setting for this request. If one
|
74
|
-
number provided, it will be total request
|
75
|
-
timeout. It can also be a pair (tuple) of
|
76
|
-
(connection, read) timeouts.
|
77
|
-
:type _request_timeout: int, tuple(int, int), optional
|
78
|
-
:param _request_auth: set to override the auth_settings for an a single
|
79
|
-
request; this effectively ignores the
|
80
|
-
authentication in the spec for a single request.
|
81
|
-
:type _request_auth: dict, optional
|
82
|
-
:param _content_type: force content-type for the request.
|
83
|
-
:type _content_type: str, Optional
|
84
|
-
:param _headers: set to override the headers for a single
|
85
|
-
request; this effectively ignores the headers
|
86
|
-
in the spec for a single request.
|
87
|
-
:type _headers: dict, optional
|
88
|
-
:param _host_index: set to override the host_index for a single
|
89
|
-
request; this effectively ignores the host_index
|
90
|
-
in the spec for a single request.
|
91
|
-
:type _host_index: int, optional
|
92
|
-
:return: Returns the result object.
|
93
|
-
""" # noqa: E501
|
94
|
-
|
95
|
-
_param = self._begin_multi_file_upload_serialize(
|
96
|
-
multi_file_upload_request_v3=multi_file_upload_request_v3,
|
97
|
-
_request_auth=_request_auth,
|
98
|
-
_content_type=_content_type,
|
99
|
-
_headers=_headers,
|
100
|
-
_host_index=_host_index
|
101
|
-
)
|
102
|
-
|
103
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
104
|
-
'200': "BeginMultiFileUpload200Response",
|
105
|
-
'400': None,
|
106
|
-
'422': "ValidationErrorModel",
|
107
|
-
}
|
108
|
-
response_data = self.api_client.call_api(
|
109
|
-
*_param,
|
110
|
-
_request_timeout=_request_timeout
|
111
|
-
)
|
112
|
-
response_data.read()
|
113
|
-
return self.api_client.response_deserialize(
|
114
|
-
response_data=response_data,
|
115
|
-
response_types_map=_response_types_map,
|
116
|
-
).data
|
117
|
-
|
118
|
-
|
119
|
-
@validate_call
|
120
|
-
def begin_multi_file_upload_with_http_info(
|
121
|
-
self,
|
122
|
-
multi_file_upload_request_v3: Annotated[MultiFileUploadRequestV3, Field(description="Request body for create")],
|
123
|
-
_request_timeout: Union[
|
124
|
-
None,
|
125
|
-
Annotated[StrictFloat, Field(gt=0)],
|
126
|
-
Tuple[
|
127
|
-
Annotated[StrictFloat, Field(gt=0)],
|
128
|
-
Annotated[StrictFloat, Field(gt=0)]
|
129
|
-
]
|
130
|
-
] = None,
|
131
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
132
|
-
_content_type: Optional[StrictStr] = None,
|
133
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
134
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
135
|
-
) -> ApiResponse[BeginMultiFileUpload200Response]:
|
136
|
-
"""Start V3 Upload
|
137
|
-
|
138
|
-
|
139
|
-
:param multi_file_upload_request_v3: Request body for create (required)
|
140
|
-
:type multi_file_upload_request_v3: MultiFileUploadRequestV3
|
141
|
-
:param _request_timeout: timeout setting for this request. If one
|
142
|
-
number provided, it will be total request
|
143
|
-
timeout. It can also be a pair (tuple) of
|
144
|
-
(connection, read) timeouts.
|
145
|
-
:type _request_timeout: int, tuple(int, int), optional
|
146
|
-
:param _request_auth: set to override the auth_settings for an a single
|
147
|
-
request; this effectively ignores the
|
148
|
-
authentication in the spec for a single request.
|
149
|
-
:type _request_auth: dict, optional
|
150
|
-
:param _content_type: force content-type for the request.
|
151
|
-
:type _content_type: str, Optional
|
152
|
-
:param _headers: set to override the headers for a single
|
153
|
-
request; this effectively ignores the headers
|
154
|
-
in the spec for a single request.
|
155
|
-
:type _headers: dict, optional
|
156
|
-
:param _host_index: set to override the host_index for a single
|
157
|
-
request; this effectively ignores the host_index
|
158
|
-
in the spec for a single request.
|
159
|
-
:type _host_index: int, optional
|
160
|
-
:return: Returns the result object.
|
161
|
-
""" # noqa: E501
|
162
|
-
|
163
|
-
_param = self._begin_multi_file_upload_serialize(
|
164
|
-
multi_file_upload_request_v3=multi_file_upload_request_v3,
|
165
|
-
_request_auth=_request_auth,
|
166
|
-
_content_type=_content_type,
|
167
|
-
_headers=_headers,
|
168
|
-
_host_index=_host_index
|
169
|
-
)
|
170
|
-
|
171
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
172
|
-
'200': "BeginMultiFileUpload200Response",
|
173
|
-
'400': None,
|
174
|
-
'422': "ValidationErrorModel",
|
175
|
-
}
|
176
|
-
response_data = self.api_client.call_api(
|
177
|
-
*_param,
|
178
|
-
_request_timeout=_request_timeout
|
179
|
-
)
|
180
|
-
response_data.read()
|
181
|
-
return self.api_client.response_deserialize(
|
182
|
-
response_data=response_data,
|
183
|
-
response_types_map=_response_types_map,
|
184
|
-
)
|
185
|
-
|
186
|
-
|
187
|
-
@validate_call
|
188
|
-
def begin_multi_file_upload_without_preload_content(
|
189
|
-
self,
|
190
|
-
multi_file_upload_request_v3: Annotated[MultiFileUploadRequestV3, Field(description="Request body for create")],
|
191
|
-
_request_timeout: Union[
|
192
|
-
None,
|
193
|
-
Annotated[StrictFloat, Field(gt=0)],
|
194
|
-
Tuple[
|
195
|
-
Annotated[StrictFloat, Field(gt=0)],
|
196
|
-
Annotated[StrictFloat, Field(gt=0)]
|
197
|
-
]
|
198
|
-
] = None,
|
199
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
200
|
-
_content_type: Optional[StrictStr] = None,
|
201
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
202
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
203
|
-
) -> RESTResponseType:
|
204
|
-
"""Start V3 Upload
|
205
|
-
|
206
|
-
|
207
|
-
:param multi_file_upload_request_v3: Request body for create (required)
|
208
|
-
:type multi_file_upload_request_v3: MultiFileUploadRequestV3
|
209
|
-
:param _request_timeout: timeout setting for this request. If one
|
210
|
-
number provided, it will be total request
|
211
|
-
timeout. It can also be a pair (tuple) of
|
212
|
-
(connection, read) timeouts.
|
213
|
-
:type _request_timeout: int, tuple(int, int), optional
|
214
|
-
:param _request_auth: set to override the auth_settings for an a single
|
215
|
-
request; this effectively ignores the
|
216
|
-
authentication in the spec for a single request.
|
217
|
-
:type _request_auth: dict, optional
|
218
|
-
:param _content_type: force content-type for the request.
|
219
|
-
:type _content_type: str, Optional
|
220
|
-
:param _headers: set to override the headers for a single
|
221
|
-
request; this effectively ignores the headers
|
222
|
-
in the spec for a single request.
|
223
|
-
:type _headers: dict, optional
|
224
|
-
:param _host_index: set to override the host_index for a single
|
225
|
-
request; this effectively ignores the host_index
|
226
|
-
in the spec for a single request.
|
227
|
-
:type _host_index: int, optional
|
228
|
-
:return: Returns the result object.
|
229
|
-
""" # noqa: E501
|
230
|
-
|
231
|
-
_param = self._begin_multi_file_upload_serialize(
|
232
|
-
multi_file_upload_request_v3=multi_file_upload_request_v3,
|
233
|
-
_request_auth=_request_auth,
|
234
|
-
_content_type=_content_type,
|
235
|
-
_headers=_headers,
|
236
|
-
_host_index=_host_index
|
237
|
-
)
|
238
|
-
|
239
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
240
|
-
'200': "BeginMultiFileUpload200Response",
|
241
|
-
'400': None,
|
242
|
-
'422': "ValidationErrorModel",
|
243
|
-
}
|
244
|
-
response_data = self.api_client.call_api(
|
245
|
-
*_param,
|
246
|
-
_request_timeout=_request_timeout
|
247
|
-
)
|
248
|
-
return response_data.response
|
249
|
-
|
250
|
-
|
251
|
-
def _begin_multi_file_upload_serialize(
|
252
|
-
self,
|
253
|
-
multi_file_upload_request_v3,
|
254
|
-
_request_auth,
|
255
|
-
_content_type,
|
256
|
-
_headers,
|
257
|
-
_host_index,
|
258
|
-
) -> RequestSerialized:
|
259
|
-
|
260
|
-
_host = None
|
261
|
-
|
262
|
-
_collection_formats: Dict[str, str] = {
|
263
|
-
}
|
264
|
-
|
265
|
-
_path_params: Dict[str, str] = {}
|
266
|
-
_query_params: List[Tuple[str, str]] = []
|
267
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
268
|
-
_form_params: List[Tuple[str, str]] = []
|
269
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
270
|
-
_body_params: Optional[bytes] = None
|
271
|
-
|
272
|
-
# process the path parameters
|
273
|
-
# process the query parameters
|
274
|
-
# process the header parameters
|
275
|
-
# process the form parameters
|
276
|
-
# process the body parameter
|
277
|
-
if multi_file_upload_request_v3 is not None:
|
278
|
-
_body_params = multi_file_upload_request_v3
|
279
|
-
|
280
|
-
|
281
|
-
# set the HTTP header `Accept`
|
282
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
283
|
-
[
|
284
|
-
'application/json'
|
285
|
-
]
|
286
|
-
)
|
287
|
-
|
288
|
-
# set the HTTP header `Content-Type`
|
289
|
-
if _content_type:
|
290
|
-
_header_params['Content-Type'] = _content_type
|
291
|
-
else:
|
292
|
-
_default_content_type = (
|
293
|
-
self.api_client.select_header_content_type(
|
294
|
-
[
|
295
|
-
'application/json'
|
296
|
-
]
|
297
|
-
)
|
298
|
-
)
|
299
|
-
if _default_content_type is not None:
|
300
|
-
_header_params['Content-Type'] = _default_content_type
|
301
|
-
|
302
|
-
# authentication setting
|
303
|
-
_auth_settings: List[str] = [
|
304
|
-
'BearerAuth'
|
305
|
-
]
|
306
|
-
|
307
|
-
return self.api_client.param_serialize(
|
308
|
-
method='POST',
|
309
|
-
resource_path='/scan/v3/upload',
|
310
|
-
path_params=_path_params,
|
311
|
-
query_params=_query_params,
|
312
|
-
header_params=_header_params,
|
313
|
-
body=_body_params,
|
314
|
-
post_params=_form_params,
|
315
|
-
files=_files,
|
316
|
-
auth_settings=_auth_settings,
|
317
|
-
collection_formats=_collection_formats,
|
318
|
-
_host=_host,
|
319
|
-
_request_auth=_request_auth
|
320
|
-
)
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
@validate_call
|
326
|
-
def begin_multipart_file_upload(
|
327
|
-
self,
|
328
|
-
file_content_length: Annotated[StrictInt, Field(description="Added file size in bytes")],
|
329
|
-
file_name: Annotated[StrictStr, Field(description="Added file name")],
|
330
|
-
scan_id: StrictStr,
|
331
|
-
_request_timeout: Union[
|
332
|
-
None,
|
333
|
-
Annotated[StrictFloat, Field(gt=0)],
|
334
|
-
Tuple[
|
335
|
-
Annotated[StrictFloat, Field(gt=0)],
|
336
|
-
Annotated[StrictFloat, Field(gt=0)]
|
337
|
-
]
|
338
|
-
] = None,
|
339
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
340
|
-
_content_type: Optional[StrictStr] = None,
|
341
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
342
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
343
|
-
) -> BeginMultipartFileUpload200Response:
|
344
|
-
"""Add file to V3 Upload
|
345
|
-
|
346
|
-
|
347
|
-
:param file_content_length: Added file size in bytes (required)
|
348
|
-
:type file_content_length: int
|
349
|
-
:param file_name: Added file name (required)
|
350
|
-
:type file_name: str
|
351
|
-
:param scan_id: (required)
|
352
|
-
:type scan_id: str
|
353
|
-
:param _request_timeout: timeout setting for this request. If one
|
354
|
-
number provided, it will be total request
|
355
|
-
timeout. It can also be a pair (tuple) of
|
356
|
-
(connection, read) timeouts.
|
357
|
-
:type _request_timeout: int, tuple(int, int), optional
|
358
|
-
:param _request_auth: set to override the auth_settings for an a single
|
359
|
-
request; this effectively ignores the
|
360
|
-
authentication in the spec for a single request.
|
361
|
-
:type _request_auth: dict, optional
|
362
|
-
:param _content_type: force content-type for the request.
|
363
|
-
:type _content_type: str, Optional
|
364
|
-
:param _headers: set to override the headers for a single
|
365
|
-
request; this effectively ignores the headers
|
366
|
-
in the spec for a single request.
|
367
|
-
:type _headers: dict, optional
|
368
|
-
:param _host_index: set to override the host_index for a single
|
369
|
-
request; this effectively ignores the host_index
|
370
|
-
in the spec for a single request.
|
371
|
-
:type _host_index: int, optional
|
372
|
-
:return: Returns the result object.
|
373
|
-
""" # noqa: E501
|
374
|
-
|
375
|
-
_param = self._begin_multipart_file_upload_serialize(
|
376
|
-
file_content_length=file_content_length,
|
377
|
-
file_name=file_name,
|
378
|
-
scan_id=scan_id,
|
379
|
-
_request_auth=_request_auth,
|
380
|
-
_content_type=_content_type,
|
381
|
-
_headers=_headers,
|
382
|
-
_host_index=_host_index
|
383
|
-
)
|
384
|
-
|
385
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
386
|
-
'200': "BeginMultipartFileUpload200Response",
|
387
|
-
'400': None,
|
388
|
-
'422': "ValidationErrorModel",
|
389
|
-
}
|
390
|
-
response_data = self.api_client.call_api(
|
391
|
-
*_param,
|
392
|
-
_request_timeout=_request_timeout
|
393
|
-
)
|
394
|
-
response_data.read()
|
395
|
-
return self.api_client.response_deserialize(
|
396
|
-
response_data=response_data,
|
397
|
-
response_types_map=_response_types_map,
|
398
|
-
).data
|
399
|
-
|
400
|
-
|
401
|
-
@validate_call
|
402
|
-
def begin_multipart_file_upload_with_http_info(
|
403
|
-
self,
|
404
|
-
file_content_length: Annotated[StrictInt, Field(description="Added file size in bytes")],
|
405
|
-
file_name: Annotated[StrictStr, Field(description="Added file name")],
|
406
|
-
scan_id: StrictStr,
|
407
|
-
_request_timeout: Union[
|
408
|
-
None,
|
409
|
-
Annotated[StrictFloat, Field(gt=0)],
|
410
|
-
Tuple[
|
411
|
-
Annotated[StrictFloat, Field(gt=0)],
|
412
|
-
Annotated[StrictFloat, Field(gt=0)]
|
413
|
-
]
|
414
|
-
] = None,
|
415
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
416
|
-
_content_type: Optional[StrictStr] = None,
|
417
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
418
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
419
|
-
) -> ApiResponse[BeginMultipartFileUpload200Response]:
|
420
|
-
"""Add file to V3 Upload
|
421
|
-
|
422
|
-
|
423
|
-
:param file_content_length: Added file size in bytes (required)
|
424
|
-
:type file_content_length: int
|
425
|
-
:param file_name: Added file name (required)
|
426
|
-
:type file_name: str
|
427
|
-
:param scan_id: (required)
|
428
|
-
:type scan_id: str
|
429
|
-
:param _request_timeout: timeout setting for this request. If one
|
430
|
-
number provided, it will be total request
|
431
|
-
timeout. It can also be a pair (tuple) of
|
432
|
-
(connection, read) timeouts.
|
433
|
-
:type _request_timeout: int, tuple(int, int), optional
|
434
|
-
:param _request_auth: set to override the auth_settings for an a single
|
435
|
-
request; this effectively ignores the
|
436
|
-
authentication in the spec for a single request.
|
437
|
-
:type _request_auth: dict, optional
|
438
|
-
:param _content_type: force content-type for the request.
|
439
|
-
:type _content_type: str, Optional
|
440
|
-
:param _headers: set to override the headers for a single
|
441
|
-
request; this effectively ignores the headers
|
442
|
-
in the spec for a single request.
|
443
|
-
:type _headers: dict, optional
|
444
|
-
:param _host_index: set to override the host_index for a single
|
445
|
-
request; this effectively ignores the host_index
|
446
|
-
in the spec for a single request.
|
447
|
-
:type _host_index: int, optional
|
448
|
-
:return: Returns the result object.
|
449
|
-
""" # noqa: E501
|
450
|
-
|
451
|
-
_param = self._begin_multipart_file_upload_serialize(
|
452
|
-
file_content_length=file_content_length,
|
453
|
-
file_name=file_name,
|
454
|
-
scan_id=scan_id,
|
455
|
-
_request_auth=_request_auth,
|
456
|
-
_content_type=_content_type,
|
457
|
-
_headers=_headers,
|
458
|
-
_host_index=_host_index
|
459
|
-
)
|
460
|
-
|
461
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
462
|
-
'200': "BeginMultipartFileUpload200Response",
|
463
|
-
'400': None,
|
464
|
-
'422': "ValidationErrorModel",
|
465
|
-
}
|
466
|
-
response_data = self.api_client.call_api(
|
467
|
-
*_param,
|
468
|
-
_request_timeout=_request_timeout
|
469
|
-
)
|
470
|
-
response_data.read()
|
471
|
-
return self.api_client.response_deserialize(
|
472
|
-
response_data=response_data,
|
473
|
-
response_types_map=_response_types_map,
|
474
|
-
)
|
475
|
-
|
476
|
-
|
477
|
-
@validate_call
|
478
|
-
def begin_multipart_file_upload_without_preload_content(
|
479
|
-
self,
|
480
|
-
file_content_length: Annotated[StrictInt, Field(description="Added file size in bytes")],
|
481
|
-
file_name: Annotated[StrictStr, Field(description="Added file name")],
|
482
|
-
scan_id: StrictStr,
|
483
|
-
_request_timeout: Union[
|
484
|
-
None,
|
485
|
-
Annotated[StrictFloat, Field(gt=0)],
|
486
|
-
Tuple[
|
487
|
-
Annotated[StrictFloat, Field(gt=0)],
|
488
|
-
Annotated[StrictFloat, Field(gt=0)]
|
489
|
-
]
|
490
|
-
] = None,
|
491
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
492
|
-
_content_type: Optional[StrictStr] = None,
|
493
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
494
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
495
|
-
) -> RESTResponseType:
|
496
|
-
"""Add file to V3 Upload
|
497
|
-
|
498
|
-
|
499
|
-
:param file_content_length: Added file size in bytes (required)
|
500
|
-
:type file_content_length: int
|
501
|
-
:param file_name: Added file name (required)
|
502
|
-
:type file_name: str
|
503
|
-
:param scan_id: (required)
|
504
|
-
:type scan_id: str
|
505
|
-
:param _request_timeout: timeout setting for this request. If one
|
506
|
-
number provided, it will be total request
|
507
|
-
timeout. It can also be a pair (tuple) of
|
508
|
-
(connection, read) timeouts.
|
509
|
-
:type _request_timeout: int, tuple(int, int), optional
|
510
|
-
:param _request_auth: set to override the auth_settings for an a single
|
511
|
-
request; this effectively ignores the
|
512
|
-
authentication in the spec for a single request.
|
513
|
-
:type _request_auth: dict, optional
|
514
|
-
:param _content_type: force content-type for the request.
|
515
|
-
:type _content_type: str, Optional
|
516
|
-
:param _headers: set to override the headers for a single
|
517
|
-
request; this effectively ignores the headers
|
518
|
-
in the spec for a single request.
|
519
|
-
:type _headers: dict, optional
|
520
|
-
:param _host_index: set to override the host_index for a single
|
521
|
-
request; this effectively ignores the host_index
|
522
|
-
in the spec for a single request.
|
523
|
-
:type _host_index: int, optional
|
524
|
-
:return: Returns the result object.
|
525
|
-
""" # noqa: E501
|
526
|
-
|
527
|
-
_param = self._begin_multipart_file_upload_serialize(
|
528
|
-
file_content_length=file_content_length,
|
529
|
-
file_name=file_name,
|
530
|
-
scan_id=scan_id,
|
531
|
-
_request_auth=_request_auth,
|
532
|
-
_content_type=_content_type,
|
533
|
-
_headers=_headers,
|
534
|
-
_host_index=_host_index
|
535
|
-
)
|
536
|
-
|
537
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
538
|
-
'200': "BeginMultipartFileUpload200Response",
|
539
|
-
'400': None,
|
540
|
-
'422': "ValidationErrorModel",
|
541
|
-
}
|
542
|
-
response_data = self.api_client.call_api(
|
543
|
-
*_param,
|
544
|
-
_request_timeout=_request_timeout
|
545
|
-
)
|
546
|
-
return response_data.response
|
547
|
-
|
548
|
-
|
549
|
-
def _begin_multipart_file_upload_serialize(
|
550
|
-
self,
|
551
|
-
file_content_length,
|
552
|
-
file_name,
|
553
|
-
scan_id,
|
554
|
-
_request_auth,
|
555
|
-
_content_type,
|
556
|
-
_headers,
|
557
|
-
_host_index,
|
558
|
-
) -> RequestSerialized:
|
559
|
-
|
560
|
-
_host = None
|
561
|
-
|
562
|
-
_collection_formats: Dict[str, str] = {
|
563
|
-
}
|
564
|
-
|
565
|
-
_path_params: Dict[str, str] = {}
|
566
|
-
_query_params: List[Tuple[str, str]] = []
|
567
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
568
|
-
_form_params: List[Tuple[str, str]] = []
|
569
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
570
|
-
_body_params: Optional[bytes] = None
|
571
|
-
|
572
|
-
# process the path parameters
|
573
|
-
if scan_id is not None:
|
574
|
-
_path_params['scan_id'] = scan_id
|
575
|
-
# process the query parameters
|
576
|
-
# process the header parameters
|
577
|
-
if file_content_length is not None:
|
578
|
-
_header_params['file-content-length'] = file_content_length
|
579
|
-
if file_name is not None:
|
580
|
-
_header_params['file-name'] = file_name
|
581
|
-
# process the form parameters
|
582
|
-
# process the body parameter
|
583
|
-
|
584
|
-
|
585
|
-
# set the HTTP header `Accept`
|
586
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
587
|
-
[
|
588
|
-
'application/json'
|
589
|
-
]
|
590
|
-
)
|
591
|
-
|
592
|
-
|
593
|
-
# authentication setting
|
594
|
-
_auth_settings: List[str] = [
|
595
|
-
'BearerAuth'
|
596
|
-
]
|
597
|
-
|
598
|
-
return self.api_client.param_serialize(
|
599
|
-
method='POST',
|
600
|
-
resource_path='/scan/v3/upload/{scan_id}/file',
|
601
|
-
path_params=_path_params,
|
602
|
-
query_params=_query_params,
|
603
|
-
header_params=_header_params,
|
604
|
-
body=_body_params,
|
605
|
-
post_params=_form_params,
|
606
|
-
files=_files,
|
607
|
-
auth_settings=_auth_settings,
|
608
|
-
collection_formats=_collection_formats,
|
609
|
-
_host=_host,
|
610
|
-
_request_auth=_request_auth
|
611
|
-
)
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
@validate_call
|
617
|
-
def complete_multi_file_upload(
|
618
|
-
self,
|
619
|
-
scan_id: StrictStr,
|
620
|
-
_request_timeout: Union[
|
621
|
-
None,
|
622
|
-
Annotated[StrictFloat, Field(gt=0)],
|
623
|
-
Tuple[
|
624
|
-
Annotated[StrictFloat, Field(gt=0)],
|
625
|
-
Annotated[StrictFloat, Field(gt=0)]
|
626
|
-
]
|
627
|
-
] = None,
|
628
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
629
|
-
_content_type: Optional[StrictStr] = None,
|
630
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
631
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
632
|
-
) -> BeginMultiFileUpload200Response:
|
633
|
-
"""Indicate All files are uploaded and start the scan
|
634
|
-
|
635
|
-
|
636
|
-
:param scan_id: (required)
|
637
|
-
:type scan_id: str
|
638
|
-
:param _request_timeout: timeout setting for this request. If one
|
639
|
-
number provided, it will be total request
|
640
|
-
timeout. It can also be a pair (tuple) of
|
641
|
-
(connection, read) timeouts.
|
642
|
-
:type _request_timeout: int, tuple(int, int), optional
|
643
|
-
:param _request_auth: set to override the auth_settings for an a single
|
644
|
-
request; this effectively ignores the
|
645
|
-
authentication in the spec for a single request.
|
646
|
-
:type _request_auth: dict, optional
|
647
|
-
:param _content_type: force content-type for the request.
|
648
|
-
:type _content_type: str, Optional
|
649
|
-
:param _headers: set to override the headers for a single
|
650
|
-
request; this effectively ignores the headers
|
651
|
-
in the spec for a single request.
|
652
|
-
:type _headers: dict, optional
|
653
|
-
:param _host_index: set to override the host_index for a single
|
654
|
-
request; this effectively ignores the host_index
|
655
|
-
in the spec for a single request.
|
656
|
-
:type _host_index: int, optional
|
657
|
-
:return: Returns the result object.
|
658
|
-
""" # noqa: E501
|
659
|
-
|
660
|
-
_param = self._complete_multi_file_upload_serialize(
|
661
|
-
scan_id=scan_id,
|
662
|
-
_request_auth=_request_auth,
|
663
|
-
_content_type=_content_type,
|
664
|
-
_headers=_headers,
|
665
|
-
_host_index=_host_index
|
666
|
-
)
|
667
|
-
|
668
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
669
|
-
'200': "BeginMultiFileUpload200Response",
|
670
|
-
'400': None,
|
671
|
-
'422': "ValidationErrorModel",
|
672
|
-
}
|
673
|
-
response_data = self.api_client.call_api(
|
674
|
-
*_param,
|
675
|
-
_request_timeout=_request_timeout
|
676
|
-
)
|
677
|
-
response_data.read()
|
678
|
-
return self.api_client.response_deserialize(
|
679
|
-
response_data=response_data,
|
680
|
-
response_types_map=_response_types_map,
|
681
|
-
).data
|
682
|
-
|
683
|
-
|
684
|
-
@validate_call
|
685
|
-
def complete_multi_file_upload_with_http_info(
|
686
|
-
self,
|
687
|
-
scan_id: StrictStr,
|
688
|
-
_request_timeout: Union[
|
689
|
-
None,
|
690
|
-
Annotated[StrictFloat, Field(gt=0)],
|
691
|
-
Tuple[
|
692
|
-
Annotated[StrictFloat, Field(gt=0)],
|
693
|
-
Annotated[StrictFloat, Field(gt=0)]
|
694
|
-
]
|
695
|
-
] = None,
|
696
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
697
|
-
_content_type: Optional[StrictStr] = None,
|
698
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
699
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
700
|
-
) -> ApiResponse[BeginMultiFileUpload200Response]:
|
701
|
-
"""Indicate All files are uploaded and start the scan
|
702
|
-
|
703
|
-
|
704
|
-
:param scan_id: (required)
|
705
|
-
:type scan_id: str
|
706
|
-
:param _request_timeout: timeout setting for this request. If one
|
707
|
-
number provided, it will be total request
|
708
|
-
timeout. It can also be a pair (tuple) of
|
709
|
-
(connection, read) timeouts.
|
710
|
-
:type _request_timeout: int, tuple(int, int), optional
|
711
|
-
:param _request_auth: set to override the auth_settings for an a single
|
712
|
-
request; this effectively ignores the
|
713
|
-
authentication in the spec for a single request.
|
714
|
-
:type _request_auth: dict, optional
|
715
|
-
:param _content_type: force content-type for the request.
|
716
|
-
:type _content_type: str, Optional
|
717
|
-
:param _headers: set to override the headers for a single
|
718
|
-
request; this effectively ignores the headers
|
719
|
-
in the spec for a single request.
|
720
|
-
:type _headers: dict, optional
|
721
|
-
:param _host_index: set to override the host_index for a single
|
722
|
-
request; this effectively ignores the host_index
|
723
|
-
in the spec for a single request.
|
724
|
-
:type _host_index: int, optional
|
725
|
-
:return: Returns the result object.
|
726
|
-
""" # noqa: E501
|
727
|
-
|
728
|
-
_param = self._complete_multi_file_upload_serialize(
|
729
|
-
scan_id=scan_id,
|
730
|
-
_request_auth=_request_auth,
|
731
|
-
_content_type=_content_type,
|
732
|
-
_headers=_headers,
|
733
|
-
_host_index=_host_index
|
734
|
-
)
|
735
|
-
|
736
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
737
|
-
'200': "BeginMultiFileUpload200Response",
|
738
|
-
'400': None,
|
739
|
-
'422': "ValidationErrorModel",
|
740
|
-
}
|
741
|
-
response_data = self.api_client.call_api(
|
742
|
-
*_param,
|
743
|
-
_request_timeout=_request_timeout
|
744
|
-
)
|
745
|
-
response_data.read()
|
746
|
-
return self.api_client.response_deserialize(
|
747
|
-
response_data=response_data,
|
748
|
-
response_types_map=_response_types_map,
|
749
|
-
)
|
750
|
-
|
751
|
-
|
752
|
-
@validate_call
|
753
|
-
def complete_multi_file_upload_without_preload_content(
|
754
|
-
self,
|
755
|
-
scan_id: StrictStr,
|
756
|
-
_request_timeout: Union[
|
757
|
-
None,
|
758
|
-
Annotated[StrictFloat, Field(gt=0)],
|
759
|
-
Tuple[
|
760
|
-
Annotated[StrictFloat, Field(gt=0)],
|
761
|
-
Annotated[StrictFloat, Field(gt=0)]
|
762
|
-
]
|
763
|
-
] = None,
|
764
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
765
|
-
_content_type: Optional[StrictStr] = None,
|
766
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
767
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
768
|
-
) -> RESTResponseType:
|
769
|
-
"""Indicate All files are uploaded and start the scan
|
770
|
-
|
771
|
-
|
772
|
-
:param scan_id: (required)
|
773
|
-
:type scan_id: str
|
774
|
-
:param _request_timeout: timeout setting for this request. If one
|
775
|
-
number provided, it will be total request
|
776
|
-
timeout. It can also be a pair (tuple) of
|
777
|
-
(connection, read) timeouts.
|
778
|
-
:type _request_timeout: int, tuple(int, int), optional
|
779
|
-
:param _request_auth: set to override the auth_settings for an a single
|
780
|
-
request; this effectively ignores the
|
781
|
-
authentication in the spec for a single request.
|
782
|
-
:type _request_auth: dict, optional
|
783
|
-
:param _content_type: force content-type for the request.
|
784
|
-
:type _content_type: str, Optional
|
785
|
-
:param _headers: set to override the headers for a single
|
786
|
-
request; this effectively ignores the headers
|
787
|
-
in the spec for a single request.
|
788
|
-
:type _headers: dict, optional
|
789
|
-
:param _host_index: set to override the host_index for a single
|
790
|
-
request; this effectively ignores the host_index
|
791
|
-
in the spec for a single request.
|
792
|
-
:type _host_index: int, optional
|
793
|
-
:return: Returns the result object.
|
794
|
-
""" # noqa: E501
|
795
|
-
|
796
|
-
_param = self._complete_multi_file_upload_serialize(
|
797
|
-
scan_id=scan_id,
|
798
|
-
_request_auth=_request_auth,
|
799
|
-
_content_type=_content_type,
|
800
|
-
_headers=_headers,
|
801
|
-
_host_index=_host_index
|
802
|
-
)
|
803
|
-
|
804
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
805
|
-
'200': "BeginMultiFileUpload200Response",
|
806
|
-
'400': None,
|
807
|
-
'422': "ValidationErrorModel",
|
808
|
-
}
|
809
|
-
response_data = self.api_client.call_api(
|
810
|
-
*_param,
|
811
|
-
_request_timeout=_request_timeout
|
812
|
-
)
|
813
|
-
return response_data.response
|
814
|
-
|
815
|
-
|
816
|
-
def _complete_multi_file_upload_serialize(
|
817
|
-
self,
|
818
|
-
scan_id,
|
819
|
-
_request_auth,
|
820
|
-
_content_type,
|
821
|
-
_headers,
|
822
|
-
_host_index,
|
823
|
-
) -> RequestSerialized:
|
824
|
-
|
825
|
-
_host = None
|
826
|
-
|
827
|
-
_collection_formats: Dict[str, str] = {
|
828
|
-
}
|
829
|
-
|
830
|
-
_path_params: Dict[str, str] = {}
|
831
|
-
_query_params: List[Tuple[str, str]] = []
|
832
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
833
|
-
_form_params: List[Tuple[str, str]] = []
|
834
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
835
|
-
_body_params: Optional[bytes] = None
|
836
|
-
|
837
|
-
# process the path parameters
|
838
|
-
if scan_id is not None:
|
839
|
-
_path_params['scan_id'] = scan_id
|
840
|
-
# process the query parameters
|
841
|
-
# process the header parameters
|
842
|
-
# process the form parameters
|
843
|
-
# process the body parameter
|
844
|
-
|
845
|
-
|
846
|
-
# set the HTTP header `Accept`
|
847
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
848
|
-
[
|
849
|
-
'application/json'
|
850
|
-
]
|
851
|
-
)
|
852
|
-
|
853
|
-
|
854
|
-
# authentication setting
|
855
|
-
_auth_settings: List[str] = [
|
856
|
-
'BearerAuth'
|
857
|
-
]
|
858
|
-
|
859
|
-
return self.api_client.param_serialize(
|
860
|
-
method='PATCH',
|
861
|
-
resource_path='/scan/v3/upload/{scan_id}',
|
862
|
-
path_params=_path_params,
|
863
|
-
query_params=_query_params,
|
864
|
-
header_params=_header_params,
|
865
|
-
body=_body_params,
|
866
|
-
post_params=_form_params,
|
867
|
-
files=_files,
|
868
|
-
auth_settings=_auth_settings,
|
869
|
-
collection_formats=_collection_formats,
|
870
|
-
_host=_host,
|
871
|
-
_request_auth=_request_auth
|
872
|
-
)
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
@validate_call
|
878
|
-
def complete_multipart_file_upload(
|
879
|
-
self,
|
880
|
-
scan_id: StrictStr,
|
881
|
-
file_id: StrictStr,
|
882
|
-
_request_timeout: Union[
|
883
|
-
None,
|
884
|
-
Annotated[StrictFloat, Field(gt=0)],
|
885
|
-
Tuple[
|
886
|
-
Annotated[StrictFloat, Field(gt=0)],
|
887
|
-
Annotated[StrictFloat, Field(gt=0)]
|
888
|
-
]
|
889
|
-
] = None,
|
890
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
891
|
-
_content_type: Optional[StrictStr] = None,
|
892
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
893
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
894
|
-
) -> BeginMultiFileUpload200Response:
|
895
|
-
"""Indicate that upload is completed for {file_id}
|
896
|
-
|
897
|
-
|
898
|
-
:param scan_id: (required)
|
899
|
-
:type scan_id: str
|
900
|
-
:param file_id: (required)
|
901
|
-
:type file_id: str
|
902
|
-
:param _request_timeout: timeout setting for this request. If one
|
903
|
-
number provided, it will be total request
|
904
|
-
timeout. It can also be a pair (tuple) of
|
905
|
-
(connection, read) timeouts.
|
906
|
-
:type _request_timeout: int, tuple(int, int), optional
|
907
|
-
:param _request_auth: set to override the auth_settings for an a single
|
908
|
-
request; this effectively ignores the
|
909
|
-
authentication in the spec for a single request.
|
910
|
-
:type _request_auth: dict, optional
|
911
|
-
:param _content_type: force content-type for the request.
|
912
|
-
:type _content_type: str, Optional
|
913
|
-
:param _headers: set to override the headers for a single
|
914
|
-
request; this effectively ignores the headers
|
915
|
-
in the spec for a single request.
|
916
|
-
:type _headers: dict, optional
|
917
|
-
:param _host_index: set to override the host_index for a single
|
918
|
-
request; this effectively ignores the host_index
|
919
|
-
in the spec for a single request.
|
920
|
-
:type _host_index: int, optional
|
921
|
-
:return: Returns the result object.
|
922
|
-
""" # noqa: E501
|
923
|
-
|
924
|
-
_param = self._complete_multipart_file_upload_serialize(
|
925
|
-
scan_id=scan_id,
|
926
|
-
file_id=file_id,
|
927
|
-
_request_auth=_request_auth,
|
928
|
-
_content_type=_content_type,
|
929
|
-
_headers=_headers,
|
930
|
-
_host_index=_host_index
|
931
|
-
)
|
932
|
-
|
933
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
934
|
-
'200': "BeginMultiFileUpload200Response",
|
935
|
-
'400': None,
|
936
|
-
'422': "ValidationErrorModel",
|
937
|
-
}
|
938
|
-
response_data = self.api_client.call_api(
|
939
|
-
*_param,
|
940
|
-
_request_timeout=_request_timeout
|
941
|
-
)
|
942
|
-
response_data.read()
|
943
|
-
return self.api_client.response_deserialize(
|
944
|
-
response_data=response_data,
|
945
|
-
response_types_map=_response_types_map,
|
946
|
-
).data
|
947
|
-
|
948
|
-
|
949
|
-
@validate_call
|
950
|
-
def complete_multipart_file_upload_with_http_info(
|
951
|
-
self,
|
952
|
-
scan_id: StrictStr,
|
953
|
-
file_id: StrictStr,
|
954
|
-
_request_timeout: Union[
|
955
|
-
None,
|
956
|
-
Annotated[StrictFloat, Field(gt=0)],
|
957
|
-
Tuple[
|
958
|
-
Annotated[StrictFloat, Field(gt=0)],
|
959
|
-
Annotated[StrictFloat, Field(gt=0)]
|
960
|
-
]
|
961
|
-
] = None,
|
962
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
963
|
-
_content_type: Optional[StrictStr] = None,
|
964
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
965
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
966
|
-
) -> ApiResponse[BeginMultiFileUpload200Response]:
|
967
|
-
"""Indicate that upload is completed for {file_id}
|
968
|
-
|
969
|
-
|
970
|
-
:param scan_id: (required)
|
971
|
-
:type scan_id: str
|
972
|
-
:param file_id: (required)
|
973
|
-
:type file_id: str
|
974
|
-
:param _request_timeout: timeout setting for this request. If one
|
975
|
-
number provided, it will be total request
|
976
|
-
timeout. It can also be a pair (tuple) of
|
977
|
-
(connection, read) timeouts.
|
978
|
-
:type _request_timeout: int, tuple(int, int), optional
|
979
|
-
:param _request_auth: set to override the auth_settings for an a single
|
980
|
-
request; this effectively ignores the
|
981
|
-
authentication in the spec for a single request.
|
982
|
-
:type _request_auth: dict, optional
|
983
|
-
:param _content_type: force content-type for the request.
|
984
|
-
:type _content_type: str, Optional
|
985
|
-
:param _headers: set to override the headers for a single
|
986
|
-
request; this effectively ignores the headers
|
987
|
-
in the spec for a single request.
|
988
|
-
:type _headers: dict, optional
|
989
|
-
:param _host_index: set to override the host_index for a single
|
990
|
-
request; this effectively ignores the host_index
|
991
|
-
in the spec for a single request.
|
992
|
-
:type _host_index: int, optional
|
993
|
-
:return: Returns the result object.
|
994
|
-
""" # noqa: E501
|
995
|
-
|
996
|
-
_param = self._complete_multipart_file_upload_serialize(
|
997
|
-
scan_id=scan_id,
|
998
|
-
file_id=file_id,
|
999
|
-
_request_auth=_request_auth,
|
1000
|
-
_content_type=_content_type,
|
1001
|
-
_headers=_headers,
|
1002
|
-
_host_index=_host_index
|
1003
|
-
)
|
1004
|
-
|
1005
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1006
|
-
'200': "BeginMultiFileUpload200Response",
|
1007
|
-
'400': None,
|
1008
|
-
'422': "ValidationErrorModel",
|
1009
|
-
}
|
1010
|
-
response_data = self.api_client.call_api(
|
1011
|
-
*_param,
|
1012
|
-
_request_timeout=_request_timeout
|
1013
|
-
)
|
1014
|
-
response_data.read()
|
1015
|
-
return self.api_client.response_deserialize(
|
1016
|
-
response_data=response_data,
|
1017
|
-
response_types_map=_response_types_map,
|
1018
|
-
)
|
1019
|
-
|
1020
|
-
|
1021
|
-
@validate_call
|
1022
|
-
def complete_multipart_file_upload_without_preload_content(
|
1023
|
-
self,
|
1024
|
-
scan_id: StrictStr,
|
1025
|
-
file_id: StrictStr,
|
1026
|
-
_request_timeout: Union[
|
1027
|
-
None,
|
1028
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1029
|
-
Tuple[
|
1030
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1031
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1032
|
-
]
|
1033
|
-
] = None,
|
1034
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1035
|
-
_content_type: Optional[StrictStr] = None,
|
1036
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1037
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1038
|
-
) -> RESTResponseType:
|
1039
|
-
"""Indicate that upload is completed for {file_id}
|
1040
|
-
|
1041
|
-
|
1042
|
-
:param scan_id: (required)
|
1043
|
-
:type scan_id: str
|
1044
|
-
:param file_id: (required)
|
1045
|
-
:type file_id: str
|
1046
|
-
:param _request_timeout: timeout setting for this request. If one
|
1047
|
-
number provided, it will be total request
|
1048
|
-
timeout. It can also be a pair (tuple) of
|
1049
|
-
(connection, read) timeouts.
|
1050
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1051
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1052
|
-
request; this effectively ignores the
|
1053
|
-
authentication in the spec for a single request.
|
1054
|
-
:type _request_auth: dict, optional
|
1055
|
-
:param _content_type: force content-type for the request.
|
1056
|
-
:type _content_type: str, Optional
|
1057
|
-
:param _headers: set to override the headers for a single
|
1058
|
-
request; this effectively ignores the headers
|
1059
|
-
in the spec for a single request.
|
1060
|
-
:type _headers: dict, optional
|
1061
|
-
:param _host_index: set to override the host_index for a single
|
1062
|
-
request; this effectively ignores the host_index
|
1063
|
-
in the spec for a single request.
|
1064
|
-
:type _host_index: int, optional
|
1065
|
-
:return: Returns the result object.
|
1066
|
-
""" # noqa: E501
|
1067
|
-
|
1068
|
-
_param = self._complete_multipart_file_upload_serialize(
|
1069
|
-
scan_id=scan_id,
|
1070
|
-
file_id=file_id,
|
1071
|
-
_request_auth=_request_auth,
|
1072
|
-
_content_type=_content_type,
|
1073
|
-
_headers=_headers,
|
1074
|
-
_host_index=_host_index
|
1075
|
-
)
|
1076
|
-
|
1077
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1078
|
-
'200': "BeginMultiFileUpload200Response",
|
1079
|
-
'400': None,
|
1080
|
-
'422': "ValidationErrorModel",
|
1081
|
-
}
|
1082
|
-
response_data = self.api_client.call_api(
|
1083
|
-
*_param,
|
1084
|
-
_request_timeout=_request_timeout
|
1085
|
-
)
|
1086
|
-
return response_data.response
|
1087
|
-
|
1088
|
-
|
1089
|
-
def _complete_multipart_file_upload_serialize(
|
1090
|
-
self,
|
1091
|
-
scan_id,
|
1092
|
-
file_id,
|
1093
|
-
_request_auth,
|
1094
|
-
_content_type,
|
1095
|
-
_headers,
|
1096
|
-
_host_index,
|
1097
|
-
) -> RequestSerialized:
|
1098
|
-
|
1099
|
-
_host = None
|
1100
|
-
|
1101
|
-
_collection_formats: Dict[str, str] = {
|
1102
|
-
}
|
1103
|
-
|
1104
|
-
_path_params: Dict[str, str] = {}
|
1105
|
-
_query_params: List[Tuple[str, str]] = []
|
1106
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1107
|
-
_form_params: List[Tuple[str, str]] = []
|
1108
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
1109
|
-
_body_params: Optional[bytes] = None
|
1110
|
-
|
1111
|
-
# process the path parameters
|
1112
|
-
if scan_id is not None:
|
1113
|
-
_path_params['scan_id'] = scan_id
|
1114
|
-
if file_id is not None:
|
1115
|
-
_path_params['file_id'] = file_id
|
1116
|
-
# process the query parameters
|
1117
|
-
# process the header parameters
|
1118
|
-
# process the form parameters
|
1119
|
-
# process the body parameter
|
1120
|
-
|
1121
|
-
|
1122
|
-
# set the HTTP header `Accept`
|
1123
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1124
|
-
[
|
1125
|
-
'application/json'
|
1126
|
-
]
|
1127
|
-
)
|
1128
|
-
|
1129
|
-
|
1130
|
-
# authentication setting
|
1131
|
-
_auth_settings: List[str] = [
|
1132
|
-
'BearerAuth'
|
1133
|
-
]
|
1134
|
-
|
1135
|
-
return self.api_client.param_serialize(
|
1136
|
-
method='PATCH',
|
1137
|
-
resource_path='/scan/v3/upload/{scan_id}/file/{file_id}',
|
1138
|
-
path_params=_path_params,
|
1139
|
-
query_params=_query_params,
|
1140
|
-
header_params=_header_params,
|
1141
|
-
body=_body_params,
|
1142
|
-
post_params=_form_params,
|
1143
|
-
files=_files,
|
1144
|
-
auth_settings=_auth_settings,
|
1145
|
-
collection_formats=_collection_formats,
|
1146
|
-
_host=_host,
|
1147
|
-
_request_auth=_request_auth
|
1148
|
-
)
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
@validate_call
|
1154
|
-
def create_scan_job(
|
1155
|
-
self,
|
1156
|
-
scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
|
1157
|
-
_request_timeout: Union[
|
1158
|
-
None,
|
1159
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1160
|
-
Tuple[
|
1161
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1162
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1163
|
-
]
|
1164
|
-
] = None,
|
1165
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1166
|
-
_content_type: Optional[StrictStr] = None,
|
1167
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1168
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1169
|
-
) -> ScanReportV3:
|
1170
|
-
"""Request a Model Scan Job
|
1171
|
-
|
1172
|
-
|
1173
|
-
:param scan_job: Request body for create scan request (required)
|
1174
|
-
:type scan_job: ScanJob
|
1175
|
-
:param _request_timeout: timeout setting for this request. If one
|
1176
|
-
number provided, it will be total request
|
1177
|
-
timeout. It can also be a pair (tuple) of
|
1178
|
-
(connection, read) timeouts.
|
1179
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1180
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1181
|
-
request; this effectively ignores the
|
1182
|
-
authentication in the spec for a single request.
|
1183
|
-
:type _request_auth: dict, optional
|
1184
|
-
:param _content_type: force content-type for the request.
|
1185
|
-
:type _content_type: str, Optional
|
1186
|
-
:param _headers: set to override the headers for a single
|
1187
|
-
request; this effectively ignores the headers
|
1188
|
-
in the spec for a single request.
|
1189
|
-
:type _headers: dict, optional
|
1190
|
-
:param _host_index: set to override the host_index for a single
|
1191
|
-
request; this effectively ignores the host_index
|
1192
|
-
in the spec for a single request.
|
1193
|
-
:type _host_index: int, optional
|
1194
|
-
:return: Returns the result object.
|
1195
|
-
""" # noqa: E501
|
1196
|
-
|
1197
|
-
_param = self._create_scan_job_serialize(
|
1198
|
-
scan_job=scan_job,
|
1199
|
-
_request_auth=_request_auth,
|
1200
|
-
_content_type=_content_type,
|
1201
|
-
_headers=_headers,
|
1202
|
-
_host_index=_host_index
|
1203
|
-
)
|
1204
|
-
|
1205
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1206
|
-
'201': "ScanReportV3",
|
1207
|
-
'400': None,
|
1208
|
-
'422': "ProblemDetails",
|
1209
|
-
}
|
1210
|
-
response_data = self.api_client.call_api(
|
1211
|
-
*_param,
|
1212
|
-
_request_timeout=_request_timeout
|
1213
|
-
)
|
1214
|
-
response_data.read()
|
1215
|
-
return self.api_client.response_deserialize(
|
1216
|
-
response_data=response_data,
|
1217
|
-
response_types_map=_response_types_map,
|
1218
|
-
).data
|
1219
|
-
|
1220
|
-
|
1221
|
-
@validate_call
|
1222
|
-
def create_scan_job_with_http_info(
|
1223
|
-
self,
|
1224
|
-
scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
|
1225
|
-
_request_timeout: Union[
|
1226
|
-
None,
|
1227
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1228
|
-
Tuple[
|
1229
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1230
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1231
|
-
]
|
1232
|
-
] = None,
|
1233
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1234
|
-
_content_type: Optional[StrictStr] = None,
|
1235
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1236
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1237
|
-
) -> ApiResponse[ScanReportV3]:
|
1238
|
-
"""Request a Model Scan Job
|
1239
|
-
|
1240
|
-
|
1241
|
-
:param scan_job: Request body for create scan request (required)
|
1242
|
-
:type scan_job: ScanJob
|
1243
|
-
:param _request_timeout: timeout setting for this request. If one
|
1244
|
-
number provided, it will be total request
|
1245
|
-
timeout. It can also be a pair (tuple) of
|
1246
|
-
(connection, read) timeouts.
|
1247
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1248
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1249
|
-
request; this effectively ignores the
|
1250
|
-
authentication in the spec for a single request.
|
1251
|
-
:type _request_auth: dict, optional
|
1252
|
-
:param _content_type: force content-type for the request.
|
1253
|
-
:type _content_type: str, Optional
|
1254
|
-
:param _headers: set to override the headers for a single
|
1255
|
-
request; this effectively ignores the headers
|
1256
|
-
in the spec for a single request.
|
1257
|
-
:type _headers: dict, optional
|
1258
|
-
:param _host_index: set to override the host_index for a single
|
1259
|
-
request; this effectively ignores the host_index
|
1260
|
-
in the spec for a single request.
|
1261
|
-
:type _host_index: int, optional
|
1262
|
-
:return: Returns the result object.
|
1263
|
-
""" # noqa: E501
|
1264
|
-
|
1265
|
-
_param = self._create_scan_job_serialize(
|
1266
|
-
scan_job=scan_job,
|
1267
|
-
_request_auth=_request_auth,
|
1268
|
-
_content_type=_content_type,
|
1269
|
-
_headers=_headers,
|
1270
|
-
_host_index=_host_index
|
1271
|
-
)
|
1272
|
-
|
1273
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1274
|
-
'201': "ScanReportV3",
|
1275
|
-
'400': None,
|
1276
|
-
'422': "ProblemDetails",
|
1277
|
-
}
|
1278
|
-
response_data = self.api_client.call_api(
|
1279
|
-
*_param,
|
1280
|
-
_request_timeout=_request_timeout
|
1281
|
-
)
|
1282
|
-
response_data.read()
|
1283
|
-
return self.api_client.response_deserialize(
|
1284
|
-
response_data=response_data,
|
1285
|
-
response_types_map=_response_types_map,
|
1286
|
-
)
|
1287
|
-
|
1288
|
-
|
1289
|
-
@validate_call
|
1290
|
-
def create_scan_job_without_preload_content(
|
1291
|
-
self,
|
1292
|
-
scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
|
1293
|
-
_request_timeout: Union[
|
1294
|
-
None,
|
1295
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1296
|
-
Tuple[
|
1297
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1298
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1299
|
-
]
|
1300
|
-
] = None,
|
1301
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1302
|
-
_content_type: Optional[StrictStr] = None,
|
1303
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1304
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1305
|
-
) -> RESTResponseType:
|
1306
|
-
"""Request a Model Scan Job
|
1307
|
-
|
1308
|
-
|
1309
|
-
:param scan_job: Request body for create scan request (required)
|
1310
|
-
:type scan_job: ScanJob
|
1311
|
-
:param _request_timeout: timeout setting for this request. If one
|
1312
|
-
number provided, it will be total request
|
1313
|
-
timeout. It can also be a pair (tuple) of
|
1314
|
-
(connection, read) timeouts.
|
1315
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1316
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1317
|
-
request; this effectively ignores the
|
1318
|
-
authentication in the spec for a single request.
|
1319
|
-
:type _request_auth: dict, optional
|
1320
|
-
:param _content_type: force content-type for the request.
|
1321
|
-
:type _content_type: str, Optional
|
1322
|
-
:param _headers: set to override the headers for a single
|
1323
|
-
request; this effectively ignores the headers
|
1324
|
-
in the spec for a single request.
|
1325
|
-
:type _headers: dict, optional
|
1326
|
-
:param _host_index: set to override the host_index for a single
|
1327
|
-
request; this effectively ignores the host_index
|
1328
|
-
in the spec for a single request.
|
1329
|
-
:type _host_index: int, optional
|
1330
|
-
:return: Returns the result object.
|
1331
|
-
""" # noqa: E501
|
1332
|
-
|
1333
|
-
_param = self._create_scan_job_serialize(
|
1334
|
-
scan_job=scan_job,
|
1335
|
-
_request_auth=_request_auth,
|
1336
|
-
_content_type=_content_type,
|
1337
|
-
_headers=_headers,
|
1338
|
-
_host_index=_host_index
|
1339
|
-
)
|
1340
|
-
|
1341
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1342
|
-
'201': "ScanReportV3",
|
1343
|
-
'400': None,
|
1344
|
-
'422': "ProblemDetails",
|
1345
|
-
}
|
1346
|
-
response_data = self.api_client.call_api(
|
1347
|
-
*_param,
|
1348
|
-
_request_timeout=_request_timeout
|
1349
|
-
)
|
1350
|
-
return response_data.response
|
1351
|
-
|
1352
|
-
|
1353
|
-
def _create_scan_job_serialize(
|
1354
|
-
self,
|
1355
|
-
scan_job,
|
1356
|
-
_request_auth,
|
1357
|
-
_content_type,
|
1358
|
-
_headers,
|
1359
|
-
_host_index,
|
1360
|
-
) -> RequestSerialized:
|
1361
|
-
|
1362
|
-
_host = None
|
1363
|
-
|
1364
|
-
_collection_formats: Dict[str, str] = {
|
1365
|
-
}
|
1366
|
-
|
1367
|
-
_path_params: Dict[str, str] = {}
|
1368
|
-
_query_params: List[Tuple[str, str]] = []
|
1369
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1370
|
-
_form_params: List[Tuple[str, str]] = []
|
1371
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
1372
|
-
_body_params: Optional[bytes] = None
|
1373
|
-
|
1374
|
-
# process the path parameters
|
1375
|
-
# process the query parameters
|
1376
|
-
# process the header parameters
|
1377
|
-
# process the form parameters
|
1378
|
-
# process the body parameter
|
1379
|
-
if scan_job is not None:
|
1380
|
-
_body_params = scan_job
|
1381
|
-
|
1382
|
-
|
1383
|
-
# set the HTTP header `Accept`
|
1384
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1385
|
-
[
|
1386
|
-
'application/json; charset=utf-8',
|
1387
|
-
'application/json'
|
1388
|
-
]
|
1389
|
-
)
|
1390
|
-
|
1391
|
-
# set the HTTP header `Content-Type`
|
1392
|
-
if _content_type:
|
1393
|
-
_header_params['Content-Type'] = _content_type
|
1394
|
-
else:
|
1395
|
-
_default_content_type = (
|
1396
|
-
self.api_client.select_header_content_type(
|
1397
|
-
[
|
1398
|
-
'application/json; charset=utf-8',
|
1399
|
-
'application/octet-stream'
|
1400
|
-
]
|
1401
|
-
)
|
1402
|
-
)
|
1403
|
-
if _default_content_type is not None:
|
1404
|
-
_header_params['Content-Type'] = _default_content_type
|
1405
|
-
|
1406
|
-
# authentication setting
|
1407
|
-
_auth_settings: List[str] = [
|
1408
|
-
'BearerAuth'
|
1409
|
-
]
|
1410
|
-
|
1411
|
-
return self.api_client.param_serialize(
|
1412
|
-
method='POST',
|
1413
|
-
resource_path='/scan/v3/jobs',
|
1414
|
-
path_params=_path_params,
|
1415
|
-
query_params=_query_params,
|
1416
|
-
header_params=_header_params,
|
1417
|
-
body=_body_params,
|
1418
|
-
post_params=_form_params,
|
1419
|
-
files=_files,
|
1420
|
-
auth_settings=_auth_settings,
|
1421
|
-
collection_formats=_collection_formats,
|
1422
|
-
_host=_host,
|
1423
|
-
_request_auth=_request_auth
|
1424
|
-
)
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
@validate_call
|
1430
|
-
def get_condensed_model_scan_reports(
|
1431
|
-
self,
|
1432
|
-
model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
|
1433
|
-
model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
|
1434
|
-
start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
|
1435
|
-
end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
|
1436
|
-
severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
|
1437
|
-
status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
|
1438
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1439
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1440
|
-
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
|
1441
|
-
latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
|
1442
|
-
_request_timeout: Union[
|
1443
|
-
None,
|
1444
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1445
|
-
Tuple[
|
1446
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1447
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1448
|
-
]
|
1449
|
-
] = None,
|
1450
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1451
|
-
_content_type: Optional[StrictStr] = None,
|
1452
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1453
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1454
|
-
) -> GetCondensedModelScanReports200Response:
|
1455
|
-
"""Get condensed reports for a Model Scan
|
1456
|
-
|
1457
|
-
|
1458
|
-
:param model_version_ids: Model Version ID
|
1459
|
-
:type model_version_ids: List[str]
|
1460
|
-
:param model_ids: Model ID
|
1461
|
-
:type model_ids: List[str]
|
1462
|
-
:param start_time: Start Time
|
1463
|
-
:type start_time: datetime
|
1464
|
-
:param end_time: End Time
|
1465
|
-
:type end_time: datetime
|
1466
|
-
:param severity: Severities
|
1467
|
-
:type severity: List[str]
|
1468
|
-
:param status: Statuses
|
1469
|
-
:type status: List[str]
|
1470
|
-
:param limit:
|
1471
|
-
:type limit: int
|
1472
|
-
:param offset:
|
1473
|
-
:type offset: int
|
1474
|
-
:param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
|
1475
|
-
:type sort: str
|
1476
|
-
:param latest_per_model_version_only: only return latest result per model version
|
1477
|
-
:type latest_per_model_version_only: bool
|
1478
|
-
:param _request_timeout: timeout setting for this request. If one
|
1479
|
-
number provided, it will be total request
|
1480
|
-
timeout. It can also be a pair (tuple) of
|
1481
|
-
(connection, read) timeouts.
|
1482
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1483
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1484
|
-
request; this effectively ignores the
|
1485
|
-
authentication in the spec for a single request.
|
1486
|
-
:type _request_auth: dict, optional
|
1487
|
-
:param _content_type: force content-type for the request.
|
1488
|
-
:type _content_type: str, Optional
|
1489
|
-
:param _headers: set to override the headers for a single
|
1490
|
-
request; this effectively ignores the headers
|
1491
|
-
in the spec for a single request.
|
1492
|
-
:type _headers: dict, optional
|
1493
|
-
:param _host_index: set to override the host_index for a single
|
1494
|
-
request; this effectively ignores the host_index
|
1495
|
-
in the spec for a single request.
|
1496
|
-
:type _host_index: int, optional
|
1497
|
-
:return: Returns the result object.
|
1498
|
-
""" # noqa: E501
|
1499
|
-
|
1500
|
-
_param = self._get_condensed_model_scan_reports_serialize(
|
1501
|
-
model_version_ids=model_version_ids,
|
1502
|
-
model_ids=model_ids,
|
1503
|
-
start_time=start_time,
|
1504
|
-
end_time=end_time,
|
1505
|
-
severity=severity,
|
1506
|
-
status=status,
|
1507
|
-
limit=limit,
|
1508
|
-
offset=offset,
|
1509
|
-
sort=sort,
|
1510
|
-
latest_per_model_version_only=latest_per_model_version_only,
|
1511
|
-
_request_auth=_request_auth,
|
1512
|
-
_content_type=_content_type,
|
1513
|
-
_headers=_headers,
|
1514
|
-
_host_index=_host_index
|
1515
|
-
)
|
1516
|
-
|
1517
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1518
|
-
'200': "GetCondensedModelScanReports200Response",
|
1519
|
-
'400': None,
|
1520
|
-
'404': None,
|
1521
|
-
}
|
1522
|
-
response_data = self.api_client.call_api(
|
1523
|
-
*_param,
|
1524
|
-
_request_timeout=_request_timeout
|
1525
|
-
)
|
1526
|
-
response_data.read()
|
1527
|
-
return self.api_client.response_deserialize(
|
1528
|
-
response_data=response_data,
|
1529
|
-
response_types_map=_response_types_map,
|
1530
|
-
).data
|
1531
|
-
|
1532
|
-
|
1533
|
-
@validate_call
|
1534
|
-
def get_condensed_model_scan_reports_with_http_info(
|
1535
|
-
self,
|
1536
|
-
model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
|
1537
|
-
model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
|
1538
|
-
start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
|
1539
|
-
end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
|
1540
|
-
severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
|
1541
|
-
status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
|
1542
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1543
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1544
|
-
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
|
1545
|
-
latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
|
1546
|
-
_request_timeout: Union[
|
1547
|
-
None,
|
1548
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1549
|
-
Tuple[
|
1550
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1551
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1552
|
-
]
|
1553
|
-
] = None,
|
1554
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1555
|
-
_content_type: Optional[StrictStr] = None,
|
1556
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1557
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1558
|
-
) -> ApiResponse[GetCondensedModelScanReports200Response]:
|
1559
|
-
"""Get condensed reports for a Model Scan
|
1560
|
-
|
1561
|
-
|
1562
|
-
:param model_version_ids: Model Version ID
|
1563
|
-
:type model_version_ids: List[str]
|
1564
|
-
:param model_ids: Model ID
|
1565
|
-
:type model_ids: List[str]
|
1566
|
-
:param start_time: Start Time
|
1567
|
-
:type start_time: datetime
|
1568
|
-
:param end_time: End Time
|
1569
|
-
:type end_time: datetime
|
1570
|
-
:param severity: Severities
|
1571
|
-
:type severity: List[str]
|
1572
|
-
:param status: Statuses
|
1573
|
-
:type status: List[str]
|
1574
|
-
:param limit:
|
1575
|
-
:type limit: int
|
1576
|
-
:param offset:
|
1577
|
-
:type offset: int
|
1578
|
-
:param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
|
1579
|
-
:type sort: str
|
1580
|
-
:param latest_per_model_version_only: only return latest result per model version
|
1581
|
-
:type latest_per_model_version_only: bool
|
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_condensed_model_scan_reports_serialize(
|
1605
|
-
model_version_ids=model_version_ids,
|
1606
|
-
model_ids=model_ids,
|
1607
|
-
start_time=start_time,
|
1608
|
-
end_time=end_time,
|
1609
|
-
severity=severity,
|
1610
|
-
status=status,
|
1611
|
-
limit=limit,
|
1612
|
-
offset=offset,
|
1613
|
-
sort=sort,
|
1614
|
-
latest_per_model_version_only=latest_per_model_version_only,
|
1615
|
-
_request_auth=_request_auth,
|
1616
|
-
_content_type=_content_type,
|
1617
|
-
_headers=_headers,
|
1618
|
-
_host_index=_host_index
|
1619
|
-
)
|
1620
|
-
|
1621
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1622
|
-
'200': "GetCondensedModelScanReports200Response",
|
1623
|
-
'400': None,
|
1624
|
-
'404': None,
|
1625
|
-
}
|
1626
|
-
response_data = self.api_client.call_api(
|
1627
|
-
*_param,
|
1628
|
-
_request_timeout=_request_timeout
|
1629
|
-
)
|
1630
|
-
response_data.read()
|
1631
|
-
return self.api_client.response_deserialize(
|
1632
|
-
response_data=response_data,
|
1633
|
-
response_types_map=_response_types_map,
|
1634
|
-
)
|
1635
|
-
|
1636
|
-
|
1637
|
-
@validate_call
|
1638
|
-
def get_condensed_model_scan_reports_without_preload_content(
|
1639
|
-
self,
|
1640
|
-
model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
|
1641
|
-
model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
|
1642
|
-
start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
|
1643
|
-
end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
|
1644
|
-
severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
|
1645
|
-
status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
|
1646
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1647
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1648
|
-
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
|
1649
|
-
latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
|
1650
|
-
_request_timeout: Union[
|
1651
|
-
None,
|
1652
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1653
|
-
Tuple[
|
1654
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1655
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1656
|
-
]
|
1657
|
-
] = None,
|
1658
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1659
|
-
_content_type: Optional[StrictStr] = None,
|
1660
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1661
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1662
|
-
) -> RESTResponseType:
|
1663
|
-
"""Get condensed reports for a Model Scan
|
1664
|
-
|
1665
|
-
|
1666
|
-
:param model_version_ids: Model Version ID
|
1667
|
-
:type model_version_ids: List[str]
|
1668
|
-
:param model_ids: Model ID
|
1669
|
-
:type model_ids: List[str]
|
1670
|
-
:param start_time: Start Time
|
1671
|
-
:type start_time: datetime
|
1672
|
-
:param end_time: End Time
|
1673
|
-
:type end_time: datetime
|
1674
|
-
:param severity: Severities
|
1675
|
-
:type severity: List[str]
|
1676
|
-
:param status: Statuses
|
1677
|
-
:type status: List[str]
|
1678
|
-
:param limit:
|
1679
|
-
:type limit: int
|
1680
|
-
:param offset:
|
1681
|
-
:type offset: int
|
1682
|
-
:param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
|
1683
|
-
:type sort: str
|
1684
|
-
:param latest_per_model_version_only: only return latest result per model version
|
1685
|
-
:type latest_per_model_version_only: bool
|
1686
|
-
:param _request_timeout: timeout setting for this request. If one
|
1687
|
-
number provided, it will be total request
|
1688
|
-
timeout. It can also be a pair (tuple) of
|
1689
|
-
(connection, read) timeouts.
|
1690
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1691
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1692
|
-
request; this effectively ignores the
|
1693
|
-
authentication in the spec for a single request.
|
1694
|
-
:type _request_auth: dict, optional
|
1695
|
-
:param _content_type: force content-type for the request.
|
1696
|
-
:type _content_type: str, Optional
|
1697
|
-
:param _headers: set to override the headers for a single
|
1698
|
-
request; this effectively ignores the headers
|
1699
|
-
in the spec for a single request.
|
1700
|
-
:type _headers: dict, optional
|
1701
|
-
:param _host_index: set to override the host_index for a single
|
1702
|
-
request; this effectively ignores the host_index
|
1703
|
-
in the spec for a single request.
|
1704
|
-
:type _host_index: int, optional
|
1705
|
-
:return: Returns the result object.
|
1706
|
-
""" # noqa: E501
|
1707
|
-
|
1708
|
-
_param = self._get_condensed_model_scan_reports_serialize(
|
1709
|
-
model_version_ids=model_version_ids,
|
1710
|
-
model_ids=model_ids,
|
1711
|
-
start_time=start_time,
|
1712
|
-
end_time=end_time,
|
1713
|
-
severity=severity,
|
1714
|
-
status=status,
|
1715
|
-
limit=limit,
|
1716
|
-
offset=offset,
|
1717
|
-
sort=sort,
|
1718
|
-
latest_per_model_version_only=latest_per_model_version_only,
|
1719
|
-
_request_auth=_request_auth,
|
1720
|
-
_content_type=_content_type,
|
1721
|
-
_headers=_headers,
|
1722
|
-
_host_index=_host_index
|
1723
|
-
)
|
1724
|
-
|
1725
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1726
|
-
'200': "GetCondensedModelScanReports200Response",
|
1727
|
-
'400': None,
|
1728
|
-
'404': None,
|
1729
|
-
}
|
1730
|
-
response_data = self.api_client.call_api(
|
1731
|
-
*_param,
|
1732
|
-
_request_timeout=_request_timeout
|
1733
|
-
)
|
1734
|
-
return response_data.response
|
1735
|
-
|
1736
|
-
|
1737
|
-
def _get_condensed_model_scan_reports_serialize(
|
1738
|
-
self,
|
1739
|
-
model_version_ids,
|
1740
|
-
model_ids,
|
1741
|
-
start_time,
|
1742
|
-
end_time,
|
1743
|
-
severity,
|
1744
|
-
status,
|
1745
|
-
limit,
|
1746
|
-
offset,
|
1747
|
-
sort,
|
1748
|
-
latest_per_model_version_only,
|
1749
|
-
_request_auth,
|
1750
|
-
_content_type,
|
1751
|
-
_headers,
|
1752
|
-
_host_index,
|
1753
|
-
) -> RequestSerialized:
|
1754
|
-
|
1755
|
-
_host = None
|
1756
|
-
|
1757
|
-
_collection_formats: Dict[str, str] = {
|
1758
|
-
'model_version_ids': 'csv',
|
1759
|
-
'model_ids': 'csv',
|
1760
|
-
'severity': 'csv',
|
1761
|
-
'status': 'csv',
|
1762
|
-
}
|
1763
|
-
|
1764
|
-
_path_params: Dict[str, str] = {}
|
1765
|
-
_query_params: List[Tuple[str, str]] = []
|
1766
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1767
|
-
_form_params: List[Tuple[str, str]] = []
|
1768
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
1769
|
-
_body_params: Optional[bytes] = None
|
1770
|
-
|
1771
|
-
# process the path parameters
|
1772
|
-
# process the query parameters
|
1773
|
-
if model_version_ids is not None:
|
1774
|
-
|
1775
|
-
_query_params.append(('model_version_ids', model_version_ids))
|
1776
|
-
|
1777
|
-
if model_ids is not None:
|
1778
|
-
|
1779
|
-
_query_params.append(('model_ids', model_ids))
|
1780
|
-
|
1781
|
-
if start_time is not None:
|
1782
|
-
if isinstance(start_time, datetime):
|
1783
|
-
_query_params.append(
|
1784
|
-
(
|
1785
|
-
'start_time',
|
1786
|
-
start_time.strftime(
|
1787
|
-
self.api_client.configuration.datetime_format
|
1788
|
-
)
|
1789
|
-
)
|
1790
|
-
)
|
1791
|
-
else:
|
1792
|
-
_query_params.append(('start_time', start_time))
|
1793
|
-
|
1794
|
-
if end_time is not None:
|
1795
|
-
if isinstance(end_time, datetime):
|
1796
|
-
_query_params.append(
|
1797
|
-
(
|
1798
|
-
'end_time',
|
1799
|
-
end_time.strftime(
|
1800
|
-
self.api_client.configuration.datetime_format
|
1801
|
-
)
|
1802
|
-
)
|
1803
|
-
)
|
1804
|
-
else:
|
1805
|
-
_query_params.append(('end_time', end_time))
|
1806
|
-
|
1807
|
-
if severity is not None:
|
1808
|
-
|
1809
|
-
_query_params.append(('severity', severity))
|
1810
|
-
|
1811
|
-
if status is not None:
|
1812
|
-
|
1813
|
-
_query_params.append(('status', status))
|
1814
|
-
|
1815
|
-
if limit is not None:
|
1816
|
-
|
1817
|
-
_query_params.append(('limit', limit))
|
1818
|
-
|
1819
|
-
if offset is not None:
|
1820
|
-
|
1821
|
-
_query_params.append(('offset', offset))
|
1822
|
-
|
1823
|
-
if sort is not None:
|
1824
|
-
|
1825
|
-
_query_params.append(('sort', sort))
|
1826
|
-
|
1827
|
-
if latest_per_model_version_only is not None:
|
1828
|
-
|
1829
|
-
_query_params.append(('latest_per_model_version_only', latest_per_model_version_only))
|
1830
|
-
|
1831
|
-
# process the header parameters
|
1832
|
-
# process the form parameters
|
1833
|
-
# process the body parameter
|
1834
|
-
|
1835
|
-
|
1836
|
-
# set the HTTP header `Accept`
|
1837
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1838
|
-
[
|
1839
|
-
'application/json; charset=utf-8'
|
1840
|
-
]
|
1841
|
-
)
|
1842
|
-
|
1843
|
-
|
1844
|
-
# authentication setting
|
1845
|
-
_auth_settings: List[str] = [
|
1846
|
-
'BearerAuth'
|
1847
|
-
]
|
1848
|
-
|
1849
|
-
return self.api_client.param_serialize(
|
1850
|
-
method='GET',
|
1851
|
-
resource_path='/scan/v3/results',
|
1852
|
-
path_params=_path_params,
|
1853
|
-
query_params=_query_params,
|
1854
|
-
header_params=_header_params,
|
1855
|
-
body=_body_params,
|
1856
|
-
post_params=_form_params,
|
1857
|
-
files=_files,
|
1858
|
-
auth_settings=_auth_settings,
|
1859
|
-
collection_formats=_collection_formats,
|
1860
|
-
_host=_host,
|
1861
|
-
_request_auth=_request_auth
|
1862
|
-
)
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
@validate_call
|
1868
|
-
def get_scan_jobs(
|
1869
|
-
self,
|
1870
|
-
_request_timeout: Union[
|
1871
|
-
None,
|
1872
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1873
|
-
Tuple[
|
1874
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1875
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1876
|
-
]
|
1877
|
-
] = None,
|
1878
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1879
|
-
_content_type: Optional[StrictStr] = None,
|
1880
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1881
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1882
|
-
) -> ScanJob:
|
1883
|
-
"""List all Model Scan Jobs
|
1884
|
-
|
1885
|
-
|
1886
|
-
:param _request_timeout: timeout setting for this request. If one
|
1887
|
-
number provided, it will be total request
|
1888
|
-
timeout. It can also be a pair (tuple) of
|
1889
|
-
(connection, read) timeouts.
|
1890
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1891
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1892
|
-
request; this effectively ignores the
|
1893
|
-
authentication in the spec for a single request.
|
1894
|
-
:type _request_auth: dict, optional
|
1895
|
-
:param _content_type: force content-type for the request.
|
1896
|
-
:type _content_type: str, Optional
|
1897
|
-
:param _headers: set to override the headers for a single
|
1898
|
-
request; this effectively ignores the headers
|
1899
|
-
in the spec for a single request.
|
1900
|
-
:type _headers: dict, optional
|
1901
|
-
:param _host_index: set to override the host_index for a single
|
1902
|
-
request; this effectively ignores the host_index
|
1903
|
-
in the spec for a single request.
|
1904
|
-
:type _host_index: int, optional
|
1905
|
-
:return: Returns the result object.
|
1906
|
-
""" # noqa: E501
|
1907
|
-
|
1908
|
-
_param = self._get_scan_jobs_serialize(
|
1909
|
-
_request_auth=_request_auth,
|
1910
|
-
_content_type=_content_type,
|
1911
|
-
_headers=_headers,
|
1912
|
-
_host_index=_host_index
|
1913
|
-
)
|
1914
|
-
|
1915
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1916
|
-
'200': "ScanJob",
|
1917
|
-
'400': None,
|
1918
|
-
'404': None,
|
1919
|
-
}
|
1920
|
-
response_data = self.api_client.call_api(
|
1921
|
-
*_param,
|
1922
|
-
_request_timeout=_request_timeout
|
1923
|
-
)
|
1924
|
-
response_data.read()
|
1925
|
-
return self.api_client.response_deserialize(
|
1926
|
-
response_data=response_data,
|
1927
|
-
response_types_map=_response_types_map,
|
1928
|
-
).data
|
1929
|
-
|
1930
|
-
|
1931
|
-
@validate_call
|
1932
|
-
def get_scan_jobs_with_http_info(
|
1933
|
-
self,
|
1934
|
-
_request_timeout: Union[
|
1935
|
-
None,
|
1936
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1937
|
-
Tuple[
|
1938
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1939
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1940
|
-
]
|
1941
|
-
] = None,
|
1942
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1943
|
-
_content_type: Optional[StrictStr] = None,
|
1944
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1945
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1946
|
-
) -> ApiResponse[ScanJob]:
|
1947
|
-
"""List all Model Scan Jobs
|
1948
|
-
|
1949
|
-
|
1950
|
-
:param _request_timeout: timeout setting for this request. If one
|
1951
|
-
number provided, it will be total request
|
1952
|
-
timeout. It can also be a pair (tuple) of
|
1953
|
-
(connection, read) timeouts.
|
1954
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1955
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1956
|
-
request; this effectively ignores the
|
1957
|
-
authentication in the spec for a single request.
|
1958
|
-
:type _request_auth: dict, optional
|
1959
|
-
:param _content_type: force content-type for the request.
|
1960
|
-
:type _content_type: str, Optional
|
1961
|
-
:param _headers: set to override the headers for a single
|
1962
|
-
request; this effectively ignores the headers
|
1963
|
-
in the spec for a single request.
|
1964
|
-
:type _headers: dict, optional
|
1965
|
-
:param _host_index: set to override the host_index for a single
|
1966
|
-
request; this effectively ignores the host_index
|
1967
|
-
in the spec for a single request.
|
1968
|
-
:type _host_index: int, optional
|
1969
|
-
:return: Returns the result object.
|
1970
|
-
""" # noqa: E501
|
1971
|
-
|
1972
|
-
_param = self._get_scan_jobs_serialize(
|
1973
|
-
_request_auth=_request_auth,
|
1974
|
-
_content_type=_content_type,
|
1975
|
-
_headers=_headers,
|
1976
|
-
_host_index=_host_index
|
1977
|
-
)
|
1978
|
-
|
1979
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1980
|
-
'200': "ScanJob",
|
1981
|
-
'400': None,
|
1982
|
-
'404': None,
|
1983
|
-
}
|
1984
|
-
response_data = self.api_client.call_api(
|
1985
|
-
*_param,
|
1986
|
-
_request_timeout=_request_timeout
|
1987
|
-
)
|
1988
|
-
response_data.read()
|
1989
|
-
return self.api_client.response_deserialize(
|
1990
|
-
response_data=response_data,
|
1991
|
-
response_types_map=_response_types_map,
|
1992
|
-
)
|
1993
|
-
|
1994
|
-
|
1995
|
-
@validate_call
|
1996
|
-
def get_scan_jobs_without_preload_content(
|
1997
|
-
self,
|
1998
|
-
_request_timeout: Union[
|
1999
|
-
None,
|
2000
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2001
|
-
Tuple[
|
2002
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2003
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2004
|
-
]
|
2005
|
-
] = None,
|
2006
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2007
|
-
_content_type: Optional[StrictStr] = None,
|
2008
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2009
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2010
|
-
) -> RESTResponseType:
|
2011
|
-
"""List all Model Scan Jobs
|
2012
|
-
|
2013
|
-
|
2014
|
-
:param _request_timeout: timeout setting for this request. If one
|
2015
|
-
number provided, it will be total request
|
2016
|
-
timeout. It can also be a pair (tuple) of
|
2017
|
-
(connection, read) timeouts.
|
2018
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2019
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2020
|
-
request; this effectively ignores the
|
2021
|
-
authentication in the spec for a single request.
|
2022
|
-
:type _request_auth: dict, optional
|
2023
|
-
:param _content_type: force content-type for the request.
|
2024
|
-
:type _content_type: str, Optional
|
2025
|
-
:param _headers: set to override the headers for a single
|
2026
|
-
request; this effectively ignores the headers
|
2027
|
-
in the spec for a single request.
|
2028
|
-
:type _headers: dict, optional
|
2029
|
-
:param _host_index: set to override the host_index for a single
|
2030
|
-
request; this effectively ignores the host_index
|
2031
|
-
in the spec for a single request.
|
2032
|
-
:type _host_index: int, optional
|
2033
|
-
:return: Returns the result object.
|
2034
|
-
""" # noqa: E501
|
2035
|
-
|
2036
|
-
_param = self._get_scan_jobs_serialize(
|
2037
|
-
_request_auth=_request_auth,
|
2038
|
-
_content_type=_content_type,
|
2039
|
-
_headers=_headers,
|
2040
|
-
_host_index=_host_index
|
2041
|
-
)
|
2042
|
-
|
2043
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2044
|
-
'200': "ScanJob",
|
2045
|
-
'400': None,
|
2046
|
-
'404': None,
|
2047
|
-
}
|
2048
|
-
response_data = self.api_client.call_api(
|
2049
|
-
*_param,
|
2050
|
-
_request_timeout=_request_timeout
|
2051
|
-
)
|
2052
|
-
return response_data.response
|
2053
|
-
|
2054
|
-
|
2055
|
-
def _get_scan_jobs_serialize(
|
2056
|
-
self,
|
2057
|
-
_request_auth,
|
2058
|
-
_content_type,
|
2059
|
-
_headers,
|
2060
|
-
_host_index,
|
2061
|
-
) -> RequestSerialized:
|
2062
|
-
|
2063
|
-
_host = None
|
2064
|
-
|
2065
|
-
_collection_formats: Dict[str, str] = {
|
2066
|
-
}
|
2067
|
-
|
2068
|
-
_path_params: Dict[str, str] = {}
|
2069
|
-
_query_params: List[Tuple[str, str]] = []
|
2070
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2071
|
-
_form_params: List[Tuple[str, str]] = []
|
2072
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
2073
|
-
_body_params: Optional[bytes] = None
|
2074
|
-
|
2075
|
-
# process the path parameters
|
2076
|
-
# process the query parameters
|
2077
|
-
# process the header parameters
|
2078
|
-
# process the form parameters
|
2079
|
-
# process the body parameter
|
2080
|
-
|
2081
|
-
|
2082
|
-
# set the HTTP header `Accept`
|
2083
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2084
|
-
[
|
2085
|
-
'application/json; charset=utf-8'
|
2086
|
-
]
|
2087
|
-
)
|
2088
|
-
|
2089
|
-
|
2090
|
-
# authentication setting
|
2091
|
-
_auth_settings: List[str] = [
|
2092
|
-
'BearerAuth'
|
2093
|
-
]
|
2094
|
-
|
2095
|
-
return self.api_client.param_serialize(
|
2096
|
-
method='GET',
|
2097
|
-
resource_path='/scan/v3/jobs',
|
2098
|
-
path_params=_path_params,
|
2099
|
-
query_params=_query_params,
|
2100
|
-
header_params=_header_params,
|
2101
|
-
body=_body_params,
|
2102
|
-
post_params=_form_params,
|
2103
|
-
files=_files,
|
2104
|
-
auth_settings=_auth_settings,
|
2105
|
-
collection_formats=_collection_formats,
|
2106
|
-
_host=_host,
|
2107
|
-
_request_auth=_request_auth
|
2108
|
-
)
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
@validate_call
|
2114
|
-
def get_scan_results(
|
2115
|
-
self,
|
2116
|
-
scan_id: StrictStr,
|
2117
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
2118
|
-
_request_timeout: Union[
|
2119
|
-
None,
|
2120
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2121
|
-
Tuple[
|
2122
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2123
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2124
|
-
]
|
2125
|
-
] = None,
|
2126
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2127
|
-
_content_type: Optional[StrictStr] = None,
|
2128
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2129
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2130
|
-
) -> ScanReportV3:
|
2131
|
-
"""Get Result of a Model Scan
|
2132
|
-
|
2133
|
-
|
2134
|
-
:param scan_id: (required)
|
2135
|
-
:type scan_id: str
|
2136
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
2137
|
-
:type has_detections: bool
|
2138
|
-
:param _request_timeout: timeout setting for this request. If one
|
2139
|
-
number provided, it will be total request
|
2140
|
-
timeout. It can also be a pair (tuple) of
|
2141
|
-
(connection, read) timeouts.
|
2142
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2143
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2144
|
-
request; this effectively ignores the
|
2145
|
-
authentication in the spec for a single request.
|
2146
|
-
:type _request_auth: dict, optional
|
2147
|
-
:param _content_type: force content-type for the request.
|
2148
|
-
:type _content_type: str, Optional
|
2149
|
-
:param _headers: set to override the headers for a single
|
2150
|
-
request; this effectively ignores the headers
|
2151
|
-
in the spec for a single request.
|
2152
|
-
:type _headers: dict, optional
|
2153
|
-
:param _host_index: set to override the host_index for a single
|
2154
|
-
request; this effectively ignores the host_index
|
2155
|
-
in the spec for a single request.
|
2156
|
-
:type _host_index: int, optional
|
2157
|
-
:return: Returns the result object.
|
2158
|
-
""" # noqa: E501
|
2159
|
-
|
2160
|
-
_param = self._get_scan_results_serialize(
|
2161
|
-
scan_id=scan_id,
|
2162
|
-
has_detections=has_detections,
|
2163
|
-
_request_auth=_request_auth,
|
2164
|
-
_content_type=_content_type,
|
2165
|
-
_headers=_headers,
|
2166
|
-
_host_index=_host_index
|
2167
|
-
)
|
2168
|
-
|
2169
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2170
|
-
'200': "ScanReportV3",
|
2171
|
-
'400': None,
|
2172
|
-
'404': None,
|
2173
|
-
}
|
2174
|
-
response_data = self.api_client.call_api(
|
2175
|
-
*_param,
|
2176
|
-
_request_timeout=_request_timeout
|
2177
|
-
)
|
2178
|
-
response_data.read()
|
2179
|
-
return self.api_client.response_deserialize(
|
2180
|
-
response_data=response_data,
|
2181
|
-
response_types_map=_response_types_map,
|
2182
|
-
).data
|
2183
|
-
|
2184
|
-
|
2185
|
-
@validate_call
|
2186
|
-
def get_scan_results_with_http_info(
|
2187
|
-
self,
|
2188
|
-
scan_id: StrictStr,
|
2189
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
2190
|
-
_request_timeout: Union[
|
2191
|
-
None,
|
2192
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2193
|
-
Tuple[
|
2194
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2195
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2196
|
-
]
|
2197
|
-
] = None,
|
2198
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2199
|
-
_content_type: Optional[StrictStr] = None,
|
2200
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2201
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2202
|
-
) -> ApiResponse[ScanReportV3]:
|
2203
|
-
"""Get Result of a Model Scan
|
2204
|
-
|
2205
|
-
|
2206
|
-
:param scan_id: (required)
|
2207
|
-
:type scan_id: str
|
2208
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
2209
|
-
:type has_detections: bool
|
2210
|
-
:param _request_timeout: timeout setting for this request. If one
|
2211
|
-
number provided, it will be total request
|
2212
|
-
timeout. It can also be a pair (tuple) of
|
2213
|
-
(connection, read) timeouts.
|
2214
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2215
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2216
|
-
request; this effectively ignores the
|
2217
|
-
authentication in the spec for a single request.
|
2218
|
-
:type _request_auth: dict, optional
|
2219
|
-
:param _content_type: force content-type for the request.
|
2220
|
-
:type _content_type: str, Optional
|
2221
|
-
:param _headers: set to override the headers for a single
|
2222
|
-
request; this effectively ignores the headers
|
2223
|
-
in the spec for a single request.
|
2224
|
-
:type _headers: dict, optional
|
2225
|
-
:param _host_index: set to override the host_index for a single
|
2226
|
-
request; this effectively ignores the host_index
|
2227
|
-
in the spec for a single request.
|
2228
|
-
:type _host_index: int, optional
|
2229
|
-
:return: Returns the result object.
|
2230
|
-
""" # noqa: E501
|
2231
|
-
|
2232
|
-
_param = self._get_scan_results_serialize(
|
2233
|
-
scan_id=scan_id,
|
2234
|
-
has_detections=has_detections,
|
2235
|
-
_request_auth=_request_auth,
|
2236
|
-
_content_type=_content_type,
|
2237
|
-
_headers=_headers,
|
2238
|
-
_host_index=_host_index
|
2239
|
-
)
|
2240
|
-
|
2241
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2242
|
-
'200': "ScanReportV3",
|
2243
|
-
'400': None,
|
2244
|
-
'404': None,
|
2245
|
-
}
|
2246
|
-
response_data = self.api_client.call_api(
|
2247
|
-
*_param,
|
2248
|
-
_request_timeout=_request_timeout
|
2249
|
-
)
|
2250
|
-
response_data.read()
|
2251
|
-
return self.api_client.response_deserialize(
|
2252
|
-
response_data=response_data,
|
2253
|
-
response_types_map=_response_types_map,
|
2254
|
-
)
|
2255
|
-
|
2256
|
-
|
2257
|
-
@validate_call
|
2258
|
-
def get_scan_results_without_preload_content(
|
2259
|
-
self,
|
2260
|
-
scan_id: StrictStr,
|
2261
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
2262
|
-
_request_timeout: Union[
|
2263
|
-
None,
|
2264
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2265
|
-
Tuple[
|
2266
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2267
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2268
|
-
]
|
2269
|
-
] = None,
|
2270
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2271
|
-
_content_type: Optional[StrictStr] = None,
|
2272
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2273
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2274
|
-
) -> RESTResponseType:
|
2275
|
-
"""Get Result of a Model Scan
|
2276
|
-
|
2277
|
-
|
2278
|
-
:param scan_id: (required)
|
2279
|
-
:type scan_id: str
|
2280
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
2281
|
-
:type has_detections: bool
|
2282
|
-
:param _request_timeout: timeout setting for this request. If one
|
2283
|
-
number provided, it will be total request
|
2284
|
-
timeout. It can also be a pair (tuple) of
|
2285
|
-
(connection, read) timeouts.
|
2286
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2287
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2288
|
-
request; this effectively ignores the
|
2289
|
-
authentication in the spec for a single request.
|
2290
|
-
:type _request_auth: dict, optional
|
2291
|
-
:param _content_type: force content-type for the request.
|
2292
|
-
:type _content_type: str, Optional
|
2293
|
-
:param _headers: set to override the headers for a single
|
2294
|
-
request; this effectively ignores the headers
|
2295
|
-
in the spec for a single request.
|
2296
|
-
:type _headers: dict, optional
|
2297
|
-
:param _host_index: set to override the host_index for a single
|
2298
|
-
request; this effectively ignores the host_index
|
2299
|
-
in the spec for a single request.
|
2300
|
-
:type _host_index: int, optional
|
2301
|
-
:return: Returns the result object.
|
2302
|
-
""" # noqa: E501
|
2303
|
-
|
2304
|
-
_param = self._get_scan_results_serialize(
|
2305
|
-
scan_id=scan_id,
|
2306
|
-
has_detections=has_detections,
|
2307
|
-
_request_auth=_request_auth,
|
2308
|
-
_content_type=_content_type,
|
2309
|
-
_headers=_headers,
|
2310
|
-
_host_index=_host_index
|
2311
|
-
)
|
2312
|
-
|
2313
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2314
|
-
'200': "ScanReportV3",
|
2315
|
-
'400': None,
|
2316
|
-
'404': None,
|
2317
|
-
}
|
2318
|
-
response_data = self.api_client.call_api(
|
2319
|
-
*_param,
|
2320
|
-
_request_timeout=_request_timeout
|
2321
|
-
)
|
2322
|
-
return response_data.response
|
2323
|
-
|
2324
|
-
|
2325
|
-
def _get_scan_results_serialize(
|
2326
|
-
self,
|
2327
|
-
scan_id,
|
2328
|
-
has_detections,
|
2329
|
-
_request_auth,
|
2330
|
-
_content_type,
|
2331
|
-
_headers,
|
2332
|
-
_host_index,
|
2333
|
-
) -> RequestSerialized:
|
2334
|
-
|
2335
|
-
_host = None
|
2336
|
-
|
2337
|
-
_collection_formats: Dict[str, str] = {
|
2338
|
-
}
|
2339
|
-
|
2340
|
-
_path_params: Dict[str, str] = {}
|
2341
|
-
_query_params: List[Tuple[str, str]] = []
|
2342
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2343
|
-
_form_params: List[Tuple[str, str]] = []
|
2344
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
2345
|
-
_body_params: Optional[bytes] = None
|
2346
|
-
|
2347
|
-
# process the path parameters
|
2348
|
-
if scan_id is not None:
|
2349
|
-
_path_params['scan_id'] = scan_id
|
2350
|
-
# process the query parameters
|
2351
|
-
if has_detections is not None:
|
2352
|
-
|
2353
|
-
_query_params.append(('has_detections', has_detections))
|
2354
|
-
|
2355
|
-
# process the header parameters
|
2356
|
-
# process the form parameters
|
2357
|
-
# process the body parameter
|
2358
|
-
|
2359
|
-
|
2360
|
-
# set the HTTP header `Accept`
|
2361
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2362
|
-
[
|
2363
|
-
'application/json; charset=utf-8',
|
2364
|
-
'application/sarif+json'
|
2365
|
-
]
|
2366
|
-
)
|
2367
|
-
|
2368
|
-
|
2369
|
-
# authentication setting
|
2370
|
-
_auth_settings: List[str] = [
|
2371
|
-
'BearerAuth'
|
2372
|
-
]
|
2373
|
-
|
2374
|
-
return self.api_client.param_serialize(
|
2375
|
-
method='GET',
|
2376
|
-
resource_path='/scan/v3/results/{scan_id}',
|
2377
|
-
path_params=_path_params,
|
2378
|
-
query_params=_query_params,
|
2379
|
-
header_params=_header_params,
|
2380
|
-
body=_body_params,
|
2381
|
-
post_params=_form_params,
|
2382
|
-
files=_files,
|
2383
|
-
auth_settings=_auth_settings,
|
2384
|
-
collection_formats=_collection_formats,
|
2385
|
-
_host=_host,
|
2386
|
-
_request_auth=_request_auth
|
2387
|
-
)
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
@validate_call
|
2393
|
-
def get_scan_results1(
|
2394
|
-
self,
|
2395
|
-
scan_id: StrictStr,
|
2396
|
-
cursor: Optional[StrictStr] = None,
|
2397
|
-
page_size: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
2398
|
-
_request_timeout: Union[
|
2399
|
-
None,
|
2400
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2401
|
-
Tuple[
|
2402
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2403
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2404
|
-
]
|
2405
|
-
] = None,
|
2406
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2407
|
-
_content_type: Optional[StrictStr] = None,
|
2408
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2409
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2410
|
-
) -> List[ScanResultsMapV3]:
|
2411
|
-
"""Retrieve Model Scan Results
|
2412
|
-
|
2413
|
-
|
2414
|
-
:param scan_id: (required)
|
2415
|
-
:type scan_id: str
|
2416
|
-
:param cursor:
|
2417
|
-
:type cursor: str
|
2418
|
-
:param page_size:
|
2419
|
-
:type page_size: int
|
2420
|
-
:param _request_timeout: timeout setting for this request. If one
|
2421
|
-
number provided, it will be total request
|
2422
|
-
timeout. It can also be a pair (tuple) of
|
2423
|
-
(connection, read) timeouts.
|
2424
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2425
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2426
|
-
request; this effectively ignores the
|
2427
|
-
authentication in the spec for a single request.
|
2428
|
-
:type _request_auth: dict, optional
|
2429
|
-
:param _content_type: force content-type for the request.
|
2430
|
-
:type _content_type: str, Optional
|
2431
|
-
:param _headers: set to override the headers for a single
|
2432
|
-
request; this effectively ignores the headers
|
2433
|
-
in the spec for a single request.
|
2434
|
-
:type _headers: dict, optional
|
2435
|
-
:param _host_index: set to override the host_index for a single
|
2436
|
-
request; this effectively ignores the host_index
|
2437
|
-
in the spec for a single request.
|
2438
|
-
:type _host_index: int, optional
|
2439
|
-
:return: Returns the result object.
|
2440
|
-
""" # noqa: E501
|
2441
|
-
|
2442
|
-
_param = self._get_scan_results1_serialize(
|
2443
|
-
scan_id=scan_id,
|
2444
|
-
cursor=cursor,
|
2445
|
-
page_size=page_size,
|
2446
|
-
_request_auth=_request_auth,
|
2447
|
-
_content_type=_content_type,
|
2448
|
-
_headers=_headers,
|
2449
|
-
_host_index=_host_index
|
2450
|
-
)
|
2451
|
-
|
2452
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2453
|
-
'200': "List[ScanResultsMapV3]",
|
2454
|
-
'400': None,
|
2455
|
-
'404': None,
|
2456
|
-
'405': None,
|
2457
|
-
}
|
2458
|
-
response_data = self.api_client.call_api(
|
2459
|
-
*_param,
|
2460
|
-
_request_timeout=_request_timeout
|
2461
|
-
)
|
2462
|
-
response_data.read()
|
2463
|
-
return self.api_client.response_deserialize(
|
2464
|
-
response_data=response_data,
|
2465
|
-
response_types_map=_response_types_map,
|
2466
|
-
).data
|
2467
|
-
|
2468
|
-
|
2469
|
-
@validate_call
|
2470
|
-
def get_scan_results1_with_http_info(
|
2471
|
-
self,
|
2472
|
-
scan_id: StrictStr,
|
2473
|
-
cursor: Optional[StrictStr] = None,
|
2474
|
-
page_size: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
2475
|
-
_request_timeout: Union[
|
2476
|
-
None,
|
2477
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2478
|
-
Tuple[
|
2479
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2480
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2481
|
-
]
|
2482
|
-
] = None,
|
2483
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2484
|
-
_content_type: Optional[StrictStr] = None,
|
2485
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2486
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2487
|
-
) -> ApiResponse[List[ScanResultsMapV3]]:
|
2488
|
-
"""Retrieve Model Scan Results
|
2489
|
-
|
2490
|
-
|
2491
|
-
:param scan_id: (required)
|
2492
|
-
:type scan_id: str
|
2493
|
-
:param cursor:
|
2494
|
-
:type cursor: str
|
2495
|
-
:param page_size:
|
2496
|
-
:type page_size: int
|
2497
|
-
:param _request_timeout: timeout setting for this request. If one
|
2498
|
-
number provided, it will be total request
|
2499
|
-
timeout. It can also be a pair (tuple) of
|
2500
|
-
(connection, read) timeouts.
|
2501
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2502
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2503
|
-
request; this effectively ignores the
|
2504
|
-
authentication in the spec for a single request.
|
2505
|
-
:type _request_auth: dict, optional
|
2506
|
-
:param _content_type: force content-type for the request.
|
2507
|
-
:type _content_type: str, Optional
|
2508
|
-
:param _headers: set to override the headers for a single
|
2509
|
-
request; this effectively ignores the headers
|
2510
|
-
in the spec for a single request.
|
2511
|
-
:type _headers: dict, optional
|
2512
|
-
:param _host_index: set to override the host_index for a single
|
2513
|
-
request; this effectively ignores the host_index
|
2514
|
-
in the spec for a single request.
|
2515
|
-
:type _host_index: int, optional
|
2516
|
-
:return: Returns the result object.
|
2517
|
-
""" # noqa: E501
|
2518
|
-
|
2519
|
-
_param = self._get_scan_results1_serialize(
|
2520
|
-
scan_id=scan_id,
|
2521
|
-
cursor=cursor,
|
2522
|
-
page_size=page_size,
|
2523
|
-
_request_auth=_request_auth,
|
2524
|
-
_content_type=_content_type,
|
2525
|
-
_headers=_headers,
|
2526
|
-
_host_index=_host_index
|
2527
|
-
)
|
2528
|
-
|
2529
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2530
|
-
'200': "List[ScanResultsMapV3]",
|
2531
|
-
'400': None,
|
2532
|
-
'404': None,
|
2533
|
-
'405': None,
|
2534
|
-
}
|
2535
|
-
response_data = self.api_client.call_api(
|
2536
|
-
*_param,
|
2537
|
-
_request_timeout=_request_timeout
|
2538
|
-
)
|
2539
|
-
response_data.read()
|
2540
|
-
return self.api_client.response_deserialize(
|
2541
|
-
response_data=response_data,
|
2542
|
-
response_types_map=_response_types_map,
|
2543
|
-
)
|
2544
|
-
|
2545
|
-
|
2546
|
-
@validate_call
|
2547
|
-
def get_scan_results1_without_preload_content(
|
2548
|
-
self,
|
2549
|
-
scan_id: StrictStr,
|
2550
|
-
cursor: Optional[StrictStr] = None,
|
2551
|
-
page_size: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
2552
|
-
_request_timeout: Union[
|
2553
|
-
None,
|
2554
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2555
|
-
Tuple[
|
2556
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2557
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2558
|
-
]
|
2559
|
-
] = None,
|
2560
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2561
|
-
_content_type: Optional[StrictStr] = None,
|
2562
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2563
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2564
|
-
) -> RESTResponseType:
|
2565
|
-
"""Retrieve Model Scan Results
|
2566
|
-
|
2567
|
-
|
2568
|
-
:param scan_id: (required)
|
2569
|
-
:type scan_id: str
|
2570
|
-
:param cursor:
|
2571
|
-
:type cursor: str
|
2572
|
-
:param page_size:
|
2573
|
-
:type page_size: int
|
2574
|
-
:param _request_timeout: timeout setting for this request. If one
|
2575
|
-
number provided, it will be total request
|
2576
|
-
timeout. It can also be a pair (tuple) of
|
2577
|
-
(connection, read) timeouts.
|
2578
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2579
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2580
|
-
request; this effectively ignores the
|
2581
|
-
authentication in the spec for a single request.
|
2582
|
-
:type _request_auth: dict, optional
|
2583
|
-
:param _content_type: force content-type for the request.
|
2584
|
-
:type _content_type: str, Optional
|
2585
|
-
:param _headers: set to override the headers for a single
|
2586
|
-
request; this effectively ignores the headers
|
2587
|
-
in the spec for a single request.
|
2588
|
-
:type _headers: dict, optional
|
2589
|
-
:param _host_index: set to override the host_index for a single
|
2590
|
-
request; this effectively ignores the host_index
|
2591
|
-
in the spec for a single request.
|
2592
|
-
:type _host_index: int, optional
|
2593
|
-
:return: Returns the result object.
|
2594
|
-
""" # noqa: E501
|
2595
|
-
|
2596
|
-
_param = self._get_scan_results1_serialize(
|
2597
|
-
scan_id=scan_id,
|
2598
|
-
cursor=cursor,
|
2599
|
-
page_size=page_size,
|
2600
|
-
_request_auth=_request_auth,
|
2601
|
-
_content_type=_content_type,
|
2602
|
-
_headers=_headers,
|
2603
|
-
_host_index=_host_index
|
2604
|
-
)
|
2605
|
-
|
2606
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2607
|
-
'200': "List[ScanResultsMapV3]",
|
2608
|
-
'400': None,
|
2609
|
-
'404': None,
|
2610
|
-
'405': None,
|
2611
|
-
}
|
2612
|
-
response_data = self.api_client.call_api(
|
2613
|
-
*_param,
|
2614
|
-
_request_timeout=_request_timeout
|
2615
|
-
)
|
2616
|
-
return response_data.response
|
2617
|
-
|
2618
|
-
|
2619
|
-
def _get_scan_results1_serialize(
|
2620
|
-
self,
|
2621
|
-
scan_id,
|
2622
|
-
cursor,
|
2623
|
-
page_size,
|
2624
|
-
_request_auth,
|
2625
|
-
_content_type,
|
2626
|
-
_headers,
|
2627
|
-
_host_index,
|
2628
|
-
) -> RequestSerialized:
|
2629
|
-
|
2630
|
-
_host = None
|
2631
|
-
|
2632
|
-
_collection_formats: Dict[str, str] = {
|
2633
|
-
}
|
2634
|
-
|
2635
|
-
_path_params: Dict[str, str] = {}
|
2636
|
-
_query_params: List[Tuple[str, str]] = []
|
2637
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2638
|
-
_form_params: List[Tuple[str, str]] = []
|
2639
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
2640
|
-
_body_params: Optional[bytes] = None
|
2641
|
-
|
2642
|
-
# process the path parameters
|
2643
|
-
if scan_id is not None:
|
2644
|
-
_path_params['scan_id'] = scan_id
|
2645
|
-
# process the query parameters
|
2646
|
-
if cursor is not None:
|
2647
|
-
|
2648
|
-
_query_params.append(('cursor', cursor))
|
2649
|
-
|
2650
|
-
if page_size is not None:
|
2651
|
-
|
2652
|
-
_query_params.append(('page_size', page_size))
|
2653
|
-
|
2654
|
-
# process the header parameters
|
2655
|
-
# process the form parameters
|
2656
|
-
# process the body parameter
|
2657
|
-
|
2658
|
-
|
2659
|
-
# set the HTTP header `Accept`
|
2660
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2661
|
-
[
|
2662
|
-
'application/json; charset=utf-8'
|
2663
|
-
]
|
2664
|
-
)
|
2665
|
-
|
2666
|
-
|
2667
|
-
# authentication setting
|
2668
|
-
_auth_settings: List[str] = [
|
2669
|
-
'BearerAuth'
|
2670
|
-
]
|
2671
|
-
|
2672
|
-
return self.api_client.param_serialize(
|
2673
|
-
method='GET',
|
2674
|
-
resource_path='/scans/v3/results/{scan_id}',
|
2675
|
-
path_params=_path_params,
|
2676
|
-
query_params=_query_params,
|
2677
|
-
header_params=_header_params,
|
2678
|
-
body=_body_params,
|
2679
|
-
post_params=_form_params,
|
2680
|
-
files=_files,
|
2681
|
-
auth_settings=_auth_settings,
|
2682
|
-
collection_formats=_collection_formats,
|
2683
|
-
_host=_host,
|
2684
|
-
_request_auth=_request_auth
|
2685
|
-
)
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
@validate_call
|
2691
|
-
def modelscanner_api_v3_health_check(
|
2692
|
-
self,
|
2693
|
-
_request_timeout: Union[
|
2694
|
-
None,
|
2695
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2696
|
-
Tuple[
|
2697
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2698
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2699
|
-
]
|
2700
|
-
] = None,
|
2701
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2702
|
-
_content_type: Optional[StrictStr] = None,
|
2703
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2704
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2705
|
-
) -> None:
|
2706
|
-
"""Health check endpoint for Model Supply Chain Services
|
2707
|
-
|
2708
|
-
|
2709
|
-
:param _request_timeout: timeout setting for this request. If one
|
2710
|
-
number provided, it will be total request
|
2711
|
-
timeout. It can also be a pair (tuple) of
|
2712
|
-
(connection, read) timeouts.
|
2713
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2714
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2715
|
-
request; this effectively ignores the
|
2716
|
-
authentication in the spec for a single request.
|
2717
|
-
:type _request_auth: dict, optional
|
2718
|
-
:param _content_type: force content-type for the request.
|
2719
|
-
:type _content_type: str, Optional
|
2720
|
-
:param _headers: set to override the headers for a single
|
2721
|
-
request; this effectively ignores the headers
|
2722
|
-
in the spec for a single request.
|
2723
|
-
:type _headers: dict, optional
|
2724
|
-
:param _host_index: set to override the host_index for a single
|
2725
|
-
request; this effectively ignores the host_index
|
2726
|
-
in the spec for a single request.
|
2727
|
-
:type _host_index: int, optional
|
2728
|
-
:return: Returns the result object.
|
2729
|
-
""" # noqa: E501
|
2730
|
-
|
2731
|
-
_param = self._modelscanner_api_v3_health_check_serialize(
|
2732
|
-
_request_auth=_request_auth,
|
2733
|
-
_content_type=_content_type,
|
2734
|
-
_headers=_headers,
|
2735
|
-
_host_index=_host_index
|
2736
|
-
)
|
2737
|
-
|
2738
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2739
|
-
'200': None,
|
2740
|
-
'503': None,
|
2741
|
-
}
|
2742
|
-
response_data = self.api_client.call_api(
|
2743
|
-
*_param,
|
2744
|
-
_request_timeout=_request_timeout
|
2745
|
-
)
|
2746
|
-
response_data.read()
|
2747
|
-
return self.api_client.response_deserialize(
|
2748
|
-
response_data=response_data,
|
2749
|
-
response_types_map=_response_types_map,
|
2750
|
-
).data
|
2751
|
-
|
2752
|
-
|
2753
|
-
@validate_call
|
2754
|
-
def modelscanner_api_v3_health_check_with_http_info(
|
2755
|
-
self,
|
2756
|
-
_request_timeout: Union[
|
2757
|
-
None,
|
2758
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2759
|
-
Tuple[
|
2760
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2761
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2762
|
-
]
|
2763
|
-
] = None,
|
2764
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2765
|
-
_content_type: Optional[StrictStr] = None,
|
2766
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2767
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2768
|
-
) -> ApiResponse[None]:
|
2769
|
-
"""Health check endpoint for Model Supply Chain Services
|
2770
|
-
|
2771
|
-
|
2772
|
-
:param _request_timeout: timeout setting for this request. If one
|
2773
|
-
number provided, it will be total request
|
2774
|
-
timeout. It can also be a pair (tuple) of
|
2775
|
-
(connection, read) timeouts.
|
2776
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2777
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2778
|
-
request; this effectively ignores the
|
2779
|
-
authentication in the spec for a single request.
|
2780
|
-
:type _request_auth: dict, optional
|
2781
|
-
:param _content_type: force content-type for the request.
|
2782
|
-
:type _content_type: str, Optional
|
2783
|
-
:param _headers: set to override the headers for a single
|
2784
|
-
request; this effectively ignores the headers
|
2785
|
-
in the spec for a single request.
|
2786
|
-
:type _headers: dict, optional
|
2787
|
-
:param _host_index: set to override the host_index for a single
|
2788
|
-
request; this effectively ignores the host_index
|
2789
|
-
in the spec for a single request.
|
2790
|
-
:type _host_index: int, optional
|
2791
|
-
:return: Returns the result object.
|
2792
|
-
""" # noqa: E501
|
2793
|
-
|
2794
|
-
_param = self._modelscanner_api_v3_health_check_serialize(
|
2795
|
-
_request_auth=_request_auth,
|
2796
|
-
_content_type=_content_type,
|
2797
|
-
_headers=_headers,
|
2798
|
-
_host_index=_host_index
|
2799
|
-
)
|
2800
|
-
|
2801
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2802
|
-
'200': None,
|
2803
|
-
'503': None,
|
2804
|
-
}
|
2805
|
-
response_data = self.api_client.call_api(
|
2806
|
-
*_param,
|
2807
|
-
_request_timeout=_request_timeout
|
2808
|
-
)
|
2809
|
-
response_data.read()
|
2810
|
-
return self.api_client.response_deserialize(
|
2811
|
-
response_data=response_data,
|
2812
|
-
response_types_map=_response_types_map,
|
2813
|
-
)
|
2814
|
-
|
2815
|
-
|
2816
|
-
@validate_call
|
2817
|
-
def modelscanner_api_v3_health_check_without_preload_content(
|
2818
|
-
self,
|
2819
|
-
_request_timeout: Union[
|
2820
|
-
None,
|
2821
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2822
|
-
Tuple[
|
2823
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2824
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2825
|
-
]
|
2826
|
-
] = None,
|
2827
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2828
|
-
_content_type: Optional[StrictStr] = None,
|
2829
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2830
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2831
|
-
) -> RESTResponseType:
|
2832
|
-
"""Health check endpoint for Model Supply Chain Services
|
2833
|
-
|
2834
|
-
|
2835
|
-
:param _request_timeout: timeout setting for this request. If one
|
2836
|
-
number provided, it will be total request
|
2837
|
-
timeout. It can also be a pair (tuple) of
|
2838
|
-
(connection, read) timeouts.
|
2839
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2840
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2841
|
-
request; this effectively ignores the
|
2842
|
-
authentication in the spec for a single request.
|
2843
|
-
:type _request_auth: dict, optional
|
2844
|
-
:param _content_type: force content-type for the request.
|
2845
|
-
:type _content_type: str, Optional
|
2846
|
-
:param _headers: set to override the headers for a single
|
2847
|
-
request; this effectively ignores the headers
|
2848
|
-
in the spec for a single request.
|
2849
|
-
:type _headers: dict, optional
|
2850
|
-
:param _host_index: set to override the host_index for a single
|
2851
|
-
request; this effectively ignores the host_index
|
2852
|
-
in the spec for a single request.
|
2853
|
-
:type _host_index: int, optional
|
2854
|
-
:return: Returns the result object.
|
2855
|
-
""" # noqa: E501
|
2856
|
-
|
2857
|
-
_param = self._modelscanner_api_v3_health_check_serialize(
|
2858
|
-
_request_auth=_request_auth,
|
2859
|
-
_content_type=_content_type,
|
2860
|
-
_headers=_headers,
|
2861
|
-
_host_index=_host_index
|
2862
|
-
)
|
2863
|
-
|
2864
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2865
|
-
'200': None,
|
2866
|
-
'503': None,
|
2867
|
-
}
|
2868
|
-
response_data = self.api_client.call_api(
|
2869
|
-
*_param,
|
2870
|
-
_request_timeout=_request_timeout
|
2871
|
-
)
|
2872
|
-
return response_data.response
|
2873
|
-
|
2874
|
-
|
2875
|
-
def _modelscanner_api_v3_health_check_serialize(
|
2876
|
-
self,
|
2877
|
-
_request_auth,
|
2878
|
-
_content_type,
|
2879
|
-
_headers,
|
2880
|
-
_host_index,
|
2881
|
-
) -> RequestSerialized:
|
2882
|
-
|
2883
|
-
_host = None
|
2884
|
-
|
2885
|
-
_collection_formats: Dict[str, str] = {
|
2886
|
-
}
|
2887
|
-
|
2888
|
-
_path_params: Dict[str, str] = {}
|
2889
|
-
_query_params: List[Tuple[str, str]] = []
|
2890
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2891
|
-
_form_params: List[Tuple[str, str]] = []
|
2892
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
2893
|
-
_body_params: Optional[bytes] = None
|
2894
|
-
|
2895
|
-
# process the path parameters
|
2896
|
-
# process the query parameters
|
2897
|
-
# process the header parameters
|
2898
|
-
# process the form parameters
|
2899
|
-
# process the body parameter
|
2900
|
-
|
2901
|
-
|
2902
|
-
|
2903
|
-
|
2904
|
-
# authentication setting
|
2905
|
-
_auth_settings: List[str] = [
|
2906
|
-
'BearerAuth'
|
2907
|
-
]
|
2908
|
-
|
2909
|
-
return self.api_client.param_serialize(
|
2910
|
-
method='GET',
|
2911
|
-
resource_path='/scans/v3/health',
|
2912
|
-
path_params=_path_params,
|
2913
|
-
query_params=_query_params,
|
2914
|
-
header_params=_header_params,
|
2915
|
-
body=_body_params,
|
2916
|
-
post_params=_form_params,
|
2917
|
-
files=_files,
|
2918
|
-
auth_settings=_auth_settings,
|
2919
|
-
collection_formats=_collection_formats,
|
2920
|
-
_host=_host,
|
2921
|
-
_request_auth=_request_auth
|
2922
|
-
)
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
@validate_call
|
2928
|
-
def modelscanner_api_v3_readiness_check(
|
2929
|
-
self,
|
2930
|
-
_request_timeout: Union[
|
2931
|
-
None,
|
2932
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2933
|
-
Tuple[
|
2934
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2935
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2936
|
-
]
|
2937
|
-
] = None,
|
2938
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2939
|
-
_content_type: Optional[StrictStr] = None,
|
2940
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2941
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2942
|
-
) -> None:
|
2943
|
-
"""Readiness check endpoint for Model Supply Chain Services
|
2944
|
-
|
2945
|
-
|
2946
|
-
:param _request_timeout: timeout setting for this request. If one
|
2947
|
-
number provided, it will be total request
|
2948
|
-
timeout. It can also be a pair (tuple) of
|
2949
|
-
(connection, read) timeouts.
|
2950
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2951
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2952
|
-
request; this effectively ignores the
|
2953
|
-
authentication in the spec for a single request.
|
2954
|
-
:type _request_auth: dict, optional
|
2955
|
-
:param _content_type: force content-type for the request.
|
2956
|
-
:type _content_type: str, Optional
|
2957
|
-
:param _headers: set to override the headers for a single
|
2958
|
-
request; this effectively ignores the headers
|
2959
|
-
in the spec for a single request.
|
2960
|
-
:type _headers: dict, optional
|
2961
|
-
:param _host_index: set to override the host_index for a single
|
2962
|
-
request; this effectively ignores the host_index
|
2963
|
-
in the spec for a single request.
|
2964
|
-
:type _host_index: int, optional
|
2965
|
-
:return: Returns the result object.
|
2966
|
-
""" # noqa: E501
|
2967
|
-
|
2968
|
-
_param = self._modelscanner_api_v3_readiness_check_serialize(
|
2969
|
-
_request_auth=_request_auth,
|
2970
|
-
_content_type=_content_type,
|
2971
|
-
_headers=_headers,
|
2972
|
-
_host_index=_host_index
|
2973
|
-
)
|
2974
|
-
|
2975
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2976
|
-
'200': None,
|
2977
|
-
'503': None,
|
2978
|
-
}
|
2979
|
-
response_data = self.api_client.call_api(
|
2980
|
-
*_param,
|
2981
|
-
_request_timeout=_request_timeout
|
2982
|
-
)
|
2983
|
-
response_data.read()
|
2984
|
-
return self.api_client.response_deserialize(
|
2985
|
-
response_data=response_data,
|
2986
|
-
response_types_map=_response_types_map,
|
2987
|
-
).data
|
2988
|
-
|
2989
|
-
|
2990
|
-
@validate_call
|
2991
|
-
def modelscanner_api_v3_readiness_check_with_http_info(
|
2992
|
-
self,
|
2993
|
-
_request_timeout: Union[
|
2994
|
-
None,
|
2995
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2996
|
-
Tuple[
|
2997
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2998
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2999
|
-
]
|
3000
|
-
] = None,
|
3001
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3002
|
-
_content_type: Optional[StrictStr] = None,
|
3003
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3004
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3005
|
-
) -> ApiResponse[None]:
|
3006
|
-
"""Readiness check endpoint for Model Supply Chain Services
|
3007
|
-
|
3008
|
-
|
3009
|
-
:param _request_timeout: timeout setting for this request. If one
|
3010
|
-
number provided, it will be total request
|
3011
|
-
timeout. It can also be a pair (tuple) of
|
3012
|
-
(connection, read) timeouts.
|
3013
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3014
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3015
|
-
request; this effectively ignores the
|
3016
|
-
authentication in the spec for a single request.
|
3017
|
-
:type _request_auth: dict, optional
|
3018
|
-
:param _content_type: force content-type for the request.
|
3019
|
-
:type _content_type: str, Optional
|
3020
|
-
:param _headers: set to override the headers for a single
|
3021
|
-
request; this effectively ignores the headers
|
3022
|
-
in the spec for a single request.
|
3023
|
-
:type _headers: dict, optional
|
3024
|
-
:param _host_index: set to override the host_index for a single
|
3025
|
-
request; this effectively ignores the host_index
|
3026
|
-
in the spec for a single request.
|
3027
|
-
:type _host_index: int, optional
|
3028
|
-
:return: Returns the result object.
|
3029
|
-
""" # noqa: E501
|
3030
|
-
|
3031
|
-
_param = self._modelscanner_api_v3_readiness_check_serialize(
|
3032
|
-
_request_auth=_request_auth,
|
3033
|
-
_content_type=_content_type,
|
3034
|
-
_headers=_headers,
|
3035
|
-
_host_index=_host_index
|
3036
|
-
)
|
3037
|
-
|
3038
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3039
|
-
'200': None,
|
3040
|
-
'503': None,
|
3041
|
-
}
|
3042
|
-
response_data = self.api_client.call_api(
|
3043
|
-
*_param,
|
3044
|
-
_request_timeout=_request_timeout
|
3045
|
-
)
|
3046
|
-
response_data.read()
|
3047
|
-
return self.api_client.response_deserialize(
|
3048
|
-
response_data=response_data,
|
3049
|
-
response_types_map=_response_types_map,
|
3050
|
-
)
|
3051
|
-
|
3052
|
-
|
3053
|
-
@validate_call
|
3054
|
-
def modelscanner_api_v3_readiness_check_without_preload_content(
|
3055
|
-
self,
|
3056
|
-
_request_timeout: Union[
|
3057
|
-
None,
|
3058
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3059
|
-
Tuple[
|
3060
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3061
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3062
|
-
]
|
3063
|
-
] = None,
|
3064
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3065
|
-
_content_type: Optional[StrictStr] = None,
|
3066
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3067
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3068
|
-
) -> RESTResponseType:
|
3069
|
-
"""Readiness check endpoint for Model Supply Chain Services
|
3070
|
-
|
3071
|
-
|
3072
|
-
:param _request_timeout: timeout setting for this request. If one
|
3073
|
-
number provided, it will be total request
|
3074
|
-
timeout. It can also be a pair (tuple) of
|
3075
|
-
(connection, read) timeouts.
|
3076
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3077
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3078
|
-
request; this effectively ignores the
|
3079
|
-
authentication in the spec for a single request.
|
3080
|
-
:type _request_auth: dict, optional
|
3081
|
-
:param _content_type: force content-type for the request.
|
3082
|
-
:type _content_type: str, Optional
|
3083
|
-
:param _headers: set to override the headers for a single
|
3084
|
-
request; this effectively ignores the headers
|
3085
|
-
in the spec for a single request.
|
3086
|
-
:type _headers: dict, optional
|
3087
|
-
:param _host_index: set to override the host_index for a single
|
3088
|
-
request; this effectively ignores the host_index
|
3089
|
-
in the spec for a single request.
|
3090
|
-
:type _host_index: int, optional
|
3091
|
-
:return: Returns the result object.
|
3092
|
-
""" # noqa: E501
|
3093
|
-
|
3094
|
-
_param = self._modelscanner_api_v3_readiness_check_serialize(
|
3095
|
-
_request_auth=_request_auth,
|
3096
|
-
_content_type=_content_type,
|
3097
|
-
_headers=_headers,
|
3098
|
-
_host_index=_host_index
|
3099
|
-
)
|
3100
|
-
|
3101
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3102
|
-
'200': None,
|
3103
|
-
'503': None,
|
3104
|
-
}
|
3105
|
-
response_data = self.api_client.call_api(
|
3106
|
-
*_param,
|
3107
|
-
_request_timeout=_request_timeout
|
3108
|
-
)
|
3109
|
-
return response_data.response
|
3110
|
-
|
3111
|
-
|
3112
|
-
def _modelscanner_api_v3_readiness_check_serialize(
|
3113
|
-
self,
|
3114
|
-
_request_auth,
|
3115
|
-
_content_type,
|
3116
|
-
_headers,
|
3117
|
-
_host_index,
|
3118
|
-
) -> RequestSerialized:
|
3119
|
-
|
3120
|
-
_host = None
|
3121
|
-
|
3122
|
-
_collection_formats: Dict[str, str] = {
|
3123
|
-
}
|
3124
|
-
|
3125
|
-
_path_params: Dict[str, str] = {}
|
3126
|
-
_query_params: List[Tuple[str, str]] = []
|
3127
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3128
|
-
_form_params: List[Tuple[str, str]] = []
|
3129
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
3130
|
-
_body_params: Optional[bytes] = None
|
3131
|
-
|
3132
|
-
# process the path parameters
|
3133
|
-
# process the query parameters
|
3134
|
-
# process the header parameters
|
3135
|
-
# process the form parameters
|
3136
|
-
# process the body parameter
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
# authentication setting
|
3142
|
-
_auth_settings: List[str] = [
|
3143
|
-
'BearerAuth'
|
3144
|
-
]
|
3145
|
-
|
3146
|
-
return self.api_client.param_serialize(
|
3147
|
-
method='GET',
|
3148
|
-
resource_path='/scans/v3/readiness',
|
3149
|
-
path_params=_path_params,
|
3150
|
-
query_params=_query_params,
|
3151
|
-
header_params=_header_params,
|
3152
|
-
body=_body_params,
|
3153
|
-
post_params=_form_params,
|
3154
|
-
files=_files,
|
3155
|
-
auth_settings=_auth_settings,
|
3156
|
-
collection_formats=_collection_formats,
|
3157
|
-
_host=_host,
|
3158
|
-
_request_auth=_request_auth
|
3159
|
-
)
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
@validate_call
|
3165
|
-
def notify_model_scan_completed(
|
3166
|
-
self,
|
3167
|
-
scan_id: StrictStr,
|
3168
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
|
3169
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3170
|
-
_request_timeout: Union[
|
3171
|
-
None,
|
3172
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3173
|
-
Tuple[
|
3174
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3175
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3176
|
-
]
|
3177
|
-
] = None,
|
3178
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3179
|
-
_content_type: Optional[StrictStr] = None,
|
3180
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3181
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3182
|
-
) -> NotifyModelScanCompleted200Response:
|
3183
|
-
"""Indicate part (file or files) of a model scan has completed
|
3184
|
-
|
3185
|
-
|
3186
|
-
:param scan_id: (required)
|
3187
|
-
:type scan_id: str
|
3188
|
-
:param scan_report_v3: Request body for partial update (required)
|
3189
|
-
:type scan_report_v3: ScanReportV3
|
3190
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3191
|
-
:type has_detections: bool
|
3192
|
-
:param _request_timeout: timeout setting for this request. If one
|
3193
|
-
number provided, it will be total request
|
3194
|
-
timeout. It can also be a pair (tuple) of
|
3195
|
-
(connection, read) timeouts.
|
3196
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3197
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3198
|
-
request; this effectively ignores the
|
3199
|
-
authentication in the spec for a single request.
|
3200
|
-
:type _request_auth: dict, optional
|
3201
|
-
:param _content_type: force content-type for the request.
|
3202
|
-
:type _content_type: str, Optional
|
3203
|
-
:param _headers: set to override the headers for a single
|
3204
|
-
request; this effectively ignores the headers
|
3205
|
-
in the spec for a single request.
|
3206
|
-
:type _headers: dict, optional
|
3207
|
-
:param _host_index: set to override the host_index for a single
|
3208
|
-
request; this effectively ignores the host_index
|
3209
|
-
in the spec for a single request.
|
3210
|
-
:type _host_index: int, optional
|
3211
|
-
:return: Returns the result object.
|
3212
|
-
""" # noqa: E501
|
3213
|
-
|
3214
|
-
_param = self._notify_model_scan_completed_serialize(
|
3215
|
-
scan_id=scan_id,
|
3216
|
-
scan_report_v3=scan_report_v3,
|
3217
|
-
has_detections=has_detections,
|
3218
|
-
_request_auth=_request_auth,
|
3219
|
-
_content_type=_content_type,
|
3220
|
-
_headers=_headers,
|
3221
|
-
_host_index=_host_index
|
3222
|
-
)
|
3223
|
-
|
3224
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3225
|
-
'200': "NotifyModelScanCompleted200Response",
|
3226
|
-
'400': None,
|
3227
|
-
'422': "ValidationErrorModel",
|
3228
|
-
}
|
3229
|
-
response_data = self.api_client.call_api(
|
3230
|
-
*_param,
|
3231
|
-
_request_timeout=_request_timeout
|
3232
|
-
)
|
3233
|
-
response_data.read()
|
3234
|
-
return self.api_client.response_deserialize(
|
3235
|
-
response_data=response_data,
|
3236
|
-
response_types_map=_response_types_map,
|
3237
|
-
).data
|
3238
|
-
|
3239
|
-
|
3240
|
-
@validate_call
|
3241
|
-
def notify_model_scan_completed_with_http_info(
|
3242
|
-
self,
|
3243
|
-
scan_id: StrictStr,
|
3244
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
|
3245
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3246
|
-
_request_timeout: Union[
|
3247
|
-
None,
|
3248
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3249
|
-
Tuple[
|
3250
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3251
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3252
|
-
]
|
3253
|
-
] = None,
|
3254
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3255
|
-
_content_type: Optional[StrictStr] = None,
|
3256
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3257
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3258
|
-
) -> ApiResponse[NotifyModelScanCompleted200Response]:
|
3259
|
-
"""Indicate part (file or files) of a model scan has completed
|
3260
|
-
|
3261
|
-
|
3262
|
-
:param scan_id: (required)
|
3263
|
-
:type scan_id: str
|
3264
|
-
:param scan_report_v3: Request body for partial update (required)
|
3265
|
-
:type scan_report_v3: ScanReportV3
|
3266
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3267
|
-
:type has_detections: bool
|
3268
|
-
:param _request_timeout: timeout setting for this request. If one
|
3269
|
-
number provided, it will be total request
|
3270
|
-
timeout. It can also be a pair (tuple) of
|
3271
|
-
(connection, read) timeouts.
|
3272
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3273
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3274
|
-
request; this effectively ignores the
|
3275
|
-
authentication in the spec for a single request.
|
3276
|
-
:type _request_auth: dict, optional
|
3277
|
-
:param _content_type: force content-type for the request.
|
3278
|
-
:type _content_type: str, Optional
|
3279
|
-
:param _headers: set to override the headers for a single
|
3280
|
-
request; this effectively ignores the headers
|
3281
|
-
in the spec for a single request.
|
3282
|
-
:type _headers: dict, optional
|
3283
|
-
:param _host_index: set to override the host_index for a single
|
3284
|
-
request; this effectively ignores the host_index
|
3285
|
-
in the spec for a single request.
|
3286
|
-
:type _host_index: int, optional
|
3287
|
-
:return: Returns the result object.
|
3288
|
-
""" # noqa: E501
|
3289
|
-
|
3290
|
-
_param = self._notify_model_scan_completed_serialize(
|
3291
|
-
scan_id=scan_id,
|
3292
|
-
scan_report_v3=scan_report_v3,
|
3293
|
-
has_detections=has_detections,
|
3294
|
-
_request_auth=_request_auth,
|
3295
|
-
_content_type=_content_type,
|
3296
|
-
_headers=_headers,
|
3297
|
-
_host_index=_host_index
|
3298
|
-
)
|
3299
|
-
|
3300
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3301
|
-
'200': "NotifyModelScanCompleted200Response",
|
3302
|
-
'400': None,
|
3303
|
-
'422': "ValidationErrorModel",
|
3304
|
-
}
|
3305
|
-
response_data = self.api_client.call_api(
|
3306
|
-
*_param,
|
3307
|
-
_request_timeout=_request_timeout
|
3308
|
-
)
|
3309
|
-
response_data.read()
|
3310
|
-
return self.api_client.response_deserialize(
|
3311
|
-
response_data=response_data,
|
3312
|
-
response_types_map=_response_types_map,
|
3313
|
-
)
|
3314
|
-
|
3315
|
-
|
3316
|
-
@validate_call
|
3317
|
-
def notify_model_scan_completed_without_preload_content(
|
3318
|
-
self,
|
3319
|
-
scan_id: StrictStr,
|
3320
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
|
3321
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3322
|
-
_request_timeout: Union[
|
3323
|
-
None,
|
3324
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3325
|
-
Tuple[
|
3326
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3327
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3328
|
-
]
|
3329
|
-
] = None,
|
3330
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3331
|
-
_content_type: Optional[StrictStr] = None,
|
3332
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3333
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3334
|
-
) -> RESTResponseType:
|
3335
|
-
"""Indicate part (file or files) of a model scan has completed
|
3336
|
-
|
3337
|
-
|
3338
|
-
:param scan_id: (required)
|
3339
|
-
:type scan_id: str
|
3340
|
-
:param scan_report_v3: Request body for partial update (required)
|
3341
|
-
:type scan_report_v3: ScanReportV3
|
3342
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3343
|
-
:type has_detections: bool
|
3344
|
-
:param _request_timeout: timeout setting for this request. If one
|
3345
|
-
number provided, it will be total request
|
3346
|
-
timeout. It can also be a pair (tuple) of
|
3347
|
-
(connection, read) timeouts.
|
3348
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3349
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3350
|
-
request; this effectively ignores the
|
3351
|
-
authentication in the spec for a single request.
|
3352
|
-
:type _request_auth: dict, optional
|
3353
|
-
:param _content_type: force content-type for the request.
|
3354
|
-
:type _content_type: str, Optional
|
3355
|
-
:param _headers: set to override the headers for a single
|
3356
|
-
request; this effectively ignores the headers
|
3357
|
-
in the spec for a single request.
|
3358
|
-
:type _headers: dict, optional
|
3359
|
-
:param _host_index: set to override the host_index for a single
|
3360
|
-
request; this effectively ignores the host_index
|
3361
|
-
in the spec for a single request.
|
3362
|
-
:type _host_index: int, optional
|
3363
|
-
:return: Returns the result object.
|
3364
|
-
""" # noqa: E501
|
3365
|
-
|
3366
|
-
_param = self._notify_model_scan_completed_serialize(
|
3367
|
-
scan_id=scan_id,
|
3368
|
-
scan_report_v3=scan_report_v3,
|
3369
|
-
has_detections=has_detections,
|
3370
|
-
_request_auth=_request_auth,
|
3371
|
-
_content_type=_content_type,
|
3372
|
-
_headers=_headers,
|
3373
|
-
_host_index=_host_index
|
3374
|
-
)
|
3375
|
-
|
3376
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3377
|
-
'200': "NotifyModelScanCompleted200Response",
|
3378
|
-
'400': None,
|
3379
|
-
'422': "ValidationErrorModel",
|
3380
|
-
}
|
3381
|
-
response_data = self.api_client.call_api(
|
3382
|
-
*_param,
|
3383
|
-
_request_timeout=_request_timeout
|
3384
|
-
)
|
3385
|
-
return response_data.response
|
3386
|
-
|
3387
|
-
|
3388
|
-
def _notify_model_scan_completed_serialize(
|
3389
|
-
self,
|
3390
|
-
scan_id,
|
3391
|
-
scan_report_v3,
|
3392
|
-
has_detections,
|
3393
|
-
_request_auth,
|
3394
|
-
_content_type,
|
3395
|
-
_headers,
|
3396
|
-
_host_index,
|
3397
|
-
) -> RequestSerialized:
|
3398
|
-
|
3399
|
-
_host = None
|
3400
|
-
|
3401
|
-
_collection_formats: Dict[str, str] = {
|
3402
|
-
}
|
3403
|
-
|
3404
|
-
_path_params: Dict[str, str] = {}
|
3405
|
-
_query_params: List[Tuple[str, str]] = []
|
3406
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3407
|
-
_form_params: List[Tuple[str, str]] = []
|
3408
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
3409
|
-
_body_params: Optional[bytes] = None
|
3410
|
-
|
3411
|
-
# process the path parameters
|
3412
|
-
if scan_id is not None:
|
3413
|
-
_path_params['scan_id'] = scan_id
|
3414
|
-
# process the query parameters
|
3415
|
-
if has_detections is not None:
|
3416
|
-
|
3417
|
-
_query_params.append(('has_detections', has_detections))
|
3418
|
-
|
3419
|
-
# process the header parameters
|
3420
|
-
# process the form parameters
|
3421
|
-
# process the body parameter
|
3422
|
-
if scan_report_v3 is not None:
|
3423
|
-
_body_params = scan_report_v3
|
3424
|
-
|
3425
|
-
|
3426
|
-
# set the HTTP header `Accept`
|
3427
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
3428
|
-
[
|
3429
|
-
'application/json'
|
3430
|
-
]
|
3431
|
-
)
|
3432
|
-
|
3433
|
-
# set the HTTP header `Content-Type`
|
3434
|
-
if _content_type:
|
3435
|
-
_header_params['Content-Type'] = _content_type
|
3436
|
-
else:
|
3437
|
-
_default_content_type = (
|
3438
|
-
self.api_client.select_header_content_type(
|
3439
|
-
[
|
3440
|
-
'application/json'
|
3441
|
-
]
|
3442
|
-
)
|
3443
|
-
)
|
3444
|
-
if _default_content_type is not None:
|
3445
|
-
_header_params['Content-Type'] = _default_content_type
|
3446
|
-
|
3447
|
-
# authentication setting
|
3448
|
-
_auth_settings: List[str] = [
|
3449
|
-
'BearerAuth'
|
3450
|
-
]
|
3451
|
-
|
3452
|
-
return self.api_client.param_serialize(
|
3453
|
-
method='PATCH',
|
3454
|
-
resource_path='/scan/v3/results/{scan_id}',
|
3455
|
-
path_params=_path_params,
|
3456
|
-
query_params=_query_params,
|
3457
|
-
header_params=_header_params,
|
3458
|
-
body=_body_params,
|
3459
|
-
post_params=_form_params,
|
3460
|
-
files=_files,
|
3461
|
-
auth_settings=_auth_settings,
|
3462
|
-
collection_formats=_collection_formats,
|
3463
|
-
_host=_host,
|
3464
|
-
_request_auth=_request_auth
|
3465
|
-
)
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
3470
|
-
@validate_call
|
3471
|
-
def notify_model_scan_started(
|
3472
|
-
self,
|
3473
|
-
scan_id: StrictStr,
|
3474
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
|
3475
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3476
|
-
_request_timeout: Union[
|
3477
|
-
None,
|
3478
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3479
|
-
Tuple[
|
3480
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3481
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3482
|
-
]
|
3483
|
-
] = None,
|
3484
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3485
|
-
_content_type: Optional[StrictStr] = None,
|
3486
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3487
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3488
|
-
) -> None:
|
3489
|
-
"""Indicate model scan has started
|
3490
|
-
|
3491
|
-
|
3492
|
-
:param scan_id: (required)
|
3493
|
-
:type scan_id: str
|
3494
|
-
:param scan_report_v3: Request body for create (required)
|
3495
|
-
:type scan_report_v3: ScanReportV3
|
3496
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3497
|
-
:type has_detections: bool
|
3498
|
-
:param _request_timeout: timeout setting for this request. If one
|
3499
|
-
number provided, it will be total request
|
3500
|
-
timeout. It can also be a pair (tuple) of
|
3501
|
-
(connection, read) timeouts.
|
3502
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3503
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3504
|
-
request; this effectively ignores the
|
3505
|
-
authentication in the spec for a single request.
|
3506
|
-
:type _request_auth: dict, optional
|
3507
|
-
:param _content_type: force content-type for the request.
|
3508
|
-
:type _content_type: str, Optional
|
3509
|
-
:param _headers: set to override the headers for a single
|
3510
|
-
request; this effectively ignores the headers
|
3511
|
-
in the spec for a single request.
|
3512
|
-
:type _headers: dict, optional
|
3513
|
-
:param _host_index: set to override the host_index for a single
|
3514
|
-
request; this effectively ignores the host_index
|
3515
|
-
in the spec for a single request.
|
3516
|
-
:type _host_index: int, optional
|
3517
|
-
:return: Returns the result object.
|
3518
|
-
""" # noqa: E501
|
3519
|
-
|
3520
|
-
_param = self._notify_model_scan_started_serialize(
|
3521
|
-
scan_id=scan_id,
|
3522
|
-
scan_report_v3=scan_report_v3,
|
3523
|
-
has_detections=has_detections,
|
3524
|
-
_request_auth=_request_auth,
|
3525
|
-
_content_type=_content_type,
|
3526
|
-
_headers=_headers,
|
3527
|
-
_host_index=_host_index
|
3528
|
-
)
|
3529
|
-
|
3530
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3531
|
-
'201': None,
|
3532
|
-
'400': None,
|
3533
|
-
'422': "ValidationErrorModel",
|
3534
|
-
}
|
3535
|
-
response_data = self.api_client.call_api(
|
3536
|
-
*_param,
|
3537
|
-
_request_timeout=_request_timeout
|
3538
|
-
)
|
3539
|
-
response_data.read()
|
3540
|
-
return self.api_client.response_deserialize(
|
3541
|
-
response_data=response_data,
|
3542
|
-
response_types_map=_response_types_map,
|
3543
|
-
).data
|
3544
|
-
|
3545
|
-
|
3546
|
-
@validate_call
|
3547
|
-
def notify_model_scan_started_with_http_info(
|
3548
|
-
self,
|
3549
|
-
scan_id: StrictStr,
|
3550
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
|
3551
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3552
|
-
_request_timeout: Union[
|
3553
|
-
None,
|
3554
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3555
|
-
Tuple[
|
3556
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3557
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3558
|
-
]
|
3559
|
-
] = None,
|
3560
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3561
|
-
_content_type: Optional[StrictStr] = None,
|
3562
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3563
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3564
|
-
) -> ApiResponse[None]:
|
3565
|
-
"""Indicate model scan has started
|
3566
|
-
|
3567
|
-
|
3568
|
-
:param scan_id: (required)
|
3569
|
-
:type scan_id: str
|
3570
|
-
:param scan_report_v3: Request body for create (required)
|
3571
|
-
:type scan_report_v3: ScanReportV3
|
3572
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3573
|
-
:type has_detections: bool
|
3574
|
-
:param _request_timeout: timeout setting for this request. If one
|
3575
|
-
number provided, it will be total request
|
3576
|
-
timeout. It can also be a pair (tuple) of
|
3577
|
-
(connection, read) timeouts.
|
3578
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3579
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3580
|
-
request; this effectively ignores the
|
3581
|
-
authentication in the spec for a single request.
|
3582
|
-
:type _request_auth: dict, optional
|
3583
|
-
:param _content_type: force content-type for the request.
|
3584
|
-
:type _content_type: str, Optional
|
3585
|
-
:param _headers: set to override the headers for a single
|
3586
|
-
request; this effectively ignores the headers
|
3587
|
-
in the spec for a single request.
|
3588
|
-
:type _headers: dict, optional
|
3589
|
-
:param _host_index: set to override the host_index for a single
|
3590
|
-
request; this effectively ignores the host_index
|
3591
|
-
in the spec for a single request.
|
3592
|
-
:type _host_index: int, optional
|
3593
|
-
:return: Returns the result object.
|
3594
|
-
""" # noqa: E501
|
3595
|
-
|
3596
|
-
_param = self._notify_model_scan_started_serialize(
|
3597
|
-
scan_id=scan_id,
|
3598
|
-
scan_report_v3=scan_report_v3,
|
3599
|
-
has_detections=has_detections,
|
3600
|
-
_request_auth=_request_auth,
|
3601
|
-
_content_type=_content_type,
|
3602
|
-
_headers=_headers,
|
3603
|
-
_host_index=_host_index
|
3604
|
-
)
|
3605
|
-
|
3606
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3607
|
-
'201': None,
|
3608
|
-
'400': None,
|
3609
|
-
'422': "ValidationErrorModel",
|
3610
|
-
}
|
3611
|
-
response_data = self.api_client.call_api(
|
3612
|
-
*_param,
|
3613
|
-
_request_timeout=_request_timeout
|
3614
|
-
)
|
3615
|
-
response_data.read()
|
3616
|
-
return self.api_client.response_deserialize(
|
3617
|
-
response_data=response_data,
|
3618
|
-
response_types_map=_response_types_map,
|
3619
|
-
)
|
3620
|
-
|
3621
|
-
|
3622
|
-
@validate_call
|
3623
|
-
def notify_model_scan_started_without_preload_content(
|
3624
|
-
self,
|
3625
|
-
scan_id: StrictStr,
|
3626
|
-
scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
|
3627
|
-
has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
|
3628
|
-
_request_timeout: Union[
|
3629
|
-
None,
|
3630
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3631
|
-
Tuple[
|
3632
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3633
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3634
|
-
]
|
3635
|
-
] = None,
|
3636
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3637
|
-
_content_type: Optional[StrictStr] = None,
|
3638
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3639
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3640
|
-
) -> RESTResponseType:
|
3641
|
-
"""Indicate model scan has started
|
3642
|
-
|
3643
|
-
|
3644
|
-
:param scan_id: (required)
|
3645
|
-
:type scan_id: str
|
3646
|
-
:param scan_report_v3: Request body for create (required)
|
3647
|
-
:type scan_report_v3: ScanReportV3
|
3648
|
-
:param has_detections: Filter file_results to only those that have detections (and parents)
|
3649
|
-
:type has_detections: bool
|
3650
|
-
:param _request_timeout: timeout setting for this request. If one
|
3651
|
-
number provided, it will be total request
|
3652
|
-
timeout. It can also be a pair (tuple) of
|
3653
|
-
(connection, read) timeouts.
|
3654
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3655
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3656
|
-
request; this effectively ignores the
|
3657
|
-
authentication in the spec for a single request.
|
3658
|
-
:type _request_auth: dict, optional
|
3659
|
-
:param _content_type: force content-type for the request.
|
3660
|
-
:type _content_type: str, Optional
|
3661
|
-
:param _headers: set to override the headers for a single
|
3662
|
-
request; this effectively ignores the headers
|
3663
|
-
in the spec for a single request.
|
3664
|
-
:type _headers: dict, optional
|
3665
|
-
:param _host_index: set to override the host_index for a single
|
3666
|
-
request; this effectively ignores the host_index
|
3667
|
-
in the spec for a single request.
|
3668
|
-
:type _host_index: int, optional
|
3669
|
-
:return: Returns the result object.
|
3670
|
-
""" # noqa: E501
|
3671
|
-
|
3672
|
-
_param = self._notify_model_scan_started_serialize(
|
3673
|
-
scan_id=scan_id,
|
3674
|
-
scan_report_v3=scan_report_v3,
|
3675
|
-
has_detections=has_detections,
|
3676
|
-
_request_auth=_request_auth,
|
3677
|
-
_content_type=_content_type,
|
3678
|
-
_headers=_headers,
|
3679
|
-
_host_index=_host_index
|
3680
|
-
)
|
3681
|
-
|
3682
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3683
|
-
'201': None,
|
3684
|
-
'400': None,
|
3685
|
-
'422': "ValidationErrorModel",
|
3686
|
-
}
|
3687
|
-
response_data = self.api_client.call_api(
|
3688
|
-
*_param,
|
3689
|
-
_request_timeout=_request_timeout
|
3690
|
-
)
|
3691
|
-
return response_data.response
|
3692
|
-
|
3693
|
-
|
3694
|
-
def _notify_model_scan_started_serialize(
|
3695
|
-
self,
|
3696
|
-
scan_id,
|
3697
|
-
scan_report_v3,
|
3698
|
-
has_detections,
|
3699
|
-
_request_auth,
|
3700
|
-
_content_type,
|
3701
|
-
_headers,
|
3702
|
-
_host_index,
|
3703
|
-
) -> RequestSerialized:
|
3704
|
-
|
3705
|
-
_host = None
|
3706
|
-
|
3707
|
-
_collection_formats: Dict[str, str] = {
|
3708
|
-
}
|
3709
|
-
|
3710
|
-
_path_params: Dict[str, str] = {}
|
3711
|
-
_query_params: List[Tuple[str, str]] = []
|
3712
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3713
|
-
_form_params: List[Tuple[str, str]] = []
|
3714
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
3715
|
-
_body_params: Optional[bytes] = None
|
3716
|
-
|
3717
|
-
# process the path parameters
|
3718
|
-
if scan_id is not None:
|
3719
|
-
_path_params['scan_id'] = scan_id
|
3720
|
-
# process the query parameters
|
3721
|
-
if has_detections is not None:
|
3722
|
-
|
3723
|
-
_query_params.append(('has_detections', has_detections))
|
3724
|
-
|
3725
|
-
# process the header parameters
|
3726
|
-
# process the form parameters
|
3727
|
-
# process the body parameter
|
3728
|
-
if scan_report_v3 is not None:
|
3729
|
-
_body_params = scan_report_v3
|
3730
|
-
|
3731
|
-
|
3732
|
-
# set the HTTP header `Accept`
|
3733
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
3734
|
-
[
|
3735
|
-
'application/json'
|
3736
|
-
]
|
3737
|
-
)
|
3738
|
-
|
3739
|
-
# set the HTTP header `Content-Type`
|
3740
|
-
if _content_type:
|
3741
|
-
_header_params['Content-Type'] = _content_type
|
3742
|
-
else:
|
3743
|
-
_default_content_type = (
|
3744
|
-
self.api_client.select_header_content_type(
|
3745
|
-
[
|
3746
|
-
'application/json'
|
3747
|
-
]
|
3748
|
-
)
|
3749
|
-
)
|
3750
|
-
if _default_content_type is not None:
|
3751
|
-
_header_params['Content-Type'] = _default_content_type
|
3752
|
-
|
3753
|
-
# authentication setting
|
3754
|
-
_auth_settings: List[str] = [
|
3755
|
-
'BearerAuth'
|
3756
|
-
]
|
3757
|
-
|
3758
|
-
return self.api_client.param_serialize(
|
3759
|
-
method='POST',
|
3760
|
-
resource_path='/scan/v3/results/{scan_id}',
|
3761
|
-
path_params=_path_params,
|
3762
|
-
query_params=_query_params,
|
3763
|
-
header_params=_header_params,
|
3764
|
-
body=_body_params,
|
3765
|
-
post_params=_form_params,
|
3766
|
-
files=_files,
|
3767
|
-
auth_settings=_auth_settings,
|
3768
|
-
collection_formats=_collection_formats,
|
3769
|
-
_host=_host,
|
3770
|
-
_request_auth=_request_auth
|
3771
|
-
)
|
3772
|
-
|
3773
|
-
|
3774
|
-
|
3775
|
-
|
3776
|
-
@validate_call
|
3777
|
-
def report_scan_results(
|
3778
|
-
self,
|
3779
|
-
scan_id: StrictStr,
|
3780
|
-
scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
|
3781
|
-
_request_timeout: Union[
|
3782
|
-
None,
|
3783
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3784
|
-
Tuple[
|
3785
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3786
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3787
|
-
]
|
3788
|
-
] = None,
|
3789
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3790
|
-
_content_type: Optional[StrictStr] = None,
|
3791
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3792
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3793
|
-
) -> None:
|
3794
|
-
"""Engine Report Endpoint of Model Scan Results
|
3795
|
-
|
3796
|
-
|
3797
|
-
:param scan_id: (required)
|
3798
|
-
:type scan_id: str
|
3799
|
-
:param scan_create_request: Request body for reporting a scan of one or more file results (required)
|
3800
|
-
:type scan_create_request: ScanCreateRequest
|
3801
|
-
:param _request_timeout: timeout setting for this request. If one
|
3802
|
-
number provided, it will be total request
|
3803
|
-
timeout. It can also be a pair (tuple) of
|
3804
|
-
(connection, read) timeouts.
|
3805
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3806
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3807
|
-
request; this effectively ignores the
|
3808
|
-
authentication in the spec for a single request.
|
3809
|
-
:type _request_auth: dict, optional
|
3810
|
-
:param _content_type: force content-type for the request.
|
3811
|
-
:type _content_type: str, Optional
|
3812
|
-
:param _headers: set to override the headers for a single
|
3813
|
-
request; this effectively ignores the headers
|
3814
|
-
in the spec for a single request.
|
3815
|
-
:type _headers: dict, optional
|
3816
|
-
:param _host_index: set to override the host_index for a single
|
3817
|
-
request; this effectively ignores the host_index
|
3818
|
-
in the spec for a single request.
|
3819
|
-
:type _host_index: int, optional
|
3820
|
-
:return: Returns the result object.
|
3821
|
-
""" # noqa: E501
|
3822
|
-
|
3823
|
-
_param = self._report_scan_results_serialize(
|
3824
|
-
scan_id=scan_id,
|
3825
|
-
scan_create_request=scan_create_request,
|
3826
|
-
_request_auth=_request_auth,
|
3827
|
-
_content_type=_content_type,
|
3828
|
-
_headers=_headers,
|
3829
|
-
_host_index=_host_index
|
3830
|
-
)
|
3831
|
-
|
3832
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3833
|
-
'204': None,
|
3834
|
-
'400': None,
|
3835
|
-
'422': "ValidationErrorModel",
|
3836
|
-
}
|
3837
|
-
response_data = self.api_client.call_api(
|
3838
|
-
*_param,
|
3839
|
-
_request_timeout=_request_timeout
|
3840
|
-
)
|
3841
|
-
response_data.read()
|
3842
|
-
return self.api_client.response_deserialize(
|
3843
|
-
response_data=response_data,
|
3844
|
-
response_types_map=_response_types_map,
|
3845
|
-
).data
|
3846
|
-
|
3847
|
-
|
3848
|
-
@validate_call
|
3849
|
-
def report_scan_results_with_http_info(
|
3850
|
-
self,
|
3851
|
-
scan_id: StrictStr,
|
3852
|
-
scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
|
3853
|
-
_request_timeout: Union[
|
3854
|
-
None,
|
3855
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3856
|
-
Tuple[
|
3857
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3858
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3859
|
-
]
|
3860
|
-
] = None,
|
3861
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3862
|
-
_content_type: Optional[StrictStr] = None,
|
3863
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3864
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3865
|
-
) -> ApiResponse[None]:
|
3866
|
-
"""Engine Report Endpoint of Model Scan Results
|
3867
|
-
|
3868
|
-
|
3869
|
-
:param scan_id: (required)
|
3870
|
-
:type scan_id: str
|
3871
|
-
:param scan_create_request: Request body for reporting a scan of one or more file results (required)
|
3872
|
-
:type scan_create_request: ScanCreateRequest
|
3873
|
-
:param _request_timeout: timeout setting for this request. If one
|
3874
|
-
number provided, it will be total request
|
3875
|
-
timeout. It can also be a pair (tuple) of
|
3876
|
-
(connection, read) timeouts.
|
3877
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3878
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3879
|
-
request; this effectively ignores the
|
3880
|
-
authentication in the spec for a single request.
|
3881
|
-
:type _request_auth: dict, optional
|
3882
|
-
:param _content_type: force content-type for the request.
|
3883
|
-
:type _content_type: str, Optional
|
3884
|
-
:param _headers: set to override the headers for a single
|
3885
|
-
request; this effectively ignores the headers
|
3886
|
-
in the spec for a single request.
|
3887
|
-
:type _headers: dict, optional
|
3888
|
-
:param _host_index: set to override the host_index for a single
|
3889
|
-
request; this effectively ignores the host_index
|
3890
|
-
in the spec for a single request.
|
3891
|
-
:type _host_index: int, optional
|
3892
|
-
:return: Returns the result object.
|
3893
|
-
""" # noqa: E501
|
3894
|
-
|
3895
|
-
_param = self._report_scan_results_serialize(
|
3896
|
-
scan_id=scan_id,
|
3897
|
-
scan_create_request=scan_create_request,
|
3898
|
-
_request_auth=_request_auth,
|
3899
|
-
_content_type=_content_type,
|
3900
|
-
_headers=_headers,
|
3901
|
-
_host_index=_host_index
|
3902
|
-
)
|
3903
|
-
|
3904
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3905
|
-
'204': None,
|
3906
|
-
'400': None,
|
3907
|
-
'422': "ValidationErrorModel",
|
3908
|
-
}
|
3909
|
-
response_data = self.api_client.call_api(
|
3910
|
-
*_param,
|
3911
|
-
_request_timeout=_request_timeout
|
3912
|
-
)
|
3913
|
-
response_data.read()
|
3914
|
-
return self.api_client.response_deserialize(
|
3915
|
-
response_data=response_data,
|
3916
|
-
response_types_map=_response_types_map,
|
3917
|
-
)
|
3918
|
-
|
3919
|
-
|
3920
|
-
@validate_call
|
3921
|
-
def report_scan_results_without_preload_content(
|
3922
|
-
self,
|
3923
|
-
scan_id: StrictStr,
|
3924
|
-
scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
|
3925
|
-
_request_timeout: Union[
|
3926
|
-
None,
|
3927
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3928
|
-
Tuple[
|
3929
|
-
Annotated[StrictFloat, Field(gt=0)],
|
3930
|
-
Annotated[StrictFloat, Field(gt=0)]
|
3931
|
-
]
|
3932
|
-
] = None,
|
3933
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3934
|
-
_content_type: Optional[StrictStr] = None,
|
3935
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3936
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3937
|
-
) -> RESTResponseType:
|
3938
|
-
"""Engine Report Endpoint of Model Scan Results
|
3939
|
-
|
3940
|
-
|
3941
|
-
:param scan_id: (required)
|
3942
|
-
:type scan_id: str
|
3943
|
-
:param scan_create_request: Request body for reporting a scan of one or more file results (required)
|
3944
|
-
:type scan_create_request: ScanCreateRequest
|
3945
|
-
:param _request_timeout: timeout setting for this request. If one
|
3946
|
-
number provided, it will be total request
|
3947
|
-
timeout. It can also be a pair (tuple) of
|
3948
|
-
(connection, read) timeouts.
|
3949
|
-
:type _request_timeout: int, tuple(int, int), optional
|
3950
|
-
:param _request_auth: set to override the auth_settings for an a single
|
3951
|
-
request; this effectively ignores the
|
3952
|
-
authentication in the spec for a single request.
|
3953
|
-
:type _request_auth: dict, optional
|
3954
|
-
:param _content_type: force content-type for the request.
|
3955
|
-
:type _content_type: str, Optional
|
3956
|
-
:param _headers: set to override the headers for a single
|
3957
|
-
request; this effectively ignores the headers
|
3958
|
-
in the spec for a single request.
|
3959
|
-
:type _headers: dict, optional
|
3960
|
-
:param _host_index: set to override the host_index for a single
|
3961
|
-
request; this effectively ignores the host_index
|
3962
|
-
in the spec for a single request.
|
3963
|
-
:type _host_index: int, optional
|
3964
|
-
:return: Returns the result object.
|
3965
|
-
""" # noqa: E501
|
3966
|
-
|
3967
|
-
_param = self._report_scan_results_serialize(
|
3968
|
-
scan_id=scan_id,
|
3969
|
-
scan_create_request=scan_create_request,
|
3970
|
-
_request_auth=_request_auth,
|
3971
|
-
_content_type=_content_type,
|
3972
|
-
_headers=_headers,
|
3973
|
-
_host_index=_host_index
|
3974
|
-
)
|
3975
|
-
|
3976
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
3977
|
-
'204': None,
|
3978
|
-
'400': None,
|
3979
|
-
'422': "ValidationErrorModel",
|
3980
|
-
}
|
3981
|
-
response_data = self.api_client.call_api(
|
3982
|
-
*_param,
|
3983
|
-
_request_timeout=_request_timeout
|
3984
|
-
)
|
3985
|
-
return response_data.response
|
3986
|
-
|
3987
|
-
|
3988
|
-
def _report_scan_results_serialize(
|
3989
|
-
self,
|
3990
|
-
scan_id,
|
3991
|
-
scan_create_request,
|
3992
|
-
_request_auth,
|
3993
|
-
_content_type,
|
3994
|
-
_headers,
|
3995
|
-
_host_index,
|
3996
|
-
) -> RequestSerialized:
|
3997
|
-
|
3998
|
-
_host = None
|
3999
|
-
|
4000
|
-
_collection_formats: Dict[str, str] = {
|
4001
|
-
}
|
4002
|
-
|
4003
|
-
_path_params: Dict[str, str] = {}
|
4004
|
-
_query_params: List[Tuple[str, str]] = []
|
4005
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
4006
|
-
_form_params: List[Tuple[str, str]] = []
|
4007
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
4008
|
-
_body_params: Optional[bytes] = None
|
4009
|
-
|
4010
|
-
# process the path parameters
|
4011
|
-
if scan_id is not None:
|
4012
|
-
_path_params['scan_id'] = scan_id
|
4013
|
-
# process the query parameters
|
4014
|
-
# process the header parameters
|
4015
|
-
# process the form parameters
|
4016
|
-
# process the body parameter
|
4017
|
-
if scan_create_request is not None:
|
4018
|
-
_body_params = scan_create_request
|
4019
|
-
|
4020
|
-
|
4021
|
-
# set the HTTP header `Accept`
|
4022
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
4023
|
-
[
|
4024
|
-
'application/json'
|
4025
|
-
]
|
4026
|
-
)
|
4027
|
-
|
4028
|
-
# set the HTTP header `Content-Type`
|
4029
|
-
if _content_type:
|
4030
|
-
_header_params['Content-Type'] = _content_type
|
4031
|
-
else:
|
4032
|
-
_default_content_type = (
|
4033
|
-
self.api_client.select_header_content_type(
|
4034
|
-
[
|
4035
|
-
'application/json',
|
4036
|
-
'application/octet-stream'
|
4037
|
-
]
|
4038
|
-
)
|
4039
|
-
)
|
4040
|
-
if _default_content_type is not None:
|
4041
|
-
_header_params['Content-Type'] = _default_content_type
|
4042
|
-
|
4043
|
-
# authentication setting
|
4044
|
-
_auth_settings: List[str] = [
|
4045
|
-
'BearerAuth'
|
4046
|
-
]
|
4047
|
-
|
4048
|
-
return self.api_client.param_serialize(
|
4049
|
-
method='POST',
|
4050
|
-
resource_path='/scans/v3/reports/{scan_id}',
|
4051
|
-
path_params=_path_params,
|
4052
|
-
query_params=_query_params,
|
4053
|
-
header_params=_header_params,
|
4054
|
-
body=_body_params,
|
4055
|
-
post_params=_form_params,
|
4056
|
-
files=_files,
|
4057
|
-
auth_settings=_auth_settings,
|
4058
|
-
collection_formats=_collection_formats,
|
4059
|
-
_host=_host,
|
4060
|
-
_request_auth=_request_auth
|
4061
|
-
)
|
4062
|
-
|
4063
|
-
|