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