qi-compute-api-client 0.56.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.
- compute_api_client/__init__.py +219 -0
- compute_api_client/api/__init__.py +23 -0
- compute_api_client/api/algorithms_api.py +1603 -0
- compute_api_client/api/auth_config_api.py +278 -0
- compute_api_client/api/backend_api.py +1540 -0
- compute_api_client/api/backend_types_api.py +1178 -0
- compute_api_client/api/batch_jobs_api.py +2224 -0
- compute_api_client/api/commits_api.py +1565 -0
- compute_api_client/api/files_api.py +1307 -0
- compute_api_client/api/final_results_api.py +847 -0
- compute_api_client/api/health_api.py +281 -0
- compute_api_client/api/jobs_api.py +1787 -0
- compute_api_client/api/languages_api.py +692 -0
- compute_api_client/api/members_api.py +1238 -0
- compute_api_client/api/metadata_api.py +930 -0
- compute_api_client/api/permissions_api.py +1295 -0
- compute_api_client/api/projects_api.py +1889 -0
- compute_api_client/api/reservations_api.py +1324 -0
- compute_api_client/api/results_api.py +1702 -0
- compute_api_client/api/teams_api.py +692 -0
- compute_api_client/api/transactions_api.py +805 -0
- compute_api_client/api/users_api.py +1305 -0
- compute_api_client/api_client.py +804 -0
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +606 -0
- compute_api_client/docs/Algorithm.md +34 -0
- compute_api_client/docs/AlgorithmIn.md +33 -0
- compute_api_client/docs/AlgorithmType.md +12 -0
- compute_api_client/docs/AlgorithmsApi.md +428 -0
- compute_api_client/docs/AuthConfig.md +31 -0
- compute_api_client/docs/AuthConfigApi.md +71 -0
- compute_api_client/docs/Backend.md +35 -0
- compute_api_client/docs/BackendApi.md +418 -0
- compute_api_client/docs/BackendIn.md +34 -0
- compute_api_client/docs/BackendMessage.md +29 -0
- compute_api_client/docs/BackendPatch.md +31 -0
- compute_api_client/docs/BackendStatus.md +16 -0
- compute_api_client/docs/BackendType.md +48 -0
- compute_api_client/docs/BackendTypePatch.md +45 -0
- compute_api_client/docs/BackendTypesApi.md +289 -0
- compute_api_client/docs/BackendWithAuthentication.md +36 -0
- compute_api_client/docs/BatchJob.md +39 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/BatchJobStatus.md +18 -0
- compute_api_client/docs/BatchJobsApi.md +600 -0
- compute_api_client/docs/Commit.md +33 -0
- compute_api_client/docs/CommitIn.md +30 -0
- compute_api_client/docs/CommitsApi.md +425 -0
- compute_api_client/docs/CompilePayload.md +30 -0
- compute_api_client/docs/CompileStage.md +18 -0
- compute_api_client/docs/Domain.md +14 -0
- compute_api_client/docs/File.md +36 -0
- compute_api_client/docs/FileIn.md +35 -0
- compute_api_client/docs/FilesApi.md +346 -0
- compute_api_client/docs/FinalResult.md +32 -0
- compute_api_client/docs/FinalResultIn.md +30 -0
- compute_api_client/docs/FinalResultsApi.md +248 -0
- compute_api_client/docs/HTTPBadRequestError.md +29 -0
- compute_api_client/docs/HTTPNotFoundError.md +29 -0
- compute_api_client/docs/HTTPValidationError.md +29 -0
- compute_api_client/docs/HealthApi.md +72 -0
- compute_api_client/docs/Job.md +42 -0
- compute_api_client/docs/JobIn.md +32 -0
- compute_api_client/docs/JobPatch.md +34 -0
- compute_api_client/docs/JobStatus.md +18 -0
- compute_api_client/docs/JobsApi.md +460 -0
- compute_api_client/docs/Language.md +31 -0
- compute_api_client/docs/LanguagesApi.md +177 -0
- compute_api_client/docs/LocationInner.md +27 -0
- compute_api_client/docs/Member.md +33 -0
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +32 -0
- compute_api_client/docs/MembersApi.md +331 -0
- compute_api_client/docs/PageAlgorithm.md +33 -0
- compute_api_client/docs/PageBackend.md +33 -0
- compute_api_client/docs/PageBackendType.md +33 -0
- compute_api_client/docs/PageBatchJob.md +33 -0
- compute_api_client/docs/PageCommit.md +33 -0
- compute_api_client/docs/PageFile.md +33 -0
- compute_api_client/docs/PageJob.md +33 -0
- compute_api_client/docs/PageLanguage.md +33 -0
- compute_api_client/docs/PageMember.md +33 -0
- compute_api_client/docs/PageMetadata.md +32 -0
- compute_api_client/docs/PagePermission.md +33 -0
- compute_api_client/docs/PagePermissionGroup.md +33 -0
- compute_api_client/docs/PageProject.md +33 -0
- compute_api_client/docs/PageReservation.md +33 -0
- compute_api_client/docs/PageResult.md +33 -0
- compute_api_client/docs/PageTeam.md +33 -0
- compute_api_client/docs/PageTransaction.md +33 -0
- compute_api_client/docs/PageUser.md +33 -0
- compute_api_client/docs/Permission.md +31 -0
- compute_api_client/docs/PermissionGroup.md +30 -0
- compute_api_client/docs/PermissionsApi.md +340 -0
- compute_api_client/docs/Project.md +34 -0
- compute_api_client/docs/ProjectIn.md +32 -0
- compute_api_client/docs/ProjectPatch.md +32 -0
- compute_api_client/docs/ProjectsApi.md +502 -0
- compute_api_client/docs/Reservation.md +35 -0
- compute_api_client/docs/ReservationIn.md +32 -0
- compute_api_client/docs/ReservationsApi.md +341 -0
- compute_api_client/docs/Result.md +36 -0
- compute_api_client/docs/ResultIn.md +34 -0
- compute_api_client/docs/ResultsApi.md +439 -0
- compute_api_client/docs/Role.md +12 -0
- compute_api_client/docs/ShareType.md +14 -0
- compute_api_client/docs/Team.md +32 -0
- compute_api_client/docs/TeamsApi.md +177 -0
- compute_api_client/docs/Transaction.md +35 -0
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +190 -0
- compute_api_client/docs/User.md +36 -0
- compute_api_client/docs/UserIn.md +35 -0
- compute_api_client/docs/UsersApi.md +338 -0
- compute_api_client/docs/ValidationError.md +31 -0
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +216 -0
- compute_api_client/models/__init__.py +84 -0
- compute_api_client/models/algorithm.py +105 -0
- compute_api_client/models/algorithm_in.py +103 -0
- compute_api_client/models/algorithm_type.py +37 -0
- compute_api_client/models/auth_config.py +91 -0
- compute_api_client/models/backend.py +106 -0
- compute_api_client/models/backend_in.py +104 -0
- compute_api_client/models/backend_message.py +87 -0
- compute_api_client/models/backend_patch.py +112 -0
- compute_api_client/models/backend_status.py +39 -0
- compute_api_client/models/backend_type.py +145 -0
- compute_api_client/models/backend_type_patch.py +205 -0
- compute_api_client/models/backend_with_authentication.py +108 -0
- compute_api_client/models/batch_job.py +130 -0
- compute_api_client/models/batch_job_in.py +87 -0
- compute_api_client/models/batch_job_status.py +40 -0
- compute_api_client/models/commit.py +97 -0
- compute_api_client/models/commit_in.py +89 -0
- compute_api_client/models/compile_payload.py +95 -0
- compute_api_client/models/compile_stage.py +40 -0
- compute_api_client/models/domain.py +38 -0
- compute_api_client/models/file.py +108 -0
- compute_api_client/models/file_in.py +106 -0
- compute_api_client/models/final_result.py +94 -0
- compute_api_client/models/final_result_in.py +89 -0
- compute_api_client/models/http_bad_request_error.py +87 -0
- compute_api_client/models/http_not_found_error.py +87 -0
- compute_api_client/models/http_validation_error.py +95 -0
- compute_api_client/models/job.py +131 -0
- compute_api_client/models/job_in.py +98 -0
- compute_api_client/models/job_patch.py +99 -0
- compute_api_client/models/job_status.py +40 -0
- compute_api_client/models/language.py +92 -0
- compute_api_client/models/location_inner.py +144 -0
- compute_api_client/models/member.py +96 -0
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +94 -0
- compute_api_client/models/metadata.py +93 -0
- compute_api_client/models/metadata_in.py +94 -0
- compute_api_client/models/page_algorithm.py +104 -0
- compute_api_client/models/page_backend.py +104 -0
- compute_api_client/models/page_backend_type.py +104 -0
- compute_api_client/models/page_batch_job.py +104 -0
- compute_api_client/models/page_commit.py +104 -0
- compute_api_client/models/page_file.py +104 -0
- compute_api_client/models/page_job.py +104 -0
- compute_api_client/models/page_language.py +104 -0
- compute_api_client/models/page_member.py +104 -0
- compute_api_client/models/page_metadata.py +125 -0
- compute_api_client/models/page_permission.py +104 -0
- compute_api_client/models/page_permission_group.py +104 -0
- compute_api_client/models/page_project.py +104 -0
- compute_api_client/models/page_reservation.py +104 -0
- compute_api_client/models/page_result.py +104 -0
- compute_api_client/models/page_team.py +104 -0
- compute_api_client/models/page_transaction.py +104 -0
- compute_api_client/models/page_user.py +104 -0
- compute_api_client/models/permission.py +92 -0
- compute_api_client/models/permission_group.py +90 -0
- compute_api_client/models/project.py +99 -0
- compute_api_client/models/project_in.py +94 -0
- compute_api_client/models/project_patch.py +114 -0
- compute_api_client/models/reservation.py +105 -0
- compute_api_client/models/reservation_in.py +94 -0
- compute_api_client/models/result.py +122 -0
- compute_api_client/models/result_in.py +117 -0
- compute_api_client/models/role.py +37 -0
- compute_api_client/models/share_type.py +38 -0
- compute_api_client/models/team.py +94 -0
- compute_api_client/models/transaction.py +117 -0
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +102 -0
- compute_api_client/models/user_in.py +100 -0
- compute_api_client/models/validation_error.py +99 -0
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +213 -0
- qi2_shared/__init__.py +0 -0
- qi2_shared/authentication.py +66 -0
- qi2_shared/client.py +52 -0
- qi2_shared/hybrid/__init__.py +0 -0
- qi2_shared/hybrid/quantum_interface.py +45 -0
- qi2_shared/pagination.py +44 -0
- qi2_shared/settings.py +68 -0
- qi2_shared/utils.py +13 -0
- qi_compute_api_client-0.56.0.dist-info/METADATA +266 -0
- qi_compute_api_client-0.56.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.56.0.dist-info/WHEEL +4 -0
- qi_compute_api_client-0.56.0.dist-info/licenses/LICENSE.md +142 -0
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Quantum Inspire 2
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import io
|
|
16
|
+
import warnings
|
|
17
|
+
|
|
18
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
19
|
+
from typing import Dict, List, Optional, Tuple, Union, Any
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
from typing import Annotated
|
|
23
|
+
except ImportError:
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
|
|
26
|
+
from pydantic import Field
|
|
27
|
+
from typing_extensions import Annotated
|
|
28
|
+
from pydantic import StrictBool, StrictInt, StrictStr
|
|
29
|
+
|
|
30
|
+
from typing import Optional
|
|
31
|
+
|
|
32
|
+
from compute_api_client.models.metadata import Metadata
|
|
33
|
+
from compute_api_client.models.metadata_in import MetadataIn
|
|
34
|
+
from compute_api_client.models.page_metadata import PageMetadata
|
|
35
|
+
|
|
36
|
+
from compute_api_client.api_client import ApiClient
|
|
37
|
+
from compute_api_client.api_response import ApiResponse
|
|
38
|
+
from compute_api_client.rest import RESTResponseType
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class MetadataApi:
|
|
42
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
43
|
+
Ref: https://openapi-generator.tech
|
|
44
|
+
|
|
45
|
+
Do not edit the class manually.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(self, api_client=None) -> None:
|
|
49
|
+
if api_client is None:
|
|
50
|
+
api_client = ApiClient.get_default()
|
|
51
|
+
self.api_client = api_client
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@validate_call
|
|
55
|
+
async def create_metadata_self_metadata_post(
|
|
56
|
+
self,
|
|
57
|
+
metadata_in: MetadataIn,
|
|
58
|
+
_request_timeout: Union[
|
|
59
|
+
None,
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
+
Tuple[
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
64
|
+
]
|
|
65
|
+
] = None,
|
|
66
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
67
|
+
_content_type: Optional[StrictStr] = None,
|
|
68
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
69
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
70
|
+
) -> Metadata:
|
|
71
|
+
"""Create metadata
|
|
72
|
+
|
|
73
|
+
Create new metadata.
|
|
74
|
+
|
|
75
|
+
:param metadata_in: (required)
|
|
76
|
+
:type metadata_in: MetadataIn
|
|
77
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
78
|
+
number provided, it will be total request
|
|
79
|
+
timeout. It can also be a pair (tuple) of
|
|
80
|
+
(connection, read) timeouts.
|
|
81
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
82
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
83
|
+
request; this effectively ignores the
|
|
84
|
+
authentication in the spec for a single request.
|
|
85
|
+
:type _request_auth: dict, optional
|
|
86
|
+
:param _content_type: force content-type for the request.
|
|
87
|
+
:type _content_type: str, Optional
|
|
88
|
+
:param _headers: set to override the headers for a single
|
|
89
|
+
request; this effectively ignores the headers
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _headers: dict, optional
|
|
92
|
+
:param _host_index: set to override the host_index for a single
|
|
93
|
+
request; this effectively ignores the host_index
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _host_index: int, optional
|
|
96
|
+
:return: Returns the result object.
|
|
97
|
+
""" # noqa: E501
|
|
98
|
+
|
|
99
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
100
|
+
metadata_in=metadata_in,
|
|
101
|
+
_request_auth=_request_auth,
|
|
102
|
+
_content_type=_content_type,
|
|
103
|
+
_headers=_headers,
|
|
104
|
+
_host_index=_host_index
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
108
|
+
'201': "Metadata",
|
|
109
|
+
'422': "HTTPValidationError"
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
response_data = await self.api_client.call_api(
|
|
113
|
+
*_param,
|
|
114
|
+
_request_timeout=_request_timeout
|
|
115
|
+
)
|
|
116
|
+
await response_data.read()
|
|
117
|
+
return self.api_client.response_deserialize(
|
|
118
|
+
response_data=response_data,
|
|
119
|
+
response_types_map=_response_types_map,
|
|
120
|
+
).data
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@validate_call
|
|
124
|
+
async def create_metadata_self_metadata_post_with_http_info(
|
|
125
|
+
self,
|
|
126
|
+
metadata_in: MetadataIn,
|
|
127
|
+
_request_timeout: Union[
|
|
128
|
+
None,
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Tuple[
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
133
|
+
]
|
|
134
|
+
] = None,
|
|
135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_content_type: Optional[StrictStr] = None,
|
|
137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
139
|
+
) -> ApiResponse[Metadata]:
|
|
140
|
+
"""Create metadata
|
|
141
|
+
|
|
142
|
+
Create new metadata.
|
|
143
|
+
|
|
144
|
+
:param metadata_in: (required)
|
|
145
|
+
:type metadata_in: MetadataIn
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
169
|
+
metadata_in=metadata_in,
|
|
170
|
+
_request_auth=_request_auth,
|
|
171
|
+
_content_type=_content_type,
|
|
172
|
+
_headers=_headers,
|
|
173
|
+
_host_index=_host_index
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
177
|
+
'201': "Metadata",
|
|
178
|
+
'422': "HTTPValidationError"
|
|
179
|
+
|
|
180
|
+
}
|
|
181
|
+
response_data = await self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
await response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
async def create_metadata_self_metadata_post_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
metadata_in: MetadataIn,
|
|
196
|
+
_request_timeout: Union[
|
|
197
|
+
None,
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Tuple[
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
202
|
+
]
|
|
203
|
+
] = None,
|
|
204
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_content_type: Optional[StrictStr] = None,
|
|
206
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
208
|
+
) -> RESTResponseType:
|
|
209
|
+
"""Create metadata
|
|
210
|
+
|
|
211
|
+
Create new metadata.
|
|
212
|
+
|
|
213
|
+
:param metadata_in: (required)
|
|
214
|
+
:type metadata_in: MetadataIn
|
|
215
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
216
|
+
number provided, it will be total request
|
|
217
|
+
timeout. It can also be a pair (tuple) of
|
|
218
|
+
(connection, read) timeouts.
|
|
219
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
220
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
221
|
+
request; this effectively ignores the
|
|
222
|
+
authentication in the spec for a single request.
|
|
223
|
+
:type _request_auth: dict, optional
|
|
224
|
+
:param _content_type: force content-type for the request.
|
|
225
|
+
:type _content_type: str, Optional
|
|
226
|
+
:param _headers: set to override the headers for a single
|
|
227
|
+
request; this effectively ignores the headers
|
|
228
|
+
in the spec for a single request.
|
|
229
|
+
:type _headers: dict, optional
|
|
230
|
+
:param _host_index: set to override the host_index for a single
|
|
231
|
+
request; this effectively ignores the host_index
|
|
232
|
+
in the spec for a single request.
|
|
233
|
+
:type _host_index: int, optional
|
|
234
|
+
:return: Returns the result object.
|
|
235
|
+
""" # noqa: E501
|
|
236
|
+
|
|
237
|
+
_param = self._create_metadata_self_metadata_post_serialize(
|
|
238
|
+
metadata_in=metadata_in,
|
|
239
|
+
_request_auth=_request_auth,
|
|
240
|
+
_content_type=_content_type,
|
|
241
|
+
_headers=_headers,
|
|
242
|
+
_host_index=_host_index
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
246
|
+
'201': "Metadata",
|
|
247
|
+
'422': "HTTPValidationError"
|
|
248
|
+
|
|
249
|
+
}
|
|
250
|
+
response_data = await self.api_client.call_api(
|
|
251
|
+
*_param,
|
|
252
|
+
_request_timeout=_request_timeout
|
|
253
|
+
)
|
|
254
|
+
return response_data.response
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _create_metadata_self_metadata_post_serialize(
|
|
258
|
+
self,
|
|
259
|
+
metadata_in,
|
|
260
|
+
_request_auth,
|
|
261
|
+
_content_type,
|
|
262
|
+
_headers,
|
|
263
|
+
_host_index,
|
|
264
|
+
) -> Tuple:
|
|
265
|
+
|
|
266
|
+
_host = None
|
|
267
|
+
|
|
268
|
+
_collection_formats: Dict[str, str] = {
|
|
269
|
+
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
_path_params: Dict[str, str] = {}
|
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
|
276
|
+
_files: Dict[str, str] = {}
|
|
277
|
+
_body_params: Optional[bytes] = None
|
|
278
|
+
|
|
279
|
+
# process the path parameters
|
|
280
|
+
# process the query parameters
|
|
281
|
+
# process the header parameters
|
|
282
|
+
# process the form parameters
|
|
283
|
+
# process the body parameter
|
|
284
|
+
if metadata_in is not None:
|
|
285
|
+
_body_params = metadata_in
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Accept`
|
|
289
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
290
|
+
[
|
|
291
|
+
'application/json'
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# set the HTTP header `Content-Type`
|
|
296
|
+
if _content_type:
|
|
297
|
+
_header_params['Content-Type'] = _content_type
|
|
298
|
+
else:
|
|
299
|
+
_default_content_type = (
|
|
300
|
+
self.api_client.select_header_content_type(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
if _default_content_type is not None:
|
|
307
|
+
_header_params['Content-Type'] = _default_content_type
|
|
308
|
+
|
|
309
|
+
# authentication setting
|
|
310
|
+
_auth_settings: List[str] = [
|
|
311
|
+
'backend'
|
|
312
|
+
]
|
|
313
|
+
|
|
314
|
+
return self.api_client.param_serialize(
|
|
315
|
+
method='POST',
|
|
316
|
+
resource_path='/metadata',
|
|
317
|
+
path_params=_path_params,
|
|
318
|
+
query_params=_query_params,
|
|
319
|
+
header_params=_header_params,
|
|
320
|
+
body=_body_params,
|
|
321
|
+
post_params=_form_params,
|
|
322
|
+
files=_files,
|
|
323
|
+
auth_settings=_auth_settings,
|
|
324
|
+
collection_formats=_collection_formats,
|
|
325
|
+
_host=_host,
|
|
326
|
+
_request_auth=_request_auth
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@validate_call
|
|
333
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get(
|
|
334
|
+
self,
|
|
335
|
+
backend_id: StrictInt,
|
|
336
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
337
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
338
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
339
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
340
|
+
_request_timeout: Union[
|
|
341
|
+
None,
|
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
343
|
+
Tuple[
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
346
|
+
]
|
|
347
|
+
] = None,
|
|
348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
349
|
+
_content_type: Optional[StrictStr] = None,
|
|
350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
352
|
+
) -> PageMetadata:
|
|
353
|
+
"""Retrieve metadata by backend ID
|
|
354
|
+
|
|
355
|
+
Get metadata by job ID.
|
|
356
|
+
|
|
357
|
+
:param backend_id: (required)
|
|
358
|
+
:type backend_id: int
|
|
359
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
360
|
+
:type sort_by: str
|
|
361
|
+
:param latest: If True gets the most recently created object.
|
|
362
|
+
:type latest: bool
|
|
363
|
+
:param page: Page number
|
|
364
|
+
:type page: int
|
|
365
|
+
:param size: Page size
|
|
366
|
+
:type size: int
|
|
367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
+
number provided, it will be total request
|
|
369
|
+
timeout. It can also be a pair (tuple) of
|
|
370
|
+
(connection, read) timeouts.
|
|
371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
+
request; this effectively ignores the
|
|
374
|
+
authentication in the spec for a single request.
|
|
375
|
+
:type _request_auth: dict, optional
|
|
376
|
+
:param _content_type: force content-type for the request.
|
|
377
|
+
:type _content_type: str, Optional
|
|
378
|
+
:param _headers: set to override the headers for a single
|
|
379
|
+
request; this effectively ignores the headers
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _headers: dict, optional
|
|
382
|
+
:param _host_index: set to override the host_index for a single
|
|
383
|
+
request; this effectively ignores the host_index
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _host_index: int, optional
|
|
386
|
+
:return: Returns the result object.
|
|
387
|
+
""" # noqa: E501
|
|
388
|
+
|
|
389
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
390
|
+
backend_id=backend_id,
|
|
391
|
+
sort_by=sort_by,
|
|
392
|
+
latest=latest,
|
|
393
|
+
page=page,
|
|
394
|
+
size=size,
|
|
395
|
+
_request_auth=_request_auth,
|
|
396
|
+
_content_type=_content_type,
|
|
397
|
+
_headers=_headers,
|
|
398
|
+
_host_index=_host_index
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
402
|
+
'200': "PageMetadata",
|
|
403
|
+
'422': "HTTPValidationError"
|
|
404
|
+
|
|
405
|
+
}
|
|
406
|
+
response_data = await self.api_client.call_api(
|
|
407
|
+
*_param,
|
|
408
|
+
_request_timeout=_request_timeout
|
|
409
|
+
)
|
|
410
|
+
await response_data.read()
|
|
411
|
+
return self.api_client.response_deserialize(
|
|
412
|
+
response_data=response_data,
|
|
413
|
+
response_types_map=_response_types_map,
|
|
414
|
+
).data
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
@validate_call
|
|
418
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get_with_http_info(
|
|
419
|
+
self,
|
|
420
|
+
backend_id: StrictInt,
|
|
421
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
422
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
423
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
424
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
425
|
+
_request_timeout: Union[
|
|
426
|
+
None,
|
|
427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
428
|
+
Tuple[
|
|
429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
431
|
+
]
|
|
432
|
+
] = None,
|
|
433
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
434
|
+
_content_type: Optional[StrictStr] = None,
|
|
435
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
436
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
437
|
+
) -> ApiResponse[PageMetadata]:
|
|
438
|
+
"""Retrieve metadata by backend ID
|
|
439
|
+
|
|
440
|
+
Get metadata by job ID.
|
|
441
|
+
|
|
442
|
+
:param backend_id: (required)
|
|
443
|
+
:type backend_id: int
|
|
444
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
445
|
+
:type sort_by: str
|
|
446
|
+
:param latest: If True gets the most recently created object.
|
|
447
|
+
:type latest: bool
|
|
448
|
+
:param page: Page number
|
|
449
|
+
:type page: int
|
|
450
|
+
:param size: Page size
|
|
451
|
+
:type size: int
|
|
452
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
453
|
+
number provided, it will be total request
|
|
454
|
+
timeout. It can also be a pair (tuple) of
|
|
455
|
+
(connection, read) timeouts.
|
|
456
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
457
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
458
|
+
request; this effectively ignores the
|
|
459
|
+
authentication in the spec for a single request.
|
|
460
|
+
:type _request_auth: dict, optional
|
|
461
|
+
:param _content_type: force content-type for the request.
|
|
462
|
+
:type _content_type: str, Optional
|
|
463
|
+
:param _headers: set to override the headers for a single
|
|
464
|
+
request; this effectively ignores the headers
|
|
465
|
+
in the spec for a single request.
|
|
466
|
+
:type _headers: dict, optional
|
|
467
|
+
:param _host_index: set to override the host_index for a single
|
|
468
|
+
request; this effectively ignores the host_index
|
|
469
|
+
in the spec for a single request.
|
|
470
|
+
:type _host_index: int, optional
|
|
471
|
+
:return: Returns the result object.
|
|
472
|
+
""" # noqa: E501
|
|
473
|
+
|
|
474
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
475
|
+
backend_id=backend_id,
|
|
476
|
+
sort_by=sort_by,
|
|
477
|
+
latest=latest,
|
|
478
|
+
page=page,
|
|
479
|
+
size=size,
|
|
480
|
+
_request_auth=_request_auth,
|
|
481
|
+
_content_type=_content_type,
|
|
482
|
+
_headers=_headers,
|
|
483
|
+
_host_index=_host_index
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
487
|
+
'200': "PageMetadata",
|
|
488
|
+
'422': "HTTPValidationError"
|
|
489
|
+
|
|
490
|
+
}
|
|
491
|
+
response_data = await self.api_client.call_api(
|
|
492
|
+
*_param,
|
|
493
|
+
_request_timeout=_request_timeout
|
|
494
|
+
)
|
|
495
|
+
await response_data.read()
|
|
496
|
+
return self.api_client.response_deserialize(
|
|
497
|
+
response_data=response_data,
|
|
498
|
+
response_types_map=_response_types_map,
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
@validate_call
|
|
503
|
+
async def read_metadata_by_backend_id_metadata_backend_backend_id_get_without_preload_content(
|
|
504
|
+
self,
|
|
505
|
+
backend_id: StrictInt,
|
|
506
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
507
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
508
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
509
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
510
|
+
_request_timeout: Union[
|
|
511
|
+
None,
|
|
512
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
513
|
+
Tuple[
|
|
514
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
515
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
516
|
+
]
|
|
517
|
+
] = None,
|
|
518
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
519
|
+
_content_type: Optional[StrictStr] = None,
|
|
520
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
521
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
522
|
+
) -> RESTResponseType:
|
|
523
|
+
"""Retrieve metadata by backend ID
|
|
524
|
+
|
|
525
|
+
Get metadata by job ID.
|
|
526
|
+
|
|
527
|
+
:param backend_id: (required)
|
|
528
|
+
:type backend_id: int
|
|
529
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
530
|
+
:type sort_by: str
|
|
531
|
+
:param latest: If True gets the most recently created object.
|
|
532
|
+
:type latest: bool
|
|
533
|
+
:param page: Page number
|
|
534
|
+
:type page: int
|
|
535
|
+
:param size: Page size
|
|
536
|
+
:type size: int
|
|
537
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
538
|
+
number provided, it will be total request
|
|
539
|
+
timeout. It can also be a pair (tuple) of
|
|
540
|
+
(connection, read) timeouts.
|
|
541
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
542
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
543
|
+
request; this effectively ignores the
|
|
544
|
+
authentication in the spec for a single request.
|
|
545
|
+
:type _request_auth: dict, optional
|
|
546
|
+
:param _content_type: force content-type for the request.
|
|
547
|
+
:type _content_type: str, Optional
|
|
548
|
+
:param _headers: set to override the headers for a single
|
|
549
|
+
request; this effectively ignores the headers
|
|
550
|
+
in the spec for a single request.
|
|
551
|
+
:type _headers: dict, optional
|
|
552
|
+
:param _host_index: set to override the host_index for a single
|
|
553
|
+
request; this effectively ignores the host_index
|
|
554
|
+
in the spec for a single request.
|
|
555
|
+
:type _host_index: int, optional
|
|
556
|
+
:return: Returns the result object.
|
|
557
|
+
""" # noqa: E501
|
|
558
|
+
|
|
559
|
+
_param = self._read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
560
|
+
backend_id=backend_id,
|
|
561
|
+
sort_by=sort_by,
|
|
562
|
+
latest=latest,
|
|
563
|
+
page=page,
|
|
564
|
+
size=size,
|
|
565
|
+
_request_auth=_request_auth,
|
|
566
|
+
_content_type=_content_type,
|
|
567
|
+
_headers=_headers,
|
|
568
|
+
_host_index=_host_index
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
572
|
+
'200': "PageMetadata",
|
|
573
|
+
'422': "HTTPValidationError"
|
|
574
|
+
|
|
575
|
+
}
|
|
576
|
+
response_data = await self.api_client.call_api(
|
|
577
|
+
*_param,
|
|
578
|
+
_request_timeout=_request_timeout
|
|
579
|
+
)
|
|
580
|
+
return response_data.response
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def _read_metadata_by_backend_id_metadata_backend_backend_id_get_serialize(
|
|
584
|
+
self,
|
|
585
|
+
backend_id,
|
|
586
|
+
sort_by,
|
|
587
|
+
latest,
|
|
588
|
+
page,
|
|
589
|
+
size,
|
|
590
|
+
_request_auth,
|
|
591
|
+
_content_type,
|
|
592
|
+
_headers,
|
|
593
|
+
_host_index,
|
|
594
|
+
) -> Tuple:
|
|
595
|
+
|
|
596
|
+
_host = None
|
|
597
|
+
|
|
598
|
+
_collection_formats: Dict[str, str] = {
|
|
599
|
+
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
_path_params: Dict[str, str] = {}
|
|
603
|
+
_query_params: List[Tuple[str, str]] = []
|
|
604
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
605
|
+
_form_params: List[Tuple[str, str]] = []
|
|
606
|
+
_files: Dict[str, str] = {}
|
|
607
|
+
_body_params: Optional[bytes] = None
|
|
608
|
+
|
|
609
|
+
# process the path parameters
|
|
610
|
+
if backend_id is not None:
|
|
611
|
+
_path_params['backend_id'] = backend_id
|
|
612
|
+
# process the query parameters
|
|
613
|
+
if sort_by is not None:
|
|
614
|
+
|
|
615
|
+
_query_params.append(('sort_by', sort_by))
|
|
616
|
+
|
|
617
|
+
if latest is not None:
|
|
618
|
+
|
|
619
|
+
_query_params.append(('latest', latest))
|
|
620
|
+
|
|
621
|
+
if page is not None:
|
|
622
|
+
|
|
623
|
+
_query_params.append(('page', page))
|
|
624
|
+
|
|
625
|
+
if size is not None:
|
|
626
|
+
|
|
627
|
+
_query_params.append(('size', size))
|
|
628
|
+
|
|
629
|
+
# process the header parameters
|
|
630
|
+
# process the form parameters
|
|
631
|
+
# process the body parameter
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
# set the HTTP header `Accept`
|
|
635
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
636
|
+
[
|
|
637
|
+
'application/json'
|
|
638
|
+
]
|
|
639
|
+
)
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
# authentication setting
|
|
643
|
+
_auth_settings: List[str] = [
|
|
644
|
+
'user_bearer'
|
|
645
|
+
]
|
|
646
|
+
|
|
647
|
+
return self.api_client.param_serialize(
|
|
648
|
+
method='GET',
|
|
649
|
+
resource_path='/metadata/backend/{backend_id}',
|
|
650
|
+
path_params=_path_params,
|
|
651
|
+
query_params=_query_params,
|
|
652
|
+
header_params=_header_params,
|
|
653
|
+
body=_body_params,
|
|
654
|
+
post_params=_form_params,
|
|
655
|
+
files=_files,
|
|
656
|
+
auth_settings=_auth_settings,
|
|
657
|
+
collection_formats=_collection_formats,
|
|
658
|
+
_host=_host,
|
|
659
|
+
_request_auth=_request_auth
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
@validate_call
|
|
666
|
+
async def read_metadata_metadata_id_get(
|
|
667
|
+
self,
|
|
668
|
+
id: StrictInt,
|
|
669
|
+
_request_timeout: Union[
|
|
670
|
+
None,
|
|
671
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
672
|
+
Tuple[
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
675
|
+
]
|
|
676
|
+
] = None,
|
|
677
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
678
|
+
_content_type: Optional[StrictStr] = None,
|
|
679
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
681
|
+
) -> Metadata:
|
|
682
|
+
"""Get metadata by ID
|
|
683
|
+
|
|
684
|
+
Get metadata by ID.
|
|
685
|
+
|
|
686
|
+
:param id: (required)
|
|
687
|
+
:type id: int
|
|
688
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
689
|
+
number provided, it will be total request
|
|
690
|
+
timeout. It can also be a pair (tuple) of
|
|
691
|
+
(connection, read) timeouts.
|
|
692
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
693
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
694
|
+
request; this effectively ignores the
|
|
695
|
+
authentication in the spec for a single request.
|
|
696
|
+
:type _request_auth: dict, optional
|
|
697
|
+
:param _content_type: force content-type for the request.
|
|
698
|
+
:type _content_type: str, Optional
|
|
699
|
+
:param _headers: set to override the headers for a single
|
|
700
|
+
request; this effectively ignores the headers
|
|
701
|
+
in the spec for a single request.
|
|
702
|
+
:type _headers: dict, optional
|
|
703
|
+
:param _host_index: set to override the host_index for a single
|
|
704
|
+
request; this effectively ignores the host_index
|
|
705
|
+
in the spec for a single request.
|
|
706
|
+
:type _host_index: int, optional
|
|
707
|
+
:return: Returns the result object.
|
|
708
|
+
""" # noqa: E501
|
|
709
|
+
|
|
710
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
711
|
+
id=id,
|
|
712
|
+
_request_auth=_request_auth,
|
|
713
|
+
_content_type=_content_type,
|
|
714
|
+
_headers=_headers,
|
|
715
|
+
_host_index=_host_index
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
719
|
+
'200': "Metadata",
|
|
720
|
+
'404': "HTTPNotFoundError",
|
|
721
|
+
'422': "HTTPValidationError"
|
|
722
|
+
|
|
723
|
+
}
|
|
724
|
+
response_data = await self.api_client.call_api(
|
|
725
|
+
*_param,
|
|
726
|
+
_request_timeout=_request_timeout
|
|
727
|
+
)
|
|
728
|
+
await response_data.read()
|
|
729
|
+
return self.api_client.response_deserialize(
|
|
730
|
+
response_data=response_data,
|
|
731
|
+
response_types_map=_response_types_map,
|
|
732
|
+
).data
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
@validate_call
|
|
736
|
+
async def read_metadata_metadata_id_get_with_http_info(
|
|
737
|
+
self,
|
|
738
|
+
id: StrictInt,
|
|
739
|
+
_request_timeout: Union[
|
|
740
|
+
None,
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Tuple[
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
744
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
745
|
+
]
|
|
746
|
+
] = None,
|
|
747
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
748
|
+
_content_type: Optional[StrictStr] = None,
|
|
749
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
750
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
751
|
+
) -> ApiResponse[Metadata]:
|
|
752
|
+
"""Get metadata by ID
|
|
753
|
+
|
|
754
|
+
Get metadata by ID.
|
|
755
|
+
|
|
756
|
+
:param id: (required)
|
|
757
|
+
:type id: int
|
|
758
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
759
|
+
number provided, it will be total request
|
|
760
|
+
timeout. It can also be a pair (tuple) of
|
|
761
|
+
(connection, read) timeouts.
|
|
762
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
763
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
764
|
+
request; this effectively ignores the
|
|
765
|
+
authentication in the spec for a single request.
|
|
766
|
+
:type _request_auth: dict, optional
|
|
767
|
+
:param _content_type: force content-type for the request.
|
|
768
|
+
:type _content_type: str, Optional
|
|
769
|
+
:param _headers: set to override the headers for a single
|
|
770
|
+
request; this effectively ignores the headers
|
|
771
|
+
in the spec for a single request.
|
|
772
|
+
:type _headers: dict, optional
|
|
773
|
+
:param _host_index: set to override the host_index for a single
|
|
774
|
+
request; this effectively ignores the host_index
|
|
775
|
+
in the spec for a single request.
|
|
776
|
+
:type _host_index: int, optional
|
|
777
|
+
:return: Returns the result object.
|
|
778
|
+
""" # noqa: E501
|
|
779
|
+
|
|
780
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
781
|
+
id=id,
|
|
782
|
+
_request_auth=_request_auth,
|
|
783
|
+
_content_type=_content_type,
|
|
784
|
+
_headers=_headers,
|
|
785
|
+
_host_index=_host_index
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
789
|
+
'200': "Metadata",
|
|
790
|
+
'404': "HTTPNotFoundError",
|
|
791
|
+
'422': "HTTPValidationError"
|
|
792
|
+
|
|
793
|
+
}
|
|
794
|
+
response_data = await self.api_client.call_api(
|
|
795
|
+
*_param,
|
|
796
|
+
_request_timeout=_request_timeout
|
|
797
|
+
)
|
|
798
|
+
await response_data.read()
|
|
799
|
+
return self.api_client.response_deserialize(
|
|
800
|
+
response_data=response_data,
|
|
801
|
+
response_types_map=_response_types_map,
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
@validate_call
|
|
806
|
+
async def read_metadata_metadata_id_get_without_preload_content(
|
|
807
|
+
self,
|
|
808
|
+
id: StrictInt,
|
|
809
|
+
_request_timeout: Union[
|
|
810
|
+
None,
|
|
811
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
812
|
+
Tuple[
|
|
813
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
814
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
815
|
+
]
|
|
816
|
+
] = None,
|
|
817
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
818
|
+
_content_type: Optional[StrictStr] = None,
|
|
819
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
820
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
821
|
+
) -> RESTResponseType:
|
|
822
|
+
"""Get metadata by ID
|
|
823
|
+
|
|
824
|
+
Get metadata by ID.
|
|
825
|
+
|
|
826
|
+
:param id: (required)
|
|
827
|
+
:type id: int
|
|
828
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
829
|
+
number provided, it will be total request
|
|
830
|
+
timeout. It can also be a pair (tuple) of
|
|
831
|
+
(connection, read) timeouts.
|
|
832
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
833
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
834
|
+
request; this effectively ignores the
|
|
835
|
+
authentication in the spec for a single request.
|
|
836
|
+
:type _request_auth: dict, optional
|
|
837
|
+
:param _content_type: force content-type for the request.
|
|
838
|
+
:type _content_type: str, Optional
|
|
839
|
+
:param _headers: set to override the headers for a single
|
|
840
|
+
request; this effectively ignores the headers
|
|
841
|
+
in the spec for a single request.
|
|
842
|
+
:type _headers: dict, optional
|
|
843
|
+
:param _host_index: set to override the host_index for a single
|
|
844
|
+
request; this effectively ignores the host_index
|
|
845
|
+
in the spec for a single request.
|
|
846
|
+
:type _host_index: int, optional
|
|
847
|
+
:return: Returns the result object.
|
|
848
|
+
""" # noqa: E501
|
|
849
|
+
|
|
850
|
+
_param = self._read_metadata_metadata_id_get_serialize(
|
|
851
|
+
id=id,
|
|
852
|
+
_request_auth=_request_auth,
|
|
853
|
+
_content_type=_content_type,
|
|
854
|
+
_headers=_headers,
|
|
855
|
+
_host_index=_host_index
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
859
|
+
'200': "Metadata",
|
|
860
|
+
'404': "HTTPNotFoundError",
|
|
861
|
+
'422': "HTTPValidationError"
|
|
862
|
+
|
|
863
|
+
}
|
|
864
|
+
response_data = await self.api_client.call_api(
|
|
865
|
+
*_param,
|
|
866
|
+
_request_timeout=_request_timeout
|
|
867
|
+
)
|
|
868
|
+
return response_data.response
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
def _read_metadata_metadata_id_get_serialize(
|
|
872
|
+
self,
|
|
873
|
+
id,
|
|
874
|
+
_request_auth,
|
|
875
|
+
_content_type,
|
|
876
|
+
_headers,
|
|
877
|
+
_host_index,
|
|
878
|
+
) -> Tuple:
|
|
879
|
+
|
|
880
|
+
_host = None
|
|
881
|
+
|
|
882
|
+
_collection_formats: Dict[str, str] = {
|
|
883
|
+
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
_path_params: Dict[str, str] = {}
|
|
887
|
+
_query_params: List[Tuple[str, str]] = []
|
|
888
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
889
|
+
_form_params: List[Tuple[str, str]] = []
|
|
890
|
+
_files: Dict[str, str] = {}
|
|
891
|
+
_body_params: Optional[bytes] = None
|
|
892
|
+
|
|
893
|
+
# process the path parameters
|
|
894
|
+
if id is not None:
|
|
895
|
+
_path_params['id'] = id
|
|
896
|
+
# process the query parameters
|
|
897
|
+
# process the header parameters
|
|
898
|
+
# process the form parameters
|
|
899
|
+
# process the body parameter
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
# set the HTTP header `Accept`
|
|
903
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
904
|
+
[
|
|
905
|
+
'application/json'
|
|
906
|
+
]
|
|
907
|
+
)
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
# authentication setting
|
|
911
|
+
_auth_settings: List[str] = [
|
|
912
|
+
'user_bearer'
|
|
913
|
+
]
|
|
914
|
+
|
|
915
|
+
return self.api_client.param_serialize(
|
|
916
|
+
method='GET',
|
|
917
|
+
resource_path='/metadata/{id}',
|
|
918
|
+
path_params=_path_params,
|
|
919
|
+
query_params=_query_params,
|
|
920
|
+
header_params=_header_params,
|
|
921
|
+
body=_body_params,
|
|
922
|
+
post_params=_form_params,
|
|
923
|
+
files=_files,
|
|
924
|
+
auth_settings=_auth_settings,
|
|
925
|
+
collection_formats=_collection_formats,
|
|
926
|
+
_host=_host,
|
|
927
|
+
_request_auth=_request_auth
|
|
928
|
+
)
|
|
929
|
+
|
|
930
|
+
|