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.

Files changed (165) hide show
  1. compute_api_client/__init__.py +22 -19
  2. compute_api_client/api/__init__.py +5 -6
  3. compute_api_client/api/algorithms_api.py +1333 -553
  4. compute_api_client/api/backend_api.py +1501 -0
  5. compute_api_client/api/backend_types_api.py +684 -0
  6. compute_api_client/api/batch_jobs_api.py +1937 -0
  7. compute_api_client/api/commits_api.py +1068 -435
  8. compute_api_client/api/files_api.py +1075 -435
  9. compute_api_client/api/final_results_api.py +736 -338
  10. compute_api_client/api/jobs_api.py +1653 -0
  11. compute_api_client/api/languages_api.py +556 -217
  12. compute_api_client/api/members_api.py +1057 -435
  13. compute_api_client/api/metadata_api.py +736 -337
  14. compute_api_client/api/permissions_api.py +1055 -421
  15. compute_api_client/api/projects_api.py +1604 -676
  16. compute_api_client/api/reservations_api.py +1124 -427
  17. compute_api_client/api/results_api.py +738 -337
  18. compute_api_client/api/teams_api.py +567 -220
  19. compute_api_client/api/transactions_api.py +679 -218
  20. compute_api_client/api/users_api.py +1090 -435
  21. compute_api_client/api_client.py +346 -304
  22. compute_api_client/api_response.py +21 -0
  23. compute_api_client/configuration.py +54 -67
  24. compute_api_client/docs/Algorithm.md +20 -3
  25. compute_api_client/docs/AlgorithmIn.md +20 -3
  26. compute_api_client/docs/AlgorithmType.md +0 -1
  27. compute_api_client/docs/AlgorithmsApi.md +78 -77
  28. compute_api_client/docs/Backend.md +33 -0
  29. compute_api_client/docs/BackendApi.md +419 -0
  30. compute_api_client/docs/BackendPatch.md +29 -0
  31. compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
  32. compute_api_client/docs/BackendType.md +36 -0
  33. compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
  34. compute_api_client/docs/BackendWithAuthentication.md +34 -0
  35. compute_api_client/docs/BatchJob.md +38 -0
  36. compute_api_client/docs/BatchJobIn.md +29 -0
  37. compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
  38. compute_api_client/docs/{BatchRunsApi.md → BatchJobsApi.md} +170 -147
  39. compute_api_client/docs/Commit.md +18 -1
  40. compute_api_client/docs/CommitIn.md +17 -0
  41. compute_api_client/docs/CommitsApi.md +62 -71
  42. compute_api_client/docs/CompileStage.md +0 -1
  43. compute_api_client/docs/Domain.md +0 -1
  44. compute_api_client/docs/File.md +21 -4
  45. compute_api_client/docs/FileIn.md +21 -4
  46. compute_api_client/docs/FilesApi.md +65 -71
  47. compute_api_client/docs/FinalResult.md +20 -3
  48. compute_api_client/docs/FinalResultIn.md +19 -2
  49. compute_api_client/docs/FinalResultsApi.md +44 -71
  50. compute_api_client/docs/HTTPNotFoundError.md +17 -0
  51. compute_api_client/docs/HTTPValidationError.md +18 -1
  52. compute_api_client/docs/Job.md +36 -0
  53. compute_api_client/docs/JobIn.md +31 -0
  54. compute_api_client/docs/JobPatch.md +28 -0
  55. compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
  56. compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
  57. compute_api_client/docs/Language.md +17 -0
  58. compute_api_client/docs/LanguagesApi.md +30 -12
  59. compute_api_client/docs/LocationInner.md +17 -0
  60. compute_api_client/docs/Member.md +19 -2
  61. compute_api_client/docs/MemberIn.md +19 -2
  62. compute_api_client/docs/MembersApi.md +59 -24
  63. compute_api_client/docs/Metadata.md +20 -3
  64. compute_api_client/docs/MetadataApi.md +49 -33
  65. compute_api_client/docs/MetadataIn.md +19 -2
  66. compute_api_client/docs/Permission.md +17 -0
  67. compute_api_client/docs/PermissionGroup.md +17 -0
  68. compute_api_client/docs/PermissionsApi.md +68 -28
  69. compute_api_client/docs/Project.md +20 -3
  70. compute_api_client/docs/ProjectIn.md +18 -1
  71. compute_api_client/docs/ProjectPatch.md +19 -2
  72. compute_api_client/docs/ProjectsApi.md +84 -36
  73. compute_api_client/docs/Reservation.md +21 -4
  74. compute_api_client/docs/ReservationIn.md +19 -2
  75. compute_api_client/docs/ReservationsApi.md +66 -24
  76. compute_api_client/docs/Result.md +23 -6
  77. compute_api_client/docs/ResultIn.md +19 -2
  78. compute_api_client/docs/ResultsApi.md +42 -26
  79. compute_api_client/docs/Role.md +0 -1
  80. compute_api_client/docs/ShareType.md +0 -1
  81. compute_api_client/docs/Team.md +18 -1
  82. compute_api_client/docs/TeamsApi.md +37 -14
  83. compute_api_client/docs/Transaction.md +21 -4
  84. compute_api_client/docs/TransactionsApi.md +50 -14
  85. compute_api_client/docs/User.md +21 -4
  86. compute_api_client/docs/UserIn.md +17 -0
  87. compute_api_client/docs/UsersApi.md +62 -24
  88. compute_api_client/docs/ValidationError.md +18 -1
  89. compute_api_client/exceptions.py +19 -16
  90. compute_api_client/models/__init__.py +16 -14
  91. compute_api_client/models/algorithm.py +78 -237
  92. compute_api_client/models/algorithm_in.py +76 -204
  93. compute_api_client/models/algorithm_type.py +21 -87
  94. compute_api_client/models/backend.py +100 -0
  95. compute_api_client/models/backend_patch.py +90 -0
  96. compute_api_client/models/backend_status.py +47 -0
  97. compute_api_client/models/backend_type.py +105 -0
  98. compute_api_client/models/backend_with_authentication.py +102 -0
  99. compute_api_client/models/batch_job.py +129 -0
  100. compute_api_client/models/batch_job_in.py +89 -0
  101. compute_api_client/models/batch_job_status.py +48 -0
  102. compute_api_client/models/commit.py +72 -230
  103. compute_api_client/models/commit_in.py +67 -169
  104. compute_api_client/models/compile_stage.py +23 -89
  105. compute_api_client/models/domain.py +22 -88
  106. compute_api_client/models/file.py +74 -288
  107. compute_api_client/models/file_in.py +72 -254
  108. compute_api_client/models/final_result.py +68 -198
  109. compute_api_client/models/final_result_in.py +63 -137
  110. compute_api_client/models/http_not_found_error.py +60 -105
  111. compute_api_client/models/http_validation_error.py +69 -105
  112. compute_api_client/models/job.py +120 -0
  113. compute_api_client/models/job_in.py +99 -0
  114. compute_api_client/models/job_patch.py +88 -0
  115. compute_api_client/models/job_status.py +48 -0
  116. compute_api_client/models/language.py +67 -172
  117. compute_api_client/models/location_inner.py +125 -84
  118. compute_api_client/models/member.py +70 -236
  119. compute_api_client/models/member_in.py +68 -203
  120. compute_api_client/models/metadata.py +68 -198
  121. compute_api_client/models/metadata_in.py +68 -137
  122. compute_api_client/models/permission.py +67 -172
  123. compute_api_client/models/permission_group.py +65 -142
  124. compute_api_client/models/project.py +74 -256
  125. compute_api_client/models/project_in.py +69 -195
  126. compute_api_client/models/project_patch.py +89 -192
  127. compute_api_client/models/reservation.py +79 -290
  128. compute_api_client/models/reservation_in.py +68 -200
  129. compute_api_client/models/result.py +101 -359
  130. compute_api_client/models/result_in.py +95 -291
  131. compute_api_client/models/role.py +21 -87
  132. compute_api_client/models/share_type.py +22 -88
  133. compute_api_client/models/team.py +69 -198
  134. compute_api_client/models/transaction.py +93 -299
  135. compute_api_client/models/user.py +75 -276
  136. compute_api_client/models/user_in.py +73 -243
  137. compute_api_client/models/validation_error.py +73 -160
  138. compute_api_client/rest.py +55 -114
  139. {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
  140. qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
  141. compute_api_client/api/batch_runs_api.py +0 -862
  142. compute_api_client/api/runs_api.py +0 -723
  143. compute_api_client/api/runtime_api.py +0 -449
  144. compute_api_client/api/runtime_types_api.py +0 -303
  145. compute_api_client/docs/BatchRun.md +0 -21
  146. compute_api_client/docs/BatchRunIn.md +0 -12
  147. compute_api_client/docs/Run.md +0 -19
  148. compute_api_client/docs/RunIn.md +0 -14
  149. compute_api_client/docs/Runtime.md +0 -16
  150. compute_api_client/docs/RuntimeApi.md +0 -229
  151. compute_api_client/docs/RuntimeType.md +0 -19
  152. compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
  153. compute_api_client/models/batch_run.py +0 -423
  154. compute_api_client/models/batch_run_in.py +0 -171
  155. compute_api_client/models/batch_run_status.py +0 -114
  156. compute_api_client/models/run.py +0 -376
  157. compute_api_client/models/run_in.py +0 -233
  158. compute_api_client/models/run_status.py +0 -114
  159. compute_api_client/models/runtime.py +0 -290
  160. compute_api_client/models/runtime_status.py +0 -113
  161. compute_api_client/models/runtime_type.py +0 -357
  162. compute_api_client/models/runtime_with_authentication.py +0 -320
  163. qi_compute_api_client-0.7.0.dist-info/RECORD +0 -137
  164. {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
  165. {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) # noqa: E501
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: https://openapi-generator.tech
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 __future__ import absolute_import
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
14
20
 
15
- import re # noqa: F401
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
16
25
 
17
- # python 2 and python 3 compatibility library
18
- import six
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.exceptions import ( # noqa: F401
22
- ApiTypeError,
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(object):
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
- Create new metadata. # noqa: E501
43
- This method makes a synchronous HTTP request by default. To make an
44
- asynchronous HTTP request, please pass async_req=True
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
- >>> thread = api.create_metadata_metadata_post(metadata_in, async_req=True)
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
- If the method is called asynchronously,
63
- returns the request thread.
64
- :rtype: Metadata
65
- """
66
- kwargs['_return_http_data_only'] = True
67
- return self.create_metadata_metadata_post_with_http_info(metadata_in, **kwargs) # noqa: E501
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
- def create_metadata_metadata_post_with_http_info(self, metadata_in, **kwargs): # noqa: E501
70
- """Create metadata # noqa: E501
139
+ Create new metadata.
71
140
 
72
- Create new metadata. # noqa: E501
73
- This method makes a synchronous HTTP request by default. To make an
74
- asynchronous HTTP request, please pass async_req=True
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
- >>> thread = api.create_metadata_metadata_post_with_http_info(metadata_in, async_req=True)
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 authentication
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
- :type _content_type: string, optional: force content-type for the request
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
- If the method is called asynchronously,
101
- returns the request thread.
102
- :rtype: tuple(Metadata, status_code(int), headers(HTTPHeaderDict))
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
- local_var_params = locals()
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
- all_params = [
108
- 'metadata_in'
109
- ]
110
- all_params.extend(
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
- 'async_req',
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
- for key, val in six.iteritems(local_var_params['kwargs']):
123
- if key not in all_params:
124
- raise ApiTypeError(
125
- "Got an unexpected keyword argument '%s'"
126
- " to method create_metadata_metadata_post" % key
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
- local_var_params[key] = val
129
- del local_var_params['kwargs']
130
- # verify the required parameter 'metadata_in' is set
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
- collection_formats = {}
135
-
136
- path_params = {}
137
-
138
- query_params = []
306
+ # authentication setting
307
+ _auth_settings: List[str] = [
308
+ 'backend'
309
+ ]
139
310
 
140
- header_params = dict(local_var_params.get('_headers', {}))
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
- # Authentication setting
161
- auth_settings = ['user'] # noqa: E501
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
- response_types_map = {
164
- 201: "Metadata",
165
- 422: "HTTPValidationError",
382
+ _response_types_map: Dict[str, Optional[str]] = {
383
+ '200': "List[Metadata]",
384
+ '422': "HTTPValidationError"
385
+
166
386
  }
167
-
168
- return self.api_client.call_api(
169
- '/metadata', 'POST',
170
- path_params,
171
- query_params,
172
- header_params,
173
- body=body_params,
174
- post_params=form_params,
175
- files=local_var_files,
176
- response_types_map=response_types_map,
177
- auth_settings=auth_settings,
178
- async_req=local_var_params.get('async_req'),
179
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
180
- _preload_content=local_var_params.get('_preload_content', True),
181
- _request_timeout=local_var_params.get('_request_timeout'),
182
- collection_formats=collection_formats,
183
- _request_auth=local_var_params.get('_request_auth'))
184
-
185
- def read_metadata_by_runtime_id_metadata_runtime_runtime_id_get(self, runtime_id, **kwargs): # noqa: E501
186
- """Retrieve metadata by runtime ID # noqa: E501
187
-
188
- Get metadata by run ID. # noqa: E501
189
- This method makes a synchronous HTTP request by default. To make an
190
- asynchronous HTTP request, please pass async_req=True
191
-
192
- >>> thread = api.read_metadata_by_runtime_id_metadata_runtime_runtime_id_get(runtime_id, async_req=True)
193
- >>> result = thread.get()
194
-
195
- :param runtime_id: (required)
196
- :type runtime_id: int
197
- :param async_req: Whether to execute the request asynchronously.
198
- :type async_req: bool, optional
199
- :param _preload_content: if False, the urllib3.HTTPResponse object will
200
- be returned without reading/decoding response
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
- If the method is called asynchronously,
209
- returns the request thread.
210
- :rtype: list[Metadata]
211
- """
212
- kwargs['_return_http_data_only'] = True
213
- return self.read_metadata_by_runtime_id_metadata_runtime_runtime_id_get_with_http_info(runtime_id, **kwargs) # noqa: E501
214
-
215
- def read_metadata_by_runtime_id_metadata_runtime_runtime_id_get_with_http_info(self, runtime_id, **kwargs): # noqa: E501
216
- """Retrieve metadata by runtime ID # noqa: E501
217
-
218
- Get metadata by run ID. # noqa: E501
219
- This method makes a synchronous HTTP request by default. To make an
220
- asynchronous HTTP request, please pass async_req=True
221
-
222
- >>> thread = api.read_metadata_by_runtime_id_metadata_runtime_runtime_id_get_with_http_info(runtime_id, async_req=True)
223
- >>> result = thread.get()
224
-
225
- :param runtime_id: (required)
226
- :type runtime_id: int
227
- :param async_req: Whether to execute the request asynchronously.
228
- :type async_req: bool, optional
229
- :param _return_http_data_only: response data without head status code
230
- and headers
231
- :type _return_http_data_only: bool, optional
232
- :param _preload_content: if False, the urllib3.HTTPResponse object will
233
- be returned without reading/decoding response
234
- data. Default is True.
235
- :type _preload_content: bool, optional
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 authentication
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
- :type _content_type: string, optional: force content-type for the request
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
- If the method is called asynchronously,
247
- returns the request thread.
248
- :rtype: tuple(list[Metadata], status_code(int), headers(HTTPHeaderDict))
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
- local_var_params = locals()
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
- all_params = [
254
- 'runtime_id'
255
- ]
256
- all_params.extend(
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
- 'async_req',
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
- collection_formats = {}
571
+ # authentication setting
572
+ _auth_settings: List[str] = [
573
+ 'user'
574
+ ]
281
575
 
282
- path_params = {}
283
- if 'runtime_id' in local_var_params:
284
- path_params['runtime_id'] = local_var_params['runtime_id'] # noqa: E501
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
- body_params = None
294
- # HTTP header `Accept`
295
- header_params['Accept'] = self.api_client.select_header_accept(
296
- ['application/json']) # noqa: E501
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
- # Authentication setting
299
- auth_settings = ['user'] # noqa: E501
613
+ Get metadata by ID.
300
614
 
301
- response_types_map = {
302
- 200: "list[Metadata]",
303
- 422: "HTTPValidationError",
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
- return self.api_client.call_api(
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
- If the method is called asynchronously,
347
- returns the request thread.
348
- :rtype: Metadata
349
- """
350
- kwargs['_return_http_data_only'] = True
351
- return self.read_metadata_metadata_id_get_with_http_info(id, **kwargs) # noqa: E501
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
- def read_metadata_metadata_id_get_with_http_info(self, id, **kwargs): # noqa: E501
354
- """Get metadata by ID # noqa: E501
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
- >>> thread = api.read_metadata_metadata_id_get_with_http_info(id, async_req=True)
361
- >>> result = thread.get()
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 authentication
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
- :type _content_type: string, optional: force content-type for the request
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
- If the method is called asynchronously,
385
- returns the request thread.
386
- :rtype: tuple(Metadata, status_code(int), headers(HTTPHeaderDict))
387
- """
388
-
389
- local_var_params = locals()
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
- all_params = [
392
- 'id'
393
- ]
394
- all_params.extend(
395
- [
396
- 'async_req',
397
- '_return_http_data_only',
398
- '_preload_content',
399
- '_request_timeout',
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
- collection_formats = {}
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
- path_params = {}
421
- if 'id' in local_var_params:
422
- path_params['id'] = local_var_params['id'] # noqa: E501
809
+ _host = None
423
810
 
424
- query_params = []
811
+ _collection_formats: Dict[str, str] = {
812
+
813
+ }
425
814
 
426
- header_params = dict(local_var_params.get('_headers', {}))
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
- form_params = []
429
- local_var_files = {}
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
- # Authentication setting
437
- auth_settings = ['user'] # noqa: E501
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'))