hiddenlayer-sdk 0.1.1__py3-none-any.whl → 1.0.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. hiddenlayer/sdk/models.py +45 -8
  2. hiddenlayer/sdk/rest/__init__.py +80 -3
  3. hiddenlayer/sdk/rest/api/__init__.py +3 -0
  4. hiddenlayer/sdk/rest/api/aidr_predictive_api.py +1 -1
  5. hiddenlayer/sdk/rest/api/health_api.py +272 -0
  6. hiddenlayer/sdk/rest/api/model_scan_api.py +1 -1
  7. hiddenlayer/sdk/rest/api/model_supply_chain_api.py +2927 -0
  8. hiddenlayer/sdk/rest/api/readiness_api.py +272 -0
  9. hiddenlayer/sdk/rest/api/sensor_api.py +345 -16
  10. hiddenlayer/sdk/rest/api_client.py +1 -1
  11. hiddenlayer/sdk/rest/configuration.py +4 -4
  12. hiddenlayer/sdk/rest/exceptions.py +1 -1
  13. hiddenlayer/sdk/rest/models/__init__.py +77 -3
  14. hiddenlayer/sdk/rest/models/address.py +110 -0
  15. hiddenlayer/sdk/rest/models/artifact.py +155 -0
  16. hiddenlayer/sdk/rest/models/artifact_change.py +108 -0
  17. hiddenlayer/sdk/rest/models/artifact_content.py +101 -0
  18. hiddenlayer/sdk/rest/models/artifact_location.py +109 -0
  19. hiddenlayer/sdk/rest/models/attachment.py +129 -0
  20. hiddenlayer/sdk/rest/models/code_flow.py +113 -0
  21. hiddenlayer/sdk/rest/models/configuration_override.py +108 -0
  22. hiddenlayer/sdk/rest/models/conversion.py +114 -0
  23. hiddenlayer/sdk/rest/models/create_sensor_request.py +1 -1
  24. hiddenlayer/sdk/rest/models/detections.py +101 -0
  25. hiddenlayer/sdk/rest/models/edge.py +108 -0
  26. hiddenlayer/sdk/rest/models/edge_traversal.py +122 -0
  27. hiddenlayer/sdk/rest/models/exception.py +113 -0
  28. hiddenlayer/sdk/rest/models/external_properties.py +273 -0
  29. hiddenlayer/sdk/rest/models/external_property_file_reference.py +102 -0
  30. hiddenlayer/sdk/rest/models/external_property_file_references.py +240 -0
  31. hiddenlayer/sdk/rest/models/file_details_v3.py +140 -0
  32. hiddenlayer/sdk/rest/models/file_results_inner.py +121 -0
  33. hiddenlayer/sdk/rest/models/file_scan_report_v3.py +95 -0
  34. hiddenlayer/sdk/rest/models/fix.py +113 -0
  35. hiddenlayer/sdk/rest/models/get_multipart_upload_response.py +1 -1
  36. hiddenlayer/sdk/rest/models/graph.py +123 -0
  37. hiddenlayer/sdk/rest/models/graph_traversal.py +97 -0
  38. hiddenlayer/sdk/rest/models/invocation.py +199 -0
  39. hiddenlayer/sdk/rest/models/location.py +146 -0
  40. hiddenlayer/sdk/rest/models/{validation_error_model_loc_inner.py → location_inner.py} +7 -7
  41. hiddenlayer/sdk/rest/models/location_relationship.py +107 -0
  42. hiddenlayer/sdk/rest/models/logical_location.py +104 -0
  43. hiddenlayer/sdk/rest/models/message.py +92 -0
  44. hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +110 -0
  45. hiddenlayer/sdk/rest/models/model.py +1 -1
  46. hiddenlayer/sdk/rest/models/model_inventory_info.py +99 -0
  47. hiddenlayer/sdk/rest/models/model_query_response.py +1 -1
  48. hiddenlayer/sdk/rest/models/model_scan_api_v3_scan_model_version_id_patch200_response.py +87 -0
  49. hiddenlayer/sdk/rest/models/model_scan_api_v3_scan_query200_response.py +102 -0
  50. hiddenlayer/sdk/rest/models/multiformat_message_string.py +95 -0
  51. hiddenlayer/sdk/rest/models/multipart_upload_part.py +1 -1
  52. hiddenlayer/sdk/rest/models/node.py +122 -0
  53. hiddenlayer/sdk/rest/models/notification.py +157 -0
  54. hiddenlayer/sdk/rest/models/paged_response_with_total.py +94 -0
  55. hiddenlayer/sdk/rest/models/physical_location.py +94 -0
  56. hiddenlayer/sdk/rest/models/property_bag.py +101 -0
  57. hiddenlayer/sdk/rest/models/rectangle.py +110 -0
  58. hiddenlayer/sdk/rest/models/region.py +127 -0
  59. hiddenlayer/sdk/rest/models/replacement.py +103 -0
  60. hiddenlayer/sdk/rest/models/reporting_configuration.py +113 -0
  61. hiddenlayer/sdk/rest/models/reporting_descriptor.py +162 -0
  62. hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +103 -0
  63. hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +115 -0
  64. hiddenlayer/sdk/rest/models/result.py +312 -0
  65. hiddenlayer/sdk/rest/models/result_provenance.py +133 -0
  66. hiddenlayer/sdk/rest/models/rule_details_inner.py +102 -0
  67. hiddenlayer/sdk/rest/models/run.py +318 -0
  68. hiddenlayer/sdk/rest/models/run_automation_details.py +129 -0
  69. hiddenlayer/sdk/rest/models/sarif210.py +123 -0
  70. hiddenlayer/sdk/rest/models/scan_create_request.py +87 -0
  71. hiddenlayer/sdk/rest/models/scan_detection_v3.py +156 -0
  72. hiddenlayer/sdk/rest/models/scan_header_v3.py +129 -0
  73. hiddenlayer/sdk/rest/models/scan_job.py +109 -0
  74. hiddenlayer/sdk/rest/models/scan_job_inventory.py +137 -0
  75. hiddenlayer/sdk/rest/models/scan_model_details_v3.py +95 -0
  76. hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +89 -0
  77. hiddenlayer/sdk/rest/models/scan_model_request.py +1 -1
  78. hiddenlayer/sdk/rest/models/scan_report_v3.py +139 -0
  79. hiddenlayer/sdk/rest/models/{file_info.py → scan_results.py} +14 -6
  80. hiddenlayer/sdk/rest/models/scan_results_v2.py +30 -10
  81. hiddenlayer/sdk/rest/models/security_posture.py +89 -0
  82. hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +101 -0
  83. hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +127 -0
  84. hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +1 -1
  85. hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +1 -1
  86. hiddenlayer/sdk/rest/models/special_locations.py +97 -0
  87. hiddenlayer/sdk/rest/models/stack.py +113 -0
  88. hiddenlayer/sdk/rest/models/stack_frame.py +104 -0
  89. hiddenlayer/sdk/rest/models/submission_response.py +1 -1
  90. hiddenlayer/sdk/rest/models/submission_v2.py +1 -1
  91. hiddenlayer/sdk/rest/models/suppression.py +133 -0
  92. hiddenlayer/sdk/rest/models/thread_flow.py +144 -0
  93. hiddenlayer/sdk/rest/models/thread_flow_location.py +166 -0
  94. hiddenlayer/sdk/rest/models/tool.py +107 -0
  95. hiddenlayer/sdk/rest/models/tool_component.py +251 -0
  96. hiddenlayer/sdk/rest/models/tool_component_reference.py +108 -0
  97. hiddenlayer/sdk/rest/models/translation_metadata.py +110 -0
  98. hiddenlayer/sdk/rest/models/validation_error_model.py +4 -4
  99. hiddenlayer/sdk/rest/models/version_control_details.py +108 -0
  100. hiddenlayer/sdk/rest/models/web_request.py +112 -0
  101. hiddenlayer/sdk/rest/models/web_response.py +112 -0
  102. hiddenlayer/sdk/rest/rest.py +1 -1
  103. hiddenlayer/sdk/services/model.py +5 -2
  104. hiddenlayer/sdk/services/model_scan.py +153 -105
  105. hiddenlayer/sdk/version.py +1 -1
  106. {hiddenlayer_sdk-0.1.1.dist-info → hiddenlayer_sdk-1.0.0.dist-info}/METADATA +39 -20
  107. hiddenlayer_sdk-1.0.0.dist-info/RECORD +118 -0
  108. {hiddenlayer_sdk-0.1.1.dist-info → hiddenlayer_sdk-1.0.0.dist-info}/WHEEL +1 -1
  109. hiddenlayer/sdk/enterprise/__init__.py +0 -0
  110. hiddenlayer/sdk/enterprise/enterprise_model_scan_api.py +0 -55
  111. hiddenlayer_sdk-0.1.1.dist-info/RECORD +0 -43
  112. {hiddenlayer_sdk-0.1.1.dist-info → hiddenlayer_sdk-1.0.0.dist-info}/LICENSE +0 -0
  113. {hiddenlayer_sdk-0.1.1.dist-info → hiddenlayer_sdk-1.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2927 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HiddenLayer ModelScan V2
5
+
6
+ HiddenLayer ModelScan API for scanning of models
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, StrictStr, field_validator
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from hiddenlayer.sdk.rest.models.model_scan_api_v3_scan_model_version_id_patch200_response import ModelScanApiV3ScanModelVersionIdPatch200Response
24
+ from hiddenlayer.sdk.rest.models.model_scan_api_v3_scan_query200_response import ModelScanApiV3ScanQuery200Response
25
+ from hiddenlayer.sdk.rest.models.scan_create_request import ScanCreateRequest
26
+ from hiddenlayer.sdk.rest.models.scan_job import ScanJob
27
+ from hiddenlayer.sdk.rest.models.scan_report_v3 import ScanReportV3
28
+ from hiddenlayer.sdk.rest.models.scan_results_v2 import ScanResultsV2
29
+
30
+ from hiddenlayer.sdk.rest.api_client import ApiClient, RequestSerialized
31
+ from hiddenlayer.sdk.rest.api_response import ApiResponse
32
+ from hiddenlayer.sdk.rest.rest import RESTResponseType
33
+
34
+
35
+ class ModelSupplyChainApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def model_scan_api_v3_scan_model_version_id_get(
50
+ self,
51
+ scan_id: StrictStr,
52
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> ScanReportV3:
66
+ """Get Result of a Model Scan
67
+
68
+
69
+ :param scan_id: (required)
70
+ :type scan_id: str
71
+ :param has_detections: Filter file_results to only those that have detections (and parents)
72
+ :type has_detections: bool
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._model_scan_api_v3_scan_model_version_id_get_serialize(
96
+ scan_id=scan_id,
97
+ has_detections=has_detections,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "ScanReportV3",
106
+ '400': None,
107
+ '404': None,
108
+ }
109
+ response_data = self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ def model_scan_api_v3_scan_model_version_id_get_with_http_info(
122
+ self,
123
+ scan_id: StrictStr,
124
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[ScanReportV3]:
138
+ """Get Result of a Model Scan
139
+
140
+
141
+ :param scan_id: (required)
142
+ :type scan_id: str
143
+ :param has_detections: Filter file_results to only those that have detections (and parents)
144
+ :type has_detections: bool
145
+ :param _request_timeout: timeout setting for this request. If one
146
+ number provided, it will be total request
147
+ timeout. It can also be a pair (tuple) of
148
+ (connection, read) timeouts.
149
+ :type _request_timeout: int, tuple(int, int), optional
150
+ :param _request_auth: set to override the auth_settings for an a single
151
+ request; this effectively ignores the
152
+ authentication in the spec for a single request.
153
+ :type _request_auth: dict, optional
154
+ :param _content_type: force content-type for the request.
155
+ :type _content_type: str, Optional
156
+ :param _headers: set to override the headers for a single
157
+ request; this effectively ignores the headers
158
+ in the spec for a single request.
159
+ :type _headers: dict, optional
160
+ :param _host_index: set to override the host_index for a single
161
+ request; this effectively ignores the host_index
162
+ in the spec for a single request.
163
+ :type _host_index: int, optional
164
+ :return: Returns the result object.
165
+ """ # noqa: E501
166
+
167
+ _param = self._model_scan_api_v3_scan_model_version_id_get_serialize(
168
+ scan_id=scan_id,
169
+ has_detections=has_detections,
170
+ _request_auth=_request_auth,
171
+ _content_type=_content_type,
172
+ _headers=_headers,
173
+ _host_index=_host_index
174
+ )
175
+
176
+ _response_types_map: Dict[str, Optional[str]] = {
177
+ '200': "ScanReportV3",
178
+ '400': None,
179
+ '404': None,
180
+ }
181
+ response_data = self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
190
+
191
+
192
+ @validate_call
193
+ def model_scan_api_v3_scan_model_version_id_get_without_preload_content(
194
+ self,
195
+ scan_id: StrictStr,
196
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Get Result of a Model Scan
211
+
212
+
213
+ :param scan_id: (required)
214
+ :type scan_id: str
215
+ :param has_detections: Filter file_results to only those that have detections (and parents)
216
+ :type has_detections: bool
217
+ :param _request_timeout: timeout setting for this request. If one
218
+ number provided, it will be total request
219
+ timeout. It can also be a pair (tuple) of
220
+ (connection, read) timeouts.
221
+ :type _request_timeout: int, tuple(int, int), optional
222
+ :param _request_auth: set to override the auth_settings for an a single
223
+ request; this effectively ignores the
224
+ authentication in the spec for a single request.
225
+ :type _request_auth: dict, optional
226
+ :param _content_type: force content-type for the request.
227
+ :type _content_type: str, Optional
228
+ :param _headers: set to override the headers for a single
229
+ request; this effectively ignores the headers
230
+ in the spec for a single request.
231
+ :type _headers: dict, optional
232
+ :param _host_index: set to override the host_index for a single
233
+ request; this effectively ignores the host_index
234
+ in the spec for a single request.
235
+ :type _host_index: int, optional
236
+ :return: Returns the result object.
237
+ """ # noqa: E501
238
+
239
+ _param = self._model_scan_api_v3_scan_model_version_id_get_serialize(
240
+ scan_id=scan_id,
241
+ has_detections=has_detections,
242
+ _request_auth=_request_auth,
243
+ _content_type=_content_type,
244
+ _headers=_headers,
245
+ _host_index=_host_index
246
+ )
247
+
248
+ _response_types_map: Dict[str, Optional[str]] = {
249
+ '200': "ScanReportV3",
250
+ '400': None,
251
+ '404': None,
252
+ }
253
+ response_data = self.api_client.call_api(
254
+ *_param,
255
+ _request_timeout=_request_timeout
256
+ )
257
+ return response_data.response
258
+
259
+
260
+ def _model_scan_api_v3_scan_model_version_id_get_serialize(
261
+ self,
262
+ scan_id,
263
+ has_detections,
264
+ _request_auth,
265
+ _content_type,
266
+ _headers,
267
+ _host_index,
268
+ ) -> RequestSerialized:
269
+
270
+ _host = None
271
+
272
+ _collection_formats: Dict[str, str] = {
273
+ }
274
+
275
+ _path_params: Dict[str, str] = {}
276
+ _query_params: List[Tuple[str, str]] = []
277
+ _header_params: Dict[str, Optional[str]] = _headers or {}
278
+ _form_params: List[Tuple[str, str]] = []
279
+ _files: Dict[str, Union[str, bytes]] = {}
280
+ _body_params: Optional[bytes] = None
281
+
282
+ # process the path parameters
283
+ if scan_id is not None:
284
+ _path_params['scan_id'] = scan_id
285
+ # process the query parameters
286
+ if has_detections is not None:
287
+
288
+ _query_params.append(('has_detections', has_detections))
289
+
290
+ # process the header parameters
291
+ # process the form parameters
292
+ # process the body parameter
293
+
294
+
295
+ # set the HTTP header `Accept`
296
+ _header_params['Accept'] = self.api_client.select_header_accept(
297
+ [
298
+ 'application/json; charset=utf-8',
299
+ 'application/sarif+json'
300
+ ]
301
+ )
302
+
303
+
304
+ # authentication setting
305
+ _auth_settings: List[str] = [
306
+ 'BearerAuth'
307
+ ]
308
+
309
+ return self.api_client.param_serialize(
310
+ method='GET',
311
+ resource_path='/scan/v3/results/{scan_id}',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ def model_scan_api_v3_scan_model_version_id_patch(
329
+ self,
330
+ scan_id: StrictStr,
331
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
332
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
333
+ _request_timeout: Union[
334
+ None,
335
+ Annotated[StrictFloat, Field(gt=0)],
336
+ Tuple[
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Annotated[StrictFloat, Field(gt=0)]
339
+ ]
340
+ ] = None,
341
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
342
+ _content_type: Optional[StrictStr] = None,
343
+ _headers: Optional[Dict[StrictStr, Any]] = None,
344
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
345
+ ) -> ModelScanApiV3ScanModelVersionIdPatch200Response:
346
+ """Indicate part (file or files) of a model scan has completed
347
+
348
+
349
+ :param scan_id: (required)
350
+ :type scan_id: str
351
+ :param scan_report_v3: Request body for partial update (required)
352
+ :type scan_report_v3: ScanReportV3
353
+ :param has_detections: Filter file_results to only those that have detections (and parents)
354
+ :type has_detections: bool
355
+ :param _request_timeout: timeout setting for this request. If one
356
+ number provided, it will be total request
357
+ timeout. It can also be a pair (tuple) of
358
+ (connection, read) timeouts.
359
+ :type _request_timeout: int, tuple(int, int), optional
360
+ :param _request_auth: set to override the auth_settings for an a single
361
+ request; this effectively ignores the
362
+ authentication in the spec for a single request.
363
+ :type _request_auth: dict, optional
364
+ :param _content_type: force content-type for the request.
365
+ :type _content_type: str, Optional
366
+ :param _headers: set to override the headers for a single
367
+ request; this effectively ignores the headers
368
+ in the spec for a single request.
369
+ :type _headers: dict, optional
370
+ :param _host_index: set to override the host_index for a single
371
+ request; this effectively ignores the host_index
372
+ in the spec for a single request.
373
+ :type _host_index: int, optional
374
+ :return: Returns the result object.
375
+ """ # noqa: E501
376
+
377
+ _param = self._model_scan_api_v3_scan_model_version_id_patch_serialize(
378
+ scan_id=scan_id,
379
+ scan_report_v3=scan_report_v3,
380
+ has_detections=has_detections,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index
385
+ )
386
+
387
+ _response_types_map: Dict[str, Optional[str]] = {
388
+ '200': "ModelScanApiV3ScanModelVersionIdPatch200Response",
389
+ '400': None,
390
+ '422': "ValidationErrorModel",
391
+ }
392
+ response_data = self.api_client.call_api(
393
+ *_param,
394
+ _request_timeout=_request_timeout
395
+ )
396
+ response_data.read()
397
+ return self.api_client.response_deserialize(
398
+ response_data=response_data,
399
+ response_types_map=_response_types_map,
400
+ ).data
401
+
402
+
403
+ @validate_call
404
+ def model_scan_api_v3_scan_model_version_id_patch_with_http_info(
405
+ self,
406
+ scan_id: StrictStr,
407
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
408
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
409
+ _request_timeout: Union[
410
+ None,
411
+ Annotated[StrictFloat, Field(gt=0)],
412
+ Tuple[
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Annotated[StrictFloat, Field(gt=0)]
415
+ ]
416
+ ] = None,
417
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
418
+ _content_type: Optional[StrictStr] = None,
419
+ _headers: Optional[Dict[StrictStr, Any]] = None,
420
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
421
+ ) -> ApiResponse[ModelScanApiV3ScanModelVersionIdPatch200Response]:
422
+ """Indicate part (file or files) of a model scan has completed
423
+
424
+
425
+ :param scan_id: (required)
426
+ :type scan_id: str
427
+ :param scan_report_v3: Request body for partial update (required)
428
+ :type scan_report_v3: ScanReportV3
429
+ :param has_detections: Filter file_results to only those that have detections (and parents)
430
+ :type has_detections: bool
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._model_scan_api_v3_scan_model_version_id_patch_serialize(
454
+ scan_id=scan_id,
455
+ scan_report_v3=scan_report_v3,
456
+ has_detections=has_detections,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ '200': "ModelScanApiV3ScanModelVersionIdPatch200Response",
465
+ '400': None,
466
+ '422': "ValidationErrorModel",
467
+ }
468
+ response_data = self.api_client.call_api(
469
+ *_param,
470
+ _request_timeout=_request_timeout
471
+ )
472
+ response_data.read()
473
+ return self.api_client.response_deserialize(
474
+ response_data=response_data,
475
+ response_types_map=_response_types_map,
476
+ )
477
+
478
+
479
+ @validate_call
480
+ def model_scan_api_v3_scan_model_version_id_patch_without_preload_content(
481
+ self,
482
+ scan_id: StrictStr,
483
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for partial update")],
484
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
485
+ _request_timeout: Union[
486
+ None,
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Tuple[
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Annotated[StrictFloat, Field(gt=0)]
491
+ ]
492
+ ] = None,
493
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
494
+ _content_type: Optional[StrictStr] = None,
495
+ _headers: Optional[Dict[StrictStr, Any]] = None,
496
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
497
+ ) -> RESTResponseType:
498
+ """Indicate part (file or files) of a model scan has completed
499
+
500
+
501
+ :param scan_id: (required)
502
+ :type scan_id: str
503
+ :param scan_report_v3: Request body for partial update (required)
504
+ :type scan_report_v3: ScanReportV3
505
+ :param has_detections: Filter file_results to only those that have detections (and parents)
506
+ :type has_detections: bool
507
+ :param _request_timeout: timeout setting for this request. If one
508
+ number provided, it will be total request
509
+ timeout. It can also be a pair (tuple) of
510
+ (connection, read) timeouts.
511
+ :type _request_timeout: int, tuple(int, int), optional
512
+ :param _request_auth: set to override the auth_settings for an a single
513
+ request; this effectively ignores the
514
+ authentication in the spec for a single request.
515
+ :type _request_auth: dict, optional
516
+ :param _content_type: force content-type for the request.
517
+ :type _content_type: str, Optional
518
+ :param _headers: set to override the headers for a single
519
+ request; this effectively ignores the headers
520
+ in the spec for a single request.
521
+ :type _headers: dict, optional
522
+ :param _host_index: set to override the host_index for a single
523
+ request; this effectively ignores the host_index
524
+ in the spec for a single request.
525
+ :type _host_index: int, optional
526
+ :return: Returns the result object.
527
+ """ # noqa: E501
528
+
529
+ _param = self._model_scan_api_v3_scan_model_version_id_patch_serialize(
530
+ scan_id=scan_id,
531
+ scan_report_v3=scan_report_v3,
532
+ has_detections=has_detections,
533
+ _request_auth=_request_auth,
534
+ _content_type=_content_type,
535
+ _headers=_headers,
536
+ _host_index=_host_index
537
+ )
538
+
539
+ _response_types_map: Dict[str, Optional[str]] = {
540
+ '200': "ModelScanApiV3ScanModelVersionIdPatch200Response",
541
+ '400': None,
542
+ '422': "ValidationErrorModel",
543
+ }
544
+ response_data = self.api_client.call_api(
545
+ *_param,
546
+ _request_timeout=_request_timeout
547
+ )
548
+ return response_data.response
549
+
550
+
551
+ def _model_scan_api_v3_scan_model_version_id_patch_serialize(
552
+ self,
553
+ scan_id,
554
+ scan_report_v3,
555
+ has_detections,
556
+ _request_auth,
557
+ _content_type,
558
+ _headers,
559
+ _host_index,
560
+ ) -> RequestSerialized:
561
+
562
+ _host = None
563
+
564
+ _collection_formats: Dict[str, str] = {
565
+ }
566
+
567
+ _path_params: Dict[str, str] = {}
568
+ _query_params: List[Tuple[str, str]] = []
569
+ _header_params: Dict[str, Optional[str]] = _headers or {}
570
+ _form_params: List[Tuple[str, str]] = []
571
+ _files: Dict[str, Union[str, bytes]] = {}
572
+ _body_params: Optional[bytes] = None
573
+
574
+ # process the path parameters
575
+ if scan_id is not None:
576
+ _path_params['scan_id'] = scan_id
577
+ # process the query parameters
578
+ if has_detections is not None:
579
+
580
+ _query_params.append(('has_detections', has_detections))
581
+
582
+ # process the header parameters
583
+ # process the form parameters
584
+ # process the body parameter
585
+ if scan_report_v3 is not None:
586
+ _body_params = scan_report_v3
587
+
588
+
589
+ # set the HTTP header `Accept`
590
+ _header_params['Accept'] = self.api_client.select_header_accept(
591
+ [
592
+ 'application/json'
593
+ ]
594
+ )
595
+
596
+ # set the HTTP header `Content-Type`
597
+ if _content_type:
598
+ _header_params['Content-Type'] = _content_type
599
+ else:
600
+ _default_content_type = (
601
+ self.api_client.select_header_content_type(
602
+ [
603
+ 'application/json'
604
+ ]
605
+ )
606
+ )
607
+ if _default_content_type is not None:
608
+ _header_params['Content-Type'] = _default_content_type
609
+
610
+ # authentication setting
611
+ _auth_settings: List[str] = [
612
+ 'BearerAuth'
613
+ ]
614
+
615
+ return self.api_client.param_serialize(
616
+ method='PATCH',
617
+ resource_path='/scan/v3/results/{scan_id}',
618
+ path_params=_path_params,
619
+ query_params=_query_params,
620
+ header_params=_header_params,
621
+ body=_body_params,
622
+ post_params=_form_params,
623
+ files=_files,
624
+ auth_settings=_auth_settings,
625
+ collection_formats=_collection_formats,
626
+ _host=_host,
627
+ _request_auth=_request_auth
628
+ )
629
+
630
+
631
+
632
+
633
+ @validate_call
634
+ def model_scan_api_v3_scan_model_version_id_post(
635
+ self,
636
+ scan_id: StrictStr,
637
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
638
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
639
+ _request_timeout: Union[
640
+ None,
641
+ Annotated[StrictFloat, Field(gt=0)],
642
+ Tuple[
643
+ Annotated[StrictFloat, Field(gt=0)],
644
+ Annotated[StrictFloat, Field(gt=0)]
645
+ ]
646
+ ] = None,
647
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
648
+ _content_type: Optional[StrictStr] = None,
649
+ _headers: Optional[Dict[StrictStr, Any]] = None,
650
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
651
+ ) -> None:
652
+ """Indicate model scan has started
653
+
654
+
655
+ :param scan_id: (required)
656
+ :type scan_id: str
657
+ :param scan_report_v3: Request body for create (required)
658
+ :type scan_report_v3: ScanReportV3
659
+ :param has_detections: Filter file_results to only those that have detections (and parents)
660
+ :type has_detections: bool
661
+ :param _request_timeout: timeout setting for this request. If one
662
+ number provided, it will be total request
663
+ timeout. It can also be a pair (tuple) of
664
+ (connection, read) timeouts.
665
+ :type _request_timeout: int, tuple(int, int), optional
666
+ :param _request_auth: set to override the auth_settings for an a single
667
+ request; this effectively ignores the
668
+ authentication in the spec for a single request.
669
+ :type _request_auth: dict, optional
670
+ :param _content_type: force content-type for the request.
671
+ :type _content_type: str, Optional
672
+ :param _headers: set to override the headers for a single
673
+ request; this effectively ignores the headers
674
+ in the spec for a single request.
675
+ :type _headers: dict, optional
676
+ :param _host_index: set to override the host_index for a single
677
+ request; this effectively ignores the host_index
678
+ in the spec for a single request.
679
+ :type _host_index: int, optional
680
+ :return: Returns the result object.
681
+ """ # noqa: E501
682
+
683
+ _param = self._model_scan_api_v3_scan_model_version_id_post_serialize(
684
+ scan_id=scan_id,
685
+ scan_report_v3=scan_report_v3,
686
+ has_detections=has_detections,
687
+ _request_auth=_request_auth,
688
+ _content_type=_content_type,
689
+ _headers=_headers,
690
+ _host_index=_host_index
691
+ )
692
+
693
+ _response_types_map: Dict[str, Optional[str]] = {
694
+ '201': None,
695
+ '400': None,
696
+ '422': "ValidationErrorModel",
697
+ }
698
+ response_data = self.api_client.call_api(
699
+ *_param,
700
+ _request_timeout=_request_timeout
701
+ )
702
+ response_data.read()
703
+ return self.api_client.response_deserialize(
704
+ response_data=response_data,
705
+ response_types_map=_response_types_map,
706
+ ).data
707
+
708
+
709
+ @validate_call
710
+ def model_scan_api_v3_scan_model_version_id_post_with_http_info(
711
+ self,
712
+ scan_id: StrictStr,
713
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
714
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
715
+ _request_timeout: Union[
716
+ None,
717
+ Annotated[StrictFloat, Field(gt=0)],
718
+ Tuple[
719
+ Annotated[StrictFloat, Field(gt=0)],
720
+ Annotated[StrictFloat, Field(gt=0)]
721
+ ]
722
+ ] = None,
723
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
724
+ _content_type: Optional[StrictStr] = None,
725
+ _headers: Optional[Dict[StrictStr, Any]] = None,
726
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
727
+ ) -> ApiResponse[None]:
728
+ """Indicate model scan has started
729
+
730
+
731
+ :param scan_id: (required)
732
+ :type scan_id: str
733
+ :param scan_report_v3: Request body for create (required)
734
+ :type scan_report_v3: ScanReportV3
735
+ :param has_detections: Filter file_results to only those that have detections (and parents)
736
+ :type has_detections: bool
737
+ :param _request_timeout: timeout setting for this request. If one
738
+ number provided, it will be total request
739
+ timeout. It can also be a pair (tuple) of
740
+ (connection, read) timeouts.
741
+ :type _request_timeout: int, tuple(int, int), optional
742
+ :param _request_auth: set to override the auth_settings for an a single
743
+ request; this effectively ignores the
744
+ authentication in the spec for a single request.
745
+ :type _request_auth: dict, optional
746
+ :param _content_type: force content-type for the request.
747
+ :type _content_type: str, Optional
748
+ :param _headers: set to override the headers for a single
749
+ request; this effectively ignores the headers
750
+ in the spec for a single request.
751
+ :type _headers: dict, optional
752
+ :param _host_index: set to override the host_index for a single
753
+ request; this effectively ignores the host_index
754
+ in the spec for a single request.
755
+ :type _host_index: int, optional
756
+ :return: Returns the result object.
757
+ """ # noqa: E501
758
+
759
+ _param = self._model_scan_api_v3_scan_model_version_id_post_serialize(
760
+ scan_id=scan_id,
761
+ scan_report_v3=scan_report_v3,
762
+ has_detections=has_detections,
763
+ _request_auth=_request_auth,
764
+ _content_type=_content_type,
765
+ _headers=_headers,
766
+ _host_index=_host_index
767
+ )
768
+
769
+ _response_types_map: Dict[str, Optional[str]] = {
770
+ '201': None,
771
+ '400': None,
772
+ '422': "ValidationErrorModel",
773
+ }
774
+ response_data = self.api_client.call_api(
775
+ *_param,
776
+ _request_timeout=_request_timeout
777
+ )
778
+ response_data.read()
779
+ return self.api_client.response_deserialize(
780
+ response_data=response_data,
781
+ response_types_map=_response_types_map,
782
+ )
783
+
784
+
785
+ @validate_call
786
+ def model_scan_api_v3_scan_model_version_id_post_without_preload_content(
787
+ self,
788
+ scan_id: StrictStr,
789
+ scan_report_v3: Annotated[ScanReportV3, Field(description="Request body for create")],
790
+ has_detections: Annotated[Optional[StrictBool], Field(description="Filter file_results to only those that have detections (and parents)")] = None,
791
+ _request_timeout: Union[
792
+ None,
793
+ Annotated[StrictFloat, Field(gt=0)],
794
+ Tuple[
795
+ Annotated[StrictFloat, Field(gt=0)],
796
+ Annotated[StrictFloat, Field(gt=0)]
797
+ ]
798
+ ] = None,
799
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
800
+ _content_type: Optional[StrictStr] = None,
801
+ _headers: Optional[Dict[StrictStr, Any]] = None,
802
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
803
+ ) -> RESTResponseType:
804
+ """Indicate model scan has started
805
+
806
+
807
+ :param scan_id: (required)
808
+ :type scan_id: str
809
+ :param scan_report_v3: Request body for create (required)
810
+ :type scan_report_v3: ScanReportV3
811
+ :param has_detections: Filter file_results to only those that have detections (and parents)
812
+ :type has_detections: bool
813
+ :param _request_timeout: timeout setting for this request. If one
814
+ number provided, it will be total request
815
+ timeout. It can also be a pair (tuple) of
816
+ (connection, read) timeouts.
817
+ :type _request_timeout: int, tuple(int, int), optional
818
+ :param _request_auth: set to override the auth_settings for an a single
819
+ request; this effectively ignores the
820
+ authentication in the spec for a single request.
821
+ :type _request_auth: dict, optional
822
+ :param _content_type: force content-type for the request.
823
+ :type _content_type: str, Optional
824
+ :param _headers: set to override the headers for a single
825
+ request; this effectively ignores the headers
826
+ in the spec for a single request.
827
+ :type _headers: dict, optional
828
+ :param _host_index: set to override the host_index for a single
829
+ request; this effectively ignores the host_index
830
+ in the spec for a single request.
831
+ :type _host_index: int, optional
832
+ :return: Returns the result object.
833
+ """ # noqa: E501
834
+
835
+ _param = self._model_scan_api_v3_scan_model_version_id_post_serialize(
836
+ scan_id=scan_id,
837
+ scan_report_v3=scan_report_v3,
838
+ has_detections=has_detections,
839
+ _request_auth=_request_auth,
840
+ _content_type=_content_type,
841
+ _headers=_headers,
842
+ _host_index=_host_index
843
+ )
844
+
845
+ _response_types_map: Dict[str, Optional[str]] = {
846
+ '201': None,
847
+ '400': None,
848
+ '422': "ValidationErrorModel",
849
+ }
850
+ response_data = self.api_client.call_api(
851
+ *_param,
852
+ _request_timeout=_request_timeout
853
+ )
854
+ return response_data.response
855
+
856
+
857
+ def _model_scan_api_v3_scan_model_version_id_post_serialize(
858
+ self,
859
+ scan_id,
860
+ scan_report_v3,
861
+ has_detections,
862
+ _request_auth,
863
+ _content_type,
864
+ _headers,
865
+ _host_index,
866
+ ) -> RequestSerialized:
867
+
868
+ _host = None
869
+
870
+ _collection_formats: Dict[str, str] = {
871
+ }
872
+
873
+ _path_params: Dict[str, str] = {}
874
+ _query_params: List[Tuple[str, str]] = []
875
+ _header_params: Dict[str, Optional[str]] = _headers or {}
876
+ _form_params: List[Tuple[str, str]] = []
877
+ _files: Dict[str, Union[str, bytes]] = {}
878
+ _body_params: Optional[bytes] = None
879
+
880
+ # process the path parameters
881
+ if scan_id is not None:
882
+ _path_params['scan_id'] = scan_id
883
+ # process the query parameters
884
+ if has_detections is not None:
885
+
886
+ _query_params.append(('has_detections', has_detections))
887
+
888
+ # process the header parameters
889
+ # process the form parameters
890
+ # process the body parameter
891
+ if scan_report_v3 is not None:
892
+ _body_params = scan_report_v3
893
+
894
+
895
+ # set the HTTP header `Accept`
896
+ _header_params['Accept'] = self.api_client.select_header_accept(
897
+ [
898
+ 'application/json'
899
+ ]
900
+ )
901
+
902
+ # set the HTTP header `Content-Type`
903
+ if _content_type:
904
+ _header_params['Content-Type'] = _content_type
905
+ else:
906
+ _default_content_type = (
907
+ self.api_client.select_header_content_type(
908
+ [
909
+ 'application/json'
910
+ ]
911
+ )
912
+ )
913
+ if _default_content_type is not None:
914
+ _header_params['Content-Type'] = _default_content_type
915
+
916
+ # authentication setting
917
+ _auth_settings: List[str] = [
918
+ 'BearerAuth'
919
+ ]
920
+
921
+ return self.api_client.param_serialize(
922
+ method='POST',
923
+ resource_path='/scan/v3/results/{scan_id}',
924
+ path_params=_path_params,
925
+ query_params=_query_params,
926
+ header_params=_header_params,
927
+ body=_body_params,
928
+ post_params=_form_params,
929
+ files=_files,
930
+ auth_settings=_auth_settings,
931
+ collection_formats=_collection_formats,
932
+ _host=_host,
933
+ _request_auth=_request_auth
934
+ )
935
+
936
+
937
+
938
+
939
+ @validate_call
940
+ def model_scan_api_v3_scan_query(
941
+ self,
942
+ model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
943
+ model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
944
+ start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
945
+ end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
946
+ severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
947
+ status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
948
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
949
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
950
+ sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
951
+ latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
952
+ _request_timeout: Union[
953
+ None,
954
+ Annotated[StrictFloat, Field(gt=0)],
955
+ Tuple[
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Annotated[StrictFloat, Field(gt=0)]
958
+ ]
959
+ ] = None,
960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
961
+ _content_type: Optional[StrictStr] = None,
962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
964
+ ) -> ModelScanApiV3ScanQuery200Response:
965
+ """Get condensed reports for a Model Scan
966
+
967
+
968
+ :param model_version_ids: Model Version ID
969
+ :type model_version_ids: List[str]
970
+ :param model_ids: Model ID
971
+ :type model_ids: List[str]
972
+ :param start_time: Start Time
973
+ :type start_time: datetime
974
+ :param end_time: End Time
975
+ :type end_time: datetime
976
+ :param severity: Severities
977
+ :type severity: List[str]
978
+ :param status: Statuses
979
+ :type status: List[str]
980
+ :param limit:
981
+ :type limit: int
982
+ :param offset:
983
+ :type offset: int
984
+ :param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
985
+ :type sort: str
986
+ :param latest_per_model_version_only: only return latest result per model version
987
+ :type latest_per_model_version_only: bool
988
+ :param _request_timeout: timeout setting for this request. If one
989
+ number provided, it will be total request
990
+ timeout. It can also be a pair (tuple) of
991
+ (connection, read) timeouts.
992
+ :type _request_timeout: int, tuple(int, int), optional
993
+ :param _request_auth: set to override the auth_settings for an a single
994
+ request; this effectively ignores the
995
+ authentication in the spec for a single request.
996
+ :type _request_auth: dict, optional
997
+ :param _content_type: force content-type for the request.
998
+ :type _content_type: str, Optional
999
+ :param _headers: set to override the headers for a single
1000
+ request; this effectively ignores the headers
1001
+ in the spec for a single request.
1002
+ :type _headers: dict, optional
1003
+ :param _host_index: set to override the host_index for a single
1004
+ request; this effectively ignores the host_index
1005
+ in the spec for a single request.
1006
+ :type _host_index: int, optional
1007
+ :return: Returns the result object.
1008
+ """ # noqa: E501
1009
+
1010
+ _param = self._model_scan_api_v3_scan_query_serialize(
1011
+ model_version_ids=model_version_ids,
1012
+ model_ids=model_ids,
1013
+ start_time=start_time,
1014
+ end_time=end_time,
1015
+ severity=severity,
1016
+ status=status,
1017
+ limit=limit,
1018
+ offset=offset,
1019
+ sort=sort,
1020
+ latest_per_model_version_only=latest_per_model_version_only,
1021
+ _request_auth=_request_auth,
1022
+ _content_type=_content_type,
1023
+ _headers=_headers,
1024
+ _host_index=_host_index
1025
+ )
1026
+
1027
+ _response_types_map: Dict[str, Optional[str]] = {
1028
+ '200': "ModelScanApiV3ScanQuery200Response",
1029
+ '400': None,
1030
+ '404': None,
1031
+ }
1032
+ response_data = self.api_client.call_api(
1033
+ *_param,
1034
+ _request_timeout=_request_timeout
1035
+ )
1036
+ response_data.read()
1037
+ return self.api_client.response_deserialize(
1038
+ response_data=response_data,
1039
+ response_types_map=_response_types_map,
1040
+ ).data
1041
+
1042
+
1043
+ @validate_call
1044
+ def model_scan_api_v3_scan_query_with_http_info(
1045
+ self,
1046
+ model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
1047
+ model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
1048
+ start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
1049
+ end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
1050
+ severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
1051
+ status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
1052
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
1053
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
1054
+ sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
1055
+ latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
1056
+ _request_timeout: Union[
1057
+ None,
1058
+ Annotated[StrictFloat, Field(gt=0)],
1059
+ Tuple[
1060
+ Annotated[StrictFloat, Field(gt=0)],
1061
+ Annotated[StrictFloat, Field(gt=0)]
1062
+ ]
1063
+ ] = None,
1064
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1065
+ _content_type: Optional[StrictStr] = None,
1066
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1067
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1068
+ ) -> ApiResponse[ModelScanApiV3ScanQuery200Response]:
1069
+ """Get condensed reports for a Model Scan
1070
+
1071
+
1072
+ :param model_version_ids: Model Version ID
1073
+ :type model_version_ids: List[str]
1074
+ :param model_ids: Model ID
1075
+ :type model_ids: List[str]
1076
+ :param start_time: Start Time
1077
+ :type start_time: datetime
1078
+ :param end_time: End Time
1079
+ :type end_time: datetime
1080
+ :param severity: Severities
1081
+ :type severity: List[str]
1082
+ :param status: Statuses
1083
+ :type status: List[str]
1084
+ :param limit:
1085
+ :type limit: int
1086
+ :param offset:
1087
+ :type offset: int
1088
+ :param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
1089
+ :type sort: str
1090
+ :param latest_per_model_version_only: only return latest result per model version
1091
+ :type latest_per_model_version_only: bool
1092
+ :param _request_timeout: timeout setting for this request. If one
1093
+ number provided, it will be total request
1094
+ timeout. It can also be a pair (tuple) of
1095
+ (connection, read) timeouts.
1096
+ :type _request_timeout: int, tuple(int, int), optional
1097
+ :param _request_auth: set to override the auth_settings for an a single
1098
+ request; this effectively ignores the
1099
+ authentication in the spec for a single request.
1100
+ :type _request_auth: dict, optional
1101
+ :param _content_type: force content-type for the request.
1102
+ :type _content_type: str, Optional
1103
+ :param _headers: set to override the headers for a single
1104
+ request; this effectively ignores the headers
1105
+ in the spec for a single request.
1106
+ :type _headers: dict, optional
1107
+ :param _host_index: set to override the host_index for a single
1108
+ request; this effectively ignores the host_index
1109
+ in the spec for a single request.
1110
+ :type _host_index: int, optional
1111
+ :return: Returns the result object.
1112
+ """ # noqa: E501
1113
+
1114
+ _param = self._model_scan_api_v3_scan_query_serialize(
1115
+ model_version_ids=model_version_ids,
1116
+ model_ids=model_ids,
1117
+ start_time=start_time,
1118
+ end_time=end_time,
1119
+ severity=severity,
1120
+ status=status,
1121
+ limit=limit,
1122
+ offset=offset,
1123
+ sort=sort,
1124
+ latest_per_model_version_only=latest_per_model_version_only,
1125
+ _request_auth=_request_auth,
1126
+ _content_type=_content_type,
1127
+ _headers=_headers,
1128
+ _host_index=_host_index
1129
+ )
1130
+
1131
+ _response_types_map: Dict[str, Optional[str]] = {
1132
+ '200': "ModelScanApiV3ScanQuery200Response",
1133
+ '400': None,
1134
+ '404': None,
1135
+ }
1136
+ response_data = self.api_client.call_api(
1137
+ *_param,
1138
+ _request_timeout=_request_timeout
1139
+ )
1140
+ response_data.read()
1141
+ return self.api_client.response_deserialize(
1142
+ response_data=response_data,
1143
+ response_types_map=_response_types_map,
1144
+ )
1145
+
1146
+
1147
+ @validate_call
1148
+ def model_scan_api_v3_scan_query_without_preload_content(
1149
+ self,
1150
+ model_version_ids: Annotated[Optional[List[StrictStr]], Field(description="Model Version ID")] = None,
1151
+ model_ids: Annotated[Optional[List[StrictStr]], Field(description="Model ID")] = None,
1152
+ start_time: Annotated[Optional[datetime], Field(description="Start Time")] = None,
1153
+ end_time: Annotated[Optional[datetime], Field(description="End Time")] = None,
1154
+ severity: Annotated[Optional[List[StrictStr]], Field(description="Severities")] = None,
1155
+ status: Annotated[Optional[List[StrictStr]], Field(description="Statuses")] = None,
1156
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
1157
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
1158
+ sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by status, severity or created at, ascending (+) or the default descending (-)")] = None,
1159
+ latest_per_model_version_only: Annotated[Optional[StrictBool], Field(description="only return latest result per model version")] = None,
1160
+ _request_timeout: Union[
1161
+ None,
1162
+ Annotated[StrictFloat, Field(gt=0)],
1163
+ Tuple[
1164
+ Annotated[StrictFloat, Field(gt=0)],
1165
+ Annotated[StrictFloat, Field(gt=0)]
1166
+ ]
1167
+ ] = None,
1168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1169
+ _content_type: Optional[StrictStr] = None,
1170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1172
+ ) -> RESTResponseType:
1173
+ """Get condensed reports for a Model Scan
1174
+
1175
+
1176
+ :param model_version_ids: Model Version ID
1177
+ :type model_version_ids: List[str]
1178
+ :param model_ids: Model ID
1179
+ :type model_ids: List[str]
1180
+ :param start_time: Start Time
1181
+ :type start_time: datetime
1182
+ :param end_time: End Time
1183
+ :type end_time: datetime
1184
+ :param severity: Severities
1185
+ :type severity: List[str]
1186
+ :param status: Statuses
1187
+ :type status: List[str]
1188
+ :param limit:
1189
+ :type limit: int
1190
+ :param offset:
1191
+ :type offset: int
1192
+ :param sort: allow sorting by status, severity or created at, ascending (+) or the default descending (-)
1193
+ :type sort: str
1194
+ :param latest_per_model_version_only: only return latest result per model version
1195
+ :type latest_per_model_version_only: bool
1196
+ :param _request_timeout: timeout setting for this request. If one
1197
+ number provided, it will be total request
1198
+ timeout. It can also be a pair (tuple) of
1199
+ (connection, read) timeouts.
1200
+ :type _request_timeout: int, tuple(int, int), optional
1201
+ :param _request_auth: set to override the auth_settings for an a single
1202
+ request; this effectively ignores the
1203
+ authentication in the spec for a single request.
1204
+ :type _request_auth: dict, optional
1205
+ :param _content_type: force content-type for the request.
1206
+ :type _content_type: str, Optional
1207
+ :param _headers: set to override the headers for a single
1208
+ request; this effectively ignores the headers
1209
+ in the spec for a single request.
1210
+ :type _headers: dict, optional
1211
+ :param _host_index: set to override the host_index for a single
1212
+ request; this effectively ignores the host_index
1213
+ in the spec for a single request.
1214
+ :type _host_index: int, optional
1215
+ :return: Returns the result object.
1216
+ """ # noqa: E501
1217
+
1218
+ _param = self._model_scan_api_v3_scan_query_serialize(
1219
+ model_version_ids=model_version_ids,
1220
+ model_ids=model_ids,
1221
+ start_time=start_time,
1222
+ end_time=end_time,
1223
+ severity=severity,
1224
+ status=status,
1225
+ limit=limit,
1226
+ offset=offset,
1227
+ sort=sort,
1228
+ latest_per_model_version_only=latest_per_model_version_only,
1229
+ _request_auth=_request_auth,
1230
+ _content_type=_content_type,
1231
+ _headers=_headers,
1232
+ _host_index=_host_index
1233
+ )
1234
+
1235
+ _response_types_map: Dict[str, Optional[str]] = {
1236
+ '200': "ModelScanApiV3ScanQuery200Response",
1237
+ '400': None,
1238
+ '404': None,
1239
+ }
1240
+ response_data = self.api_client.call_api(
1241
+ *_param,
1242
+ _request_timeout=_request_timeout
1243
+ )
1244
+ return response_data.response
1245
+
1246
+
1247
+ def _model_scan_api_v3_scan_query_serialize(
1248
+ self,
1249
+ model_version_ids,
1250
+ model_ids,
1251
+ start_time,
1252
+ end_time,
1253
+ severity,
1254
+ status,
1255
+ limit,
1256
+ offset,
1257
+ sort,
1258
+ latest_per_model_version_only,
1259
+ _request_auth,
1260
+ _content_type,
1261
+ _headers,
1262
+ _host_index,
1263
+ ) -> RequestSerialized:
1264
+
1265
+ _host = None
1266
+
1267
+ _collection_formats: Dict[str, str] = {
1268
+ 'model_version_ids': 'csv',
1269
+ 'model_ids': 'csv',
1270
+ 'severity': 'csv',
1271
+ 'status': 'csv',
1272
+ }
1273
+
1274
+ _path_params: Dict[str, str] = {}
1275
+ _query_params: List[Tuple[str, str]] = []
1276
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1277
+ _form_params: List[Tuple[str, str]] = []
1278
+ _files: Dict[str, Union[str, bytes]] = {}
1279
+ _body_params: Optional[bytes] = None
1280
+
1281
+ # process the path parameters
1282
+ # process the query parameters
1283
+ if model_version_ids is not None:
1284
+
1285
+ _query_params.append(('model_version_ids', model_version_ids))
1286
+
1287
+ if model_ids is not None:
1288
+
1289
+ _query_params.append(('model_ids', model_ids))
1290
+
1291
+ if start_time is not None:
1292
+ if isinstance(start_time, datetime):
1293
+ _query_params.append(
1294
+ (
1295
+ 'start_time',
1296
+ start_time.strftime(
1297
+ self.api_client.configuration.datetime_format
1298
+ )
1299
+ )
1300
+ )
1301
+ else:
1302
+ _query_params.append(('start_time', start_time))
1303
+
1304
+ if end_time is not None:
1305
+ if isinstance(end_time, datetime):
1306
+ _query_params.append(
1307
+ (
1308
+ 'end_time',
1309
+ end_time.strftime(
1310
+ self.api_client.configuration.datetime_format
1311
+ )
1312
+ )
1313
+ )
1314
+ else:
1315
+ _query_params.append(('end_time', end_time))
1316
+
1317
+ if severity is not None:
1318
+
1319
+ _query_params.append(('severity', severity))
1320
+
1321
+ if status is not None:
1322
+
1323
+ _query_params.append(('status', status))
1324
+
1325
+ if limit is not None:
1326
+
1327
+ _query_params.append(('limit', limit))
1328
+
1329
+ if offset is not None:
1330
+
1331
+ _query_params.append(('offset', offset))
1332
+
1333
+ if sort is not None:
1334
+
1335
+ _query_params.append(('sort', sort))
1336
+
1337
+ if latest_per_model_version_only is not None:
1338
+
1339
+ _query_params.append(('latest_per_model_version_only', latest_per_model_version_only))
1340
+
1341
+ # process the header parameters
1342
+ # process the form parameters
1343
+ # process the body parameter
1344
+
1345
+
1346
+ # set the HTTP header `Accept`
1347
+ _header_params['Accept'] = self.api_client.select_header_accept(
1348
+ [
1349
+ 'application/json; charset=utf-8'
1350
+ ]
1351
+ )
1352
+
1353
+
1354
+ # authentication setting
1355
+ _auth_settings: List[str] = [
1356
+ 'BearerAuth'
1357
+ ]
1358
+
1359
+ return self.api_client.param_serialize(
1360
+ method='GET',
1361
+ resource_path='/scan/v3/results',
1362
+ path_params=_path_params,
1363
+ query_params=_query_params,
1364
+ header_params=_header_params,
1365
+ body=_body_params,
1366
+ post_params=_form_params,
1367
+ files=_files,
1368
+ auth_settings=_auth_settings,
1369
+ collection_formats=_collection_formats,
1370
+ _host=_host,
1371
+ _request_auth=_request_auth
1372
+ )
1373
+
1374
+
1375
+
1376
+
1377
+ @validate_call
1378
+ def modelscan_api_v3_get_scan_results(
1379
+ self,
1380
+ scan_id: Optional[StrictStr] = None,
1381
+ _request_timeout: Union[
1382
+ None,
1383
+ Annotated[StrictFloat, Field(gt=0)],
1384
+ Tuple[
1385
+ Annotated[StrictFloat, Field(gt=0)],
1386
+ Annotated[StrictFloat, Field(gt=0)]
1387
+ ]
1388
+ ] = None,
1389
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1390
+ _content_type: Optional[StrictStr] = None,
1391
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1392
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1393
+ ) -> List[ScanResultsV2]:
1394
+ """Retrieve Model Scan Results
1395
+
1396
+
1397
+ :param scan_id:
1398
+ :type scan_id: str
1399
+ :param _request_timeout: timeout setting for this request. If one
1400
+ number provided, it will be total request
1401
+ timeout. It can also be a pair (tuple) of
1402
+ (connection, read) timeouts.
1403
+ :type _request_timeout: int, tuple(int, int), optional
1404
+ :param _request_auth: set to override the auth_settings for an a single
1405
+ request; this effectively ignores the
1406
+ authentication in the spec for a single request.
1407
+ :type _request_auth: dict, optional
1408
+ :param _content_type: force content-type for the request.
1409
+ :type _content_type: str, Optional
1410
+ :param _headers: set to override the headers for a single
1411
+ request; this effectively ignores the headers
1412
+ in the spec for a single request.
1413
+ :type _headers: dict, optional
1414
+ :param _host_index: set to override the host_index for a single
1415
+ request; this effectively ignores the host_index
1416
+ in the spec for a single request.
1417
+ :type _host_index: int, optional
1418
+ :return: Returns the result object.
1419
+ """ # noqa: E501
1420
+
1421
+ _param = self._modelscan_api_v3_get_scan_results_serialize(
1422
+ scan_id=scan_id,
1423
+ _request_auth=_request_auth,
1424
+ _content_type=_content_type,
1425
+ _headers=_headers,
1426
+ _host_index=_host_index
1427
+ )
1428
+
1429
+ _response_types_map: Dict[str, Optional[str]] = {
1430
+ '200': "List[ScanResultsV2]",
1431
+ '202': "List[ScanResultsV2]",
1432
+ '400': None,
1433
+ '404': None,
1434
+ '422': "ValidationErrorModel",
1435
+ }
1436
+ response_data = self.api_client.call_api(
1437
+ *_param,
1438
+ _request_timeout=_request_timeout
1439
+ )
1440
+ response_data.read()
1441
+ return self.api_client.response_deserialize(
1442
+ response_data=response_data,
1443
+ response_types_map=_response_types_map,
1444
+ ).data
1445
+
1446
+
1447
+ @validate_call
1448
+ def modelscan_api_v3_get_scan_results_with_http_info(
1449
+ self,
1450
+ scan_id: Optional[StrictStr] = None,
1451
+ _request_timeout: Union[
1452
+ None,
1453
+ Annotated[StrictFloat, Field(gt=0)],
1454
+ Tuple[
1455
+ Annotated[StrictFloat, Field(gt=0)],
1456
+ Annotated[StrictFloat, Field(gt=0)]
1457
+ ]
1458
+ ] = None,
1459
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1460
+ _content_type: Optional[StrictStr] = None,
1461
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1462
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1463
+ ) -> ApiResponse[List[ScanResultsV2]]:
1464
+ """Retrieve Model Scan Results
1465
+
1466
+
1467
+ :param scan_id:
1468
+ :type scan_id: str
1469
+ :param _request_timeout: timeout setting for this request. If one
1470
+ number provided, it will be total request
1471
+ timeout. It can also be a pair (tuple) of
1472
+ (connection, read) timeouts.
1473
+ :type _request_timeout: int, tuple(int, int), optional
1474
+ :param _request_auth: set to override the auth_settings for an a single
1475
+ request; this effectively ignores the
1476
+ authentication in the spec for a single request.
1477
+ :type _request_auth: dict, optional
1478
+ :param _content_type: force content-type for the request.
1479
+ :type _content_type: str, Optional
1480
+ :param _headers: set to override the headers for a single
1481
+ request; this effectively ignores the headers
1482
+ in the spec for a single request.
1483
+ :type _headers: dict, optional
1484
+ :param _host_index: set to override the host_index for a single
1485
+ request; this effectively ignores the host_index
1486
+ in the spec for a single request.
1487
+ :type _host_index: int, optional
1488
+ :return: Returns the result object.
1489
+ """ # noqa: E501
1490
+
1491
+ _param = self._modelscan_api_v3_get_scan_results_serialize(
1492
+ scan_id=scan_id,
1493
+ _request_auth=_request_auth,
1494
+ _content_type=_content_type,
1495
+ _headers=_headers,
1496
+ _host_index=_host_index
1497
+ )
1498
+
1499
+ _response_types_map: Dict[str, Optional[str]] = {
1500
+ '200': "List[ScanResultsV2]",
1501
+ '202': "List[ScanResultsV2]",
1502
+ '400': None,
1503
+ '404': None,
1504
+ '422': "ValidationErrorModel",
1505
+ }
1506
+ response_data = self.api_client.call_api(
1507
+ *_param,
1508
+ _request_timeout=_request_timeout
1509
+ )
1510
+ response_data.read()
1511
+ return self.api_client.response_deserialize(
1512
+ response_data=response_data,
1513
+ response_types_map=_response_types_map,
1514
+ )
1515
+
1516
+
1517
+ @validate_call
1518
+ def modelscan_api_v3_get_scan_results_without_preload_content(
1519
+ self,
1520
+ scan_id: Optional[StrictStr] = None,
1521
+ _request_timeout: Union[
1522
+ None,
1523
+ Annotated[StrictFloat, Field(gt=0)],
1524
+ Tuple[
1525
+ Annotated[StrictFloat, Field(gt=0)],
1526
+ Annotated[StrictFloat, Field(gt=0)]
1527
+ ]
1528
+ ] = None,
1529
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1530
+ _content_type: Optional[StrictStr] = None,
1531
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1532
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1533
+ ) -> RESTResponseType:
1534
+ """Retrieve Model Scan Results
1535
+
1536
+
1537
+ :param scan_id:
1538
+ :type scan_id: str
1539
+ :param _request_timeout: timeout setting for this request. If one
1540
+ number provided, it will be total request
1541
+ timeout. It can also be a pair (tuple) of
1542
+ (connection, read) timeouts.
1543
+ :type _request_timeout: int, tuple(int, int), optional
1544
+ :param _request_auth: set to override the auth_settings for an a single
1545
+ request; this effectively ignores the
1546
+ authentication in the spec for a single request.
1547
+ :type _request_auth: dict, optional
1548
+ :param _content_type: force content-type for the request.
1549
+ :type _content_type: str, Optional
1550
+ :param _headers: set to override the headers for a single
1551
+ request; this effectively ignores the headers
1552
+ in the spec for a single request.
1553
+ :type _headers: dict, optional
1554
+ :param _host_index: set to override the host_index for a single
1555
+ request; this effectively ignores the host_index
1556
+ in the spec for a single request.
1557
+ :type _host_index: int, optional
1558
+ :return: Returns the result object.
1559
+ """ # noqa: E501
1560
+
1561
+ _param = self._modelscan_api_v3_get_scan_results_serialize(
1562
+ scan_id=scan_id,
1563
+ _request_auth=_request_auth,
1564
+ _content_type=_content_type,
1565
+ _headers=_headers,
1566
+ _host_index=_host_index
1567
+ )
1568
+
1569
+ _response_types_map: Dict[str, Optional[str]] = {
1570
+ '200': "List[ScanResultsV2]",
1571
+ '202': "List[ScanResultsV2]",
1572
+ '400': None,
1573
+ '404': None,
1574
+ '422': "ValidationErrorModel",
1575
+ }
1576
+ response_data = self.api_client.call_api(
1577
+ *_param,
1578
+ _request_timeout=_request_timeout
1579
+ )
1580
+ return response_data.response
1581
+
1582
+
1583
+ def _modelscan_api_v3_get_scan_results_serialize(
1584
+ self,
1585
+ scan_id,
1586
+ _request_auth,
1587
+ _content_type,
1588
+ _headers,
1589
+ _host_index,
1590
+ ) -> RequestSerialized:
1591
+
1592
+ _host = None
1593
+
1594
+ _collection_formats: Dict[str, str] = {
1595
+ }
1596
+
1597
+ _path_params: Dict[str, str] = {}
1598
+ _query_params: List[Tuple[str, str]] = []
1599
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1600
+ _form_params: List[Tuple[str, str]] = []
1601
+ _files: Dict[str, Union[str, bytes]] = {}
1602
+ _body_params: Optional[bytes] = None
1603
+
1604
+ # process the path parameters
1605
+ if scan_id is not None:
1606
+ _path_params['scan_id'] = scan_id
1607
+ # process the query parameters
1608
+ # process the header parameters
1609
+ # process the form parameters
1610
+ # process the body parameter
1611
+
1612
+
1613
+ # set the HTTP header `Accept`
1614
+ _header_params['Accept'] = self.api_client.select_header_accept(
1615
+ [
1616
+ 'application/json; charset=utf-8',
1617
+ 'application/json'
1618
+ ]
1619
+ )
1620
+
1621
+
1622
+ # authentication setting
1623
+ _auth_settings: List[str] = [
1624
+ 'BearerAuth'
1625
+ ]
1626
+
1627
+ return self.api_client.param_serialize(
1628
+ method='GET',
1629
+ resource_path='/scans/v3/results/{scan_id}',
1630
+ path_params=_path_params,
1631
+ query_params=_query_params,
1632
+ header_params=_header_params,
1633
+ body=_body_params,
1634
+ post_params=_form_params,
1635
+ files=_files,
1636
+ auth_settings=_auth_settings,
1637
+ collection_formats=_collection_formats,
1638
+ _host=_host,
1639
+ _request_auth=_request_auth
1640
+ )
1641
+
1642
+
1643
+
1644
+
1645
+ @validate_call
1646
+ def modelscan_api_v3_post_scan_results(
1647
+ self,
1648
+ scan_id: StrictStr,
1649
+ scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
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
+ ) -> None:
1663
+ """Engine Report Endpoint of Model Scan Results
1664
+
1665
+
1666
+ :param scan_id: (required)
1667
+ :type scan_id: str
1668
+ :param scan_create_request: Request body for reporting a scan of one or more file results (required)
1669
+ :type scan_create_request: ScanCreateRequest
1670
+ :param _request_timeout: timeout setting for this request. If one
1671
+ number provided, it will be total request
1672
+ timeout. It can also be a pair (tuple) of
1673
+ (connection, read) timeouts.
1674
+ :type _request_timeout: int, tuple(int, int), optional
1675
+ :param _request_auth: set to override the auth_settings for an a single
1676
+ request; this effectively ignores the
1677
+ authentication in the spec for a single request.
1678
+ :type _request_auth: dict, optional
1679
+ :param _content_type: force content-type for the request.
1680
+ :type _content_type: str, Optional
1681
+ :param _headers: set to override the headers for a single
1682
+ request; this effectively ignores the headers
1683
+ in the spec for a single request.
1684
+ :type _headers: dict, optional
1685
+ :param _host_index: set to override the host_index for a single
1686
+ request; this effectively ignores the host_index
1687
+ in the spec for a single request.
1688
+ :type _host_index: int, optional
1689
+ :return: Returns the result object.
1690
+ """ # noqa: E501
1691
+
1692
+ _param = self._modelscan_api_v3_post_scan_results_serialize(
1693
+ scan_id=scan_id,
1694
+ scan_create_request=scan_create_request,
1695
+ _request_auth=_request_auth,
1696
+ _content_type=_content_type,
1697
+ _headers=_headers,
1698
+ _host_index=_host_index
1699
+ )
1700
+
1701
+ _response_types_map: Dict[str, Optional[str]] = {
1702
+ '204': None,
1703
+ '400': None,
1704
+ '422': "ValidationErrorModel",
1705
+ }
1706
+ response_data = self.api_client.call_api(
1707
+ *_param,
1708
+ _request_timeout=_request_timeout
1709
+ )
1710
+ response_data.read()
1711
+ return self.api_client.response_deserialize(
1712
+ response_data=response_data,
1713
+ response_types_map=_response_types_map,
1714
+ ).data
1715
+
1716
+
1717
+ @validate_call
1718
+ def modelscan_api_v3_post_scan_results_with_http_info(
1719
+ self,
1720
+ scan_id: StrictStr,
1721
+ scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
1722
+ _request_timeout: Union[
1723
+ None,
1724
+ Annotated[StrictFloat, Field(gt=0)],
1725
+ Tuple[
1726
+ Annotated[StrictFloat, Field(gt=0)],
1727
+ Annotated[StrictFloat, Field(gt=0)]
1728
+ ]
1729
+ ] = None,
1730
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1731
+ _content_type: Optional[StrictStr] = None,
1732
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1733
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1734
+ ) -> ApiResponse[None]:
1735
+ """Engine Report Endpoint of Model Scan Results
1736
+
1737
+
1738
+ :param scan_id: (required)
1739
+ :type scan_id: str
1740
+ :param scan_create_request: Request body for reporting a scan of one or more file results (required)
1741
+ :type scan_create_request: ScanCreateRequest
1742
+ :param _request_timeout: timeout setting for this request. If one
1743
+ number provided, it will be total request
1744
+ timeout. It can also be a pair (tuple) of
1745
+ (connection, read) timeouts.
1746
+ :type _request_timeout: int, tuple(int, int), optional
1747
+ :param _request_auth: set to override the auth_settings for an a single
1748
+ request; this effectively ignores the
1749
+ authentication in the spec for a single request.
1750
+ :type _request_auth: dict, optional
1751
+ :param _content_type: force content-type for the request.
1752
+ :type _content_type: str, Optional
1753
+ :param _headers: set to override the headers for a single
1754
+ request; this effectively ignores the headers
1755
+ in the spec for a single request.
1756
+ :type _headers: dict, optional
1757
+ :param _host_index: set to override the host_index for a single
1758
+ request; this effectively ignores the host_index
1759
+ in the spec for a single request.
1760
+ :type _host_index: int, optional
1761
+ :return: Returns the result object.
1762
+ """ # noqa: E501
1763
+
1764
+ _param = self._modelscan_api_v3_post_scan_results_serialize(
1765
+ scan_id=scan_id,
1766
+ scan_create_request=scan_create_request,
1767
+ _request_auth=_request_auth,
1768
+ _content_type=_content_type,
1769
+ _headers=_headers,
1770
+ _host_index=_host_index
1771
+ )
1772
+
1773
+ _response_types_map: Dict[str, Optional[str]] = {
1774
+ '204': None,
1775
+ '400': None,
1776
+ '422': "ValidationErrorModel",
1777
+ }
1778
+ response_data = self.api_client.call_api(
1779
+ *_param,
1780
+ _request_timeout=_request_timeout
1781
+ )
1782
+ response_data.read()
1783
+ return self.api_client.response_deserialize(
1784
+ response_data=response_data,
1785
+ response_types_map=_response_types_map,
1786
+ )
1787
+
1788
+
1789
+ @validate_call
1790
+ def modelscan_api_v3_post_scan_results_without_preload_content(
1791
+ self,
1792
+ scan_id: StrictStr,
1793
+ scan_create_request: Annotated[ScanCreateRequest, Field(description="Request body for reporting a scan of one or more file results")],
1794
+ _request_timeout: Union[
1795
+ None,
1796
+ Annotated[StrictFloat, Field(gt=0)],
1797
+ Tuple[
1798
+ Annotated[StrictFloat, Field(gt=0)],
1799
+ Annotated[StrictFloat, Field(gt=0)]
1800
+ ]
1801
+ ] = None,
1802
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1803
+ _content_type: Optional[StrictStr] = None,
1804
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1805
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1806
+ ) -> RESTResponseType:
1807
+ """Engine Report Endpoint of Model Scan Results
1808
+
1809
+
1810
+ :param scan_id: (required)
1811
+ :type scan_id: str
1812
+ :param scan_create_request: Request body for reporting a scan of one or more file results (required)
1813
+ :type scan_create_request: ScanCreateRequest
1814
+ :param _request_timeout: timeout setting for this request. If one
1815
+ number provided, it will be total request
1816
+ timeout. It can also be a pair (tuple) of
1817
+ (connection, read) timeouts.
1818
+ :type _request_timeout: int, tuple(int, int), optional
1819
+ :param _request_auth: set to override the auth_settings for an a single
1820
+ request; this effectively ignores the
1821
+ authentication in the spec for a single request.
1822
+ :type _request_auth: dict, optional
1823
+ :param _content_type: force content-type for the request.
1824
+ :type _content_type: str, Optional
1825
+ :param _headers: set to override the headers for a single
1826
+ request; this effectively ignores the headers
1827
+ in the spec for a single request.
1828
+ :type _headers: dict, optional
1829
+ :param _host_index: set to override the host_index for a single
1830
+ request; this effectively ignores the host_index
1831
+ in the spec for a single request.
1832
+ :type _host_index: int, optional
1833
+ :return: Returns the result object.
1834
+ """ # noqa: E501
1835
+
1836
+ _param = self._modelscan_api_v3_post_scan_results_serialize(
1837
+ scan_id=scan_id,
1838
+ scan_create_request=scan_create_request,
1839
+ _request_auth=_request_auth,
1840
+ _content_type=_content_type,
1841
+ _headers=_headers,
1842
+ _host_index=_host_index
1843
+ )
1844
+
1845
+ _response_types_map: Dict[str, Optional[str]] = {
1846
+ '204': None,
1847
+ '400': None,
1848
+ '422': "ValidationErrorModel",
1849
+ }
1850
+ response_data = self.api_client.call_api(
1851
+ *_param,
1852
+ _request_timeout=_request_timeout
1853
+ )
1854
+ return response_data.response
1855
+
1856
+
1857
+ def _modelscan_api_v3_post_scan_results_serialize(
1858
+ self,
1859
+ scan_id,
1860
+ scan_create_request,
1861
+ _request_auth,
1862
+ _content_type,
1863
+ _headers,
1864
+ _host_index,
1865
+ ) -> RequestSerialized:
1866
+
1867
+ _host = None
1868
+
1869
+ _collection_formats: Dict[str, str] = {
1870
+ }
1871
+
1872
+ _path_params: Dict[str, str] = {}
1873
+ _query_params: List[Tuple[str, str]] = []
1874
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1875
+ _form_params: List[Tuple[str, str]] = []
1876
+ _files: Dict[str, Union[str, bytes]] = {}
1877
+ _body_params: Optional[bytes] = None
1878
+
1879
+ # process the path parameters
1880
+ if scan_id is not None:
1881
+ _path_params['scan_id'] = scan_id
1882
+ # process the query parameters
1883
+ # process the header parameters
1884
+ # process the form parameters
1885
+ # process the body parameter
1886
+ if scan_create_request is not None:
1887
+ _body_params = scan_create_request
1888
+
1889
+
1890
+ # set the HTTP header `Accept`
1891
+ _header_params['Accept'] = self.api_client.select_header_accept(
1892
+ [
1893
+ 'application/json'
1894
+ ]
1895
+ )
1896
+
1897
+ # set the HTTP header `Content-Type`
1898
+ if _content_type:
1899
+ _header_params['Content-Type'] = _content_type
1900
+ else:
1901
+ _default_content_type = (
1902
+ self.api_client.select_header_content_type(
1903
+ [
1904
+ 'application/json',
1905
+ 'application/octet-stream'
1906
+ ]
1907
+ )
1908
+ )
1909
+ if _default_content_type is not None:
1910
+ _header_params['Content-Type'] = _default_content_type
1911
+
1912
+ # authentication setting
1913
+ _auth_settings: List[str] = [
1914
+ 'BearerAuth'
1915
+ ]
1916
+
1917
+ return self.api_client.param_serialize(
1918
+ method='POST',
1919
+ resource_path='/scans/v3/reports/{scan_id}',
1920
+ path_params=_path_params,
1921
+ query_params=_query_params,
1922
+ header_params=_header_params,
1923
+ body=_body_params,
1924
+ post_params=_form_params,
1925
+ files=_files,
1926
+ auth_settings=_auth_settings,
1927
+ collection_formats=_collection_formats,
1928
+ _host=_host,
1929
+ _request_auth=_request_auth
1930
+ )
1931
+
1932
+
1933
+
1934
+
1935
+ @validate_call
1936
+ def modelscanner_api_v3_get_jobs(
1937
+ self,
1938
+ _request_timeout: Union[
1939
+ None,
1940
+ Annotated[StrictFloat, Field(gt=0)],
1941
+ Tuple[
1942
+ Annotated[StrictFloat, Field(gt=0)],
1943
+ Annotated[StrictFloat, Field(gt=0)]
1944
+ ]
1945
+ ] = None,
1946
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1947
+ _content_type: Optional[StrictStr] = None,
1948
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1949
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1950
+ ) -> List[ScanJob]:
1951
+ """List all Model Scan Jobs
1952
+
1953
+
1954
+ :param _request_timeout: timeout setting for this request. If one
1955
+ number provided, it will be total request
1956
+ timeout. It can also be a pair (tuple) of
1957
+ (connection, read) timeouts.
1958
+ :type _request_timeout: int, tuple(int, int), optional
1959
+ :param _request_auth: set to override the auth_settings for an a single
1960
+ request; this effectively ignores the
1961
+ authentication in the spec for a single request.
1962
+ :type _request_auth: dict, optional
1963
+ :param _content_type: force content-type for the request.
1964
+ :type _content_type: str, Optional
1965
+ :param _headers: set to override the headers for a single
1966
+ request; this effectively ignores the headers
1967
+ in the spec for a single request.
1968
+ :type _headers: dict, optional
1969
+ :param _host_index: set to override the host_index for a single
1970
+ request; this effectively ignores the host_index
1971
+ in the spec for a single request.
1972
+ :type _host_index: int, optional
1973
+ :return: Returns the result object.
1974
+ """ # noqa: E501
1975
+
1976
+ _param = self._modelscanner_api_v3_get_jobs_serialize(
1977
+ _request_auth=_request_auth,
1978
+ _content_type=_content_type,
1979
+ _headers=_headers,
1980
+ _host_index=_host_index
1981
+ )
1982
+
1983
+ _response_types_map: Dict[str, Optional[str]] = {
1984
+ '200': "List[ScanJob]",
1985
+ '400': None,
1986
+ '404': None,
1987
+ }
1988
+ response_data = self.api_client.call_api(
1989
+ *_param,
1990
+ _request_timeout=_request_timeout
1991
+ )
1992
+ response_data.read()
1993
+ return self.api_client.response_deserialize(
1994
+ response_data=response_data,
1995
+ response_types_map=_response_types_map,
1996
+ ).data
1997
+
1998
+
1999
+ @validate_call
2000
+ def modelscanner_api_v3_get_jobs_with_http_info(
2001
+ self,
2002
+ _request_timeout: Union[
2003
+ None,
2004
+ Annotated[StrictFloat, Field(gt=0)],
2005
+ Tuple[
2006
+ Annotated[StrictFloat, Field(gt=0)],
2007
+ Annotated[StrictFloat, Field(gt=0)]
2008
+ ]
2009
+ ] = None,
2010
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2011
+ _content_type: Optional[StrictStr] = None,
2012
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2013
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2014
+ ) -> ApiResponse[List[ScanJob]]:
2015
+ """List all Model Scan Jobs
2016
+
2017
+
2018
+ :param _request_timeout: timeout setting for this request. If one
2019
+ number provided, it will be total request
2020
+ timeout. It can also be a pair (tuple) of
2021
+ (connection, read) timeouts.
2022
+ :type _request_timeout: int, tuple(int, int), optional
2023
+ :param _request_auth: set to override the auth_settings for an a single
2024
+ request; this effectively ignores the
2025
+ authentication in the spec for a single request.
2026
+ :type _request_auth: dict, optional
2027
+ :param _content_type: force content-type for the request.
2028
+ :type _content_type: str, Optional
2029
+ :param _headers: set to override the headers for a single
2030
+ request; this effectively ignores the headers
2031
+ in the spec for a single request.
2032
+ :type _headers: dict, optional
2033
+ :param _host_index: set to override the host_index for a single
2034
+ request; this effectively ignores the host_index
2035
+ in the spec for a single request.
2036
+ :type _host_index: int, optional
2037
+ :return: Returns the result object.
2038
+ """ # noqa: E501
2039
+
2040
+ _param = self._modelscanner_api_v3_get_jobs_serialize(
2041
+ _request_auth=_request_auth,
2042
+ _content_type=_content_type,
2043
+ _headers=_headers,
2044
+ _host_index=_host_index
2045
+ )
2046
+
2047
+ _response_types_map: Dict[str, Optional[str]] = {
2048
+ '200': "List[ScanJob]",
2049
+ '400': None,
2050
+ '404': None,
2051
+ }
2052
+ response_data = self.api_client.call_api(
2053
+ *_param,
2054
+ _request_timeout=_request_timeout
2055
+ )
2056
+ response_data.read()
2057
+ return self.api_client.response_deserialize(
2058
+ response_data=response_data,
2059
+ response_types_map=_response_types_map,
2060
+ )
2061
+
2062
+
2063
+ @validate_call
2064
+ def modelscanner_api_v3_get_jobs_without_preload_content(
2065
+ self,
2066
+ _request_timeout: Union[
2067
+ None,
2068
+ Annotated[StrictFloat, Field(gt=0)],
2069
+ Tuple[
2070
+ Annotated[StrictFloat, Field(gt=0)],
2071
+ Annotated[StrictFloat, Field(gt=0)]
2072
+ ]
2073
+ ] = None,
2074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2075
+ _content_type: Optional[StrictStr] = None,
2076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2078
+ ) -> RESTResponseType:
2079
+ """List all Model Scan Jobs
2080
+
2081
+
2082
+ :param _request_timeout: timeout setting for this request. If one
2083
+ number provided, it will be total request
2084
+ timeout. It can also be a pair (tuple) of
2085
+ (connection, read) timeouts.
2086
+ :type _request_timeout: int, tuple(int, int), optional
2087
+ :param _request_auth: set to override the auth_settings for an a single
2088
+ request; this effectively ignores the
2089
+ authentication in the spec for a single request.
2090
+ :type _request_auth: dict, optional
2091
+ :param _content_type: force content-type for the request.
2092
+ :type _content_type: str, Optional
2093
+ :param _headers: set to override the headers for a single
2094
+ request; this effectively ignores the headers
2095
+ in the spec for a single request.
2096
+ :type _headers: dict, optional
2097
+ :param _host_index: set to override the host_index for a single
2098
+ request; this effectively ignores the host_index
2099
+ in the spec for a single request.
2100
+ :type _host_index: int, optional
2101
+ :return: Returns the result object.
2102
+ """ # noqa: E501
2103
+
2104
+ _param = self._modelscanner_api_v3_get_jobs_serialize(
2105
+ _request_auth=_request_auth,
2106
+ _content_type=_content_type,
2107
+ _headers=_headers,
2108
+ _host_index=_host_index
2109
+ )
2110
+
2111
+ _response_types_map: Dict[str, Optional[str]] = {
2112
+ '200': "List[ScanJob]",
2113
+ '400': None,
2114
+ '404': None,
2115
+ }
2116
+ response_data = self.api_client.call_api(
2117
+ *_param,
2118
+ _request_timeout=_request_timeout
2119
+ )
2120
+ return response_data.response
2121
+
2122
+
2123
+ def _modelscanner_api_v3_get_jobs_serialize(
2124
+ self,
2125
+ _request_auth,
2126
+ _content_type,
2127
+ _headers,
2128
+ _host_index,
2129
+ ) -> RequestSerialized:
2130
+
2131
+ _host = None
2132
+
2133
+ _collection_formats: Dict[str, str] = {
2134
+ }
2135
+
2136
+ _path_params: Dict[str, str] = {}
2137
+ _query_params: List[Tuple[str, str]] = []
2138
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2139
+ _form_params: List[Tuple[str, str]] = []
2140
+ _files: Dict[str, Union[str, bytes]] = {}
2141
+ _body_params: Optional[bytes] = None
2142
+
2143
+ # process the path parameters
2144
+ # process the query parameters
2145
+ # process the header parameters
2146
+ # process the form parameters
2147
+ # process the body parameter
2148
+
2149
+
2150
+ # set the HTTP header `Accept`
2151
+ _header_params['Accept'] = self.api_client.select_header_accept(
2152
+ [
2153
+ 'application/json; charset=utf-8'
2154
+ ]
2155
+ )
2156
+
2157
+
2158
+ # authentication setting
2159
+ _auth_settings: List[str] = [
2160
+ 'BearerAuth'
2161
+ ]
2162
+
2163
+ return self.api_client.param_serialize(
2164
+ method='GET',
2165
+ resource_path='/scans/v3/jobs',
2166
+ path_params=_path_params,
2167
+ query_params=_query_params,
2168
+ header_params=_header_params,
2169
+ body=_body_params,
2170
+ post_params=_form_params,
2171
+ files=_files,
2172
+ auth_settings=_auth_settings,
2173
+ collection_formats=_collection_formats,
2174
+ _host=_host,
2175
+ _request_auth=_request_auth
2176
+ )
2177
+
2178
+
2179
+
2180
+
2181
+ @validate_call
2182
+ def modelscanner_api_v3_health_check(
2183
+ self,
2184
+ _request_timeout: Union[
2185
+ None,
2186
+ Annotated[StrictFloat, Field(gt=0)],
2187
+ Tuple[
2188
+ Annotated[StrictFloat, Field(gt=0)],
2189
+ Annotated[StrictFloat, Field(gt=0)]
2190
+ ]
2191
+ ] = None,
2192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2193
+ _content_type: Optional[StrictStr] = None,
2194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2196
+ ) -> None:
2197
+ """Health check endpoint for Model Supply Chain Services
2198
+
2199
+
2200
+ :param _request_timeout: timeout setting for this request. If one
2201
+ number provided, it will be total request
2202
+ timeout. It can also be a pair (tuple) of
2203
+ (connection, read) timeouts.
2204
+ :type _request_timeout: int, tuple(int, int), optional
2205
+ :param _request_auth: set to override the auth_settings for an a single
2206
+ request; this effectively ignores the
2207
+ authentication in the spec for a single request.
2208
+ :type _request_auth: dict, optional
2209
+ :param _content_type: force content-type for the request.
2210
+ :type _content_type: str, Optional
2211
+ :param _headers: set to override the headers for a single
2212
+ request; this effectively ignores the headers
2213
+ in the spec for a single request.
2214
+ :type _headers: dict, optional
2215
+ :param _host_index: set to override the host_index for a single
2216
+ request; this effectively ignores the host_index
2217
+ in the spec for a single request.
2218
+ :type _host_index: int, optional
2219
+ :return: Returns the result object.
2220
+ """ # noqa: E501
2221
+
2222
+ _param = self._modelscanner_api_v3_health_check_serialize(
2223
+ _request_auth=_request_auth,
2224
+ _content_type=_content_type,
2225
+ _headers=_headers,
2226
+ _host_index=_host_index
2227
+ )
2228
+
2229
+ _response_types_map: Dict[str, Optional[str]] = {
2230
+ '200': None,
2231
+ '503': None,
2232
+ }
2233
+ response_data = self.api_client.call_api(
2234
+ *_param,
2235
+ _request_timeout=_request_timeout
2236
+ )
2237
+ response_data.read()
2238
+ return self.api_client.response_deserialize(
2239
+ response_data=response_data,
2240
+ response_types_map=_response_types_map,
2241
+ ).data
2242
+
2243
+
2244
+ @validate_call
2245
+ def modelscanner_api_v3_health_check_with_http_info(
2246
+ self,
2247
+ _request_timeout: Union[
2248
+ None,
2249
+ Annotated[StrictFloat, Field(gt=0)],
2250
+ Tuple[
2251
+ Annotated[StrictFloat, Field(gt=0)],
2252
+ Annotated[StrictFloat, Field(gt=0)]
2253
+ ]
2254
+ ] = None,
2255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2256
+ _content_type: Optional[StrictStr] = None,
2257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2259
+ ) -> ApiResponse[None]:
2260
+ """Health check endpoint for Model Supply Chain Services
2261
+
2262
+
2263
+ :param _request_timeout: timeout setting for this request. If one
2264
+ number provided, it will be total request
2265
+ timeout. It can also be a pair (tuple) of
2266
+ (connection, read) timeouts.
2267
+ :type _request_timeout: int, tuple(int, int), optional
2268
+ :param _request_auth: set to override the auth_settings for an a single
2269
+ request; this effectively ignores the
2270
+ authentication in the spec for a single request.
2271
+ :type _request_auth: dict, optional
2272
+ :param _content_type: force content-type for the request.
2273
+ :type _content_type: str, Optional
2274
+ :param _headers: set to override the headers for a single
2275
+ request; this effectively ignores the headers
2276
+ in the spec for a single request.
2277
+ :type _headers: dict, optional
2278
+ :param _host_index: set to override the host_index for a single
2279
+ request; this effectively ignores the host_index
2280
+ in the spec for a single request.
2281
+ :type _host_index: int, optional
2282
+ :return: Returns the result object.
2283
+ """ # noqa: E501
2284
+
2285
+ _param = self._modelscanner_api_v3_health_check_serialize(
2286
+ _request_auth=_request_auth,
2287
+ _content_type=_content_type,
2288
+ _headers=_headers,
2289
+ _host_index=_host_index
2290
+ )
2291
+
2292
+ _response_types_map: Dict[str, Optional[str]] = {
2293
+ '200': None,
2294
+ '503': None,
2295
+ }
2296
+ response_data = self.api_client.call_api(
2297
+ *_param,
2298
+ _request_timeout=_request_timeout
2299
+ )
2300
+ response_data.read()
2301
+ return self.api_client.response_deserialize(
2302
+ response_data=response_data,
2303
+ response_types_map=_response_types_map,
2304
+ )
2305
+
2306
+
2307
+ @validate_call
2308
+ def modelscanner_api_v3_health_check_without_preload_content(
2309
+ self,
2310
+ _request_timeout: Union[
2311
+ None,
2312
+ Annotated[StrictFloat, Field(gt=0)],
2313
+ Tuple[
2314
+ Annotated[StrictFloat, Field(gt=0)],
2315
+ Annotated[StrictFloat, Field(gt=0)]
2316
+ ]
2317
+ ] = None,
2318
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2319
+ _content_type: Optional[StrictStr] = None,
2320
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2321
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2322
+ ) -> RESTResponseType:
2323
+ """Health check endpoint for Model Supply Chain Services
2324
+
2325
+
2326
+ :param _request_timeout: timeout setting for this request. If one
2327
+ number provided, it will be total request
2328
+ timeout. It can also be a pair (tuple) of
2329
+ (connection, read) timeouts.
2330
+ :type _request_timeout: int, tuple(int, int), optional
2331
+ :param _request_auth: set to override the auth_settings for an a single
2332
+ request; this effectively ignores the
2333
+ authentication in the spec for a single request.
2334
+ :type _request_auth: dict, optional
2335
+ :param _content_type: force content-type for the request.
2336
+ :type _content_type: str, Optional
2337
+ :param _headers: set to override the headers for a single
2338
+ request; this effectively ignores the headers
2339
+ in the spec for a single request.
2340
+ :type _headers: dict, optional
2341
+ :param _host_index: set to override the host_index for a single
2342
+ request; this effectively ignores the host_index
2343
+ in the spec for a single request.
2344
+ :type _host_index: int, optional
2345
+ :return: Returns the result object.
2346
+ """ # noqa: E501
2347
+
2348
+ _param = self._modelscanner_api_v3_health_check_serialize(
2349
+ _request_auth=_request_auth,
2350
+ _content_type=_content_type,
2351
+ _headers=_headers,
2352
+ _host_index=_host_index
2353
+ )
2354
+
2355
+ _response_types_map: Dict[str, Optional[str]] = {
2356
+ '200': None,
2357
+ '503': None,
2358
+ }
2359
+ response_data = self.api_client.call_api(
2360
+ *_param,
2361
+ _request_timeout=_request_timeout
2362
+ )
2363
+ return response_data.response
2364
+
2365
+
2366
+ def _modelscanner_api_v3_health_check_serialize(
2367
+ self,
2368
+ _request_auth,
2369
+ _content_type,
2370
+ _headers,
2371
+ _host_index,
2372
+ ) -> RequestSerialized:
2373
+
2374
+ _host = None
2375
+
2376
+ _collection_formats: Dict[str, str] = {
2377
+ }
2378
+
2379
+ _path_params: Dict[str, str] = {}
2380
+ _query_params: List[Tuple[str, str]] = []
2381
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2382
+ _form_params: List[Tuple[str, str]] = []
2383
+ _files: Dict[str, Union[str, bytes]] = {}
2384
+ _body_params: Optional[bytes] = None
2385
+
2386
+ # process the path parameters
2387
+ # process the query parameters
2388
+ # process the header parameters
2389
+ # process the form parameters
2390
+ # process the body parameter
2391
+
2392
+
2393
+
2394
+
2395
+ # authentication setting
2396
+ _auth_settings: List[str] = [
2397
+ 'BearerAuth'
2398
+ ]
2399
+
2400
+ return self.api_client.param_serialize(
2401
+ method='GET',
2402
+ resource_path='/scans/v3/health',
2403
+ path_params=_path_params,
2404
+ query_params=_query_params,
2405
+ header_params=_header_params,
2406
+ body=_body_params,
2407
+ post_params=_form_params,
2408
+ files=_files,
2409
+ auth_settings=_auth_settings,
2410
+ collection_formats=_collection_formats,
2411
+ _host=_host,
2412
+ _request_auth=_request_auth
2413
+ )
2414
+
2415
+
2416
+
2417
+
2418
+ @validate_call
2419
+ def modelscanner_api_v3_post_request(
2420
+ self,
2421
+ scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
2422
+ _request_timeout: Union[
2423
+ None,
2424
+ Annotated[StrictFloat, Field(gt=0)],
2425
+ Tuple[
2426
+ Annotated[StrictFloat, Field(gt=0)],
2427
+ Annotated[StrictFloat, Field(gt=0)]
2428
+ ]
2429
+ ] = None,
2430
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2431
+ _content_type: Optional[StrictStr] = None,
2432
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2433
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2434
+ ) -> None:
2435
+ """Request a Model Scan Job
2436
+
2437
+
2438
+ :param scan_job: Request body for create scan request (required)
2439
+ :type scan_job: ScanJob
2440
+ :param _request_timeout: timeout setting for this request. If one
2441
+ number provided, it will be total request
2442
+ timeout. It can also be a pair (tuple) of
2443
+ (connection, read) timeouts.
2444
+ :type _request_timeout: int, tuple(int, int), optional
2445
+ :param _request_auth: set to override the auth_settings for an a single
2446
+ request; this effectively ignores the
2447
+ authentication in the spec for a single request.
2448
+ :type _request_auth: dict, optional
2449
+ :param _content_type: force content-type for the request.
2450
+ :type _content_type: str, Optional
2451
+ :param _headers: set to override the headers for a single
2452
+ request; this effectively ignores the headers
2453
+ in the spec for a single request.
2454
+ :type _headers: dict, optional
2455
+ :param _host_index: set to override the host_index for a single
2456
+ request; this effectively ignores the host_index
2457
+ in the spec for a single request.
2458
+ :type _host_index: int, optional
2459
+ :return: Returns the result object.
2460
+ """ # noqa: E501
2461
+
2462
+ _param = self._modelscanner_api_v3_post_request_serialize(
2463
+ scan_job=scan_job,
2464
+ _request_auth=_request_auth,
2465
+ _content_type=_content_type,
2466
+ _headers=_headers,
2467
+ _host_index=_host_index
2468
+ )
2469
+
2470
+ _response_types_map: Dict[str, Optional[str]] = {
2471
+ '201': None,
2472
+ '400': None,
2473
+ '422': "ValidationErrorModel",
2474
+ }
2475
+ response_data = self.api_client.call_api(
2476
+ *_param,
2477
+ _request_timeout=_request_timeout
2478
+ )
2479
+ response_data.read()
2480
+ return self.api_client.response_deserialize(
2481
+ response_data=response_data,
2482
+ response_types_map=_response_types_map,
2483
+ ).data
2484
+
2485
+
2486
+ @validate_call
2487
+ def modelscanner_api_v3_post_request_with_http_info(
2488
+ self,
2489
+ scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
2490
+ _request_timeout: Union[
2491
+ None,
2492
+ Annotated[StrictFloat, Field(gt=0)],
2493
+ Tuple[
2494
+ Annotated[StrictFloat, Field(gt=0)],
2495
+ Annotated[StrictFloat, Field(gt=0)]
2496
+ ]
2497
+ ] = None,
2498
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2499
+ _content_type: Optional[StrictStr] = None,
2500
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2501
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2502
+ ) -> ApiResponse[None]:
2503
+ """Request a Model Scan Job
2504
+
2505
+
2506
+ :param scan_job: Request body for create scan request (required)
2507
+ :type scan_job: ScanJob
2508
+ :param _request_timeout: timeout setting for this request. If one
2509
+ number provided, it will be total request
2510
+ timeout. It can also be a pair (tuple) of
2511
+ (connection, read) timeouts.
2512
+ :type _request_timeout: int, tuple(int, int), optional
2513
+ :param _request_auth: set to override the auth_settings for an a single
2514
+ request; this effectively ignores the
2515
+ authentication in the spec for a single request.
2516
+ :type _request_auth: dict, optional
2517
+ :param _content_type: force content-type for the request.
2518
+ :type _content_type: str, Optional
2519
+ :param _headers: set to override the headers for a single
2520
+ request; this effectively ignores the headers
2521
+ in the spec for a single request.
2522
+ :type _headers: dict, optional
2523
+ :param _host_index: set to override the host_index for a single
2524
+ request; this effectively ignores the host_index
2525
+ in the spec for a single request.
2526
+ :type _host_index: int, optional
2527
+ :return: Returns the result object.
2528
+ """ # noqa: E501
2529
+
2530
+ _param = self._modelscanner_api_v3_post_request_serialize(
2531
+ scan_job=scan_job,
2532
+ _request_auth=_request_auth,
2533
+ _content_type=_content_type,
2534
+ _headers=_headers,
2535
+ _host_index=_host_index
2536
+ )
2537
+
2538
+ _response_types_map: Dict[str, Optional[str]] = {
2539
+ '201': None,
2540
+ '400': None,
2541
+ '422': "ValidationErrorModel",
2542
+ }
2543
+ response_data = self.api_client.call_api(
2544
+ *_param,
2545
+ _request_timeout=_request_timeout
2546
+ )
2547
+ response_data.read()
2548
+ return self.api_client.response_deserialize(
2549
+ response_data=response_data,
2550
+ response_types_map=_response_types_map,
2551
+ )
2552
+
2553
+
2554
+ @validate_call
2555
+ def modelscanner_api_v3_post_request_without_preload_content(
2556
+ self,
2557
+ scan_job: Annotated[ScanJob, Field(description="Request body for create scan request")],
2558
+ _request_timeout: Union[
2559
+ None,
2560
+ Annotated[StrictFloat, Field(gt=0)],
2561
+ Tuple[
2562
+ Annotated[StrictFloat, Field(gt=0)],
2563
+ Annotated[StrictFloat, Field(gt=0)]
2564
+ ]
2565
+ ] = None,
2566
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2567
+ _content_type: Optional[StrictStr] = None,
2568
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2569
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2570
+ ) -> RESTResponseType:
2571
+ """Request a Model Scan Job
2572
+
2573
+
2574
+ :param scan_job: Request body for create scan request (required)
2575
+ :type scan_job: ScanJob
2576
+ :param _request_timeout: timeout setting for this request. If one
2577
+ number provided, it will be total request
2578
+ timeout. It can also be a pair (tuple) of
2579
+ (connection, read) timeouts.
2580
+ :type _request_timeout: int, tuple(int, int), optional
2581
+ :param _request_auth: set to override the auth_settings for an a single
2582
+ request; this effectively ignores the
2583
+ authentication in the spec for a single request.
2584
+ :type _request_auth: dict, optional
2585
+ :param _content_type: force content-type for the request.
2586
+ :type _content_type: str, Optional
2587
+ :param _headers: set to override the headers for a single
2588
+ request; this effectively ignores the headers
2589
+ in the spec for a single request.
2590
+ :type _headers: dict, optional
2591
+ :param _host_index: set to override the host_index for a single
2592
+ request; this effectively ignores the host_index
2593
+ in the spec for a single request.
2594
+ :type _host_index: int, optional
2595
+ :return: Returns the result object.
2596
+ """ # noqa: E501
2597
+
2598
+ _param = self._modelscanner_api_v3_post_request_serialize(
2599
+ scan_job=scan_job,
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
+ '201': None,
2608
+ '400': None,
2609
+ '422': "ValidationErrorModel",
2610
+ }
2611
+ response_data = self.api_client.call_api(
2612
+ *_param,
2613
+ _request_timeout=_request_timeout
2614
+ )
2615
+ return response_data.response
2616
+
2617
+
2618
+ def _modelscanner_api_v3_post_request_serialize(
2619
+ self,
2620
+ scan_job,
2621
+ _request_auth,
2622
+ _content_type,
2623
+ _headers,
2624
+ _host_index,
2625
+ ) -> RequestSerialized:
2626
+
2627
+ _host = None
2628
+
2629
+ _collection_formats: Dict[str, str] = {
2630
+ }
2631
+
2632
+ _path_params: Dict[str, str] = {}
2633
+ _query_params: List[Tuple[str, str]] = []
2634
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2635
+ _form_params: List[Tuple[str, str]] = []
2636
+ _files: Dict[str, Union[str, bytes]] = {}
2637
+ _body_params: Optional[bytes] = None
2638
+
2639
+ # process the path parameters
2640
+ # process the query parameters
2641
+ # process the header parameters
2642
+ # process the form parameters
2643
+ # process the body parameter
2644
+ if scan_job is not None:
2645
+ _body_params = scan_job
2646
+
2647
+
2648
+ # set the HTTP header `Accept`
2649
+ _header_params['Accept'] = self.api_client.select_header_accept(
2650
+ [
2651
+ 'application/json'
2652
+ ]
2653
+ )
2654
+
2655
+ # set the HTTP header `Content-Type`
2656
+ if _content_type:
2657
+ _header_params['Content-Type'] = _content_type
2658
+ else:
2659
+ _default_content_type = (
2660
+ self.api_client.select_header_content_type(
2661
+ [
2662
+ 'application/json; charset=utf-8',
2663
+ 'application/octet-stream'
2664
+ ]
2665
+ )
2666
+ )
2667
+ if _default_content_type is not None:
2668
+ _header_params['Content-Type'] = _default_content_type
2669
+
2670
+ # authentication setting
2671
+ _auth_settings: List[str] = [
2672
+ 'BearerAuth'
2673
+ ]
2674
+
2675
+ return self.api_client.param_serialize(
2676
+ method='POST',
2677
+ resource_path='/scans/v3/jobs',
2678
+ path_params=_path_params,
2679
+ query_params=_query_params,
2680
+ header_params=_header_params,
2681
+ body=_body_params,
2682
+ post_params=_form_params,
2683
+ files=_files,
2684
+ auth_settings=_auth_settings,
2685
+ collection_formats=_collection_formats,
2686
+ _host=_host,
2687
+ _request_auth=_request_auth
2688
+ )
2689
+
2690
+
2691
+
2692
+
2693
+ @validate_call
2694
+ def modelscanner_api_v3_readiness_check(
2695
+ self,
2696
+ _request_timeout: Union[
2697
+ None,
2698
+ Annotated[StrictFloat, Field(gt=0)],
2699
+ Tuple[
2700
+ Annotated[StrictFloat, Field(gt=0)],
2701
+ Annotated[StrictFloat, Field(gt=0)]
2702
+ ]
2703
+ ] = None,
2704
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2705
+ _content_type: Optional[StrictStr] = None,
2706
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2707
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2708
+ ) -> None:
2709
+ """Readiness check endpoint for Model Supply Chain Services
2710
+
2711
+
2712
+ :param _request_timeout: timeout setting for this request. If one
2713
+ number provided, it will be total request
2714
+ timeout. It can also be a pair (tuple) of
2715
+ (connection, read) timeouts.
2716
+ :type _request_timeout: int, tuple(int, int), optional
2717
+ :param _request_auth: set to override the auth_settings for an a single
2718
+ request; this effectively ignores the
2719
+ authentication in the spec for a single request.
2720
+ :type _request_auth: dict, optional
2721
+ :param _content_type: force content-type for the request.
2722
+ :type _content_type: str, Optional
2723
+ :param _headers: set to override the headers for a single
2724
+ request; this effectively ignores the headers
2725
+ in the spec for a single request.
2726
+ :type _headers: dict, optional
2727
+ :param _host_index: set to override the host_index for a single
2728
+ request; this effectively ignores the host_index
2729
+ in the spec for a single request.
2730
+ :type _host_index: int, optional
2731
+ :return: Returns the result object.
2732
+ """ # noqa: E501
2733
+
2734
+ _param = self._modelscanner_api_v3_readiness_check_serialize(
2735
+ _request_auth=_request_auth,
2736
+ _content_type=_content_type,
2737
+ _headers=_headers,
2738
+ _host_index=_host_index
2739
+ )
2740
+
2741
+ _response_types_map: Dict[str, Optional[str]] = {
2742
+ '200': None,
2743
+ '503': None,
2744
+ }
2745
+ response_data = self.api_client.call_api(
2746
+ *_param,
2747
+ _request_timeout=_request_timeout
2748
+ )
2749
+ response_data.read()
2750
+ return self.api_client.response_deserialize(
2751
+ response_data=response_data,
2752
+ response_types_map=_response_types_map,
2753
+ ).data
2754
+
2755
+
2756
+ @validate_call
2757
+ def modelscanner_api_v3_readiness_check_with_http_info(
2758
+ self,
2759
+ _request_timeout: Union[
2760
+ None,
2761
+ Annotated[StrictFloat, Field(gt=0)],
2762
+ Tuple[
2763
+ Annotated[StrictFloat, Field(gt=0)],
2764
+ Annotated[StrictFloat, Field(gt=0)]
2765
+ ]
2766
+ ] = None,
2767
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2768
+ _content_type: Optional[StrictStr] = None,
2769
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2770
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2771
+ ) -> ApiResponse[None]:
2772
+ """Readiness check endpoint for Model Supply Chain Services
2773
+
2774
+
2775
+ :param _request_timeout: timeout setting for this request. If one
2776
+ number provided, it will be total request
2777
+ timeout. It can also be a pair (tuple) of
2778
+ (connection, read) timeouts.
2779
+ :type _request_timeout: int, tuple(int, int), optional
2780
+ :param _request_auth: set to override the auth_settings for an a single
2781
+ request; this effectively ignores the
2782
+ authentication in the spec for a single request.
2783
+ :type _request_auth: dict, optional
2784
+ :param _content_type: force content-type for the request.
2785
+ :type _content_type: str, Optional
2786
+ :param _headers: set to override the headers for a single
2787
+ request; this effectively ignores the headers
2788
+ in the spec for a single request.
2789
+ :type _headers: dict, optional
2790
+ :param _host_index: set to override the host_index for a single
2791
+ request; this effectively ignores the host_index
2792
+ in the spec for a single request.
2793
+ :type _host_index: int, optional
2794
+ :return: Returns the result object.
2795
+ """ # noqa: E501
2796
+
2797
+ _param = self._modelscanner_api_v3_readiness_check_serialize(
2798
+ _request_auth=_request_auth,
2799
+ _content_type=_content_type,
2800
+ _headers=_headers,
2801
+ _host_index=_host_index
2802
+ )
2803
+
2804
+ _response_types_map: Dict[str, Optional[str]] = {
2805
+ '200': None,
2806
+ '503': None,
2807
+ }
2808
+ response_data = self.api_client.call_api(
2809
+ *_param,
2810
+ _request_timeout=_request_timeout
2811
+ )
2812
+ response_data.read()
2813
+ return self.api_client.response_deserialize(
2814
+ response_data=response_data,
2815
+ response_types_map=_response_types_map,
2816
+ )
2817
+
2818
+
2819
+ @validate_call
2820
+ def modelscanner_api_v3_readiness_check_without_preload_content(
2821
+ self,
2822
+ _request_timeout: Union[
2823
+ None,
2824
+ Annotated[StrictFloat, Field(gt=0)],
2825
+ Tuple[
2826
+ Annotated[StrictFloat, Field(gt=0)],
2827
+ Annotated[StrictFloat, Field(gt=0)]
2828
+ ]
2829
+ ] = None,
2830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2831
+ _content_type: Optional[StrictStr] = None,
2832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2834
+ ) -> RESTResponseType:
2835
+ """Readiness check endpoint for Model Supply Chain Services
2836
+
2837
+
2838
+ :param _request_timeout: timeout setting for this request. If one
2839
+ number provided, it will be total request
2840
+ timeout. It can also be a pair (tuple) of
2841
+ (connection, read) timeouts.
2842
+ :type _request_timeout: int, tuple(int, int), optional
2843
+ :param _request_auth: set to override the auth_settings for an a single
2844
+ request; this effectively ignores the
2845
+ authentication in the spec for a single request.
2846
+ :type _request_auth: dict, optional
2847
+ :param _content_type: force content-type for the request.
2848
+ :type _content_type: str, Optional
2849
+ :param _headers: set to override the headers for a single
2850
+ request; this effectively ignores the headers
2851
+ in the spec for a single request.
2852
+ :type _headers: dict, optional
2853
+ :param _host_index: set to override the host_index for a single
2854
+ request; this effectively ignores the host_index
2855
+ in the spec for a single request.
2856
+ :type _host_index: int, optional
2857
+ :return: Returns the result object.
2858
+ """ # noqa: E501
2859
+
2860
+ _param = self._modelscanner_api_v3_readiness_check_serialize(
2861
+ _request_auth=_request_auth,
2862
+ _content_type=_content_type,
2863
+ _headers=_headers,
2864
+ _host_index=_host_index
2865
+ )
2866
+
2867
+ _response_types_map: Dict[str, Optional[str]] = {
2868
+ '200': None,
2869
+ '503': None,
2870
+ }
2871
+ response_data = self.api_client.call_api(
2872
+ *_param,
2873
+ _request_timeout=_request_timeout
2874
+ )
2875
+ return response_data.response
2876
+
2877
+
2878
+ def _modelscanner_api_v3_readiness_check_serialize(
2879
+ self,
2880
+ _request_auth,
2881
+ _content_type,
2882
+ _headers,
2883
+ _host_index,
2884
+ ) -> RequestSerialized:
2885
+
2886
+ _host = None
2887
+
2888
+ _collection_formats: Dict[str, str] = {
2889
+ }
2890
+
2891
+ _path_params: Dict[str, str] = {}
2892
+ _query_params: List[Tuple[str, str]] = []
2893
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2894
+ _form_params: List[Tuple[str, str]] = []
2895
+ _files: Dict[str, Union[str, bytes]] = {}
2896
+ _body_params: Optional[bytes] = None
2897
+
2898
+ # process the path parameters
2899
+ # process the query parameters
2900
+ # process the header parameters
2901
+ # process the form parameters
2902
+ # process the body parameter
2903
+
2904
+
2905
+
2906
+
2907
+ # authentication setting
2908
+ _auth_settings: List[str] = [
2909
+ 'BearerAuth'
2910
+ ]
2911
+
2912
+ return self.api_client.param_serialize(
2913
+ method='GET',
2914
+ resource_path='/scans/v3/readiness',
2915
+ path_params=_path_params,
2916
+ query_params=_query_params,
2917
+ header_params=_header_params,
2918
+ body=_body_params,
2919
+ post_params=_form_params,
2920
+ files=_files,
2921
+ auth_settings=_auth_settings,
2922
+ collection_formats=_collection_formats,
2923
+ _host=_host,
2924
+ _request_auth=_request_auth
2925
+ )
2926
+
2927
+