hiddenlayer-sdk 0.1.2__py3-none-any.whl → 1.1.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- hiddenlayer/sdk/constants.py +1 -0
- hiddenlayer/sdk/models.py +45 -8
- hiddenlayer/sdk/rest/__init__.py +80 -3
- hiddenlayer/sdk/rest/api/__init__.py +3 -0
- hiddenlayer/sdk/rest/api/aidr_predictive_api.py +1 -1
- hiddenlayer/sdk/rest/api/health_api.py +272 -0
- hiddenlayer/sdk/rest/api/model_scan_api.py +1 -1
- hiddenlayer/sdk/rest/api/model_supply_chain_api.py +2927 -0
- hiddenlayer/sdk/rest/api/readiness_api.py +272 -0
- hiddenlayer/sdk/rest/api/sensor_api.py +354 -37
- hiddenlayer/sdk/rest/api_client.py +1 -1
- hiddenlayer/sdk/rest/configuration.py +4 -4
- hiddenlayer/sdk/rest/exceptions.py +1 -1
- hiddenlayer/sdk/rest/models/__init__.py +77 -3
- hiddenlayer/sdk/rest/models/address.py +110 -0
- hiddenlayer/sdk/rest/models/artifact.py +155 -0
- hiddenlayer/sdk/rest/models/artifact_change.py +108 -0
- hiddenlayer/sdk/rest/models/artifact_content.py +101 -0
- hiddenlayer/sdk/rest/models/artifact_location.py +109 -0
- hiddenlayer/sdk/rest/models/attachment.py +129 -0
- hiddenlayer/sdk/rest/models/code_flow.py +113 -0
- hiddenlayer/sdk/rest/models/configuration_override.py +108 -0
- hiddenlayer/sdk/rest/models/conversion.py +114 -0
- hiddenlayer/sdk/rest/models/create_sensor_request.py +1 -1
- hiddenlayer/sdk/rest/models/detections.py +101 -0
- hiddenlayer/sdk/rest/models/edge.py +108 -0
- hiddenlayer/sdk/rest/models/edge_traversal.py +122 -0
- hiddenlayer/sdk/rest/models/exception.py +113 -0
- hiddenlayer/sdk/rest/models/external_properties.py +273 -0
- hiddenlayer/sdk/rest/models/external_property_file_reference.py +102 -0
- hiddenlayer/sdk/rest/models/external_property_file_references.py +240 -0
- hiddenlayer/sdk/rest/models/file_details_v3.py +140 -0
- hiddenlayer/sdk/rest/models/file_scan_report_v3.py +132 -0
- hiddenlayer/sdk/rest/models/file_scan_reports_v3.py +95 -0
- hiddenlayer/sdk/rest/models/fix.py +113 -0
- hiddenlayer/sdk/rest/models/get_multipart_upload_response.py +1 -1
- hiddenlayer/sdk/rest/models/graph.py +123 -0
- hiddenlayer/sdk/rest/models/graph_traversal.py +97 -0
- hiddenlayer/sdk/rest/models/invocation.py +199 -0
- hiddenlayer/sdk/rest/models/location.py +146 -0
- hiddenlayer/sdk/rest/models/{validation_error_model_loc_inner.py → location_inner.py} +7 -7
- hiddenlayer/sdk/rest/models/location_relationship.py +107 -0
- hiddenlayer/sdk/rest/models/logical_location.py +104 -0
- hiddenlayer/sdk/rest/models/message.py +92 -0
- hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +110 -0
- hiddenlayer/sdk/rest/models/model.py +1 -1
- hiddenlayer/sdk/rest/models/model_inventory_info.py +99 -0
- hiddenlayer/sdk/rest/models/model_query_response.py +1 -1
- hiddenlayer/sdk/rest/models/model_scan_api_v3_scan_model_version_id_patch200_response.py +87 -0
- hiddenlayer/sdk/rest/models/model_scan_api_v3_scan_query200_response.py +102 -0
- hiddenlayer/sdk/rest/models/multiformat_message_string.py +95 -0
- hiddenlayer/sdk/rest/models/multipart_upload_part.py +1 -1
- hiddenlayer/sdk/rest/models/node.py +122 -0
- hiddenlayer/sdk/rest/models/notification.py +157 -0
- hiddenlayer/sdk/rest/models/paged_response_with_total.py +94 -0
- hiddenlayer/sdk/rest/models/physical_location.py +94 -0
- hiddenlayer/sdk/rest/models/property_bag.py +101 -0
- hiddenlayer/sdk/rest/models/rectangle.py +110 -0
- hiddenlayer/sdk/rest/models/region.py +127 -0
- hiddenlayer/sdk/rest/models/replacement.py +103 -0
- hiddenlayer/sdk/rest/models/reporting_configuration.py +113 -0
- hiddenlayer/sdk/rest/models/reporting_descriptor.py +162 -0
- hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +103 -0
- hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +115 -0
- hiddenlayer/sdk/rest/models/result.py +312 -0
- hiddenlayer/sdk/rest/models/result_provenance.py +133 -0
- hiddenlayer/sdk/rest/models/rule_details_inner.py +102 -0
- hiddenlayer/sdk/rest/models/run.py +318 -0
- hiddenlayer/sdk/rest/models/run_automation_details.py +129 -0
- hiddenlayer/sdk/rest/models/sarif210.py +123 -0
- hiddenlayer/sdk/rest/models/scan_create_request.py +87 -0
- hiddenlayer/sdk/rest/models/scan_detection_v3.py +156 -0
- hiddenlayer/sdk/rest/models/scan_header_v3.py +129 -0
- hiddenlayer/sdk/rest/models/scan_job.py +109 -0
- hiddenlayer/sdk/rest/models/scan_job_inventory.py +137 -0
- hiddenlayer/sdk/rest/models/scan_model_details_v3.py +95 -0
- hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +89 -0
- hiddenlayer/sdk/rest/models/scan_model_request.py +1 -1
- hiddenlayer/sdk/rest/models/scan_report_v3.py +139 -0
- hiddenlayer/sdk/rest/models/{file_info.py → scan_results.py} +14 -6
- hiddenlayer/sdk/rest/models/scan_results_v2.py +30 -10
- hiddenlayer/sdk/rest/models/security_posture.py +89 -0
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +101 -0
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +127 -0
- hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +1 -1
- hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +1 -1
- hiddenlayer/sdk/rest/models/special_locations.py +97 -0
- hiddenlayer/sdk/rest/models/stack.py +113 -0
- hiddenlayer/sdk/rest/models/stack_frame.py +104 -0
- hiddenlayer/sdk/rest/models/submission_response.py +1 -1
- hiddenlayer/sdk/rest/models/submission_v2.py +1 -1
- hiddenlayer/sdk/rest/models/suppression.py +133 -0
- hiddenlayer/sdk/rest/models/thread_flow.py +144 -0
- hiddenlayer/sdk/rest/models/thread_flow_location.py +166 -0
- hiddenlayer/sdk/rest/models/tool.py +107 -0
- hiddenlayer/sdk/rest/models/tool_component.py +251 -0
- hiddenlayer/sdk/rest/models/tool_component_reference.py +108 -0
- hiddenlayer/sdk/rest/models/translation_metadata.py +110 -0
- hiddenlayer/sdk/rest/models/validation_error_model.py +4 -4
- hiddenlayer/sdk/rest/models/version_control_details.py +108 -0
- hiddenlayer/sdk/rest/models/web_request.py +112 -0
- hiddenlayer/sdk/rest/models/web_response.py +112 -0
- hiddenlayer/sdk/rest/rest.py +1 -1
- hiddenlayer/sdk/services/model.py +51 -3
- hiddenlayer/sdk/services/model_scan.py +153 -105
- hiddenlayer/sdk/version.py +1 -1
- {hiddenlayer_sdk-0.1.2.dist-info → hiddenlayer_sdk-1.1.0.dist-info}/METADATA +40 -21
- hiddenlayer_sdk-1.1.0.dist-info/RECORD +118 -0
- {hiddenlayer_sdk-0.1.2.dist-info → hiddenlayer_sdk-1.1.0.dist-info}/WHEEL +1 -1
- hiddenlayer/sdk/enterprise/__init__.py +0 -0
- hiddenlayer/sdk/enterprise/enterprise_model_scan_api.py +0 -55
- hiddenlayer_sdk-0.1.2.dist-info/RECORD +0 -43
- {hiddenlayer_sdk-0.1.2.dist-info → hiddenlayer_sdk-1.1.0.dist-info}/LICENSE +0 -0
- {hiddenlayer_sdk-0.1.2.dist-info → hiddenlayer_sdk-1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
HiddenLayer ModelScan
|
4
|
+
HiddenLayer ModelScan V2
|
5
5
|
|
6
6
|
HiddenLayer ModelScan API for scanning of models
|
7
7
|
|
@@ -16,13 +16,14 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import Field, StrictFloat, StrictInt, StrictStr
|
19
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
|
20
20
|
from typing import Any, Optional, Union
|
21
21
|
from typing_extensions import Annotated
|
22
22
|
from hiddenlayer.sdk.rest.models.create_sensor_request import CreateSensorRequest
|
23
23
|
from hiddenlayer.sdk.rest.models.get_multipart_upload_response import GetMultipartUploadResponse
|
24
24
|
from hiddenlayer.sdk.rest.models.model import Model
|
25
25
|
from hiddenlayer.sdk.rest.models.model_query_response import ModelQueryResponse
|
26
|
+
from hiddenlayer.sdk.rest.models.sensor_sor_model_card_query_response import SensorSORModelCardQueryResponse
|
26
27
|
from hiddenlayer.sdk.rest.models.sensor_sor_query_request import SensorSORQueryRequest
|
27
28
|
|
28
29
|
from hiddenlayer.sdk.rest.api_client import ApiClient, RequestSerialized
|
@@ -46,8 +47,8 @@ class SensorApi:
|
|
46
47
|
@validate_call
|
47
48
|
def begin_multipart_upload(
|
48
49
|
self,
|
49
|
-
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
50
50
|
sensor_id: StrictStr,
|
51
|
+
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
51
52
|
_request_timeout: Union[
|
52
53
|
None,
|
53
54
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -64,10 +65,10 @@ class SensorApi:
|
|
64
65
|
"""Begin Multipart Upload
|
65
66
|
|
66
67
|
|
67
|
-
:param x_content_length: The total size of multipart upload. (required)
|
68
|
-
:type x_content_length: float
|
69
68
|
:param sensor_id: (required)
|
70
69
|
:type sensor_id: str
|
70
|
+
:param x_content_length: The total size of multipart upload. (required)
|
71
|
+
:type x_content_length: float
|
71
72
|
:param _request_timeout: timeout setting for this request. If one
|
72
73
|
number provided, it will be total request
|
73
74
|
timeout. It can also be a pair (tuple) of
|
@@ -91,8 +92,8 @@ class SensorApi:
|
|
91
92
|
""" # noqa: E501
|
92
93
|
|
93
94
|
_param = self._begin_multipart_upload_serialize(
|
94
|
-
x_content_length=x_content_length,
|
95
95
|
sensor_id=sensor_id,
|
96
|
+
x_content_length=x_content_length,
|
96
97
|
_request_auth=_request_auth,
|
97
98
|
_content_type=_content_type,
|
98
99
|
_headers=_headers,
|
@@ -117,8 +118,8 @@ class SensorApi:
|
|
117
118
|
@validate_call
|
118
119
|
def begin_multipart_upload_with_http_info(
|
119
120
|
self,
|
120
|
-
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
121
121
|
sensor_id: StrictStr,
|
122
|
+
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
122
123
|
_request_timeout: Union[
|
123
124
|
None,
|
124
125
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -135,10 +136,10 @@ class SensorApi:
|
|
135
136
|
"""Begin Multipart Upload
|
136
137
|
|
137
138
|
|
138
|
-
:param x_content_length: The total size of multipart upload. (required)
|
139
|
-
:type x_content_length: float
|
140
139
|
:param sensor_id: (required)
|
141
140
|
:type sensor_id: str
|
141
|
+
:param x_content_length: The total size of multipart upload. (required)
|
142
|
+
:type x_content_length: float
|
142
143
|
:param _request_timeout: timeout setting for this request. If one
|
143
144
|
number provided, it will be total request
|
144
145
|
timeout. It can also be a pair (tuple) of
|
@@ -162,8 +163,8 @@ class SensorApi:
|
|
162
163
|
""" # noqa: E501
|
163
164
|
|
164
165
|
_param = self._begin_multipart_upload_serialize(
|
165
|
-
x_content_length=x_content_length,
|
166
166
|
sensor_id=sensor_id,
|
167
|
+
x_content_length=x_content_length,
|
167
168
|
_request_auth=_request_auth,
|
168
169
|
_content_type=_content_type,
|
169
170
|
_headers=_headers,
|
@@ -188,8 +189,8 @@ class SensorApi:
|
|
188
189
|
@validate_call
|
189
190
|
def begin_multipart_upload_without_preload_content(
|
190
191
|
self,
|
191
|
-
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
192
192
|
sensor_id: StrictStr,
|
193
|
+
x_content_length: Annotated[Union[StrictFloat, StrictInt], Field(description="The total size of multipart upload.")],
|
193
194
|
_request_timeout: Union[
|
194
195
|
None,
|
195
196
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -206,10 +207,10 @@ class SensorApi:
|
|
206
207
|
"""Begin Multipart Upload
|
207
208
|
|
208
209
|
|
209
|
-
:param x_content_length: The total size of multipart upload. (required)
|
210
|
-
:type x_content_length: float
|
211
210
|
:param sensor_id: (required)
|
212
211
|
:type sensor_id: str
|
212
|
+
:param x_content_length: The total size of multipart upload. (required)
|
213
|
+
:type x_content_length: float
|
213
214
|
:param _request_timeout: timeout setting for this request. If one
|
214
215
|
number provided, it will be total request
|
215
216
|
timeout. It can also be a pair (tuple) of
|
@@ -233,8 +234,8 @@ class SensorApi:
|
|
233
234
|
""" # noqa: E501
|
234
235
|
|
235
236
|
_param = self._begin_multipart_upload_serialize(
|
236
|
-
x_content_length=x_content_length,
|
237
237
|
sensor_id=sensor_id,
|
238
|
+
x_content_length=x_content_length,
|
238
239
|
_request_auth=_request_auth,
|
239
240
|
_content_type=_content_type,
|
240
241
|
_headers=_headers,
|
@@ -254,8 +255,8 @@ class SensorApi:
|
|
254
255
|
|
255
256
|
def _begin_multipart_upload_serialize(
|
256
257
|
self,
|
257
|
-
x_content_length,
|
258
258
|
sensor_id,
|
259
|
+
x_content_length,
|
259
260
|
_request_auth,
|
260
261
|
_content_type,
|
261
262
|
_headers,
|
@@ -333,7 +334,7 @@ class SensorApi:
|
|
333
334
|
_content_type: Optional[StrictStr] = None,
|
334
335
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
335
336
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
336
|
-
) ->
|
337
|
+
) -> None:
|
337
338
|
"""Complete Multipart Upload
|
338
339
|
|
339
340
|
|
@@ -373,7 +374,7 @@ class SensorApi:
|
|
373
374
|
)
|
374
375
|
|
375
376
|
_response_types_map: Dict[str, Optional[str]] = {
|
376
|
-
'200':
|
377
|
+
'200': None,
|
377
378
|
'400': None,
|
378
379
|
}
|
379
380
|
response_data = self.api_client.call_api(
|
@@ -404,7 +405,7 @@ class SensorApi:
|
|
404
405
|
_content_type: Optional[StrictStr] = None,
|
405
406
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
406
407
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
407
|
-
) -> ApiResponse[
|
408
|
+
) -> ApiResponse[None]:
|
408
409
|
"""Complete Multipart Upload
|
409
410
|
|
410
411
|
|
@@ -444,7 +445,7 @@ class SensorApi:
|
|
444
445
|
)
|
445
446
|
|
446
447
|
_response_types_map: Dict[str, Optional[str]] = {
|
447
|
-
'200':
|
448
|
+
'200': None,
|
448
449
|
'400': None,
|
449
450
|
}
|
450
451
|
response_data = self.api_client.call_api(
|
@@ -515,7 +516,7 @@ class SensorApi:
|
|
515
516
|
)
|
516
517
|
|
517
518
|
_response_types_map: Dict[str, Optional[str]] = {
|
518
|
-
'200':
|
519
|
+
'200': None,
|
519
520
|
'400': None,
|
520
521
|
}
|
521
522
|
response_data = self.api_client.call_api(
|
@@ -558,12 +559,6 @@ class SensorApi:
|
|
558
559
|
# process the body parameter
|
559
560
|
|
560
561
|
|
561
|
-
# set the HTTP header `Accept`
|
562
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
563
|
-
[
|
564
|
-
'application/json'
|
565
|
-
]
|
566
|
-
)
|
567
562
|
|
568
563
|
|
569
564
|
# authentication setting
|
@@ -1650,6 +1645,334 @@ class SensorApi:
|
|
1650
1645
|
|
1651
1646
|
|
1652
1647
|
|
1648
|
+
@validate_call
|
1649
|
+
def sensor_sor_api_v3_model_cards_query_get(
|
1650
|
+
self,
|
1651
|
+
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1652
|
+
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1653
|
+
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1654
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1655
|
+
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)")] = None,
|
1656
|
+
_request_timeout: Union[
|
1657
|
+
None,
|
1658
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1659
|
+
Tuple[
|
1660
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1661
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1662
|
+
]
|
1663
|
+
] = None,
|
1664
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1665
|
+
_content_type: Optional[StrictStr] = None,
|
1666
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1667
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1668
|
+
) -> SensorSORModelCardQueryResponse:
|
1669
|
+
"""List Model Cards
|
1670
|
+
|
1671
|
+
|
1672
|
+
:param model_name_eq: substring match on model name
|
1673
|
+
:type model_name_eq: str
|
1674
|
+
:param model_name_contains: substring match on model name
|
1675
|
+
:type model_name_contains: str
|
1676
|
+
:param limit:
|
1677
|
+
:type limit: int
|
1678
|
+
:param offset:
|
1679
|
+
:type offset: int
|
1680
|
+
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1681
|
+
:type sort: str
|
1682
|
+
:param _request_timeout: timeout setting for this request. If one
|
1683
|
+
number provided, it will be total request
|
1684
|
+
timeout. It can also be a pair (tuple) of
|
1685
|
+
(connection, read) timeouts.
|
1686
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1687
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1688
|
+
request; this effectively ignores the
|
1689
|
+
authentication in the spec for a single request.
|
1690
|
+
:type _request_auth: dict, optional
|
1691
|
+
:param _content_type: force content-type for the request.
|
1692
|
+
:type _content_type: str, Optional
|
1693
|
+
:param _headers: set to override the headers for a single
|
1694
|
+
request; this effectively ignores the headers
|
1695
|
+
in the spec for a single request.
|
1696
|
+
:type _headers: dict, optional
|
1697
|
+
:param _host_index: set to override the host_index for a single
|
1698
|
+
request; this effectively ignores the host_index
|
1699
|
+
in the spec for a single request.
|
1700
|
+
:type _host_index: int, optional
|
1701
|
+
:return: Returns the result object.
|
1702
|
+
""" # noqa: E501
|
1703
|
+
|
1704
|
+
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1705
|
+
model_name_eq=model_name_eq,
|
1706
|
+
model_name_contains=model_name_contains,
|
1707
|
+
limit=limit,
|
1708
|
+
offset=offset,
|
1709
|
+
sort=sort,
|
1710
|
+
_request_auth=_request_auth,
|
1711
|
+
_content_type=_content_type,
|
1712
|
+
_headers=_headers,
|
1713
|
+
_host_index=_host_index
|
1714
|
+
)
|
1715
|
+
|
1716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1717
|
+
'200': "SensorSORModelCardQueryResponse",
|
1718
|
+
'400': None,
|
1719
|
+
}
|
1720
|
+
response_data = self.api_client.call_api(
|
1721
|
+
*_param,
|
1722
|
+
_request_timeout=_request_timeout
|
1723
|
+
)
|
1724
|
+
response_data.read()
|
1725
|
+
return self.api_client.response_deserialize(
|
1726
|
+
response_data=response_data,
|
1727
|
+
response_types_map=_response_types_map,
|
1728
|
+
).data
|
1729
|
+
|
1730
|
+
|
1731
|
+
@validate_call
|
1732
|
+
def sensor_sor_api_v3_model_cards_query_get_with_http_info(
|
1733
|
+
self,
|
1734
|
+
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1735
|
+
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1736
|
+
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1737
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1738
|
+
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)")] = None,
|
1739
|
+
_request_timeout: Union[
|
1740
|
+
None,
|
1741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1742
|
+
Tuple[
|
1743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1744
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1745
|
+
]
|
1746
|
+
] = None,
|
1747
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1748
|
+
_content_type: Optional[StrictStr] = None,
|
1749
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1750
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1751
|
+
) -> ApiResponse[SensorSORModelCardQueryResponse]:
|
1752
|
+
"""List Model Cards
|
1753
|
+
|
1754
|
+
|
1755
|
+
:param model_name_eq: substring match on model name
|
1756
|
+
:type model_name_eq: str
|
1757
|
+
:param model_name_contains: substring match on model name
|
1758
|
+
:type model_name_contains: str
|
1759
|
+
:param limit:
|
1760
|
+
:type limit: int
|
1761
|
+
:param offset:
|
1762
|
+
:type offset: int
|
1763
|
+
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1764
|
+
:type sort: str
|
1765
|
+
:param _request_timeout: timeout setting for this request. If one
|
1766
|
+
number provided, it will be total request
|
1767
|
+
timeout. It can also be a pair (tuple) of
|
1768
|
+
(connection, read) timeouts.
|
1769
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1770
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1771
|
+
request; this effectively ignores the
|
1772
|
+
authentication in the spec for a single request.
|
1773
|
+
:type _request_auth: dict, optional
|
1774
|
+
:param _content_type: force content-type for the request.
|
1775
|
+
:type _content_type: str, Optional
|
1776
|
+
:param _headers: set to override the headers for a single
|
1777
|
+
request; this effectively ignores the headers
|
1778
|
+
in the spec for a single request.
|
1779
|
+
:type _headers: dict, optional
|
1780
|
+
:param _host_index: set to override the host_index for a single
|
1781
|
+
request; this effectively ignores the host_index
|
1782
|
+
in the spec for a single request.
|
1783
|
+
:type _host_index: int, optional
|
1784
|
+
:return: Returns the result object.
|
1785
|
+
""" # noqa: E501
|
1786
|
+
|
1787
|
+
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1788
|
+
model_name_eq=model_name_eq,
|
1789
|
+
model_name_contains=model_name_contains,
|
1790
|
+
limit=limit,
|
1791
|
+
offset=offset,
|
1792
|
+
sort=sort,
|
1793
|
+
_request_auth=_request_auth,
|
1794
|
+
_content_type=_content_type,
|
1795
|
+
_headers=_headers,
|
1796
|
+
_host_index=_host_index
|
1797
|
+
)
|
1798
|
+
|
1799
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1800
|
+
'200': "SensorSORModelCardQueryResponse",
|
1801
|
+
'400': None,
|
1802
|
+
}
|
1803
|
+
response_data = self.api_client.call_api(
|
1804
|
+
*_param,
|
1805
|
+
_request_timeout=_request_timeout
|
1806
|
+
)
|
1807
|
+
response_data.read()
|
1808
|
+
return self.api_client.response_deserialize(
|
1809
|
+
response_data=response_data,
|
1810
|
+
response_types_map=_response_types_map,
|
1811
|
+
)
|
1812
|
+
|
1813
|
+
|
1814
|
+
@validate_call
|
1815
|
+
def sensor_sor_api_v3_model_cards_query_get_without_preload_content(
|
1816
|
+
self,
|
1817
|
+
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1818
|
+
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1819
|
+
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1820
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1821
|
+
sort: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)")] = None,
|
1822
|
+
_request_timeout: Union[
|
1823
|
+
None,
|
1824
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1825
|
+
Tuple[
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1827
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1828
|
+
]
|
1829
|
+
] = None,
|
1830
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1831
|
+
_content_type: Optional[StrictStr] = None,
|
1832
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1833
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1834
|
+
) -> RESTResponseType:
|
1835
|
+
"""List Model Cards
|
1836
|
+
|
1837
|
+
|
1838
|
+
:param model_name_eq: substring match on model name
|
1839
|
+
:type model_name_eq: str
|
1840
|
+
:param model_name_contains: substring match on model name
|
1841
|
+
:type model_name_contains: str
|
1842
|
+
:param limit:
|
1843
|
+
:type limit: int
|
1844
|
+
:param offset:
|
1845
|
+
:type offset: int
|
1846
|
+
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1847
|
+
:type sort: str
|
1848
|
+
:param _request_timeout: timeout setting for this request. If one
|
1849
|
+
number provided, it will be total request
|
1850
|
+
timeout. It can also be a pair (tuple) of
|
1851
|
+
(connection, read) timeouts.
|
1852
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1853
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1854
|
+
request; this effectively ignores the
|
1855
|
+
authentication in the spec for a single request.
|
1856
|
+
:type _request_auth: dict, optional
|
1857
|
+
:param _content_type: force content-type for the request.
|
1858
|
+
:type _content_type: str, Optional
|
1859
|
+
:param _headers: set to override the headers for a single
|
1860
|
+
request; this effectively ignores the headers
|
1861
|
+
in the spec for a single request.
|
1862
|
+
:type _headers: dict, optional
|
1863
|
+
:param _host_index: set to override the host_index for a single
|
1864
|
+
request; this effectively ignores the host_index
|
1865
|
+
in the spec for a single request.
|
1866
|
+
:type _host_index: int, optional
|
1867
|
+
:return: Returns the result object.
|
1868
|
+
""" # noqa: E501
|
1869
|
+
|
1870
|
+
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1871
|
+
model_name_eq=model_name_eq,
|
1872
|
+
model_name_contains=model_name_contains,
|
1873
|
+
limit=limit,
|
1874
|
+
offset=offset,
|
1875
|
+
sort=sort,
|
1876
|
+
_request_auth=_request_auth,
|
1877
|
+
_content_type=_content_type,
|
1878
|
+
_headers=_headers,
|
1879
|
+
_host_index=_host_index
|
1880
|
+
)
|
1881
|
+
|
1882
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1883
|
+
'200': "SensorSORModelCardQueryResponse",
|
1884
|
+
'400': None,
|
1885
|
+
}
|
1886
|
+
response_data = self.api_client.call_api(
|
1887
|
+
*_param,
|
1888
|
+
_request_timeout=_request_timeout
|
1889
|
+
)
|
1890
|
+
return response_data.response
|
1891
|
+
|
1892
|
+
|
1893
|
+
def _sensor_sor_api_v3_model_cards_query_get_serialize(
|
1894
|
+
self,
|
1895
|
+
model_name_eq,
|
1896
|
+
model_name_contains,
|
1897
|
+
limit,
|
1898
|
+
offset,
|
1899
|
+
sort,
|
1900
|
+
_request_auth,
|
1901
|
+
_content_type,
|
1902
|
+
_headers,
|
1903
|
+
_host_index,
|
1904
|
+
) -> RequestSerialized:
|
1905
|
+
|
1906
|
+
_host = None
|
1907
|
+
|
1908
|
+
_collection_formats: Dict[str, str] = {
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
_path_params: Dict[str, str] = {}
|
1912
|
+
_query_params: List[Tuple[str, str]] = []
|
1913
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1914
|
+
_form_params: List[Tuple[str, str]] = []
|
1915
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1916
|
+
_body_params: Optional[bytes] = None
|
1917
|
+
|
1918
|
+
# process the path parameters
|
1919
|
+
# process the query parameters
|
1920
|
+
if model_name_eq is not None:
|
1921
|
+
|
1922
|
+
_query_params.append(('model_name[eq]', model_name_eq))
|
1923
|
+
|
1924
|
+
if model_name_contains is not None:
|
1925
|
+
|
1926
|
+
_query_params.append(('model_name[contains]', model_name_contains))
|
1927
|
+
|
1928
|
+
if limit is not None:
|
1929
|
+
|
1930
|
+
_query_params.append(('limit', limit))
|
1931
|
+
|
1932
|
+
if offset is not None:
|
1933
|
+
|
1934
|
+
_query_params.append(('offset', offset))
|
1935
|
+
|
1936
|
+
if sort is not None:
|
1937
|
+
|
1938
|
+
_query_params.append(('sort', sort))
|
1939
|
+
|
1940
|
+
# process the header parameters
|
1941
|
+
# process the form parameters
|
1942
|
+
# process the body parameter
|
1943
|
+
|
1944
|
+
|
1945
|
+
# set the HTTP header `Accept`
|
1946
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1947
|
+
[
|
1948
|
+
'application/json'
|
1949
|
+
]
|
1950
|
+
)
|
1951
|
+
|
1952
|
+
|
1953
|
+
# authentication setting
|
1954
|
+
_auth_settings: List[str] = [
|
1955
|
+
'BearerAuth'
|
1956
|
+
]
|
1957
|
+
|
1958
|
+
return self.api_client.param_serialize(
|
1959
|
+
method='GET',
|
1960
|
+
resource_path='/models/v3/cards',
|
1961
|
+
path_params=_path_params,
|
1962
|
+
query_params=_query_params,
|
1963
|
+
header_params=_header_params,
|
1964
|
+
body=_body_params,
|
1965
|
+
post_params=_form_params,
|
1966
|
+
files=_files,
|
1967
|
+
auth_settings=_auth_settings,
|
1968
|
+
collection_formats=_collection_formats,
|
1969
|
+
_host=_host,
|
1970
|
+
_request_auth=_request_auth
|
1971
|
+
)
|
1972
|
+
|
1973
|
+
|
1974
|
+
|
1975
|
+
|
1653
1976
|
@validate_call
|
1654
1977
|
def upload_model_part(
|
1655
1978
|
self,
|
@@ -1669,7 +1992,7 @@ class SensorApi:
|
|
1669
1992
|
_content_type: Optional[StrictStr] = None,
|
1670
1993
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1671
1994
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1672
|
-
) ->
|
1995
|
+
) -> None:
|
1673
1996
|
"""Upload part
|
1674
1997
|
|
1675
1998
|
|
@@ -1715,7 +2038,7 @@ class SensorApi:
|
|
1715
2038
|
)
|
1716
2039
|
|
1717
2040
|
_response_types_map: Dict[str, Optional[str]] = {
|
1718
|
-
'200':
|
2041
|
+
'200': None,
|
1719
2042
|
'400': None,
|
1720
2043
|
}
|
1721
2044
|
response_data = self.api_client.call_api(
|
@@ -1748,7 +2071,7 @@ class SensorApi:
|
|
1748
2071
|
_content_type: Optional[StrictStr] = None,
|
1749
2072
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1750
2073
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1751
|
-
) -> ApiResponse[
|
2074
|
+
) -> ApiResponse[None]:
|
1752
2075
|
"""Upload part
|
1753
2076
|
|
1754
2077
|
|
@@ -1794,7 +2117,7 @@ class SensorApi:
|
|
1794
2117
|
)
|
1795
2118
|
|
1796
2119
|
_response_types_map: Dict[str, Optional[str]] = {
|
1797
|
-
'200':
|
2120
|
+
'200': None,
|
1798
2121
|
'400': None,
|
1799
2122
|
}
|
1800
2123
|
response_data = self.api_client.call_api(
|
@@ -1873,7 +2196,7 @@ class SensorApi:
|
|
1873
2196
|
)
|
1874
2197
|
|
1875
2198
|
_response_types_map: Dict[str, Optional[str]] = {
|
1876
|
-
'200':
|
2199
|
+
'200': None,
|
1877
2200
|
'400': None,
|
1878
2201
|
}
|
1879
2202
|
response_data = self.api_client.call_api(
|
@@ -1922,12 +2245,6 @@ class SensorApi:
|
|
1922
2245
|
_body_params = body
|
1923
2246
|
|
1924
2247
|
|
1925
|
-
# set the HTTP header `Accept`
|
1926
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1927
|
-
[
|
1928
|
-
'application/json'
|
1929
|
-
]
|
1930
|
-
)
|
1931
2248
|
|
1932
2249
|
# set the HTTP header `Content-Type`
|
1933
2250
|
if _content_type:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
HiddenLayer ModelScan
|
4
|
+
HiddenLayer ModelScan V2
|
5
5
|
|
6
6
|
HiddenLayer ModelScan API for scanning of models
|
7
7
|
|
@@ -70,7 +70,7 @@ class Configuration:
|
|
70
70
|
) -> None:
|
71
71
|
"""Constructor
|
72
72
|
"""
|
73
|
-
self._base_path = "
|
73
|
+
self._base_path = "https://api.hiddenlayer.ai" if host is None else host
|
74
74
|
"""Default Base url
|
75
75
|
"""
|
76
76
|
self.server_index = 0 if server_index is None and host is None else server_index
|
@@ -389,8 +389,8 @@ class Configuration:
|
|
389
389
|
"""
|
390
390
|
return [
|
391
391
|
{
|
392
|
-
'url': "",
|
393
|
-
'description': "
|
392
|
+
'url': "https://api.hiddenlayer.ai",
|
393
|
+
'description': "Production API",
|
394
394
|
}
|
395
395
|
]
|
396
396
|
|