hiddenlayer-sdk 2.0.10__py3-none-any.whl → 3.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hiddenlayer/__init__.py +109 -114
- hiddenlayer/_base_client.py +1995 -0
- hiddenlayer/_client.py +761 -0
- hiddenlayer/_compat.py +219 -0
- hiddenlayer/_constants.py +14 -0
- hiddenlayer/_exceptions.py +108 -0
- hiddenlayer/_files.py +123 -0
- hiddenlayer/_models.py +835 -0
- hiddenlayer/_oauth2.py +118 -0
- hiddenlayer/_qs.py +150 -0
- hiddenlayer/_resource.py +43 -0
- hiddenlayer/_response.py +832 -0
- hiddenlayer/_streaming.py +333 -0
- hiddenlayer/_types.py +260 -0
- hiddenlayer/_utils/__init__.py +64 -0
- hiddenlayer/_utils/_compat.py +45 -0
- hiddenlayer/_utils/_datetime_parse.py +136 -0
- hiddenlayer/_utils/_logs.py +25 -0
- hiddenlayer/_utils/_proxy.py +65 -0
- hiddenlayer/_utils/_reflection.py +42 -0
- hiddenlayer/_utils/_resources_proxy.py +24 -0
- hiddenlayer/_utils/_streams.py +12 -0
- hiddenlayer/_utils/_sync.py +86 -0
- hiddenlayer/_utils/_transform.py +457 -0
- hiddenlayer/_utils/_typing.py +156 -0
- hiddenlayer/_utils/_utils.py +421 -0
- hiddenlayer/_version.py +4 -0
- hiddenlayer/lib/.keep +4 -0
- hiddenlayer/lib/__init__.py +6 -0
- hiddenlayer/lib/community_scan.py +174 -0
- hiddenlayer/lib/model_scan.py +752 -0
- hiddenlayer/lib/scan_utils.py +142 -0
- hiddenlayer/pagination.py +127 -0
- hiddenlayer/resources/__init__.py +75 -0
- hiddenlayer/resources/interactions.py +205 -0
- hiddenlayer/resources/models/__init__.py +33 -0
- hiddenlayer/resources/models/cards.py +259 -0
- hiddenlayer/resources/models/models.py +284 -0
- hiddenlayer/resources/prompt_analyzer.py +207 -0
- hiddenlayer/resources/scans/__init__.py +61 -0
- hiddenlayer/resources/scans/jobs.py +499 -0
- hiddenlayer/resources/scans/results.py +169 -0
- hiddenlayer/resources/scans/scans.py +166 -0
- hiddenlayer/resources/scans/upload/__init__.py +33 -0
- hiddenlayer/resources/scans/upload/file.py +279 -0
- hiddenlayer/resources/scans/upload/upload.py +340 -0
- hiddenlayer/resources/sensors.py +575 -0
- hiddenlayer/types/__init__.py +16 -0
- hiddenlayer/types/interaction_analyze_params.py +62 -0
- hiddenlayer/types/interaction_analyze_response.py +199 -0
- hiddenlayer/types/model_retrieve_response.py +50 -0
- hiddenlayer/types/models/__init__.py +6 -0
- hiddenlayer/types/models/card_list_params.py +65 -0
- hiddenlayer/types/models/card_list_response.py +50 -0
- hiddenlayer/types/prompt_analyzer_create_params.py +23 -0
- hiddenlayer/types/prompt_analyzer_create_response.py +381 -0
- hiddenlayer/types/scans/__init__.py +14 -0
- hiddenlayer/types/scans/job_list_params.py +75 -0
- hiddenlayer/types/scans/job_list_response.py +22 -0
- hiddenlayer/types/scans/job_request_params.py +49 -0
- hiddenlayer/types/scans/job_retrieve_params.py +16 -0
- hiddenlayer/types/scans/result_sarif_response.py +7 -0
- hiddenlayer/types/scans/scan_job.py +46 -0
- hiddenlayer/types/scans/scan_report.py +367 -0
- hiddenlayer/types/scans/upload/__init__.py +6 -0
- hiddenlayer/types/scans/upload/file_add_response.py +24 -0
- hiddenlayer/types/scans/upload/file_complete_response.py +12 -0
- hiddenlayer/types/scans/upload_complete_all_response.py +12 -0
- hiddenlayer/types/scans/upload_start_params.py +34 -0
- hiddenlayer/types/scans/upload_start_response.py +12 -0
- hiddenlayer/types/sensor_create_params.py +24 -0
- hiddenlayer/types/sensor_create_response.py +33 -0
- hiddenlayer/types/sensor_query_params.py +39 -0
- hiddenlayer/types/sensor_query_response.py +43 -0
- hiddenlayer/types/sensor_retrieve_response.py +33 -0
- hiddenlayer/types/sensor_update_params.py +20 -0
- hiddenlayer/types/sensor_update_response.py +9 -0
- hiddenlayer_sdk-3.0.1.dist-info/METADATA +521 -0
- hiddenlayer_sdk-3.0.1.dist-info/RECORD +82 -0
- {hiddenlayer_sdk-2.0.10.dist-info → hiddenlayer_sdk-3.0.1.dist-info}/WHEEL +1 -2
- {hiddenlayer_sdk-2.0.10.dist-info → hiddenlayer_sdk-3.0.1.dist-info}/licenses/LICENSE +1 -1
- hiddenlayer/sdk/constants.py +0 -26
- hiddenlayer/sdk/exceptions.py +0 -12
- hiddenlayer/sdk/models.py +0 -58
- hiddenlayer/sdk/rest/__init__.py +0 -135
- hiddenlayer/sdk/rest/api/__init__.py +0 -10
- hiddenlayer/sdk/rest/api/aidr_predictive_api.py +0 -308
- hiddenlayer/sdk/rest/api/health_api.py +0 -272
- hiddenlayer/sdk/rest/api/model_api.py +0 -559
- hiddenlayer/sdk/rest/api/model_supply_chain_api.py +0 -4063
- hiddenlayer/sdk/rest/api/readiness_api.py +0 -272
- hiddenlayer/sdk/rest/api/sensor_api.py +0 -1432
- hiddenlayer/sdk/rest/api_client.py +0 -770
- hiddenlayer/sdk/rest/api_response.py +0 -21
- hiddenlayer/sdk/rest/configuration.py +0 -445
- hiddenlayer/sdk/rest/exceptions.py +0 -199
- hiddenlayer/sdk/rest/models/__init__.py +0 -113
- hiddenlayer/sdk/rest/models/address.py +0 -110
- hiddenlayer/sdk/rest/models/artifact.py +0 -155
- hiddenlayer/sdk/rest/models/artifact_change.py +0 -108
- hiddenlayer/sdk/rest/models/artifact_content.py +0 -101
- hiddenlayer/sdk/rest/models/artifact_location.py +0 -109
- hiddenlayer/sdk/rest/models/attachment.py +0 -129
- hiddenlayer/sdk/rest/models/begin_multi_file_upload200_response.py +0 -87
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response.py +0 -97
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response_parts_inner.py +0 -94
- hiddenlayer/sdk/rest/models/code_flow.py +0 -113
- hiddenlayer/sdk/rest/models/configuration_override.py +0 -108
- hiddenlayer/sdk/rest/models/conversion.py +0 -114
- hiddenlayer/sdk/rest/models/create_sensor_request.py +0 -95
- hiddenlayer/sdk/rest/models/edge.py +0 -108
- hiddenlayer/sdk/rest/models/edge_traversal.py +0 -122
- hiddenlayer/sdk/rest/models/errors_inner.py +0 -91
- hiddenlayer/sdk/rest/models/exception.py +0 -113
- hiddenlayer/sdk/rest/models/external_properties.py +0 -273
- hiddenlayer/sdk/rest/models/external_property_file_reference.py +0 -102
- hiddenlayer/sdk/rest/models/external_property_file_references.py +0 -240
- hiddenlayer/sdk/rest/models/file_details_v3.py +0 -139
- hiddenlayer/sdk/rest/models/file_result_v3.py +0 -117
- hiddenlayer/sdk/rest/models/file_scan_report_v3.py +0 -132
- hiddenlayer/sdk/rest/models/file_scan_reports_v3.py +0 -95
- hiddenlayer/sdk/rest/models/fix.py +0 -113
- hiddenlayer/sdk/rest/models/get_condensed_model_scan_reports200_response.py +0 -102
- hiddenlayer/sdk/rest/models/graph.py +0 -123
- hiddenlayer/sdk/rest/models/graph_traversal.py +0 -97
- hiddenlayer/sdk/rest/models/inventory_v3.py +0 -101
- hiddenlayer/sdk/rest/models/invocation.py +0 -199
- hiddenlayer/sdk/rest/models/location.py +0 -146
- hiddenlayer/sdk/rest/models/location_inner.py +0 -138
- hiddenlayer/sdk/rest/models/location_relationship.py +0 -107
- hiddenlayer/sdk/rest/models/logical_location.py +0 -104
- hiddenlayer/sdk/rest/models/message.py +0 -92
- hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +0 -110
- hiddenlayer/sdk/rest/models/model.py +0 -103
- hiddenlayer/sdk/rest/models/model_inventory_info.py +0 -103
- hiddenlayer/sdk/rest/models/model_version.py +0 -97
- hiddenlayer/sdk/rest/models/multi_file_upload_request_v3.py +0 -97
- hiddenlayer/sdk/rest/models/multiformat_message_string.py +0 -95
- hiddenlayer/sdk/rest/models/node.py +0 -122
- hiddenlayer/sdk/rest/models/notification.py +0 -157
- hiddenlayer/sdk/rest/models/notify_model_scan_completed200_response.py +0 -87
- hiddenlayer/sdk/rest/models/paged_response_with_total.py +0 -94
- hiddenlayer/sdk/rest/models/pagination_v3.py +0 -95
- hiddenlayer/sdk/rest/models/physical_location.py +0 -94
- hiddenlayer/sdk/rest/models/problem_details.py +0 -103
- hiddenlayer/sdk/rest/models/property_bag.py +0 -101
- hiddenlayer/sdk/rest/models/rectangle.py +0 -110
- hiddenlayer/sdk/rest/models/region.py +0 -127
- hiddenlayer/sdk/rest/models/replacement.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_configuration.py +0 -113
- hiddenlayer/sdk/rest/models/reporting_descriptor.py +0 -162
- hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +0 -115
- hiddenlayer/sdk/rest/models/result.py +0 -312
- hiddenlayer/sdk/rest/models/result_provenance.py +0 -133
- hiddenlayer/sdk/rest/models/rule_details_inner.py +0 -102
- hiddenlayer/sdk/rest/models/run.py +0 -318
- hiddenlayer/sdk/rest/models/run_automation_details.py +0 -129
- hiddenlayer/sdk/rest/models/sarif210.py +0 -123
- hiddenlayer/sdk/rest/models/scan_create_request.py +0 -87
- hiddenlayer/sdk/rest/models/scan_detection_v3.py +0 -159
- hiddenlayer/sdk/rest/models/scan_detection_v31.py +0 -158
- hiddenlayer/sdk/rest/models/scan_header_v3.py +0 -129
- hiddenlayer/sdk/rest/models/scan_job.py +0 -115
- hiddenlayer/sdk/rest/models/scan_job_access.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_details_v3.py +0 -99
- hiddenlayer/sdk/rest/models/scan_model_details_v31.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +0 -89
- hiddenlayer/sdk/rest/models/scan_report_v3.py +0 -139
- hiddenlayer/sdk/rest/models/scan_results_map_v3.py +0 -105
- hiddenlayer/sdk/rest/models/scan_results_v3.py +0 -120
- hiddenlayer/sdk/rest/models/security_posture.py +0 -89
- hiddenlayer/sdk/rest/models/sensor.py +0 -100
- hiddenlayer/sdk/rest/models/sensor_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +0 -127
- hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +0 -108
- hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +0 -109
- hiddenlayer/sdk/rest/models/special_locations.py +0 -97
- hiddenlayer/sdk/rest/models/stack.py +0 -113
- hiddenlayer/sdk/rest/models/stack_frame.py +0 -104
- hiddenlayer/sdk/rest/models/submission_response.py +0 -95
- hiddenlayer/sdk/rest/models/submission_v2.py +0 -109
- hiddenlayer/sdk/rest/models/suppression.py +0 -133
- hiddenlayer/sdk/rest/models/thread_flow.py +0 -144
- hiddenlayer/sdk/rest/models/thread_flow_location.py +0 -166
- hiddenlayer/sdk/rest/models/tool.py +0 -107
- hiddenlayer/sdk/rest/models/tool_component.py +0 -251
- hiddenlayer/sdk/rest/models/tool_component_reference.py +0 -108
- hiddenlayer/sdk/rest/models/translation_metadata.py +0 -110
- hiddenlayer/sdk/rest/models/validation_error_model.py +0 -99
- hiddenlayer/sdk/rest/models/version_control_details.py +0 -108
- hiddenlayer/sdk/rest/models/web_request.py +0 -112
- hiddenlayer/sdk/rest/models/web_response.py +0 -112
- hiddenlayer/sdk/rest/rest.py +0 -257
- hiddenlayer/sdk/services/__init__.py +0 -0
- hiddenlayer/sdk/services/aidr_predictive.py +0 -130
- hiddenlayer/sdk/services/model_scan.py +0 -505
- hiddenlayer/sdk/utils.py +0 -92
- hiddenlayer/sdk/version.py +0 -1
- hiddenlayer_sdk-2.0.10.dist-info/METADATA +0 -368
- hiddenlayer_sdk-2.0.10.dist-info/RECORD +0 -126
- hiddenlayer_sdk-2.0.10.dist-info/top_level.txt +0 -1
- /hiddenlayer/{sdk/__init__.py → py.typed} +0 -0
@@ -1,1432 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
import warnings
|
15
|
-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
-
from typing_extensions import Annotated
|
18
|
-
|
19
|
-
from pydantic import Field, StrictStr, field_validator
|
20
|
-
from typing import Optional
|
21
|
-
from typing_extensions import Annotated
|
22
|
-
from hiddenlayer.sdk.rest.models.create_sensor_request import CreateSensorRequest
|
23
|
-
from hiddenlayer.sdk.rest.models.sensor import Sensor
|
24
|
-
from hiddenlayer.sdk.rest.models.sensor_query_response import SensorQueryResponse
|
25
|
-
from hiddenlayer.sdk.rest.models.sensor_sor_model_card_query_response import SensorSORModelCardQueryResponse
|
26
|
-
from hiddenlayer.sdk.rest.models.sensor_sor_query_request import SensorSORQueryRequest
|
27
|
-
|
28
|
-
from hiddenlayer.sdk.rest.api_client import ApiClient, RequestSerialized
|
29
|
-
from hiddenlayer.sdk.rest.api_response import ApiResponse
|
30
|
-
from hiddenlayer.sdk.rest.rest import RESTResponseType
|
31
|
-
|
32
|
-
|
33
|
-
class SensorApi:
|
34
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
35
|
-
Ref: https://openapi-generator.tech
|
36
|
-
|
37
|
-
Do not edit the class manually.
|
38
|
-
"""
|
39
|
-
|
40
|
-
def __init__(self, api_client=None) -> None:
|
41
|
-
if api_client is None:
|
42
|
-
api_client = ApiClient.get_default()
|
43
|
-
self.api_client = api_client
|
44
|
-
|
45
|
-
|
46
|
-
@validate_call
|
47
|
-
def create_sensor(
|
48
|
-
self,
|
49
|
-
create_sensor_request: Annotated[CreateSensorRequest, Field(description="Request body for create")],
|
50
|
-
_request_timeout: Union[
|
51
|
-
None,
|
52
|
-
Annotated[StrictFloat, Field(gt=0)],
|
53
|
-
Tuple[
|
54
|
-
Annotated[StrictFloat, Field(gt=0)],
|
55
|
-
Annotated[StrictFloat, Field(gt=0)]
|
56
|
-
]
|
57
|
-
] = None,
|
58
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
59
|
-
_content_type: Optional[StrictStr] = None,
|
60
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
61
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
62
|
-
) -> Sensor:
|
63
|
-
"""Create a Sensor
|
64
|
-
|
65
|
-
|
66
|
-
:param create_sensor_request: Request body for create (required)
|
67
|
-
:type create_sensor_request: CreateSensorRequest
|
68
|
-
:param _request_timeout: timeout setting for this request. If one
|
69
|
-
number provided, it will be total request
|
70
|
-
timeout. It can also be a pair (tuple) of
|
71
|
-
(connection, read) timeouts.
|
72
|
-
:type _request_timeout: int, tuple(int, int), optional
|
73
|
-
:param _request_auth: set to override the auth_settings for an a single
|
74
|
-
request; this effectively ignores the
|
75
|
-
authentication in the spec for a single request.
|
76
|
-
:type _request_auth: dict, optional
|
77
|
-
:param _content_type: force content-type for the request.
|
78
|
-
:type _content_type: str, Optional
|
79
|
-
:param _headers: set to override the headers for a single
|
80
|
-
request; this effectively ignores the headers
|
81
|
-
in the spec for a single request.
|
82
|
-
:type _headers: dict, optional
|
83
|
-
:param _host_index: set to override the host_index for a single
|
84
|
-
request; this effectively ignores the host_index
|
85
|
-
in the spec for a single request.
|
86
|
-
:type _host_index: int, optional
|
87
|
-
:return: Returns the result object.
|
88
|
-
""" # noqa: E501
|
89
|
-
|
90
|
-
_param = self._create_sensor_serialize(
|
91
|
-
create_sensor_request=create_sensor_request,
|
92
|
-
_request_auth=_request_auth,
|
93
|
-
_content_type=_content_type,
|
94
|
-
_headers=_headers,
|
95
|
-
_host_index=_host_index
|
96
|
-
)
|
97
|
-
|
98
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
99
|
-
'201': "Sensor",
|
100
|
-
'400': None,
|
101
|
-
'422': "ValidationErrorModel",
|
102
|
-
}
|
103
|
-
response_data = self.api_client.call_api(
|
104
|
-
*_param,
|
105
|
-
_request_timeout=_request_timeout
|
106
|
-
)
|
107
|
-
response_data.read()
|
108
|
-
return self.api_client.response_deserialize(
|
109
|
-
response_data=response_data,
|
110
|
-
response_types_map=_response_types_map,
|
111
|
-
).data
|
112
|
-
|
113
|
-
|
114
|
-
@validate_call
|
115
|
-
def create_sensor_with_http_info(
|
116
|
-
self,
|
117
|
-
create_sensor_request: Annotated[CreateSensorRequest, Field(description="Request body for create")],
|
118
|
-
_request_timeout: Union[
|
119
|
-
None,
|
120
|
-
Annotated[StrictFloat, Field(gt=0)],
|
121
|
-
Tuple[
|
122
|
-
Annotated[StrictFloat, Field(gt=0)],
|
123
|
-
Annotated[StrictFloat, Field(gt=0)]
|
124
|
-
]
|
125
|
-
] = None,
|
126
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
127
|
-
_content_type: Optional[StrictStr] = None,
|
128
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
129
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
130
|
-
) -> ApiResponse[Sensor]:
|
131
|
-
"""Create a Sensor
|
132
|
-
|
133
|
-
|
134
|
-
:param create_sensor_request: Request body for create (required)
|
135
|
-
:type create_sensor_request: CreateSensorRequest
|
136
|
-
:param _request_timeout: timeout setting for this request. If one
|
137
|
-
number provided, it will be total request
|
138
|
-
timeout. It can also be a pair (tuple) of
|
139
|
-
(connection, read) timeouts.
|
140
|
-
:type _request_timeout: int, tuple(int, int), optional
|
141
|
-
:param _request_auth: set to override the auth_settings for an a single
|
142
|
-
request; this effectively ignores the
|
143
|
-
authentication in the spec for a single request.
|
144
|
-
:type _request_auth: dict, optional
|
145
|
-
:param _content_type: force content-type for the request.
|
146
|
-
:type _content_type: str, Optional
|
147
|
-
:param _headers: set to override the headers for a single
|
148
|
-
request; this effectively ignores the headers
|
149
|
-
in the spec for a single request.
|
150
|
-
:type _headers: dict, optional
|
151
|
-
:param _host_index: set to override the host_index for a single
|
152
|
-
request; this effectively ignores the host_index
|
153
|
-
in the spec for a single request.
|
154
|
-
:type _host_index: int, optional
|
155
|
-
:return: Returns the result object.
|
156
|
-
""" # noqa: E501
|
157
|
-
|
158
|
-
_param = self._create_sensor_serialize(
|
159
|
-
create_sensor_request=create_sensor_request,
|
160
|
-
_request_auth=_request_auth,
|
161
|
-
_content_type=_content_type,
|
162
|
-
_headers=_headers,
|
163
|
-
_host_index=_host_index
|
164
|
-
)
|
165
|
-
|
166
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
167
|
-
'201': "Sensor",
|
168
|
-
'400': None,
|
169
|
-
'422': "ValidationErrorModel",
|
170
|
-
}
|
171
|
-
response_data = self.api_client.call_api(
|
172
|
-
*_param,
|
173
|
-
_request_timeout=_request_timeout
|
174
|
-
)
|
175
|
-
response_data.read()
|
176
|
-
return self.api_client.response_deserialize(
|
177
|
-
response_data=response_data,
|
178
|
-
response_types_map=_response_types_map,
|
179
|
-
)
|
180
|
-
|
181
|
-
|
182
|
-
@validate_call
|
183
|
-
def create_sensor_without_preload_content(
|
184
|
-
self,
|
185
|
-
create_sensor_request: Annotated[CreateSensorRequest, Field(description="Request body for create")],
|
186
|
-
_request_timeout: Union[
|
187
|
-
None,
|
188
|
-
Annotated[StrictFloat, Field(gt=0)],
|
189
|
-
Tuple[
|
190
|
-
Annotated[StrictFloat, Field(gt=0)],
|
191
|
-
Annotated[StrictFloat, Field(gt=0)]
|
192
|
-
]
|
193
|
-
] = None,
|
194
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
195
|
-
_content_type: Optional[StrictStr] = None,
|
196
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
197
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
198
|
-
) -> RESTResponseType:
|
199
|
-
"""Create a Sensor
|
200
|
-
|
201
|
-
|
202
|
-
:param create_sensor_request: Request body for create (required)
|
203
|
-
:type create_sensor_request: CreateSensorRequest
|
204
|
-
:param _request_timeout: timeout setting for this request. If one
|
205
|
-
number provided, it will be total request
|
206
|
-
timeout. It can also be a pair (tuple) of
|
207
|
-
(connection, read) timeouts.
|
208
|
-
:type _request_timeout: int, tuple(int, int), optional
|
209
|
-
:param _request_auth: set to override the auth_settings for an a single
|
210
|
-
request; this effectively ignores the
|
211
|
-
authentication in the spec for a single request.
|
212
|
-
:type _request_auth: dict, optional
|
213
|
-
:param _content_type: force content-type for the request.
|
214
|
-
:type _content_type: str, Optional
|
215
|
-
:param _headers: set to override the headers for a single
|
216
|
-
request; this effectively ignores the headers
|
217
|
-
in the spec for a single request.
|
218
|
-
:type _headers: dict, optional
|
219
|
-
:param _host_index: set to override the host_index for a single
|
220
|
-
request; this effectively ignores the host_index
|
221
|
-
in the spec for a single request.
|
222
|
-
:type _host_index: int, optional
|
223
|
-
:return: Returns the result object.
|
224
|
-
""" # noqa: E501
|
225
|
-
|
226
|
-
_param = self._create_sensor_serialize(
|
227
|
-
create_sensor_request=create_sensor_request,
|
228
|
-
_request_auth=_request_auth,
|
229
|
-
_content_type=_content_type,
|
230
|
-
_headers=_headers,
|
231
|
-
_host_index=_host_index
|
232
|
-
)
|
233
|
-
|
234
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
235
|
-
'201': "Sensor",
|
236
|
-
'400': None,
|
237
|
-
'422': "ValidationErrorModel",
|
238
|
-
}
|
239
|
-
response_data = self.api_client.call_api(
|
240
|
-
*_param,
|
241
|
-
_request_timeout=_request_timeout
|
242
|
-
)
|
243
|
-
return response_data.response
|
244
|
-
|
245
|
-
|
246
|
-
def _create_sensor_serialize(
|
247
|
-
self,
|
248
|
-
create_sensor_request,
|
249
|
-
_request_auth,
|
250
|
-
_content_type,
|
251
|
-
_headers,
|
252
|
-
_host_index,
|
253
|
-
) -> RequestSerialized:
|
254
|
-
|
255
|
-
_host = None
|
256
|
-
|
257
|
-
_collection_formats: Dict[str, str] = {
|
258
|
-
}
|
259
|
-
|
260
|
-
_path_params: Dict[str, str] = {}
|
261
|
-
_query_params: List[Tuple[str, str]] = []
|
262
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
263
|
-
_form_params: List[Tuple[str, str]] = []
|
264
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
265
|
-
_body_params: Optional[bytes] = None
|
266
|
-
|
267
|
-
# process the path parameters
|
268
|
-
# process the query parameters
|
269
|
-
# process the header parameters
|
270
|
-
# process the form parameters
|
271
|
-
# process the body parameter
|
272
|
-
if create_sensor_request is not None:
|
273
|
-
_body_params = create_sensor_request
|
274
|
-
|
275
|
-
|
276
|
-
# set the HTTP header `Accept`
|
277
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
278
|
-
[
|
279
|
-
'application/json'
|
280
|
-
]
|
281
|
-
)
|
282
|
-
|
283
|
-
# set the HTTP header `Content-Type`
|
284
|
-
if _content_type:
|
285
|
-
_header_params['Content-Type'] = _content_type
|
286
|
-
else:
|
287
|
-
_default_content_type = (
|
288
|
-
self.api_client.select_header_content_type(
|
289
|
-
[
|
290
|
-
'application/json'
|
291
|
-
]
|
292
|
-
)
|
293
|
-
)
|
294
|
-
if _default_content_type is not None:
|
295
|
-
_header_params['Content-Type'] = _default_content_type
|
296
|
-
|
297
|
-
# authentication setting
|
298
|
-
_auth_settings: List[str] = [
|
299
|
-
'BearerAuth'
|
300
|
-
]
|
301
|
-
|
302
|
-
return self.api_client.param_serialize(
|
303
|
-
method='POST',
|
304
|
-
resource_path='/api/v2/sensors/create',
|
305
|
-
path_params=_path_params,
|
306
|
-
query_params=_query_params,
|
307
|
-
header_params=_header_params,
|
308
|
-
body=_body_params,
|
309
|
-
post_params=_form_params,
|
310
|
-
files=_files,
|
311
|
-
auth_settings=_auth_settings,
|
312
|
-
collection_formats=_collection_formats,
|
313
|
-
_host=_host,
|
314
|
-
_request_auth=_request_auth
|
315
|
-
)
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
@validate_call
|
321
|
-
def delete_sensor(
|
322
|
-
self,
|
323
|
-
sensor_id: StrictStr,
|
324
|
-
_request_timeout: Union[
|
325
|
-
None,
|
326
|
-
Annotated[StrictFloat, Field(gt=0)],
|
327
|
-
Tuple[
|
328
|
-
Annotated[StrictFloat, Field(gt=0)],
|
329
|
-
Annotated[StrictFloat, Field(gt=0)]
|
330
|
-
]
|
331
|
-
] = None,
|
332
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
333
|
-
_content_type: Optional[StrictStr] = None,
|
334
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
335
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
336
|
-
) -> None:
|
337
|
-
"""Delete Sensor
|
338
|
-
|
339
|
-
|
340
|
-
:param sensor_id: (required)
|
341
|
-
:type sensor_id: str
|
342
|
-
:param _request_timeout: timeout setting for this request. If one
|
343
|
-
number provided, it will be total request
|
344
|
-
timeout. It can also be a pair (tuple) of
|
345
|
-
(connection, read) timeouts.
|
346
|
-
:type _request_timeout: int, tuple(int, int), optional
|
347
|
-
:param _request_auth: set to override the auth_settings for an a single
|
348
|
-
request; this effectively ignores the
|
349
|
-
authentication in the spec for a single request.
|
350
|
-
:type _request_auth: dict, optional
|
351
|
-
:param _content_type: force content-type for the request.
|
352
|
-
:type _content_type: str, Optional
|
353
|
-
:param _headers: set to override the headers for a single
|
354
|
-
request; this effectively ignores the headers
|
355
|
-
in the spec for a single request.
|
356
|
-
:type _headers: dict, optional
|
357
|
-
:param _host_index: set to override the host_index for a single
|
358
|
-
request; this effectively ignores the host_index
|
359
|
-
in the spec for a single request.
|
360
|
-
:type _host_index: int, optional
|
361
|
-
:return: Returns the result object.
|
362
|
-
""" # noqa: E501
|
363
|
-
|
364
|
-
_param = self._delete_sensor_serialize(
|
365
|
-
sensor_id=sensor_id,
|
366
|
-
_request_auth=_request_auth,
|
367
|
-
_content_type=_content_type,
|
368
|
-
_headers=_headers,
|
369
|
-
_host_index=_host_index
|
370
|
-
)
|
371
|
-
|
372
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
373
|
-
'204': None,
|
374
|
-
'400': None,
|
375
|
-
'404': None,
|
376
|
-
}
|
377
|
-
response_data = self.api_client.call_api(
|
378
|
-
*_param,
|
379
|
-
_request_timeout=_request_timeout
|
380
|
-
)
|
381
|
-
response_data.read()
|
382
|
-
return self.api_client.response_deserialize(
|
383
|
-
response_data=response_data,
|
384
|
-
response_types_map=_response_types_map,
|
385
|
-
).data
|
386
|
-
|
387
|
-
|
388
|
-
@validate_call
|
389
|
-
def delete_sensor_with_http_info(
|
390
|
-
self,
|
391
|
-
sensor_id: StrictStr,
|
392
|
-
_request_timeout: Union[
|
393
|
-
None,
|
394
|
-
Annotated[StrictFloat, Field(gt=0)],
|
395
|
-
Tuple[
|
396
|
-
Annotated[StrictFloat, Field(gt=0)],
|
397
|
-
Annotated[StrictFloat, Field(gt=0)]
|
398
|
-
]
|
399
|
-
] = None,
|
400
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
401
|
-
_content_type: Optional[StrictStr] = None,
|
402
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
403
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
404
|
-
) -> ApiResponse[None]:
|
405
|
-
"""Delete Sensor
|
406
|
-
|
407
|
-
|
408
|
-
:param sensor_id: (required)
|
409
|
-
:type sensor_id: str
|
410
|
-
:param _request_timeout: timeout setting for this request. If one
|
411
|
-
number provided, it will be total request
|
412
|
-
timeout. It can also be a pair (tuple) of
|
413
|
-
(connection, read) timeouts.
|
414
|
-
:type _request_timeout: int, tuple(int, int), optional
|
415
|
-
:param _request_auth: set to override the auth_settings for an a single
|
416
|
-
request; this effectively ignores the
|
417
|
-
authentication in the spec for a single request.
|
418
|
-
:type _request_auth: dict, optional
|
419
|
-
:param _content_type: force content-type for the request.
|
420
|
-
:type _content_type: str, Optional
|
421
|
-
:param _headers: set to override the headers for a single
|
422
|
-
request; this effectively ignores the headers
|
423
|
-
in the spec for a single request.
|
424
|
-
:type _headers: dict, optional
|
425
|
-
:param _host_index: set to override the host_index for a single
|
426
|
-
request; this effectively ignores the host_index
|
427
|
-
in the spec for a single request.
|
428
|
-
:type _host_index: int, optional
|
429
|
-
:return: Returns the result object.
|
430
|
-
""" # noqa: E501
|
431
|
-
|
432
|
-
_param = self._delete_sensor_serialize(
|
433
|
-
sensor_id=sensor_id,
|
434
|
-
_request_auth=_request_auth,
|
435
|
-
_content_type=_content_type,
|
436
|
-
_headers=_headers,
|
437
|
-
_host_index=_host_index
|
438
|
-
)
|
439
|
-
|
440
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
441
|
-
'204': None,
|
442
|
-
'400': None,
|
443
|
-
'404': None,
|
444
|
-
}
|
445
|
-
response_data = self.api_client.call_api(
|
446
|
-
*_param,
|
447
|
-
_request_timeout=_request_timeout
|
448
|
-
)
|
449
|
-
response_data.read()
|
450
|
-
return self.api_client.response_deserialize(
|
451
|
-
response_data=response_data,
|
452
|
-
response_types_map=_response_types_map,
|
453
|
-
)
|
454
|
-
|
455
|
-
|
456
|
-
@validate_call
|
457
|
-
def delete_sensor_without_preload_content(
|
458
|
-
self,
|
459
|
-
sensor_id: StrictStr,
|
460
|
-
_request_timeout: Union[
|
461
|
-
None,
|
462
|
-
Annotated[StrictFloat, Field(gt=0)],
|
463
|
-
Tuple[
|
464
|
-
Annotated[StrictFloat, Field(gt=0)],
|
465
|
-
Annotated[StrictFloat, Field(gt=0)]
|
466
|
-
]
|
467
|
-
] = None,
|
468
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
469
|
-
_content_type: Optional[StrictStr] = None,
|
470
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
471
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
472
|
-
) -> RESTResponseType:
|
473
|
-
"""Delete Sensor
|
474
|
-
|
475
|
-
|
476
|
-
:param sensor_id: (required)
|
477
|
-
:type sensor_id: str
|
478
|
-
:param _request_timeout: timeout setting for this request. If one
|
479
|
-
number provided, it will be total request
|
480
|
-
timeout. It can also be a pair (tuple) of
|
481
|
-
(connection, read) timeouts.
|
482
|
-
:type _request_timeout: int, tuple(int, int), optional
|
483
|
-
:param _request_auth: set to override the auth_settings for an a single
|
484
|
-
request; this effectively ignores the
|
485
|
-
authentication in the spec for a single request.
|
486
|
-
:type _request_auth: dict, optional
|
487
|
-
:param _content_type: force content-type for the request.
|
488
|
-
:type _content_type: str, Optional
|
489
|
-
:param _headers: set to override the headers for a single
|
490
|
-
request; this effectively ignores the headers
|
491
|
-
in the spec for a single request.
|
492
|
-
:type _headers: dict, optional
|
493
|
-
:param _host_index: set to override the host_index for a single
|
494
|
-
request; this effectively ignores the host_index
|
495
|
-
in the spec for a single request.
|
496
|
-
:type _host_index: int, optional
|
497
|
-
:return: Returns the result object.
|
498
|
-
""" # noqa: E501
|
499
|
-
|
500
|
-
_param = self._delete_sensor_serialize(
|
501
|
-
sensor_id=sensor_id,
|
502
|
-
_request_auth=_request_auth,
|
503
|
-
_content_type=_content_type,
|
504
|
-
_headers=_headers,
|
505
|
-
_host_index=_host_index
|
506
|
-
)
|
507
|
-
|
508
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
509
|
-
'204': None,
|
510
|
-
'400': None,
|
511
|
-
'404': None,
|
512
|
-
}
|
513
|
-
response_data = self.api_client.call_api(
|
514
|
-
*_param,
|
515
|
-
_request_timeout=_request_timeout
|
516
|
-
)
|
517
|
-
return response_data.response
|
518
|
-
|
519
|
-
|
520
|
-
def _delete_sensor_serialize(
|
521
|
-
self,
|
522
|
-
sensor_id,
|
523
|
-
_request_auth,
|
524
|
-
_content_type,
|
525
|
-
_headers,
|
526
|
-
_host_index,
|
527
|
-
) -> RequestSerialized:
|
528
|
-
|
529
|
-
_host = None
|
530
|
-
|
531
|
-
_collection_formats: Dict[str, str] = {
|
532
|
-
}
|
533
|
-
|
534
|
-
_path_params: Dict[str, str] = {}
|
535
|
-
_query_params: List[Tuple[str, str]] = []
|
536
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
537
|
-
_form_params: List[Tuple[str, str]] = []
|
538
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
539
|
-
_body_params: Optional[bytes] = None
|
540
|
-
|
541
|
-
# process the path parameters
|
542
|
-
if sensor_id is not None:
|
543
|
-
_path_params['sensor_id'] = sensor_id
|
544
|
-
# process the query parameters
|
545
|
-
# process the header parameters
|
546
|
-
# process the form parameters
|
547
|
-
# process the body parameter
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
# authentication setting
|
553
|
-
_auth_settings: List[str] = [
|
554
|
-
'BearerAuth'
|
555
|
-
]
|
556
|
-
|
557
|
-
return self.api_client.param_serialize(
|
558
|
-
method='DELETE',
|
559
|
-
resource_path='/api/v2/sensors/{sensor_id}',
|
560
|
-
path_params=_path_params,
|
561
|
-
query_params=_query_params,
|
562
|
-
header_params=_header_params,
|
563
|
-
body=_body_params,
|
564
|
-
post_params=_form_params,
|
565
|
-
files=_files,
|
566
|
-
auth_settings=_auth_settings,
|
567
|
-
collection_formats=_collection_formats,
|
568
|
-
_host=_host,
|
569
|
-
_request_auth=_request_auth
|
570
|
-
)
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
@validate_call
|
576
|
-
def get_sensor(
|
577
|
-
self,
|
578
|
-
sensor_id: StrictStr,
|
579
|
-
_request_timeout: Union[
|
580
|
-
None,
|
581
|
-
Annotated[StrictFloat, Field(gt=0)],
|
582
|
-
Tuple[
|
583
|
-
Annotated[StrictFloat, Field(gt=0)],
|
584
|
-
Annotated[StrictFloat, Field(gt=0)]
|
585
|
-
]
|
586
|
-
] = None,
|
587
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
588
|
-
_content_type: Optional[StrictStr] = None,
|
589
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
590
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
591
|
-
) -> Sensor:
|
592
|
-
"""Get Sensor
|
593
|
-
|
594
|
-
|
595
|
-
:param sensor_id: (required)
|
596
|
-
:type sensor_id: str
|
597
|
-
:param _request_timeout: timeout setting for this request. If one
|
598
|
-
number provided, it will be total request
|
599
|
-
timeout. It can also be a pair (tuple) of
|
600
|
-
(connection, read) timeouts.
|
601
|
-
:type _request_timeout: int, tuple(int, int), optional
|
602
|
-
:param _request_auth: set to override the auth_settings for an a single
|
603
|
-
request; this effectively ignores the
|
604
|
-
authentication in the spec for a single request.
|
605
|
-
:type _request_auth: dict, optional
|
606
|
-
:param _content_type: force content-type for the request.
|
607
|
-
:type _content_type: str, Optional
|
608
|
-
:param _headers: set to override the headers for a single
|
609
|
-
request; this effectively ignores the headers
|
610
|
-
in the spec for a single request.
|
611
|
-
:type _headers: dict, optional
|
612
|
-
:param _host_index: set to override the host_index for a single
|
613
|
-
request; this effectively ignores the host_index
|
614
|
-
in the spec for a single request.
|
615
|
-
:type _host_index: int, optional
|
616
|
-
:return: Returns the result object.
|
617
|
-
""" # noqa: E501
|
618
|
-
|
619
|
-
_param = self._get_sensor_serialize(
|
620
|
-
sensor_id=sensor_id,
|
621
|
-
_request_auth=_request_auth,
|
622
|
-
_content_type=_content_type,
|
623
|
-
_headers=_headers,
|
624
|
-
_host_index=_host_index
|
625
|
-
)
|
626
|
-
|
627
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
628
|
-
'200': "Sensor",
|
629
|
-
'400': None,
|
630
|
-
'404': None,
|
631
|
-
}
|
632
|
-
response_data = self.api_client.call_api(
|
633
|
-
*_param,
|
634
|
-
_request_timeout=_request_timeout
|
635
|
-
)
|
636
|
-
response_data.read()
|
637
|
-
return self.api_client.response_deserialize(
|
638
|
-
response_data=response_data,
|
639
|
-
response_types_map=_response_types_map,
|
640
|
-
).data
|
641
|
-
|
642
|
-
|
643
|
-
@validate_call
|
644
|
-
def get_sensor_with_http_info(
|
645
|
-
self,
|
646
|
-
sensor_id: StrictStr,
|
647
|
-
_request_timeout: Union[
|
648
|
-
None,
|
649
|
-
Annotated[StrictFloat, Field(gt=0)],
|
650
|
-
Tuple[
|
651
|
-
Annotated[StrictFloat, Field(gt=0)],
|
652
|
-
Annotated[StrictFloat, Field(gt=0)]
|
653
|
-
]
|
654
|
-
] = None,
|
655
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
656
|
-
_content_type: Optional[StrictStr] = None,
|
657
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
658
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
659
|
-
) -> ApiResponse[Sensor]:
|
660
|
-
"""Get Sensor
|
661
|
-
|
662
|
-
|
663
|
-
:param sensor_id: (required)
|
664
|
-
:type sensor_id: str
|
665
|
-
:param _request_timeout: timeout setting for this request. If one
|
666
|
-
number provided, it will be total request
|
667
|
-
timeout. It can also be a pair (tuple) of
|
668
|
-
(connection, read) timeouts.
|
669
|
-
:type _request_timeout: int, tuple(int, int), optional
|
670
|
-
:param _request_auth: set to override the auth_settings for an a single
|
671
|
-
request; this effectively ignores the
|
672
|
-
authentication in the spec for a single request.
|
673
|
-
:type _request_auth: dict, optional
|
674
|
-
:param _content_type: force content-type for the request.
|
675
|
-
:type _content_type: str, Optional
|
676
|
-
:param _headers: set to override the headers for a single
|
677
|
-
request; this effectively ignores the headers
|
678
|
-
in the spec for a single request.
|
679
|
-
:type _headers: dict, optional
|
680
|
-
:param _host_index: set to override the host_index for a single
|
681
|
-
request; this effectively ignores the host_index
|
682
|
-
in the spec for a single request.
|
683
|
-
:type _host_index: int, optional
|
684
|
-
:return: Returns the result object.
|
685
|
-
""" # noqa: E501
|
686
|
-
|
687
|
-
_param = self._get_sensor_serialize(
|
688
|
-
sensor_id=sensor_id,
|
689
|
-
_request_auth=_request_auth,
|
690
|
-
_content_type=_content_type,
|
691
|
-
_headers=_headers,
|
692
|
-
_host_index=_host_index
|
693
|
-
)
|
694
|
-
|
695
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
696
|
-
'200': "Sensor",
|
697
|
-
'400': None,
|
698
|
-
'404': None,
|
699
|
-
}
|
700
|
-
response_data = self.api_client.call_api(
|
701
|
-
*_param,
|
702
|
-
_request_timeout=_request_timeout
|
703
|
-
)
|
704
|
-
response_data.read()
|
705
|
-
return self.api_client.response_deserialize(
|
706
|
-
response_data=response_data,
|
707
|
-
response_types_map=_response_types_map,
|
708
|
-
)
|
709
|
-
|
710
|
-
|
711
|
-
@validate_call
|
712
|
-
def get_sensor_without_preload_content(
|
713
|
-
self,
|
714
|
-
sensor_id: StrictStr,
|
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
|
-
) -> RESTResponseType:
|
728
|
-
"""Get Sensor
|
729
|
-
|
730
|
-
|
731
|
-
:param sensor_id: (required)
|
732
|
-
:type sensor_id: str
|
733
|
-
:param _request_timeout: timeout setting for this request. If one
|
734
|
-
number provided, it will be total request
|
735
|
-
timeout. It can also be a pair (tuple) of
|
736
|
-
(connection, read) timeouts.
|
737
|
-
:type _request_timeout: int, tuple(int, int), optional
|
738
|
-
:param _request_auth: set to override the auth_settings for an a single
|
739
|
-
request; this effectively ignores the
|
740
|
-
authentication in the spec for a single request.
|
741
|
-
:type _request_auth: dict, optional
|
742
|
-
:param _content_type: force content-type for the request.
|
743
|
-
:type _content_type: str, Optional
|
744
|
-
:param _headers: set to override the headers for a single
|
745
|
-
request; this effectively ignores the headers
|
746
|
-
in the spec for a single request.
|
747
|
-
:type _headers: dict, optional
|
748
|
-
:param _host_index: set to override the host_index for a single
|
749
|
-
request; this effectively ignores the host_index
|
750
|
-
in the spec for a single request.
|
751
|
-
:type _host_index: int, optional
|
752
|
-
:return: Returns the result object.
|
753
|
-
""" # noqa: E501
|
754
|
-
|
755
|
-
_param = self._get_sensor_serialize(
|
756
|
-
sensor_id=sensor_id,
|
757
|
-
_request_auth=_request_auth,
|
758
|
-
_content_type=_content_type,
|
759
|
-
_headers=_headers,
|
760
|
-
_host_index=_host_index
|
761
|
-
)
|
762
|
-
|
763
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
764
|
-
'200': "Sensor",
|
765
|
-
'400': None,
|
766
|
-
'404': None,
|
767
|
-
}
|
768
|
-
response_data = self.api_client.call_api(
|
769
|
-
*_param,
|
770
|
-
_request_timeout=_request_timeout
|
771
|
-
)
|
772
|
-
return response_data.response
|
773
|
-
|
774
|
-
|
775
|
-
def _get_sensor_serialize(
|
776
|
-
self,
|
777
|
-
sensor_id,
|
778
|
-
_request_auth,
|
779
|
-
_content_type,
|
780
|
-
_headers,
|
781
|
-
_host_index,
|
782
|
-
) -> RequestSerialized:
|
783
|
-
|
784
|
-
_host = None
|
785
|
-
|
786
|
-
_collection_formats: Dict[str, str] = {
|
787
|
-
}
|
788
|
-
|
789
|
-
_path_params: Dict[str, str] = {}
|
790
|
-
_query_params: List[Tuple[str, str]] = []
|
791
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
792
|
-
_form_params: List[Tuple[str, str]] = []
|
793
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
794
|
-
_body_params: Optional[bytes] = None
|
795
|
-
|
796
|
-
# process the path parameters
|
797
|
-
if sensor_id is not None:
|
798
|
-
_path_params['sensor_id'] = sensor_id
|
799
|
-
# process the query parameters
|
800
|
-
# process the header parameters
|
801
|
-
# process the form parameters
|
802
|
-
# process the body parameter
|
803
|
-
|
804
|
-
|
805
|
-
# set the HTTP header `Accept`
|
806
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
807
|
-
[
|
808
|
-
'application/json'
|
809
|
-
]
|
810
|
-
)
|
811
|
-
|
812
|
-
|
813
|
-
# authentication setting
|
814
|
-
_auth_settings: List[str] = [
|
815
|
-
'BearerAuth'
|
816
|
-
]
|
817
|
-
|
818
|
-
return self.api_client.param_serialize(
|
819
|
-
method='GET',
|
820
|
-
resource_path='/api/v2/sensors/{sensor_id}',
|
821
|
-
path_params=_path_params,
|
822
|
-
query_params=_query_params,
|
823
|
-
header_params=_header_params,
|
824
|
-
body=_body_params,
|
825
|
-
post_params=_form_params,
|
826
|
-
files=_files,
|
827
|
-
auth_settings=_auth_settings,
|
828
|
-
collection_formats=_collection_formats,
|
829
|
-
_host=_host,
|
830
|
-
_request_auth=_request_auth
|
831
|
-
)
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
@validate_call
|
837
|
-
def query_sensor(
|
838
|
-
self,
|
839
|
-
sensor_sor_query_request: Annotated[Optional[SensorSORQueryRequest], Field(description="Request body for create")] = None,
|
840
|
-
_request_timeout: Union[
|
841
|
-
None,
|
842
|
-
Annotated[StrictFloat, Field(gt=0)],
|
843
|
-
Tuple[
|
844
|
-
Annotated[StrictFloat, Field(gt=0)],
|
845
|
-
Annotated[StrictFloat, Field(gt=0)]
|
846
|
-
]
|
847
|
-
] = None,
|
848
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
849
|
-
_content_type: Optional[StrictStr] = None,
|
850
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
851
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
852
|
-
) -> SensorQueryResponse:
|
853
|
-
"""Query a Sensor
|
854
|
-
|
855
|
-
|
856
|
-
:param sensor_sor_query_request: Request body for create
|
857
|
-
:type sensor_sor_query_request: SensorSORQueryRequest
|
858
|
-
:param _request_timeout: timeout setting for this request. If one
|
859
|
-
number provided, it will be total request
|
860
|
-
timeout. It can also be a pair (tuple) of
|
861
|
-
(connection, read) timeouts.
|
862
|
-
:type _request_timeout: int, tuple(int, int), optional
|
863
|
-
:param _request_auth: set to override the auth_settings for an a single
|
864
|
-
request; this effectively ignores the
|
865
|
-
authentication in the spec for a single request.
|
866
|
-
:type _request_auth: dict, optional
|
867
|
-
:param _content_type: force content-type for the request.
|
868
|
-
:type _content_type: str, Optional
|
869
|
-
:param _headers: set to override the headers for a single
|
870
|
-
request; this effectively ignores the headers
|
871
|
-
in the spec for a single request.
|
872
|
-
:type _headers: dict, optional
|
873
|
-
:param _host_index: set to override the host_index for a single
|
874
|
-
request; this effectively ignores the host_index
|
875
|
-
in the spec for a single request.
|
876
|
-
:type _host_index: int, optional
|
877
|
-
:return: Returns the result object.
|
878
|
-
""" # noqa: E501
|
879
|
-
|
880
|
-
_param = self._query_sensor_serialize(
|
881
|
-
sensor_sor_query_request=sensor_sor_query_request,
|
882
|
-
_request_auth=_request_auth,
|
883
|
-
_content_type=_content_type,
|
884
|
-
_headers=_headers,
|
885
|
-
_host_index=_host_index
|
886
|
-
)
|
887
|
-
|
888
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
889
|
-
'200': "SensorQueryResponse",
|
890
|
-
'400': None,
|
891
|
-
}
|
892
|
-
response_data = self.api_client.call_api(
|
893
|
-
*_param,
|
894
|
-
_request_timeout=_request_timeout
|
895
|
-
)
|
896
|
-
response_data.read()
|
897
|
-
return self.api_client.response_deserialize(
|
898
|
-
response_data=response_data,
|
899
|
-
response_types_map=_response_types_map,
|
900
|
-
).data
|
901
|
-
|
902
|
-
|
903
|
-
@validate_call
|
904
|
-
def query_sensor_with_http_info(
|
905
|
-
self,
|
906
|
-
sensor_sor_query_request: Annotated[Optional[SensorSORQueryRequest], Field(description="Request body for create")] = None,
|
907
|
-
_request_timeout: Union[
|
908
|
-
None,
|
909
|
-
Annotated[StrictFloat, Field(gt=0)],
|
910
|
-
Tuple[
|
911
|
-
Annotated[StrictFloat, Field(gt=0)],
|
912
|
-
Annotated[StrictFloat, Field(gt=0)]
|
913
|
-
]
|
914
|
-
] = None,
|
915
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
916
|
-
_content_type: Optional[StrictStr] = None,
|
917
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
918
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
919
|
-
) -> ApiResponse[SensorQueryResponse]:
|
920
|
-
"""Query a Sensor
|
921
|
-
|
922
|
-
|
923
|
-
:param sensor_sor_query_request: Request body for create
|
924
|
-
:type sensor_sor_query_request: SensorSORQueryRequest
|
925
|
-
:param _request_timeout: timeout setting for this request. If one
|
926
|
-
number provided, it will be total request
|
927
|
-
timeout. It can also be a pair (tuple) of
|
928
|
-
(connection, read) timeouts.
|
929
|
-
:type _request_timeout: int, tuple(int, int), optional
|
930
|
-
:param _request_auth: set to override the auth_settings for an a single
|
931
|
-
request; this effectively ignores the
|
932
|
-
authentication in the spec for a single request.
|
933
|
-
:type _request_auth: dict, optional
|
934
|
-
:param _content_type: force content-type for the request.
|
935
|
-
:type _content_type: str, Optional
|
936
|
-
:param _headers: set to override the headers for a single
|
937
|
-
request; this effectively ignores the headers
|
938
|
-
in the spec for a single request.
|
939
|
-
:type _headers: dict, optional
|
940
|
-
:param _host_index: set to override the host_index for a single
|
941
|
-
request; this effectively ignores the host_index
|
942
|
-
in the spec for a single request.
|
943
|
-
:type _host_index: int, optional
|
944
|
-
:return: Returns the result object.
|
945
|
-
""" # noqa: E501
|
946
|
-
|
947
|
-
_param = self._query_sensor_serialize(
|
948
|
-
sensor_sor_query_request=sensor_sor_query_request,
|
949
|
-
_request_auth=_request_auth,
|
950
|
-
_content_type=_content_type,
|
951
|
-
_headers=_headers,
|
952
|
-
_host_index=_host_index
|
953
|
-
)
|
954
|
-
|
955
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
956
|
-
'200': "SensorQueryResponse",
|
957
|
-
'400': None,
|
958
|
-
}
|
959
|
-
response_data = self.api_client.call_api(
|
960
|
-
*_param,
|
961
|
-
_request_timeout=_request_timeout
|
962
|
-
)
|
963
|
-
response_data.read()
|
964
|
-
return self.api_client.response_deserialize(
|
965
|
-
response_data=response_data,
|
966
|
-
response_types_map=_response_types_map,
|
967
|
-
)
|
968
|
-
|
969
|
-
|
970
|
-
@validate_call
|
971
|
-
def query_sensor_without_preload_content(
|
972
|
-
self,
|
973
|
-
sensor_sor_query_request: Annotated[Optional[SensorSORQueryRequest], Field(description="Request body for create")] = None,
|
974
|
-
_request_timeout: Union[
|
975
|
-
None,
|
976
|
-
Annotated[StrictFloat, Field(gt=0)],
|
977
|
-
Tuple[
|
978
|
-
Annotated[StrictFloat, Field(gt=0)],
|
979
|
-
Annotated[StrictFloat, Field(gt=0)]
|
980
|
-
]
|
981
|
-
] = None,
|
982
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
983
|
-
_content_type: Optional[StrictStr] = None,
|
984
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
985
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
986
|
-
) -> RESTResponseType:
|
987
|
-
"""Query a Sensor
|
988
|
-
|
989
|
-
|
990
|
-
:param sensor_sor_query_request: Request body for create
|
991
|
-
:type sensor_sor_query_request: SensorSORQueryRequest
|
992
|
-
:param _request_timeout: timeout setting for this request. If one
|
993
|
-
number provided, it will be total request
|
994
|
-
timeout. It can also be a pair (tuple) of
|
995
|
-
(connection, read) timeouts.
|
996
|
-
:type _request_timeout: int, tuple(int, int), optional
|
997
|
-
:param _request_auth: set to override the auth_settings for an a single
|
998
|
-
request; this effectively ignores the
|
999
|
-
authentication in the spec for a single request.
|
1000
|
-
:type _request_auth: dict, optional
|
1001
|
-
:param _content_type: force content-type for the request.
|
1002
|
-
:type _content_type: str, Optional
|
1003
|
-
:param _headers: set to override the headers for a single
|
1004
|
-
request; this effectively ignores the headers
|
1005
|
-
in the spec for a single request.
|
1006
|
-
:type _headers: dict, optional
|
1007
|
-
:param _host_index: set to override the host_index for a single
|
1008
|
-
request; this effectively ignores the host_index
|
1009
|
-
in the spec for a single request.
|
1010
|
-
:type _host_index: int, optional
|
1011
|
-
:return: Returns the result object.
|
1012
|
-
""" # noqa: E501
|
1013
|
-
|
1014
|
-
_param = self._query_sensor_serialize(
|
1015
|
-
sensor_sor_query_request=sensor_sor_query_request,
|
1016
|
-
_request_auth=_request_auth,
|
1017
|
-
_content_type=_content_type,
|
1018
|
-
_headers=_headers,
|
1019
|
-
_host_index=_host_index
|
1020
|
-
)
|
1021
|
-
|
1022
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1023
|
-
'200': "SensorQueryResponse",
|
1024
|
-
'400': None,
|
1025
|
-
}
|
1026
|
-
response_data = self.api_client.call_api(
|
1027
|
-
*_param,
|
1028
|
-
_request_timeout=_request_timeout
|
1029
|
-
)
|
1030
|
-
return response_data.response
|
1031
|
-
|
1032
|
-
|
1033
|
-
def _query_sensor_serialize(
|
1034
|
-
self,
|
1035
|
-
sensor_sor_query_request,
|
1036
|
-
_request_auth,
|
1037
|
-
_content_type,
|
1038
|
-
_headers,
|
1039
|
-
_host_index,
|
1040
|
-
) -> RequestSerialized:
|
1041
|
-
|
1042
|
-
_host = None
|
1043
|
-
|
1044
|
-
_collection_formats: Dict[str, str] = {
|
1045
|
-
}
|
1046
|
-
|
1047
|
-
_path_params: Dict[str, str] = {}
|
1048
|
-
_query_params: List[Tuple[str, str]] = []
|
1049
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1050
|
-
_form_params: List[Tuple[str, str]] = []
|
1051
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
1052
|
-
_body_params: Optional[bytes] = None
|
1053
|
-
|
1054
|
-
# process the path parameters
|
1055
|
-
# process the query parameters
|
1056
|
-
# process the header parameters
|
1057
|
-
# process the form parameters
|
1058
|
-
# process the body parameter
|
1059
|
-
if sensor_sor_query_request is not None:
|
1060
|
-
_body_params = sensor_sor_query_request
|
1061
|
-
|
1062
|
-
|
1063
|
-
# set the HTTP header `Accept`
|
1064
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1065
|
-
[
|
1066
|
-
'application/json'
|
1067
|
-
]
|
1068
|
-
)
|
1069
|
-
|
1070
|
-
# set the HTTP header `Content-Type`
|
1071
|
-
if _content_type:
|
1072
|
-
_header_params['Content-Type'] = _content_type
|
1073
|
-
else:
|
1074
|
-
_default_content_type = (
|
1075
|
-
self.api_client.select_header_content_type(
|
1076
|
-
[
|
1077
|
-
'application/json'
|
1078
|
-
]
|
1079
|
-
)
|
1080
|
-
)
|
1081
|
-
if _default_content_type is not None:
|
1082
|
-
_header_params['Content-Type'] = _default_content_type
|
1083
|
-
|
1084
|
-
# authentication setting
|
1085
|
-
_auth_settings: List[str] = [
|
1086
|
-
'BearerAuth'
|
1087
|
-
]
|
1088
|
-
|
1089
|
-
return self.api_client.param_serialize(
|
1090
|
-
method='POST',
|
1091
|
-
resource_path='/api/v2/sensors/query',
|
1092
|
-
path_params=_path_params,
|
1093
|
-
query_params=_query_params,
|
1094
|
-
header_params=_header_params,
|
1095
|
-
body=_body_params,
|
1096
|
-
post_params=_form_params,
|
1097
|
-
files=_files,
|
1098
|
-
auth_settings=_auth_settings,
|
1099
|
-
collection_formats=_collection_formats,
|
1100
|
-
_host=_host,
|
1101
|
-
_request_auth=_request_auth
|
1102
|
-
)
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
@validate_call
|
1108
|
-
def sensor_sor_api_v3_model_cards_query_get(
|
1109
|
-
self,
|
1110
|
-
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1111
|
-
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1112
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1113
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1114
|
-
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,
|
1115
|
-
_request_timeout: Union[
|
1116
|
-
None,
|
1117
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1118
|
-
Tuple[
|
1119
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1120
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1121
|
-
]
|
1122
|
-
] = None,
|
1123
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1124
|
-
_content_type: Optional[StrictStr] = None,
|
1125
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1126
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1127
|
-
) -> SensorSORModelCardQueryResponse:
|
1128
|
-
"""List Model Cards
|
1129
|
-
|
1130
|
-
|
1131
|
-
:param model_name_eq: substring match on model name
|
1132
|
-
:type model_name_eq: str
|
1133
|
-
:param model_name_contains: substring match on model name
|
1134
|
-
:type model_name_contains: str
|
1135
|
-
:param limit:
|
1136
|
-
:type limit: int
|
1137
|
-
:param offset:
|
1138
|
-
:type offset: int
|
1139
|
-
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1140
|
-
:type sort: str
|
1141
|
-
:param _request_timeout: timeout setting for this request. If one
|
1142
|
-
number provided, it will be total request
|
1143
|
-
timeout. It can also be a pair (tuple) of
|
1144
|
-
(connection, read) timeouts.
|
1145
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1146
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1147
|
-
request; this effectively ignores the
|
1148
|
-
authentication in the spec for a single request.
|
1149
|
-
:type _request_auth: dict, optional
|
1150
|
-
:param _content_type: force content-type for the request.
|
1151
|
-
:type _content_type: str, Optional
|
1152
|
-
:param _headers: set to override the headers for a single
|
1153
|
-
request; this effectively ignores the headers
|
1154
|
-
in the spec for a single request.
|
1155
|
-
:type _headers: dict, optional
|
1156
|
-
:param _host_index: set to override the host_index for a single
|
1157
|
-
request; this effectively ignores the host_index
|
1158
|
-
in the spec for a single request.
|
1159
|
-
:type _host_index: int, optional
|
1160
|
-
:return: Returns the result object.
|
1161
|
-
""" # noqa: E501
|
1162
|
-
|
1163
|
-
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1164
|
-
model_name_eq=model_name_eq,
|
1165
|
-
model_name_contains=model_name_contains,
|
1166
|
-
limit=limit,
|
1167
|
-
offset=offset,
|
1168
|
-
sort=sort,
|
1169
|
-
_request_auth=_request_auth,
|
1170
|
-
_content_type=_content_type,
|
1171
|
-
_headers=_headers,
|
1172
|
-
_host_index=_host_index
|
1173
|
-
)
|
1174
|
-
|
1175
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1176
|
-
'200': "SensorSORModelCardQueryResponse",
|
1177
|
-
'400': None,
|
1178
|
-
}
|
1179
|
-
response_data = self.api_client.call_api(
|
1180
|
-
*_param,
|
1181
|
-
_request_timeout=_request_timeout
|
1182
|
-
)
|
1183
|
-
response_data.read()
|
1184
|
-
return self.api_client.response_deserialize(
|
1185
|
-
response_data=response_data,
|
1186
|
-
response_types_map=_response_types_map,
|
1187
|
-
).data
|
1188
|
-
|
1189
|
-
|
1190
|
-
@validate_call
|
1191
|
-
def sensor_sor_api_v3_model_cards_query_get_with_http_info(
|
1192
|
-
self,
|
1193
|
-
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1194
|
-
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1195
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1196
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1197
|
-
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,
|
1198
|
-
_request_timeout: Union[
|
1199
|
-
None,
|
1200
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1201
|
-
Tuple[
|
1202
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1203
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1204
|
-
]
|
1205
|
-
] = None,
|
1206
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1207
|
-
_content_type: Optional[StrictStr] = None,
|
1208
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1209
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1210
|
-
) -> ApiResponse[SensorSORModelCardQueryResponse]:
|
1211
|
-
"""List Model Cards
|
1212
|
-
|
1213
|
-
|
1214
|
-
:param model_name_eq: substring match on model name
|
1215
|
-
:type model_name_eq: str
|
1216
|
-
:param model_name_contains: substring match on model name
|
1217
|
-
:type model_name_contains: str
|
1218
|
-
:param limit:
|
1219
|
-
:type limit: int
|
1220
|
-
:param offset:
|
1221
|
-
:type offset: int
|
1222
|
-
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1223
|
-
:type sort: str
|
1224
|
-
:param _request_timeout: timeout setting for this request. If one
|
1225
|
-
number provided, it will be total request
|
1226
|
-
timeout. It can also be a pair (tuple) of
|
1227
|
-
(connection, read) timeouts.
|
1228
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1229
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1230
|
-
request; this effectively ignores the
|
1231
|
-
authentication in the spec for a single request.
|
1232
|
-
:type _request_auth: dict, optional
|
1233
|
-
:param _content_type: force content-type for the request.
|
1234
|
-
:type _content_type: str, Optional
|
1235
|
-
:param _headers: set to override the headers for a single
|
1236
|
-
request; this effectively ignores the headers
|
1237
|
-
in the spec for a single request.
|
1238
|
-
:type _headers: dict, optional
|
1239
|
-
:param _host_index: set to override the host_index for a single
|
1240
|
-
request; this effectively ignores the host_index
|
1241
|
-
in the spec for a single request.
|
1242
|
-
:type _host_index: int, optional
|
1243
|
-
:return: Returns the result object.
|
1244
|
-
""" # noqa: E501
|
1245
|
-
|
1246
|
-
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1247
|
-
model_name_eq=model_name_eq,
|
1248
|
-
model_name_contains=model_name_contains,
|
1249
|
-
limit=limit,
|
1250
|
-
offset=offset,
|
1251
|
-
sort=sort,
|
1252
|
-
_request_auth=_request_auth,
|
1253
|
-
_content_type=_content_type,
|
1254
|
-
_headers=_headers,
|
1255
|
-
_host_index=_host_index
|
1256
|
-
)
|
1257
|
-
|
1258
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1259
|
-
'200': "SensorSORModelCardQueryResponse",
|
1260
|
-
'400': None,
|
1261
|
-
}
|
1262
|
-
response_data = self.api_client.call_api(
|
1263
|
-
*_param,
|
1264
|
-
_request_timeout=_request_timeout
|
1265
|
-
)
|
1266
|
-
response_data.read()
|
1267
|
-
return self.api_client.response_deserialize(
|
1268
|
-
response_data=response_data,
|
1269
|
-
response_types_map=_response_types_map,
|
1270
|
-
)
|
1271
|
-
|
1272
|
-
|
1273
|
-
@validate_call
|
1274
|
-
def sensor_sor_api_v3_model_cards_query_get_without_preload_content(
|
1275
|
-
self,
|
1276
|
-
model_name_eq: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1277
|
-
model_name_contains: Annotated[Optional[StrictStr], Field(description="substring match on model name")] = None,
|
1278
|
-
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
1279
|
-
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
1280
|
-
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,
|
1281
|
-
_request_timeout: Union[
|
1282
|
-
None,
|
1283
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1284
|
-
Tuple[
|
1285
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1286
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1287
|
-
]
|
1288
|
-
] = None,
|
1289
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1290
|
-
_content_type: Optional[StrictStr] = None,
|
1291
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1292
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1293
|
-
) -> RESTResponseType:
|
1294
|
-
"""List Model Cards
|
1295
|
-
|
1296
|
-
|
1297
|
-
:param model_name_eq: substring match on model name
|
1298
|
-
:type model_name_eq: str
|
1299
|
-
:param model_name_contains: substring match on model name
|
1300
|
-
:type model_name_contains: str
|
1301
|
-
:param limit:
|
1302
|
-
:type limit: int
|
1303
|
-
:param offset:
|
1304
|
-
:type offset: int
|
1305
|
-
:param sort: allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)
|
1306
|
-
:type sort: str
|
1307
|
-
:param _request_timeout: timeout setting for this request. If one
|
1308
|
-
number provided, it will be total request
|
1309
|
-
timeout. It can also be a pair (tuple) of
|
1310
|
-
(connection, read) timeouts.
|
1311
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1312
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1313
|
-
request; this effectively ignores the
|
1314
|
-
authentication in the spec for a single request.
|
1315
|
-
:type _request_auth: dict, optional
|
1316
|
-
:param _content_type: force content-type for the request.
|
1317
|
-
:type _content_type: str, Optional
|
1318
|
-
:param _headers: set to override the headers for a single
|
1319
|
-
request; this effectively ignores the headers
|
1320
|
-
in the spec for a single request.
|
1321
|
-
:type _headers: dict, optional
|
1322
|
-
:param _host_index: set to override the host_index for a single
|
1323
|
-
request; this effectively ignores the host_index
|
1324
|
-
in the spec for a single request.
|
1325
|
-
:type _host_index: int, optional
|
1326
|
-
:return: Returns the result object.
|
1327
|
-
""" # noqa: E501
|
1328
|
-
|
1329
|
-
_param = self._sensor_sor_api_v3_model_cards_query_get_serialize(
|
1330
|
-
model_name_eq=model_name_eq,
|
1331
|
-
model_name_contains=model_name_contains,
|
1332
|
-
limit=limit,
|
1333
|
-
offset=offset,
|
1334
|
-
sort=sort,
|
1335
|
-
_request_auth=_request_auth,
|
1336
|
-
_content_type=_content_type,
|
1337
|
-
_headers=_headers,
|
1338
|
-
_host_index=_host_index
|
1339
|
-
)
|
1340
|
-
|
1341
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1342
|
-
'200': "SensorSORModelCardQueryResponse",
|
1343
|
-
'400': None,
|
1344
|
-
}
|
1345
|
-
response_data = self.api_client.call_api(
|
1346
|
-
*_param,
|
1347
|
-
_request_timeout=_request_timeout
|
1348
|
-
)
|
1349
|
-
return response_data.response
|
1350
|
-
|
1351
|
-
|
1352
|
-
def _sensor_sor_api_v3_model_cards_query_get_serialize(
|
1353
|
-
self,
|
1354
|
-
model_name_eq,
|
1355
|
-
model_name_contains,
|
1356
|
-
limit,
|
1357
|
-
offset,
|
1358
|
-
sort,
|
1359
|
-
_request_auth,
|
1360
|
-
_content_type,
|
1361
|
-
_headers,
|
1362
|
-
_host_index,
|
1363
|
-
) -> RequestSerialized:
|
1364
|
-
|
1365
|
-
_host = None
|
1366
|
-
|
1367
|
-
_collection_formats: Dict[str, str] = {
|
1368
|
-
}
|
1369
|
-
|
1370
|
-
_path_params: Dict[str, str] = {}
|
1371
|
-
_query_params: List[Tuple[str, str]] = []
|
1372
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1373
|
-
_form_params: List[Tuple[str, str]] = []
|
1374
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
1375
|
-
_body_params: Optional[bytes] = None
|
1376
|
-
|
1377
|
-
# process the path parameters
|
1378
|
-
# process the query parameters
|
1379
|
-
if model_name_eq is not None:
|
1380
|
-
|
1381
|
-
_query_params.append(('model_name[eq]', model_name_eq))
|
1382
|
-
|
1383
|
-
if model_name_contains is not None:
|
1384
|
-
|
1385
|
-
_query_params.append(('model_name[contains]', model_name_contains))
|
1386
|
-
|
1387
|
-
if limit is not None:
|
1388
|
-
|
1389
|
-
_query_params.append(('limit', limit))
|
1390
|
-
|
1391
|
-
if offset is not None:
|
1392
|
-
|
1393
|
-
_query_params.append(('offset', offset))
|
1394
|
-
|
1395
|
-
if sort is not None:
|
1396
|
-
|
1397
|
-
_query_params.append(('sort', sort))
|
1398
|
-
|
1399
|
-
# process the header parameters
|
1400
|
-
# process the form parameters
|
1401
|
-
# process the body parameter
|
1402
|
-
|
1403
|
-
|
1404
|
-
# set the HTTP header `Accept`
|
1405
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1406
|
-
[
|
1407
|
-
'application/json'
|
1408
|
-
]
|
1409
|
-
)
|
1410
|
-
|
1411
|
-
|
1412
|
-
# authentication setting
|
1413
|
-
_auth_settings: List[str] = [
|
1414
|
-
'BearerAuth'
|
1415
|
-
]
|
1416
|
-
|
1417
|
-
return self.api_client.param_serialize(
|
1418
|
-
method='GET',
|
1419
|
-
resource_path='/models/v3/cards',
|
1420
|
-
path_params=_path_params,
|
1421
|
-
query_params=_query_params,
|
1422
|
-
header_params=_header_params,
|
1423
|
-
body=_body_params,
|
1424
|
-
post_params=_form_params,
|
1425
|
-
files=_files,
|
1426
|
-
auth_settings=_auth_settings,
|
1427
|
-
collection_formats=_collection_formats,
|
1428
|
-
_host=_host,
|
1429
|
-
_request_auth=_request_auth
|
1430
|
-
)
|
1431
|
-
|
1432
|
-
|