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,692 @@
|
|
|
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
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from compute_api_client.models.language import Language
|
|
23
|
+
from compute_api_client.models.page_language import PageLanguage
|
|
24
|
+
|
|
25
|
+
from compute_api_client.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from compute_api_client.api_response import ApiResponse
|
|
27
|
+
from compute_api_client.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class LanguagesApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
async def read_language_languages_id_get(
|
|
45
|
+
self,
|
|
46
|
+
id: StrictInt,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> Language:
|
|
60
|
+
"""Retrieve language
|
|
61
|
+
|
|
62
|
+
Get language by ID.
|
|
63
|
+
|
|
64
|
+
:param id: (required)
|
|
65
|
+
:type id: int
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._read_language_languages_id_get_serialize(
|
|
89
|
+
id=id,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'200': "Language",
|
|
98
|
+
'404': "HTTPNotFoundError",
|
|
99
|
+
'422': "HTTPValidationError",
|
|
100
|
+
}
|
|
101
|
+
response_data = await self.api_client.call_api(
|
|
102
|
+
*_param,
|
|
103
|
+
_request_timeout=_request_timeout
|
|
104
|
+
)
|
|
105
|
+
await response_data.read()
|
|
106
|
+
return self.api_client.response_deserialize(
|
|
107
|
+
response_data=response_data,
|
|
108
|
+
response_types_map=_response_types_map,
|
|
109
|
+
).data
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@validate_call
|
|
113
|
+
async def read_language_languages_id_get_with_http_info(
|
|
114
|
+
self,
|
|
115
|
+
id: StrictInt,
|
|
116
|
+
_request_timeout: Union[
|
|
117
|
+
None,
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Tuple[
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[Language]:
|
|
129
|
+
"""Retrieve language
|
|
130
|
+
|
|
131
|
+
Get language by ID.
|
|
132
|
+
|
|
133
|
+
:param id: (required)
|
|
134
|
+
:type id: int
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._read_language_languages_id_get_serialize(
|
|
158
|
+
id=id,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
'200': "Language",
|
|
167
|
+
'404': "HTTPNotFoundError",
|
|
168
|
+
'422': "HTTPValidationError",
|
|
169
|
+
}
|
|
170
|
+
response_data = await self.api_client.call_api(
|
|
171
|
+
*_param,
|
|
172
|
+
_request_timeout=_request_timeout
|
|
173
|
+
)
|
|
174
|
+
await response_data.read()
|
|
175
|
+
return self.api_client.response_deserialize(
|
|
176
|
+
response_data=response_data,
|
|
177
|
+
response_types_map=_response_types_map,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
@validate_call
|
|
182
|
+
async def read_language_languages_id_get_without_preload_content(
|
|
183
|
+
self,
|
|
184
|
+
id: StrictInt,
|
|
185
|
+
_request_timeout: Union[
|
|
186
|
+
None,
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Tuple[
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
191
|
+
]
|
|
192
|
+
] = None,
|
|
193
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_content_type: Optional[StrictStr] = None,
|
|
195
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
197
|
+
) -> RESTResponseType:
|
|
198
|
+
"""Retrieve language
|
|
199
|
+
|
|
200
|
+
Get language by ID.
|
|
201
|
+
|
|
202
|
+
:param id: (required)
|
|
203
|
+
:type id: int
|
|
204
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
205
|
+
number provided, it will be total request
|
|
206
|
+
timeout. It can also be a pair (tuple) of
|
|
207
|
+
(connection, read) timeouts.
|
|
208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
210
|
+
request; this effectively ignores the
|
|
211
|
+
authentication in the spec for a single request.
|
|
212
|
+
:type _request_auth: dict, optional
|
|
213
|
+
:param _content_type: force content-type for the request.
|
|
214
|
+
:type _content_type: str, Optional
|
|
215
|
+
:param _headers: set to override the headers for a single
|
|
216
|
+
request; this effectively ignores the headers
|
|
217
|
+
in the spec for a single request.
|
|
218
|
+
:type _headers: dict, optional
|
|
219
|
+
:param _host_index: set to override the host_index for a single
|
|
220
|
+
request; this effectively ignores the host_index
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _host_index: int, optional
|
|
223
|
+
:return: Returns the result object.
|
|
224
|
+
""" # noqa: E501
|
|
225
|
+
|
|
226
|
+
_param = self._read_language_languages_id_get_serialize(
|
|
227
|
+
id=id,
|
|
228
|
+
_request_auth=_request_auth,
|
|
229
|
+
_content_type=_content_type,
|
|
230
|
+
_headers=_headers,
|
|
231
|
+
_host_index=_host_index
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
235
|
+
'200': "Language",
|
|
236
|
+
'404': "HTTPNotFoundError",
|
|
237
|
+
'422': "HTTPValidationError",
|
|
238
|
+
}
|
|
239
|
+
response_data = await self.api_client.call_api(
|
|
240
|
+
*_param,
|
|
241
|
+
_request_timeout=_request_timeout
|
|
242
|
+
)
|
|
243
|
+
return response_data.response
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _read_language_languages_id_get_serialize(
|
|
247
|
+
self,
|
|
248
|
+
id,
|
|
249
|
+
_request_auth,
|
|
250
|
+
_content_type,
|
|
251
|
+
_headers,
|
|
252
|
+
_host_index,
|
|
253
|
+
) -> RequestSerialized:
|
|
254
|
+
|
|
255
|
+
_host = None
|
|
256
|
+
|
|
257
|
+
_collection_formats: Dict[str, str] = {
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
_path_params: Dict[str, str] = {}
|
|
261
|
+
_query_params: List[Tuple[str, str]] = []
|
|
262
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
263
|
+
_form_params: List[Tuple[str, str]] = []
|
|
264
|
+
_files: Dict[
|
|
265
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
266
|
+
] = {}
|
|
267
|
+
_body_params: Optional[bytes] = None
|
|
268
|
+
|
|
269
|
+
# process the path parameters
|
|
270
|
+
if id is not None:
|
|
271
|
+
_path_params['id'] = id
|
|
272
|
+
# process the query parameters
|
|
273
|
+
# process the header parameters
|
|
274
|
+
# process the form parameters
|
|
275
|
+
# process the body parameter
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# set the HTTP header `Accept`
|
|
279
|
+
if 'Accept' not in _header_params:
|
|
280
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
281
|
+
[
|
|
282
|
+
'application/json'
|
|
283
|
+
]
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
# authentication setting
|
|
288
|
+
_auth_settings: List[str] = [
|
|
289
|
+
'user_bearer'
|
|
290
|
+
]
|
|
291
|
+
|
|
292
|
+
return self.api_client.param_serialize(
|
|
293
|
+
method='GET',
|
|
294
|
+
resource_path='/languages/{id}',
|
|
295
|
+
path_params=_path_params,
|
|
296
|
+
query_params=_query_params,
|
|
297
|
+
header_params=_header_params,
|
|
298
|
+
body=_body_params,
|
|
299
|
+
post_params=_form_params,
|
|
300
|
+
files=_files,
|
|
301
|
+
auth_settings=_auth_settings,
|
|
302
|
+
collection_formats=_collection_formats,
|
|
303
|
+
_host=_host,
|
|
304
|
+
_request_auth=_request_auth
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
@validate_call
|
|
311
|
+
async def read_languages_languages_get(
|
|
312
|
+
self,
|
|
313
|
+
q: Optional[StrictStr] = None,
|
|
314
|
+
id: Optional[StrictInt] = None,
|
|
315
|
+
name: Optional[StrictStr] = None,
|
|
316
|
+
version: Optional[StrictStr] = None,
|
|
317
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
318
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
319
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
320
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
321
|
+
_request_timeout: Union[
|
|
322
|
+
None,
|
|
323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
324
|
+
Tuple[
|
|
325
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
326
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
327
|
+
]
|
|
328
|
+
] = None,
|
|
329
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
330
|
+
_content_type: Optional[StrictStr] = None,
|
|
331
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
332
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
333
|
+
) -> PageLanguage:
|
|
334
|
+
"""List languages
|
|
335
|
+
|
|
336
|
+
List languages.
|
|
337
|
+
|
|
338
|
+
:param q:
|
|
339
|
+
:type q: str
|
|
340
|
+
:param id:
|
|
341
|
+
:type id: int
|
|
342
|
+
:param name:
|
|
343
|
+
:type name: str
|
|
344
|
+
:param version:
|
|
345
|
+
:type version: str
|
|
346
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
347
|
+
:type sort_by: str
|
|
348
|
+
:param latest: If True gets the most recently created object.
|
|
349
|
+
:type latest: bool
|
|
350
|
+
:param page: Page number
|
|
351
|
+
:type page: int
|
|
352
|
+
:param size: Page size
|
|
353
|
+
:type size: int
|
|
354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
355
|
+
number provided, it will be total request
|
|
356
|
+
timeout. It can also be a pair (tuple) of
|
|
357
|
+
(connection, read) timeouts.
|
|
358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
360
|
+
request; this effectively ignores the
|
|
361
|
+
authentication in the spec for a single request.
|
|
362
|
+
:type _request_auth: dict, optional
|
|
363
|
+
:param _content_type: force content-type for the request.
|
|
364
|
+
:type _content_type: str, Optional
|
|
365
|
+
:param _headers: set to override the headers for a single
|
|
366
|
+
request; this effectively ignores the headers
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _headers: dict, optional
|
|
369
|
+
:param _host_index: set to override the host_index for a single
|
|
370
|
+
request; this effectively ignores the host_index
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _host_index: int, optional
|
|
373
|
+
:return: Returns the result object.
|
|
374
|
+
""" # noqa: E501
|
|
375
|
+
|
|
376
|
+
_param = self._read_languages_languages_get_serialize(
|
|
377
|
+
q=q,
|
|
378
|
+
id=id,
|
|
379
|
+
name=name,
|
|
380
|
+
version=version,
|
|
381
|
+
sort_by=sort_by,
|
|
382
|
+
latest=latest,
|
|
383
|
+
page=page,
|
|
384
|
+
size=size,
|
|
385
|
+
_request_auth=_request_auth,
|
|
386
|
+
_content_type=_content_type,
|
|
387
|
+
_headers=_headers,
|
|
388
|
+
_host_index=_host_index
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
392
|
+
'200': "PageLanguage",
|
|
393
|
+
'422': "HTTPValidationError",
|
|
394
|
+
}
|
|
395
|
+
response_data = await self.api_client.call_api(
|
|
396
|
+
*_param,
|
|
397
|
+
_request_timeout=_request_timeout
|
|
398
|
+
)
|
|
399
|
+
await response_data.read()
|
|
400
|
+
return self.api_client.response_deserialize(
|
|
401
|
+
response_data=response_data,
|
|
402
|
+
response_types_map=_response_types_map,
|
|
403
|
+
).data
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
@validate_call
|
|
407
|
+
async def read_languages_languages_get_with_http_info(
|
|
408
|
+
self,
|
|
409
|
+
q: Optional[StrictStr] = None,
|
|
410
|
+
id: Optional[StrictInt] = None,
|
|
411
|
+
name: Optional[StrictStr] = None,
|
|
412
|
+
version: Optional[StrictStr] = None,
|
|
413
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
414
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
415
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
416
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
417
|
+
_request_timeout: Union[
|
|
418
|
+
None,
|
|
419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
420
|
+
Tuple[
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
423
|
+
]
|
|
424
|
+
] = None,
|
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
429
|
+
) -> ApiResponse[PageLanguage]:
|
|
430
|
+
"""List languages
|
|
431
|
+
|
|
432
|
+
List languages.
|
|
433
|
+
|
|
434
|
+
:param q:
|
|
435
|
+
:type q: str
|
|
436
|
+
:param id:
|
|
437
|
+
:type id: int
|
|
438
|
+
:param name:
|
|
439
|
+
:type name: str
|
|
440
|
+
:param version:
|
|
441
|
+
:type version: str
|
|
442
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
443
|
+
:type sort_by: str
|
|
444
|
+
:param latest: If True gets the most recently created object.
|
|
445
|
+
:type latest: bool
|
|
446
|
+
:param page: Page number
|
|
447
|
+
:type page: int
|
|
448
|
+
:param size: Page size
|
|
449
|
+
:type size: int
|
|
450
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
451
|
+
number provided, it will be total request
|
|
452
|
+
timeout. It can also be a pair (tuple) of
|
|
453
|
+
(connection, read) timeouts.
|
|
454
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
455
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
456
|
+
request; this effectively ignores the
|
|
457
|
+
authentication in the spec for a single request.
|
|
458
|
+
:type _request_auth: dict, optional
|
|
459
|
+
:param _content_type: force content-type for the request.
|
|
460
|
+
:type _content_type: str, Optional
|
|
461
|
+
:param _headers: set to override the headers for a single
|
|
462
|
+
request; this effectively ignores the headers
|
|
463
|
+
in the spec for a single request.
|
|
464
|
+
:type _headers: dict, optional
|
|
465
|
+
:param _host_index: set to override the host_index for a single
|
|
466
|
+
request; this effectively ignores the host_index
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _host_index: int, optional
|
|
469
|
+
:return: Returns the result object.
|
|
470
|
+
""" # noqa: E501
|
|
471
|
+
|
|
472
|
+
_param = self._read_languages_languages_get_serialize(
|
|
473
|
+
q=q,
|
|
474
|
+
id=id,
|
|
475
|
+
name=name,
|
|
476
|
+
version=version,
|
|
477
|
+
sort_by=sort_by,
|
|
478
|
+
latest=latest,
|
|
479
|
+
page=page,
|
|
480
|
+
size=size,
|
|
481
|
+
_request_auth=_request_auth,
|
|
482
|
+
_content_type=_content_type,
|
|
483
|
+
_headers=_headers,
|
|
484
|
+
_host_index=_host_index
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
488
|
+
'200': "PageLanguage",
|
|
489
|
+
'422': "HTTPValidationError",
|
|
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_languages_languages_get_without_preload_content(
|
|
504
|
+
self,
|
|
505
|
+
q: Optional[StrictStr] = None,
|
|
506
|
+
id: Optional[StrictInt] = None,
|
|
507
|
+
name: Optional[StrictStr] = None,
|
|
508
|
+
version: Optional[StrictStr] = None,
|
|
509
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
510
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
511
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
512
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
513
|
+
_request_timeout: Union[
|
|
514
|
+
None,
|
|
515
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
516
|
+
Tuple[
|
|
517
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
518
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
519
|
+
]
|
|
520
|
+
] = None,
|
|
521
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
522
|
+
_content_type: Optional[StrictStr] = None,
|
|
523
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
524
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
525
|
+
) -> RESTResponseType:
|
|
526
|
+
"""List languages
|
|
527
|
+
|
|
528
|
+
List languages.
|
|
529
|
+
|
|
530
|
+
:param q:
|
|
531
|
+
:type q: str
|
|
532
|
+
:param id:
|
|
533
|
+
:type id: int
|
|
534
|
+
:param name:
|
|
535
|
+
:type name: str
|
|
536
|
+
:param version:
|
|
537
|
+
:type version: str
|
|
538
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
539
|
+
:type sort_by: str
|
|
540
|
+
:param latest: If True gets the most recently created object.
|
|
541
|
+
:type latest: bool
|
|
542
|
+
:param page: Page number
|
|
543
|
+
:type page: int
|
|
544
|
+
:param size: Page size
|
|
545
|
+
:type size: int
|
|
546
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
547
|
+
number provided, it will be total request
|
|
548
|
+
timeout. It can also be a pair (tuple) of
|
|
549
|
+
(connection, read) timeouts.
|
|
550
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
551
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
552
|
+
request; this effectively ignores the
|
|
553
|
+
authentication in the spec for a single request.
|
|
554
|
+
:type _request_auth: dict, optional
|
|
555
|
+
:param _content_type: force content-type for the request.
|
|
556
|
+
:type _content_type: str, Optional
|
|
557
|
+
:param _headers: set to override the headers for a single
|
|
558
|
+
request; this effectively ignores the headers
|
|
559
|
+
in the spec for a single request.
|
|
560
|
+
:type _headers: dict, optional
|
|
561
|
+
:param _host_index: set to override the host_index for a single
|
|
562
|
+
request; this effectively ignores the host_index
|
|
563
|
+
in the spec for a single request.
|
|
564
|
+
:type _host_index: int, optional
|
|
565
|
+
:return: Returns the result object.
|
|
566
|
+
""" # noqa: E501
|
|
567
|
+
|
|
568
|
+
_param = self._read_languages_languages_get_serialize(
|
|
569
|
+
q=q,
|
|
570
|
+
id=id,
|
|
571
|
+
name=name,
|
|
572
|
+
version=version,
|
|
573
|
+
sort_by=sort_by,
|
|
574
|
+
latest=latest,
|
|
575
|
+
page=page,
|
|
576
|
+
size=size,
|
|
577
|
+
_request_auth=_request_auth,
|
|
578
|
+
_content_type=_content_type,
|
|
579
|
+
_headers=_headers,
|
|
580
|
+
_host_index=_host_index
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
584
|
+
'200': "PageLanguage",
|
|
585
|
+
'422': "HTTPValidationError",
|
|
586
|
+
}
|
|
587
|
+
response_data = await self.api_client.call_api(
|
|
588
|
+
*_param,
|
|
589
|
+
_request_timeout=_request_timeout
|
|
590
|
+
)
|
|
591
|
+
return response_data.response
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
def _read_languages_languages_get_serialize(
|
|
595
|
+
self,
|
|
596
|
+
q,
|
|
597
|
+
id,
|
|
598
|
+
name,
|
|
599
|
+
version,
|
|
600
|
+
sort_by,
|
|
601
|
+
latest,
|
|
602
|
+
page,
|
|
603
|
+
size,
|
|
604
|
+
_request_auth,
|
|
605
|
+
_content_type,
|
|
606
|
+
_headers,
|
|
607
|
+
_host_index,
|
|
608
|
+
) -> RequestSerialized:
|
|
609
|
+
|
|
610
|
+
_host = None
|
|
611
|
+
|
|
612
|
+
_collection_formats: Dict[str, str] = {
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
_path_params: Dict[str, str] = {}
|
|
616
|
+
_query_params: List[Tuple[str, str]] = []
|
|
617
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
618
|
+
_form_params: List[Tuple[str, str]] = []
|
|
619
|
+
_files: Dict[
|
|
620
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
621
|
+
] = {}
|
|
622
|
+
_body_params: Optional[bytes] = None
|
|
623
|
+
|
|
624
|
+
# process the path parameters
|
|
625
|
+
# process the query parameters
|
|
626
|
+
if q is not None:
|
|
627
|
+
|
|
628
|
+
_query_params.append(('q', q))
|
|
629
|
+
|
|
630
|
+
if id is not None:
|
|
631
|
+
|
|
632
|
+
_query_params.append(('id', id))
|
|
633
|
+
|
|
634
|
+
if name is not None:
|
|
635
|
+
|
|
636
|
+
_query_params.append(('name', name))
|
|
637
|
+
|
|
638
|
+
if version is not None:
|
|
639
|
+
|
|
640
|
+
_query_params.append(('version', version))
|
|
641
|
+
|
|
642
|
+
if sort_by is not None:
|
|
643
|
+
|
|
644
|
+
_query_params.append(('sort_by', sort_by))
|
|
645
|
+
|
|
646
|
+
if latest is not None:
|
|
647
|
+
|
|
648
|
+
_query_params.append(('latest', latest))
|
|
649
|
+
|
|
650
|
+
if page is not None:
|
|
651
|
+
|
|
652
|
+
_query_params.append(('page', page))
|
|
653
|
+
|
|
654
|
+
if size is not None:
|
|
655
|
+
|
|
656
|
+
_query_params.append(('size', size))
|
|
657
|
+
|
|
658
|
+
# process the header parameters
|
|
659
|
+
# process the form parameters
|
|
660
|
+
# process the body parameter
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
# set the HTTP header `Accept`
|
|
664
|
+
if 'Accept' not in _header_params:
|
|
665
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
666
|
+
[
|
|
667
|
+
'application/json'
|
|
668
|
+
]
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
# authentication setting
|
|
673
|
+
_auth_settings: List[str] = [
|
|
674
|
+
'user_bearer'
|
|
675
|
+
]
|
|
676
|
+
|
|
677
|
+
return self.api_client.param_serialize(
|
|
678
|
+
method='GET',
|
|
679
|
+
resource_path='/languages',
|
|
680
|
+
path_params=_path_params,
|
|
681
|
+
query_params=_query_params,
|
|
682
|
+
header_params=_header_params,
|
|
683
|
+
body=_body_params,
|
|
684
|
+
post_params=_form_params,
|
|
685
|
+
files=_files,
|
|
686
|
+
auth_settings=_auth_settings,
|
|
687
|
+
collection_formats=_collection_formats,
|
|
688
|
+
_host=_host,
|
|
689
|
+
_request_auth=_request_auth
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
|