qi-compute-api-client 0.7.0__py3-none-any.whl → 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +22 -19
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1333 -553
- compute_api_client/api/backend_api.py +1501 -0
- compute_api_client/api/backend_types_api.py +684 -0
- compute_api_client/api/batch_jobs_api.py +1937 -0
- compute_api_client/api/commits_api.py +1068 -435
- compute_api_client/api/files_api.py +1075 -435
- compute_api_client/api/final_results_api.py +736 -338
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +556 -217
- compute_api_client/api/members_api.py +1057 -435
- compute_api_client/api/metadata_api.py +736 -337
- compute_api_client/api/permissions_api.py +1055 -421
- compute_api_client/api/projects_api.py +1604 -676
- compute_api_client/api/reservations_api.py +1124 -427
- compute_api_client/api/results_api.py +738 -337
- compute_api_client/api/teams_api.py +567 -220
- compute_api_client/api/transactions_api.py +679 -218
- compute_api_client/api/users_api.py +1090 -435
- compute_api_client/api_client.py +346 -304
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +54 -67
- compute_api_client/docs/Algorithm.md +20 -3
- compute_api_client/docs/AlgorithmIn.md +20 -3
- compute_api_client/docs/AlgorithmType.md +0 -1
- compute_api_client/docs/AlgorithmsApi.md +78 -77
- compute_api_client/docs/Backend.md +33 -0
- compute_api_client/docs/BackendApi.md +419 -0
- compute_api_client/docs/BackendPatch.md +29 -0
- compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
- compute_api_client/docs/BackendType.md +36 -0
- compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
- compute_api_client/docs/BackendWithAuthentication.md +34 -0
- compute_api_client/docs/BatchJob.md +38 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
- compute_api_client/docs/{BatchRunsApi.md → BatchJobsApi.md} +170 -147
- compute_api_client/docs/Commit.md +18 -1
- compute_api_client/docs/CommitIn.md +17 -0
- compute_api_client/docs/CommitsApi.md +62 -71
- compute_api_client/docs/CompileStage.md +0 -1
- compute_api_client/docs/Domain.md +0 -1
- compute_api_client/docs/File.md +21 -4
- compute_api_client/docs/FileIn.md +21 -4
- compute_api_client/docs/FilesApi.md +65 -71
- compute_api_client/docs/FinalResult.md +20 -3
- compute_api_client/docs/FinalResultIn.md +19 -2
- compute_api_client/docs/FinalResultsApi.md +44 -71
- compute_api_client/docs/HTTPNotFoundError.md +17 -0
- compute_api_client/docs/HTTPValidationError.md +18 -1
- compute_api_client/docs/Job.md +36 -0
- compute_api_client/docs/JobIn.md +31 -0
- compute_api_client/docs/JobPatch.md +28 -0
- compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
- compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
- compute_api_client/docs/Language.md +17 -0
- compute_api_client/docs/LanguagesApi.md +30 -12
- compute_api_client/docs/LocationInner.md +17 -0
- compute_api_client/docs/Member.md +19 -2
- compute_api_client/docs/MemberIn.md +19 -2
- compute_api_client/docs/MembersApi.md +59 -24
- compute_api_client/docs/Metadata.md +20 -3
- compute_api_client/docs/MetadataApi.md +49 -33
- compute_api_client/docs/MetadataIn.md +19 -2
- compute_api_client/docs/Permission.md +17 -0
- compute_api_client/docs/PermissionGroup.md +17 -0
- compute_api_client/docs/PermissionsApi.md +68 -28
- compute_api_client/docs/Project.md +20 -3
- compute_api_client/docs/ProjectIn.md +18 -1
- compute_api_client/docs/ProjectPatch.md +19 -2
- compute_api_client/docs/ProjectsApi.md +84 -36
- compute_api_client/docs/Reservation.md +21 -4
- compute_api_client/docs/ReservationIn.md +19 -2
- compute_api_client/docs/ReservationsApi.md +66 -24
- compute_api_client/docs/Result.md +23 -6
- compute_api_client/docs/ResultIn.md +19 -2
- compute_api_client/docs/ResultsApi.md +42 -26
- compute_api_client/docs/Role.md +0 -1
- compute_api_client/docs/ShareType.md +0 -1
- compute_api_client/docs/Team.md +18 -1
- compute_api_client/docs/TeamsApi.md +37 -14
- compute_api_client/docs/Transaction.md +21 -4
- compute_api_client/docs/TransactionsApi.md +50 -14
- compute_api_client/docs/User.md +21 -4
- compute_api_client/docs/UserIn.md +17 -0
- compute_api_client/docs/UsersApi.md +62 -24
- compute_api_client/docs/ValidationError.md +18 -1
- compute_api_client/exceptions.py +19 -16
- compute_api_client/models/__init__.py +16 -14
- compute_api_client/models/algorithm.py +78 -237
- compute_api_client/models/algorithm_in.py +76 -204
- compute_api_client/models/algorithm_type.py +21 -87
- compute_api_client/models/backend.py +100 -0
- compute_api_client/models/backend_patch.py +90 -0
- compute_api_client/models/backend_status.py +47 -0
- compute_api_client/models/backend_type.py +105 -0
- compute_api_client/models/backend_with_authentication.py +102 -0
- compute_api_client/models/batch_job.py +129 -0
- compute_api_client/models/batch_job_in.py +89 -0
- compute_api_client/models/batch_job_status.py +48 -0
- compute_api_client/models/commit.py +72 -230
- compute_api_client/models/commit_in.py +67 -169
- compute_api_client/models/compile_stage.py +23 -89
- compute_api_client/models/domain.py +22 -88
- compute_api_client/models/file.py +74 -288
- compute_api_client/models/file_in.py +72 -254
- compute_api_client/models/final_result.py +68 -198
- compute_api_client/models/final_result_in.py +63 -137
- compute_api_client/models/http_not_found_error.py +60 -105
- compute_api_client/models/http_validation_error.py +69 -105
- compute_api_client/models/job.py +120 -0
- compute_api_client/models/job_in.py +99 -0
- compute_api_client/models/job_patch.py +88 -0
- compute_api_client/models/job_status.py +48 -0
- compute_api_client/models/language.py +67 -172
- compute_api_client/models/location_inner.py +125 -84
- compute_api_client/models/member.py +70 -236
- compute_api_client/models/member_in.py +68 -203
- compute_api_client/models/metadata.py +68 -198
- compute_api_client/models/metadata_in.py +68 -137
- compute_api_client/models/permission.py +67 -172
- compute_api_client/models/permission_group.py +65 -142
- compute_api_client/models/project.py +74 -256
- compute_api_client/models/project_in.py +69 -195
- compute_api_client/models/project_patch.py +89 -192
- compute_api_client/models/reservation.py +79 -290
- compute_api_client/models/reservation_in.py +68 -200
- compute_api_client/models/result.py +101 -359
- compute_api_client/models/result_in.py +95 -291
- compute_api_client/models/role.py +21 -87
- compute_api_client/models/share_type.py +22 -88
- compute_api_client/models/team.py +69 -198
- compute_api_client/models/transaction.py +93 -299
- compute_api_client/models/user.py +75 -276
- compute_api_client/models/user_in.py +73 -243
- compute_api_client/models/validation_error.py +73 -160
- compute_api_client/rest.py +55 -114
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
- qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
- compute_api_client/api/batch_runs_api.py +0 -862
- compute_api_client/api/runs_api.py +0 -723
- compute_api_client/api/runtime_api.py +0 -449
- compute_api_client/api/runtime_types_api.py +0 -303
- compute_api_client/docs/BatchRun.md +0 -21
- compute_api_client/docs/BatchRunIn.md +0 -12
- compute_api_client/docs/Run.md +0 -19
- compute_api_client/docs/RunIn.md +0 -14
- compute_api_client/docs/Runtime.md +0 -16
- compute_api_client/docs/RuntimeApi.md +0 -229
- compute_api_client/docs/RuntimeType.md +0 -19
- compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
- compute_api_client/models/batch_run.py +0 -423
- compute_api_client/models/batch_run_in.py +0 -171
- compute_api_client/models/batch_run_status.py +0 -114
- compute_api_client/models/run.py +0 -376
- compute_api_client/models/run_in.py +0 -233
- compute_api_client/models/run_status.py +0 -114
- compute_api_client/models/runtime.py +0 -290
- compute_api_client/models/runtime_status.py +0 -113
- compute_api_client/models/runtime_type.py +0 -357
- compute_api_client/models/runtime_with_authentication.py +0 -320
- qi_compute_api_client-0.7.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -3,458 +3,857 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
11
14
|
|
|
15
|
+
import io
|
|
16
|
+
import warnings
|
|
12
17
|
|
|
13
|
-
from
|
|
18
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
19
|
+
from typing import Dict, List, Optional, Tuple, Union, Any
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
try:
|
|
22
|
+
from typing import Annotated
|
|
23
|
+
except ImportError:
|
|
24
|
+
from typing_extensions import Annotated
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
from pydantic import StrictInt
|
|
27
|
+
|
|
28
|
+
from typing import List
|
|
29
|
+
|
|
30
|
+
from compute_api_client.models.metadata import Metadata
|
|
31
|
+
from compute_api_client.models.metadata_in import MetadataIn
|
|
19
32
|
|
|
20
33
|
from compute_api_client.api_client import ApiClient
|
|
21
|
-
from compute_api_client.
|
|
22
|
-
|
|
23
|
-
ApiValueError
|
|
24
|
-
)
|
|
34
|
+
from compute_api_client.api_response import ApiResponse
|
|
35
|
+
from compute_api_client.rest import RESTResponseType
|
|
25
36
|
|
|
26
37
|
|
|
27
|
-
class MetadataApi
|
|
38
|
+
class MetadataApi:
|
|
28
39
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
40
|
Ref: https://openapi-generator.tech
|
|
30
41
|
|
|
31
42
|
Do not edit the class manually.
|
|
32
43
|
"""
|
|
33
44
|
|
|
34
|
-
def __init__(self, api_client=None):
|
|
45
|
+
def __init__(self, api_client=None) -> None:
|
|
35
46
|
if api_client is None:
|
|
36
|
-
api_client = ApiClient()
|
|
47
|
+
api_client = ApiClient.get_default()
|
|
37
48
|
self.api_client = api_client
|
|
38
49
|
|
|
39
|
-
def create_metadata_metadata_post(self, metadata_in, **kwargs): # noqa: E501
|
|
40
|
-
"""Create metadata # noqa: E501
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
@validate_call
|
|
52
|
+
async def create_metadata_self_metadata_post(
|
|
53
|
+
self,
|
|
54
|
+
metadata_in: MetadataIn,
|
|
55
|
+
_request_timeout: Union[
|
|
56
|
+
None,
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Tuple[
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_content_type: Optional[StrictStr] = None,
|
|
65
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
67
|
+
) -> Metadata:
|
|
68
|
+
"""Create metadata
|
|
45
69
|
|
|
46
|
-
|
|
47
|
-
>>> result = thread.get()
|
|
70
|
+
Create new metadata.
|
|
48
71
|
|
|
49
72
|
:param metadata_in: (required)
|
|
50
73
|
:type metadata_in: MetadataIn
|
|
51
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
52
|
-
:type async_req: bool, optional
|
|
53
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
54
|
-
be returned without reading/decoding response
|
|
55
|
-
data. Default is True.
|
|
56
|
-
:type _preload_content: bool, optional
|
|
57
74
|
:param _request_timeout: timeout setting for this request. If one
|
|
58
75
|
number provided, it will be total request
|
|
59
76
|
timeout. It can also be a pair (tuple) of
|
|
60
77
|
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
61
93
|
:return: Returns the result object.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
97
|
+
metadata_in=metadata_in,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'201': "Metadata",
|
|
106
|
+
'422': "HTTPValidationError"
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
response_data = await self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
await response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
async def create_metadata_self_metadata_post_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
metadata_in: MetadataIn,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[Metadata]:
|
|
137
|
+
"""Create metadata
|
|
68
138
|
|
|
69
|
-
|
|
70
|
-
"""Create metadata # noqa: E501
|
|
139
|
+
Create new metadata.
|
|
71
140
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
141
|
+
:param metadata_in: (required)
|
|
142
|
+
:type metadata_in: MetadataIn
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
166
|
+
metadata_in=metadata_in,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'201': "Metadata",
|
|
175
|
+
'422': "HTTPValidationError"
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
response_data = await self.api_client.call_api(
|
|
179
|
+
*_param,
|
|
180
|
+
_request_timeout=_request_timeout
|
|
181
|
+
)
|
|
182
|
+
await response_data.read()
|
|
183
|
+
return self.api_client.response_deserialize(
|
|
184
|
+
response_data=response_data,
|
|
185
|
+
response_types_map=_response_types_map,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@validate_call
|
|
190
|
+
async def create_metadata_self_metadata_post_without_preload_content(
|
|
191
|
+
self,
|
|
192
|
+
metadata_in: MetadataIn,
|
|
193
|
+
_request_timeout: Union[
|
|
194
|
+
None,
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Tuple[
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
199
|
+
]
|
|
200
|
+
] = None,
|
|
201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_content_type: Optional[StrictStr] = None,
|
|
203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
205
|
+
) -> RESTResponseType:
|
|
206
|
+
"""Create metadata
|
|
75
207
|
|
|
76
|
-
|
|
77
|
-
>>> result = thread.get()
|
|
208
|
+
Create new metadata.
|
|
78
209
|
|
|
79
210
|
:param metadata_in: (required)
|
|
80
211
|
:type metadata_in: MetadataIn
|
|
81
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
82
|
-
:type async_req: bool, optional
|
|
83
|
-
:param _return_http_data_only: response data without head status code
|
|
84
|
-
and headers
|
|
85
|
-
:type _return_http_data_only: bool, optional
|
|
86
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
87
|
-
be returned without reading/decoding response
|
|
88
|
-
data. Default is True.
|
|
89
|
-
:type _preload_content: bool, optional
|
|
90
212
|
:param _request_timeout: timeout setting for this request. If one
|
|
91
213
|
number provided, it will be total request
|
|
92
214
|
timeout. It can also be a pair (tuple) of
|
|
93
215
|
(connection, read) timeouts.
|
|
216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
94
217
|
:param _request_auth: set to override the auth_settings for an a single
|
|
95
|
-
request; this effectively ignores the
|
|
96
|
-
in the spec for a single request.
|
|
218
|
+
request; this effectively ignores the
|
|
219
|
+
authentication in the spec for a single request.
|
|
97
220
|
:type _request_auth: dict, optional
|
|
98
|
-
:
|
|
221
|
+
:param _content_type: force content-type for the request.
|
|
222
|
+
:type _content_type: str, Optional
|
|
223
|
+
:param _headers: set to override the headers for a single
|
|
224
|
+
request; this effectively ignores the headers
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _headers: dict, optional
|
|
227
|
+
:param _host_index: set to override the host_index for a single
|
|
228
|
+
request; this effectively ignores the host_index
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _host_index: int, optional
|
|
99
231
|
:return: Returns the result object.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
232
|
+
""" # noqa: E501
|
|
233
|
+
|
|
234
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
235
|
+
metadata_in=metadata_in,
|
|
236
|
+
_request_auth=_request_auth,
|
|
237
|
+
_content_type=_content_type,
|
|
238
|
+
_headers=_headers,
|
|
239
|
+
_host_index=_host_index
|
|
240
|
+
)
|
|
104
241
|
|
|
105
|
-
|
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
243
|
+
'201': "Metadata",
|
|
244
|
+
'422': "HTTPValidationError"
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
response_data = await self.api_client.call_api(
|
|
248
|
+
*_param,
|
|
249
|
+
_request_timeout=_request_timeout
|
|
250
|
+
)
|
|
251
|
+
return response_data.response
|
|
106
252
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
253
|
+
|
|
254
|
+
def _create_metadata_self_metadata_post_serialize(
|
|
255
|
+
self,
|
|
256
|
+
metadata_in,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> Tuple:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
_path_params: Dict[str, str] = {}
|
|
270
|
+
_query_params: List[Tuple[str, str]] = []
|
|
271
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
272
|
+
_form_params: List[Tuple[str, str]] = []
|
|
273
|
+
_files: Dict[str, str] = {}
|
|
274
|
+
_body_params: Optional[bytes] = None
|
|
275
|
+
|
|
276
|
+
# process the path parameters
|
|
277
|
+
# process the query parameters
|
|
278
|
+
# process the header parameters
|
|
279
|
+
# process the form parameters
|
|
280
|
+
# process the body parameter
|
|
281
|
+
if metadata_in is not None:
|
|
282
|
+
_body_params = metadata_in
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Accept`
|
|
286
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
111
287
|
[
|
|
112
|
-
'
|
|
113
|
-
'_return_http_data_only',
|
|
114
|
-
'_preload_content',
|
|
115
|
-
'_request_timeout',
|
|
116
|
-
'_request_auth',
|
|
117
|
-
'_content_type',
|
|
118
|
-
'_headers'
|
|
288
|
+
'application/json'
|
|
119
289
|
]
|
|
120
290
|
)
|
|
121
291
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
292
|
+
# set the HTTP header `Content-Type`
|
|
293
|
+
if _content_type:
|
|
294
|
+
_header_params['Content-Type'] = _content_type
|
|
295
|
+
else:
|
|
296
|
+
_default_content_type = (
|
|
297
|
+
self.api_client.select_header_content_type(
|
|
298
|
+
[
|
|
299
|
+
'application/json'
|
|
300
|
+
]
|
|
127
301
|
)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if self.api_client.client_side_validation and local_var_params.get('metadata_in') is None: # noqa: E501
|
|
132
|
-
raise ApiValueError("Missing the required parameter `metadata_in` when calling `create_metadata_metadata_post`") # noqa: E501
|
|
302
|
+
)
|
|
303
|
+
if _default_content_type is not None:
|
|
304
|
+
_header_params['Content-Type'] = _default_content_type
|
|
133
305
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
query_params = []
|
|
306
|
+
# authentication setting
|
|
307
|
+
_auth_settings: List[str] = [
|
|
308
|
+
'backend'
|
|
309
|
+
]
|
|
139
310
|
|
|
140
|
-
|
|
311
|
+
return self.api_client.param_serialize(
|
|
312
|
+
method='POST',
|
|
313
|
+
resource_path='/metadata',
|
|
314
|
+
path_params=_path_params,
|
|
315
|
+
query_params=_query_params,
|
|
316
|
+
header_params=_header_params,
|
|
317
|
+
body=_body_params,
|
|
318
|
+
post_params=_form_params,
|
|
319
|
+
files=_files,
|
|
320
|
+
auth_settings=_auth_settings,
|
|
321
|
+
collection_formats=_collection_formats,
|
|
322
|
+
_host=_host,
|
|
323
|
+
_request_auth=_request_auth
|
|
324
|
+
)
|
|
141
325
|
|
|
142
|
-
form_params = []
|
|
143
|
-
local_var_files = {}
|
|
144
326
|
|
|
145
|
-
body_params = None
|
|
146
|
-
if 'metadata_in' in local_var_params:
|
|
147
|
-
body_params = local_var_params['metadata_in']
|
|
148
|
-
# HTTP header `Accept`
|
|
149
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
150
|
-
['application/json']) # noqa: E501
|
|
151
327
|
|
|
152
|
-
# HTTP header `Content-Type`
|
|
153
|
-
content_types_list = local_var_params.get('_content_type',
|
|
154
|
-
self.api_client.select_header_content_type(
|
|
155
|
-
['application/json'],
|
|
156
|
-
'POST', body_params)) # noqa: E501
|
|
157
|
-
if content_types_list:
|
|
158
|
-
header_params['Content-Type'] = content_types_list
|
|
159
328
|
|
|
160
|
-
|
|
161
|
-
|
|
329
|
+
@validate_call
|
|
330
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get(
|
|
331
|
+
self,
|
|
332
|
+
backend_id: StrictInt,
|
|
333
|
+
_request_timeout: Union[
|
|
334
|
+
None,
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Tuple[
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
339
|
+
]
|
|
340
|
+
] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
) -> List[Metadata]:
|
|
346
|
+
"""Retrieve metadata by backend ID
|
|
347
|
+
|
|
348
|
+
Get metadata by job ID.
|
|
349
|
+
|
|
350
|
+
:param backend_id: (required)
|
|
351
|
+
:type backend_id: int
|
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
353
|
+
number provided, it will be total request
|
|
354
|
+
timeout. It can also be a pair (tuple) of
|
|
355
|
+
(connection, read) timeouts.
|
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
358
|
+
request; this effectively ignores the
|
|
359
|
+
authentication in the spec for a single request.
|
|
360
|
+
:type _request_auth: dict, optional
|
|
361
|
+
:param _content_type: force content-type for the request.
|
|
362
|
+
:type _content_type: str, Optional
|
|
363
|
+
:param _headers: set to override the headers for a single
|
|
364
|
+
request; this effectively ignores the headers
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _headers: dict, optional
|
|
367
|
+
:param _host_index: set to override the host_index for a single
|
|
368
|
+
request; this effectively ignores the host_index
|
|
369
|
+
in the spec for a single request.
|
|
370
|
+
:type _host_index: int, optional
|
|
371
|
+
:return: Returns the result object.
|
|
372
|
+
""" # noqa: E501
|
|
373
|
+
|
|
374
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
375
|
+
backend_id=backend_id,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
162
381
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
422: "HTTPValidationError"
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'200': "List[Metadata]",
|
|
384
|
+
'422': "HTTPValidationError"
|
|
385
|
+
|
|
166
386
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
:param
|
|
200
|
-
|
|
201
|
-
data. Default is True.
|
|
202
|
-
:type _preload_content: bool, optional
|
|
387
|
+
response_data = await self.api_client.call_api(
|
|
388
|
+
*_param,
|
|
389
|
+
_request_timeout=_request_timeout
|
|
390
|
+
)
|
|
391
|
+
await response_data.read()
|
|
392
|
+
return self.api_client.response_deserialize(
|
|
393
|
+
response_data=response_data,
|
|
394
|
+
response_types_map=_response_types_map,
|
|
395
|
+
).data
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
@validate_call
|
|
399
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get_with_http_info(
|
|
400
|
+
self,
|
|
401
|
+
backend_id: StrictInt,
|
|
402
|
+
_request_timeout: Union[
|
|
403
|
+
None,
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
405
|
+
Tuple[
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
408
|
+
]
|
|
409
|
+
] = None,
|
|
410
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
411
|
+
_content_type: Optional[StrictStr] = None,
|
|
412
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
413
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
414
|
+
) -> ApiResponse[List[Metadata]]:
|
|
415
|
+
"""Retrieve metadata by backend ID
|
|
416
|
+
|
|
417
|
+
Get metadata by job ID.
|
|
418
|
+
|
|
419
|
+
:param backend_id: (required)
|
|
420
|
+
:type backend_id: int
|
|
203
421
|
:param _request_timeout: timeout setting for this request. If one
|
|
204
422
|
number provided, it will be total request
|
|
205
423
|
timeout. It can also be a pair (tuple) of
|
|
206
424
|
(connection, read) timeouts.
|
|
425
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
426
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
427
|
+
request; this effectively ignores the
|
|
428
|
+
authentication in the spec for a single request.
|
|
429
|
+
:type _request_auth: dict, optional
|
|
430
|
+
:param _content_type: force content-type for the request.
|
|
431
|
+
:type _content_type: str, Optional
|
|
432
|
+
:param _headers: set to override the headers for a single
|
|
433
|
+
request; this effectively ignores the headers
|
|
434
|
+
in the spec for a single request.
|
|
435
|
+
:type _headers: dict, optional
|
|
436
|
+
:param _host_index: set to override the host_index for a single
|
|
437
|
+
request; this effectively ignores the host_index
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _host_index: int, optional
|
|
207
440
|
:return: Returns the result object.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
441
|
+
""" # noqa: E501
|
|
442
|
+
|
|
443
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
444
|
+
backend_id=backend_id,
|
|
445
|
+
_request_auth=_request_auth,
|
|
446
|
+
_content_type=_content_type,
|
|
447
|
+
_headers=_headers,
|
|
448
|
+
_host_index=_host_index
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
452
|
+
'200': "List[Metadata]",
|
|
453
|
+
'422': "HTTPValidationError"
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
response_data = await self.api_client.call_api(
|
|
457
|
+
*_param,
|
|
458
|
+
_request_timeout=_request_timeout
|
|
459
|
+
)
|
|
460
|
+
await response_data.read()
|
|
461
|
+
return self.api_client.response_deserialize(
|
|
462
|
+
response_data=response_data,
|
|
463
|
+
response_types_map=_response_types_map,
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
@validate_call
|
|
468
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get_without_preload_content(
|
|
469
|
+
self,
|
|
470
|
+
backend_id: StrictInt,
|
|
471
|
+
_request_timeout: Union[
|
|
472
|
+
None,
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Tuple[
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
477
|
+
]
|
|
478
|
+
] = None,
|
|
479
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_content_type: Optional[StrictStr] = None,
|
|
481
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
483
|
+
) -> RESTResponseType:
|
|
484
|
+
"""Retrieve metadata by backend ID
|
|
485
|
+
|
|
486
|
+
Get metadata by job ID.
|
|
487
|
+
|
|
488
|
+
:param backend_id: (required)
|
|
489
|
+
:type backend_id: int
|
|
236
490
|
:param _request_timeout: timeout setting for this request. If one
|
|
237
491
|
number provided, it will be total request
|
|
238
492
|
timeout. It can also be a pair (tuple) of
|
|
239
493
|
(connection, read) timeouts.
|
|
494
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
240
495
|
:param _request_auth: set to override the auth_settings for an a single
|
|
241
|
-
request; this effectively ignores the
|
|
242
|
-
in the spec for a single request.
|
|
496
|
+
request; this effectively ignores the
|
|
497
|
+
authentication in the spec for a single request.
|
|
243
498
|
:type _request_auth: dict, optional
|
|
244
|
-
:
|
|
499
|
+
:param _content_type: force content-type for the request.
|
|
500
|
+
:type _content_type: str, Optional
|
|
501
|
+
:param _headers: set to override the headers for a single
|
|
502
|
+
request; this effectively ignores the headers
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _headers: dict, optional
|
|
505
|
+
:param _host_index: set to override the host_index for a single
|
|
506
|
+
request; this effectively ignores the host_index
|
|
507
|
+
in the spec for a single request.
|
|
508
|
+
:type _host_index: int, optional
|
|
245
509
|
:return: Returns the result object.
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
510
|
+
""" # noqa: E501
|
|
511
|
+
|
|
512
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
513
|
+
backend_id=backend_id,
|
|
514
|
+
_request_auth=_request_auth,
|
|
515
|
+
_content_type=_content_type,
|
|
516
|
+
_headers=_headers,
|
|
517
|
+
_host_index=_host_index
|
|
518
|
+
)
|
|
250
519
|
|
|
251
|
-
|
|
520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
521
|
+
'200': "List[Metadata]",
|
|
522
|
+
'422': "HTTPValidationError"
|
|
523
|
+
|
|
524
|
+
}
|
|
525
|
+
response_data = await self.api_client.call_api(
|
|
526
|
+
*_param,
|
|
527
|
+
_request_timeout=_request_timeout
|
|
528
|
+
)
|
|
529
|
+
return response_data.response
|
|
252
530
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
531
|
+
|
|
532
|
+
def _read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
533
|
+
self,
|
|
534
|
+
backend_id,
|
|
535
|
+
_request_auth,
|
|
536
|
+
_content_type,
|
|
537
|
+
_headers,
|
|
538
|
+
_host_index,
|
|
539
|
+
) -> Tuple:
|
|
540
|
+
|
|
541
|
+
_host = None
|
|
542
|
+
|
|
543
|
+
_collection_formats: Dict[str, str] = {
|
|
544
|
+
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[str, str] = {}
|
|
552
|
+
_body_params: Optional[bytes] = None
|
|
553
|
+
|
|
554
|
+
# process the path parameters
|
|
555
|
+
if backend_id is not None:
|
|
556
|
+
_path_params['backend_id'] = backend_id
|
|
557
|
+
# process the query parameters
|
|
558
|
+
# process the header parameters
|
|
559
|
+
# process the form parameters
|
|
560
|
+
# process the body parameter
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
# set the HTTP header `Accept`
|
|
564
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
257
565
|
[
|
|
258
|
-
'
|
|
259
|
-
'_return_http_data_only',
|
|
260
|
-
'_preload_content',
|
|
261
|
-
'_request_timeout',
|
|
262
|
-
'_request_auth',
|
|
263
|
-
'_content_type',
|
|
264
|
-
'_headers'
|
|
566
|
+
'application/json'
|
|
265
567
|
]
|
|
266
568
|
)
|
|
267
569
|
|
|
268
|
-
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
269
|
-
if key not in all_params:
|
|
270
|
-
raise ApiTypeError(
|
|
271
|
-
"Got an unexpected keyword argument '%s'"
|
|
272
|
-
" to method read_metadata_by_runtime_id_metadata_runtime_runtime_id_get" % key
|
|
273
|
-
)
|
|
274
|
-
local_var_params[key] = val
|
|
275
|
-
del local_var_params['kwargs']
|
|
276
|
-
# verify the required parameter 'runtime_id' is set
|
|
277
|
-
if self.api_client.client_side_validation and local_var_params.get('runtime_id') is None: # noqa: E501
|
|
278
|
-
raise ApiValueError("Missing the required parameter `runtime_id` when calling `read_metadata_by_runtime_id_metadata_runtime_runtime_id_get`") # noqa: E501
|
|
279
570
|
|
|
280
|
-
|
|
571
|
+
# authentication setting
|
|
572
|
+
_auth_settings: List[str] = [
|
|
573
|
+
'user'
|
|
574
|
+
]
|
|
281
575
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
576
|
+
return self.api_client.param_serialize(
|
|
577
|
+
method='GET',
|
|
578
|
+
resource_path='/metadata/backend/{backend_id}',
|
|
579
|
+
path_params=_path_params,
|
|
580
|
+
query_params=_query_params,
|
|
581
|
+
header_params=_header_params,
|
|
582
|
+
body=_body_params,
|
|
583
|
+
post_params=_form_params,
|
|
584
|
+
files=_files,
|
|
585
|
+
auth_settings=_auth_settings,
|
|
586
|
+
collection_formats=_collection_formats,
|
|
587
|
+
_host=_host,
|
|
588
|
+
_request_auth=_request_auth
|
|
589
|
+
)
|
|
285
590
|
|
|
286
|
-
query_params = []
|
|
287
591
|
|
|
288
|
-
header_params = dict(local_var_params.get('_headers', {}))
|
|
289
592
|
|
|
290
|
-
form_params = []
|
|
291
|
-
local_var_files = {}
|
|
292
593
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
594
|
+
@validate_call
|
|
595
|
+
async def read_metadata_metadata_id_get(
|
|
596
|
+
self,
|
|
597
|
+
id: StrictInt,
|
|
598
|
+
_request_timeout: Union[
|
|
599
|
+
None,
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
601
|
+
Tuple[
|
|
602
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
603
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
604
|
+
]
|
|
605
|
+
] = None,
|
|
606
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
607
|
+
_content_type: Optional[StrictStr] = None,
|
|
608
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
609
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
610
|
+
) -> Metadata:
|
|
611
|
+
"""Get metadata by ID
|
|
297
612
|
|
|
298
|
-
|
|
299
|
-
auth_settings = ['user'] # noqa: E501
|
|
613
|
+
Get metadata by ID.
|
|
300
614
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
615
|
+
:param id: (required)
|
|
616
|
+
:type id: int
|
|
617
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
618
|
+
number provided, it will be total request
|
|
619
|
+
timeout. It can also be a pair (tuple) of
|
|
620
|
+
(connection, read) timeouts.
|
|
621
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
622
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
623
|
+
request; this effectively ignores the
|
|
624
|
+
authentication in the spec for a single request.
|
|
625
|
+
:type _request_auth: dict, optional
|
|
626
|
+
:param _content_type: force content-type for the request.
|
|
627
|
+
:type _content_type: str, Optional
|
|
628
|
+
:param _headers: set to override the headers for a single
|
|
629
|
+
request; this effectively ignores the headers
|
|
630
|
+
in the spec for a single request.
|
|
631
|
+
:type _headers: dict, optional
|
|
632
|
+
:param _host_index: set to override the host_index for a single
|
|
633
|
+
request; this effectively ignores the host_index
|
|
634
|
+
in the spec for a single request.
|
|
635
|
+
:type _host_index: int, optional
|
|
636
|
+
:return: Returns the result object.
|
|
637
|
+
""" # noqa: E501
|
|
638
|
+
|
|
639
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
640
|
+
id=id,
|
|
641
|
+
_request_auth=_request_auth,
|
|
642
|
+
_content_type=_content_type,
|
|
643
|
+
_headers=_headers,
|
|
644
|
+
_host_index=_host_index
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
648
|
+
'200': "Metadata",
|
|
649
|
+
'404': "HTTPNotFoundError",
|
|
650
|
+
'422': "HTTPValidationError"
|
|
651
|
+
|
|
304
652
|
}
|
|
653
|
+
response_data = await self.api_client.call_api(
|
|
654
|
+
*_param,
|
|
655
|
+
_request_timeout=_request_timeout
|
|
656
|
+
)
|
|
657
|
+
await response_data.read()
|
|
658
|
+
return self.api_client.response_deserialize(
|
|
659
|
+
response_data=response_data,
|
|
660
|
+
response_types_map=_response_types_map,
|
|
661
|
+
).data
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
@validate_call
|
|
665
|
+
async def read_metadata_metadata_id_get_with_http_info(
|
|
666
|
+
self,
|
|
667
|
+
id: StrictInt,
|
|
668
|
+
_request_timeout: Union[
|
|
669
|
+
None,
|
|
670
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
671
|
+
Tuple[
|
|
672
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
674
|
+
]
|
|
675
|
+
] = None,
|
|
676
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
677
|
+
_content_type: Optional[StrictStr] = None,
|
|
678
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
679
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
680
|
+
) -> ApiResponse[Metadata]:
|
|
681
|
+
"""Get metadata by ID
|
|
305
682
|
|
|
306
|
-
|
|
307
|
-
'/metadata/runtime/{runtime_id}', 'GET',
|
|
308
|
-
path_params,
|
|
309
|
-
query_params,
|
|
310
|
-
header_params,
|
|
311
|
-
body=body_params,
|
|
312
|
-
post_params=form_params,
|
|
313
|
-
files=local_var_files,
|
|
314
|
-
response_types_map=response_types_map,
|
|
315
|
-
auth_settings=auth_settings,
|
|
316
|
-
async_req=local_var_params.get('async_req'),
|
|
317
|
-
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
318
|
-
_preload_content=local_var_params.get('_preload_content', True),
|
|
319
|
-
_request_timeout=local_var_params.get('_request_timeout'),
|
|
320
|
-
collection_formats=collection_formats,
|
|
321
|
-
_request_auth=local_var_params.get('_request_auth'))
|
|
322
|
-
|
|
323
|
-
def read_metadata_metadata_id_get(self, id, **kwargs): # noqa: E501
|
|
324
|
-
"""Get metadata by ID # noqa: E501
|
|
325
|
-
|
|
326
|
-
Get metadata by ID. # noqa: E501
|
|
327
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
328
|
-
asynchronous HTTP request, please pass async_req=True
|
|
329
|
-
|
|
330
|
-
>>> thread = api.read_metadata_metadata_id_get(id, async_req=True)
|
|
331
|
-
>>> result = thread.get()
|
|
683
|
+
Get metadata by ID.
|
|
332
684
|
|
|
333
685
|
:param id: (required)
|
|
334
686
|
:type id: int
|
|
335
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
336
|
-
:type async_req: bool, optional
|
|
337
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
338
|
-
be returned without reading/decoding response
|
|
339
|
-
data. Default is True.
|
|
340
|
-
:type _preload_content: bool, optional
|
|
341
687
|
:param _request_timeout: timeout setting for this request. If one
|
|
342
688
|
number provided, it will be total request
|
|
343
689
|
timeout. It can also be a pair (tuple) of
|
|
344
690
|
(connection, read) timeouts.
|
|
691
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
692
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
693
|
+
request; this effectively ignores the
|
|
694
|
+
authentication in the spec for a single request.
|
|
695
|
+
:type _request_auth: dict, optional
|
|
696
|
+
:param _content_type: force content-type for the request.
|
|
697
|
+
:type _content_type: str, Optional
|
|
698
|
+
:param _headers: set to override the headers for a single
|
|
699
|
+
request; this effectively ignores the headers
|
|
700
|
+
in the spec for a single request.
|
|
701
|
+
:type _headers: dict, optional
|
|
702
|
+
:param _host_index: set to override the host_index for a single
|
|
703
|
+
request; this effectively ignores the host_index
|
|
704
|
+
in the spec for a single request.
|
|
705
|
+
:type _host_index: int, optional
|
|
345
706
|
:return: Returns the result object.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
707
|
+
""" # noqa: E501
|
|
708
|
+
|
|
709
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
710
|
+
id=id,
|
|
711
|
+
_request_auth=_request_auth,
|
|
712
|
+
_content_type=_content_type,
|
|
713
|
+
_headers=_headers,
|
|
714
|
+
_host_index=_host_index
|
|
715
|
+
)
|
|
352
716
|
|
|
353
|
-
|
|
354
|
-
|
|
717
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
718
|
+
'200': "Metadata",
|
|
719
|
+
'404': "HTTPNotFoundError",
|
|
720
|
+
'422': "HTTPValidationError"
|
|
721
|
+
|
|
722
|
+
}
|
|
723
|
+
response_data = await self.api_client.call_api(
|
|
724
|
+
*_param,
|
|
725
|
+
_request_timeout=_request_timeout
|
|
726
|
+
)
|
|
727
|
+
await response_data.read()
|
|
728
|
+
return self.api_client.response_deserialize(
|
|
729
|
+
response_data=response_data,
|
|
730
|
+
response_types_map=_response_types_map,
|
|
731
|
+
)
|
|
355
732
|
|
|
356
|
-
Get metadata by ID. # noqa: E501
|
|
357
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
358
|
-
asynchronous HTTP request, please pass async_req=True
|
|
359
733
|
|
|
360
|
-
|
|
361
|
-
|
|
734
|
+
@validate_call
|
|
735
|
+
async def read_metadata_metadata_id_get_without_preload_content(
|
|
736
|
+
self,
|
|
737
|
+
id: StrictInt,
|
|
738
|
+
_request_timeout: Union[
|
|
739
|
+
None,
|
|
740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
741
|
+
Tuple[
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
744
|
+
]
|
|
745
|
+
] = None,
|
|
746
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
747
|
+
_content_type: Optional[StrictStr] = None,
|
|
748
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
749
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
750
|
+
) -> RESTResponseType:
|
|
751
|
+
"""Get metadata by ID
|
|
752
|
+
|
|
753
|
+
Get metadata by ID.
|
|
362
754
|
|
|
363
755
|
:param id: (required)
|
|
364
756
|
:type id: int
|
|
365
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
366
|
-
:type async_req: bool, optional
|
|
367
|
-
:param _return_http_data_only: response data without head status code
|
|
368
|
-
and headers
|
|
369
|
-
:type _return_http_data_only: bool, optional
|
|
370
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
371
|
-
be returned without reading/decoding response
|
|
372
|
-
data. Default is True.
|
|
373
|
-
:type _preload_content: bool, optional
|
|
374
757
|
:param _request_timeout: timeout setting for this request. If one
|
|
375
758
|
number provided, it will be total request
|
|
376
759
|
timeout. It can also be a pair (tuple) of
|
|
377
760
|
(connection, read) timeouts.
|
|
761
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
378
762
|
:param _request_auth: set to override the auth_settings for an a single
|
|
379
|
-
request; this effectively ignores the
|
|
380
|
-
in the spec for a single request.
|
|
763
|
+
request; this effectively ignores the
|
|
764
|
+
authentication in the spec for a single request.
|
|
381
765
|
:type _request_auth: dict, optional
|
|
382
|
-
:
|
|
766
|
+
:param _content_type: force content-type for the request.
|
|
767
|
+
:type _content_type: str, Optional
|
|
768
|
+
:param _headers: set to override the headers for a single
|
|
769
|
+
request; this effectively ignores the headers
|
|
770
|
+
in the spec for a single request.
|
|
771
|
+
:type _headers: dict, optional
|
|
772
|
+
:param _host_index: set to override the host_index for a single
|
|
773
|
+
request; this effectively ignores the host_index
|
|
774
|
+
in the spec for a single request.
|
|
775
|
+
:type _host_index: int, optional
|
|
383
776
|
:return: Returns the result object.
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
777
|
+
""" # noqa: E501
|
|
778
|
+
|
|
779
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
780
|
+
id=id,
|
|
781
|
+
_request_auth=_request_auth,
|
|
782
|
+
_content_type=_content_type,
|
|
783
|
+
_headers=_headers,
|
|
784
|
+
_host_index=_host_index
|
|
785
|
+
)
|
|
390
786
|
|
|
391
|
-
|
|
392
|
-
'
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
'_request_auth',
|
|
401
|
-
'_content_type',
|
|
402
|
-
'_headers'
|
|
403
|
-
]
|
|
787
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
788
|
+
'200': "Metadata",
|
|
789
|
+
'404': "HTTPNotFoundError",
|
|
790
|
+
'422': "HTTPValidationError"
|
|
791
|
+
|
|
792
|
+
}
|
|
793
|
+
response_data = await self.api_client.call_api(
|
|
794
|
+
*_param,
|
|
795
|
+
_request_timeout=_request_timeout
|
|
404
796
|
)
|
|
797
|
+
return response_data.response
|
|
405
798
|
|
|
406
|
-
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
407
|
-
if key not in all_params:
|
|
408
|
-
raise ApiTypeError(
|
|
409
|
-
"Got an unexpected keyword argument '%s'"
|
|
410
|
-
" to method read_metadata_metadata_id_get" % key
|
|
411
|
-
)
|
|
412
|
-
local_var_params[key] = val
|
|
413
|
-
del local_var_params['kwargs']
|
|
414
|
-
# verify the required parameter 'id' is set
|
|
415
|
-
if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
|
|
416
|
-
raise ApiValueError("Missing the required parameter `id` when calling `read_metadata_metadata_id_get`") # noqa: E501
|
|
417
799
|
|
|
418
|
-
|
|
800
|
+
def _read_metadata_metadata_id_get_serialize(
|
|
801
|
+
self,
|
|
802
|
+
id,
|
|
803
|
+
_request_auth,
|
|
804
|
+
_content_type,
|
|
805
|
+
_headers,
|
|
806
|
+
_host_index,
|
|
807
|
+
) -> Tuple:
|
|
419
808
|
|
|
420
|
-
|
|
421
|
-
if 'id' in local_var_params:
|
|
422
|
-
path_params['id'] = local_var_params['id'] # noqa: E501
|
|
809
|
+
_host = None
|
|
423
810
|
|
|
424
|
-
|
|
811
|
+
_collection_formats: Dict[str, str] = {
|
|
812
|
+
|
|
813
|
+
}
|
|
425
814
|
|
|
426
|
-
|
|
815
|
+
_path_params: Dict[str, str] = {}
|
|
816
|
+
_query_params: List[Tuple[str, str]] = []
|
|
817
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
818
|
+
_form_params: List[Tuple[str, str]] = []
|
|
819
|
+
_files: Dict[str, str] = {}
|
|
820
|
+
_body_params: Optional[bytes] = None
|
|
427
821
|
|
|
428
|
-
|
|
429
|
-
|
|
822
|
+
# process the path parameters
|
|
823
|
+
if id is not None:
|
|
824
|
+
_path_params['id'] = id
|
|
825
|
+
# process the query parameters
|
|
826
|
+
# process the header parameters
|
|
827
|
+
# process the form parameters
|
|
828
|
+
# process the body parameter
|
|
430
829
|
|
|
431
|
-
body_params = None
|
|
432
|
-
# HTTP header `Accept`
|
|
433
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
434
|
-
['application/json']) # noqa: E501
|
|
435
830
|
|
|
436
|
-
#
|
|
437
|
-
|
|
831
|
+
# set the HTTP header `Accept`
|
|
832
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
833
|
+
[
|
|
834
|
+
'application/json'
|
|
835
|
+
]
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
# authentication setting
|
|
840
|
+
_auth_settings: List[str] = [
|
|
841
|
+
'user'
|
|
842
|
+
]
|
|
843
|
+
|
|
844
|
+
return self.api_client.param_serialize(
|
|
845
|
+
method='GET',
|
|
846
|
+
resource_path='/metadata/{id}',
|
|
847
|
+
path_params=_path_params,
|
|
848
|
+
query_params=_query_params,
|
|
849
|
+
header_params=_header_params,
|
|
850
|
+
body=_body_params,
|
|
851
|
+
post_params=_form_params,
|
|
852
|
+
files=_files,
|
|
853
|
+
auth_settings=_auth_settings,
|
|
854
|
+
collection_formats=_collection_formats,
|
|
855
|
+
_host=_host,
|
|
856
|
+
_request_auth=_request_auth
|
|
857
|
+
)
|
|
438
858
|
|
|
439
|
-
response_types_map = {
|
|
440
|
-
200: "Metadata",
|
|
441
|
-
404: "HTTPNotFoundError",
|
|
442
|
-
422: "HTTPValidationError",
|
|
443
|
-
}
|
|
444
859
|
|
|
445
|
-
return self.api_client.call_api(
|
|
446
|
-
'/metadata/{id}', 'GET',
|
|
447
|
-
path_params,
|
|
448
|
-
query_params,
|
|
449
|
-
header_params,
|
|
450
|
-
body=body_params,
|
|
451
|
-
post_params=form_params,
|
|
452
|
-
files=local_var_files,
|
|
453
|
-
response_types_map=response_types_map,
|
|
454
|
-
auth_settings=auth_settings,
|
|
455
|
-
async_req=local_var_params.get('async_req'),
|
|
456
|
-
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
457
|
-
_preload_content=local_var_params.get('_preload_content', True),
|
|
458
|
-
_request_timeout=local_var_params.get('_request_timeout'),
|
|
459
|
-
collection_formats=collection_formats,
|
|
460
|
-
_request_auth=local_var_params.get('_request_auth'))
|