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,582 +3,1222 @@
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.compile_stage import CompileStage
31
+ from compute_api_client.models.file import File
32
+ from compute_api_client.models.file_in import FileIn
19
33
 
20
34
  from compute_api_client.api_client import ApiClient
21
- from compute_api_client.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
35
+ from compute_api_client.api_response import ApiResponse
36
+ from compute_api_client.rest import RESTResponseType
25
37
 
26
38
 
27
- class FilesApi(object):
39
+ class FilesApi:
28
40
  """NOTE: This class is auto generated by OpenAPI Generator
29
41
  Ref: https://openapi-generator.tech
30
42
 
31
43
  Do not edit the class manually.
32
44
  """
33
45
 
34
- def __init__(self, api_client=None):
46
+ def __init__(self, api_client=None) -> None:
35
47
  if api_client is None:
36
- api_client = ApiClient()
48
+ api_client = ApiClient.get_default()
37
49
  self.api_client = api_client
38
50
 
39
- def create_file_files_post(self, file_in, **kwargs): # noqa: E501
40
- """Create file # noqa: E501
41
51
 
42
- Create new file. # noqa: E501
43
- This method makes a synchronous HTTP request by default. To make an
44
- asynchronous HTTP request, please pass async_req=True
52
+ @validate_call
53
+ async def create_file_files_post(
54
+ self,
55
+ file_in: FileIn,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Annotated[StrictFloat, Field(gt=0)]
62
+ ]
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> File:
69
+ """Create file
70
+
71
+ Create new file.
72
+
73
+ :param file_in: (required)
74
+ :type file_in: FileIn
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._create_file_files_post_serialize(
98
+ file_in=file_in,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '201': "File",
107
+ '422': "HTTPValidationError"
108
+
109
+ }
110
+ response_data = await self.api_client.call_api(
111
+ *_param,
112
+ _request_timeout=_request_timeout
113
+ )
114
+ await response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+
121
+ @validate_call
122
+ async def create_file_files_post_with_http_info(
123
+ self,
124
+ file_in: FileIn,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[File]:
138
+ """Create file
45
139
 
46
- >>> thread = api.create_file_files_post(file_in, async_req=True)
47
- >>> result = thread.get()
140
+ Create new file.
48
141
 
49
142
  :param file_in: (required)
50
143
  :type file_in: FileIn
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
144
  :param _request_timeout: timeout setting for this request. If one
58
145
  number provided, it will be total request
59
146
  timeout. It can also be a pair (tuple) of
60
147
  (connection, read) timeouts.
148
+ :type _request_timeout: int, tuple(int, int), optional
149
+ :param _request_auth: set to override the auth_settings for an a single
150
+ request; this effectively ignores the
151
+ authentication in the spec for a single request.
152
+ :type _request_auth: dict, optional
153
+ :param _content_type: force content-type for the request.
154
+ :type _content_type: str, Optional
155
+ :param _headers: set to override the headers for a single
156
+ request; this effectively ignores the headers
157
+ in the spec for a single request.
158
+ :type _headers: dict, optional
159
+ :param _host_index: set to override the host_index for a single
160
+ request; this effectively ignores the host_index
161
+ in the spec for a single request.
162
+ :type _host_index: int, optional
61
163
  :return: Returns the result object.
62
- If the method is called asynchronously,
63
- returns the request thread.
64
- :rtype: File
65
- """
66
- kwargs['_return_http_data_only'] = True
67
- return self.create_file_files_post_with_http_info(file_in, **kwargs) # noqa: E501
164
+ """ # noqa: E501
165
+
166
+ _param = self._create_file_files_post_serialize(
167
+ file_in=file_in,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index
172
+ )
68
173
 
69
- def create_file_files_post_with_http_info(self, file_in, **kwargs): # noqa: E501
70
- """Create file # noqa: E501
174
+ _response_types_map: Dict[str, Optional[str]] = {
175
+ '201': "File",
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
- Create new file. # 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.create_file_files_post_with_http_info(file_in, async_req=True)
77
- >>> result = thread.get()
190
+ @validate_call
191
+ async def create_file_files_post_without_preload_content(
192
+ self,
193
+ file_in: FileIn,
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
+ """Create file
208
+
209
+ Create new file.
78
210
 
79
211
  :param file_in: (required)
80
212
  :type file_in: FileIn
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(File, status_code(int), headers(HTTPHeaderDict))
103
- """
233
+ """ # noqa: E501
234
+
235
+ _param = self._create_file_files_post_serialize(
236
+ file_in=file_in,
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
+ '201': "File",
245
+ '422': "HTTPValidationError"
246
+
247
+ }
248
+ response_data = await self.api_client.call_api(
249
+ *_param,
250
+ _request_timeout=_request_timeout
251
+ )
252
+ return response_data.response
106
253
 
107
- all_params = [
108
- 'file_in'
109
- ]
110
- all_params.extend(
254
+
255
+ def _create_file_files_post_serialize(
256
+ self,
257
+ file_in,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> Tuple:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+
268
+ }
269
+
270
+ _path_params: Dict[str, str] = {}
271
+ _query_params: List[Tuple[str, str]] = []
272
+ _header_params: Dict[str, Optional[str]] = _headers or {}
273
+ _form_params: List[Tuple[str, str]] = []
274
+ _files: Dict[str, str] = {}
275
+ _body_params: Optional[bytes] = None
276
+
277
+ # process the path parameters
278
+ # process the query parameters
279
+ # process the header parameters
280
+ # process the form parameters
281
+ # process the body parameter
282
+ if file_in is not None:
283
+ _body_params = file_in
284
+
285
+
286
+ # set the HTTP header `Accept`
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
111
288
  [
112
- 'async_req',
113
- '_return_http_data_only',
114
- '_preload_content',
115
- '_request_timeout',
116
- '_request_auth',
117
- '_content_type',
118
- '_headers'
289
+ 'application/json'
119
290
  ]
120
291
  )
121
292
 
122
- for key, val in six.iteritems(local_var_params['kwargs']):
123
- if key not in all_params:
124
- raise ApiTypeError(
125
- "Got an unexpected keyword argument '%s'"
126
- " to method create_file_files_post" % key
293
+ # set the HTTP header `Content-Type`
294
+ if _content_type:
295
+ _header_params['Content-Type'] = _content_type
296
+ else:
297
+ _default_content_type = (
298
+ self.api_client.select_header_content_type(
299
+ [
300
+ 'application/json'
301
+ ]
127
302
  )
128
- local_var_params[key] = val
129
- del local_var_params['kwargs']
130
- # verify the required parameter 'file_in' is set
131
- if self.api_client.client_side_validation and local_var_params.get('file_in') is None: # noqa: E501
132
- raise ApiValueError("Missing the required parameter `file_in` when calling `create_file_files_post`") # noqa: E501
303
+ )
304
+ if _default_content_type is not None:
305
+ _header_params['Content-Type'] = _default_content_type
133
306
 
134
- collection_formats = {}
307
+ # authentication setting
308
+ _auth_settings: List[str] = [
309
+ 'user'
310
+ ]
135
311
 
136
- path_params = {}
312
+ return self.api_client.param_serialize(
313
+ method='POST',
314
+ resource_path='/files',
315
+ path_params=_path_params,
316
+ query_params=_query_params,
317
+ header_params=_header_params,
318
+ body=_body_params,
319
+ post_params=_form_params,
320
+ files=_files,
321
+ auth_settings=_auth_settings,
322
+ collection_formats=_collection_formats,
323
+ _host=_host,
324
+ _request_auth=_request_auth
325
+ )
137
326
 
138
- query_params = []
139
327
 
140
- header_params = dict(local_var_params.get('_headers', {}))
141
328
 
142
- form_params = []
143
- local_var_files = {}
144
329
 
145
- body_params = None
146
- if 'file_in' in local_var_params:
147
- body_params = local_var_params['file_in']
148
- # HTTP header `Accept`
149
- header_params['Accept'] = self.api_client.select_header_accept(
150
- ['application/json']) # noqa: E501
330
+ @validate_call
331
+ async def delete_file_files_id_delete(
332
+ self,
333
+ id: StrictInt,
334
+ _request_timeout: Union[
335
+ None,
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Tuple[
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Annotated[StrictFloat, Field(gt=0)]
340
+ ]
341
+ ] = None,
342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
343
+ _content_type: Optional[StrictStr] = None,
344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
346
+ ) -> None:
347
+ """Destroy file
151
348
 
152
- # HTTP header `Content-Type`
153
- content_types_list = local_var_params.get('_content_type',
154
- self.api_client.select_header_content_type(
155
- ['application/json'],
156
- 'POST', body_params)) # noqa: E501
157
- if content_types_list:
158
- header_params['Content-Type'] = content_types_list
349
+ Delete a file.
159
350
 
160
- # Authentication setting
161
- auth_settings = ['user'] # noqa: E501
351
+ :param id: (required)
352
+ :type id: int
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._delete_file_files_id_delete_serialize(
376
+ id=id,
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
381
+ )
162
382
 
163
- response_types_map = {
164
- 201: "File",
165
- 422: "HTTPValidationError",
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+
166
385
  }
386
+ response_data = await self.api_client.call_api(
387
+ *_param,
388
+ _request_timeout=_request_timeout
389
+ )
390
+ await response_data.read()
391
+ return self.api_client.response_deserialize(
392
+ response_data=response_data,
393
+ response_types_map=_response_types_map,
394
+ ).data
395
+
396
+
397
+ @validate_call
398
+ async def delete_file_files_id_delete_with_http_info(
399
+ self,
400
+ id: StrictInt,
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> ApiResponse[None]:
414
+ """Destroy file
167
415
 
168
- return self.api_client.call_api(
169
- '/files', 'POST',
170
- path_params,
171
- query_params,
172
- header_params,
173
- body=body_params,
174
- post_params=form_params,
175
- files=local_var_files,
176
- response_types_map=response_types_map,
177
- auth_settings=auth_settings,
178
- async_req=local_var_params.get('async_req'),
179
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
180
- _preload_content=local_var_params.get('_preload_content', True),
181
- _request_timeout=local_var_params.get('_request_timeout'),
182
- collection_formats=collection_formats,
183
- _request_auth=local_var_params.get('_request_auth'))
184
-
185
- def delete_file_files_id_delete(self, id, **kwargs): # noqa: E501
186
- """Destroy file # noqa: E501
187
-
188
- Delete a file. # noqa: E501
189
- This method makes a synchronous HTTP request by default. To make an
190
- asynchronous HTTP request, please pass async_req=True
191
-
192
- >>> thread = api.delete_file_files_id_delete(id, async_req=True)
193
- >>> result = thread.get()
416
+ Delete a file.
194
417
 
195
418
  :param id: (required)
196
419
  :type id: int
197
- :param async_req: Whether to execute the request asynchronously.
198
- :type async_req: bool, optional
199
- :param _preload_content: if False, the urllib3.HTTPResponse object will
200
- be returned without reading/decoding response
201
- data. Default is True.
202
- :type _preload_content: bool, optional
203
420
  :param _request_timeout: timeout setting for this request. If one
204
421
  number provided, it will be total request
205
422
  timeout. It can also be a pair (tuple) of
206
423
  (connection, read) timeouts.
424
+ :type _request_timeout: int, tuple(int, int), optional
425
+ :param _request_auth: set to override the auth_settings for an a single
426
+ request; this effectively ignores the
427
+ authentication in the spec for a single request.
428
+ :type _request_auth: dict, optional
429
+ :param _content_type: force content-type for the request.
430
+ :type _content_type: str, Optional
431
+ :param _headers: set to override the headers for a single
432
+ request; this effectively ignores the headers
433
+ in the spec for a single request.
434
+ :type _headers: dict, optional
435
+ :param _host_index: set to override the host_index for a single
436
+ request; this effectively ignores the host_index
437
+ in the spec for a single request.
438
+ :type _host_index: int, optional
207
439
  :return: Returns the result object.
208
- If the method is called asynchronously,
209
- returns the request thread.
210
- :rtype: None
211
- """
212
- kwargs['_return_http_data_only'] = True
213
- return self.delete_file_files_id_delete_with_http_info(id, **kwargs) # noqa: E501
440
+ """ # noqa: E501
441
+
442
+ _param = self._delete_file_files_id_delete_serialize(
443
+ id=id,
444
+ _request_auth=_request_auth,
445
+ _content_type=_content_type,
446
+ _headers=_headers,
447
+ _host_index=_host_index
448
+ )
449
+
450
+ _response_types_map: Dict[str, Optional[str]] = {
451
+
452
+ }
453
+ response_data = await self.api_client.call_api(
454
+ *_param,
455
+ _request_timeout=_request_timeout
456
+ )
457
+ await response_data.read()
458
+ return self.api_client.response_deserialize(
459
+ response_data=response_data,
460
+ response_types_map=_response_types_map,
461
+ )
214
462
 
215
- def delete_file_files_id_delete_with_http_info(self, id, **kwargs): # noqa: E501
216
- """Destroy file # noqa: E501
217
463
 
218
- Delete a file. # noqa: E501
219
- This method makes a synchronous HTTP request by default. To make an
220
- asynchronous HTTP request, please pass async_req=True
464
+ @validate_call
465
+ async def delete_file_files_id_delete_without_preload_content(
466
+ self,
467
+ id: StrictInt,
468
+ _request_timeout: Union[
469
+ None,
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Tuple[
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Annotated[StrictFloat, Field(gt=0)]
474
+ ]
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> RESTResponseType:
481
+ """Destroy file
221
482
 
222
- >>> thread = api.delete_file_files_id_delete_with_http_info(id, async_req=True)
223
- >>> result = thread.get()
483
+ Delete a file.
224
484
 
225
485
  :param id: (required)
226
486
  :type id: int
227
- :param async_req: Whether to execute the request asynchronously.
228
- :type async_req: bool, optional
229
- :param _return_http_data_only: response data without head status code
230
- and headers
231
- :type _return_http_data_only: bool, optional
232
- :param _preload_content: if False, the urllib3.HTTPResponse object will
233
- be returned without reading/decoding response
234
- data. Default is True.
235
- :type _preload_content: bool, optional
236
487
  :param _request_timeout: timeout setting for this request. If one
237
488
  number provided, it will be total request
238
489
  timeout. It can also be a pair (tuple) of
239
490
  (connection, read) timeouts.
491
+ :type _request_timeout: int, tuple(int, int), optional
240
492
  :param _request_auth: set to override the auth_settings for an a single
241
- request; this effectively ignores the authentication
242
- in the spec for a single request.
493
+ request; this effectively ignores the
494
+ authentication in the spec for a single request.
243
495
  :type _request_auth: dict, optional
244
- :type _content_type: string, optional: force content-type for the request
496
+ :param _content_type: force content-type for the request.
497
+ :type _content_type: str, Optional
498
+ :param _headers: set to override the headers for a single
499
+ request; this effectively ignores the headers
500
+ in the spec for a single request.
501
+ :type _headers: dict, optional
502
+ :param _host_index: set to override the host_index for a single
503
+ request; this effectively ignores the host_index
504
+ in the spec for a single request.
505
+ :type _host_index: int, optional
245
506
  :return: Returns the result object.
246
- If the method is called asynchronously,
247
- returns the request thread.
248
- :rtype: None
249
- """
507
+ """ # noqa: E501
508
+
509
+ _param = self._delete_file_files_id_delete_serialize(
510
+ id=id,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index
515
+ )
250
516
 
251
- local_var_params = locals()
517
+ _response_types_map: Dict[str, Optional[str]] = {
518
+
519
+ }
520
+ response_data = await self.api_client.call_api(
521
+ *_param,
522
+ _request_timeout=_request_timeout
523
+ )
524
+ return response_data.response
252
525
 
253
- all_params = [
254
- 'id'
255
- ]
256
- all_params.extend(
526
+
527
+ def _delete_file_files_id_delete_serialize(
528
+ self,
529
+ id,
530
+ _request_auth,
531
+ _content_type,
532
+ _headers,
533
+ _host_index,
534
+ ) -> Tuple:
535
+
536
+ _host = None
537
+
538
+ _collection_formats: Dict[str, str] = {
539
+
540
+ }
541
+
542
+ _path_params: Dict[str, str] = {}
543
+ _query_params: List[Tuple[str, str]] = []
544
+ _header_params: Dict[str, Optional[str]] = _headers or {}
545
+ _form_params: List[Tuple[str, str]] = []
546
+ _files: Dict[str, str] = {}
547
+ _body_params: Optional[bytes] = None
548
+
549
+ # process the path parameters
550
+ if id is not None:
551
+ _path_params['id'] = id
552
+ # process the query parameters
553
+ # process the header parameters
554
+ # process the form parameters
555
+ # process the body parameter
556
+
557
+
558
+ # set the HTTP header `Accept`
559
+ _header_params['Accept'] = self.api_client.select_header_accept(
257
560
  [
258
- 'async_req',
259
- '_return_http_data_only',
260
- '_preload_content',
261
- '_request_timeout',
262
- '_request_auth',
263
- '_content_type',
264
- '_headers'
561
+ 'application/json'
265
562
  ]
266
563
  )
267
564
 
268
- for key, val in six.iteritems(local_var_params['kwargs']):
269
- if key not in all_params:
270
- raise ApiTypeError(
271
- "Got an unexpected keyword argument '%s'"
272
- " to method delete_file_files_id_delete" % key
273
- )
274
- local_var_params[key] = val
275
- del local_var_params['kwargs']
276
- # verify the required parameter 'id' is set
277
- if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
278
- raise ApiValueError("Missing the required parameter `id` when calling `delete_file_files_id_delete`") # noqa: E501
279
-
280
- collection_formats = {}
281
-
282
- path_params = {}
283
- if 'id' in local_var_params:
284
- path_params['id'] = local_var_params['id'] # noqa: E501
285
-
286
- query_params = []
287
-
288
- header_params = dict(local_var_params.get('_headers', {}))
289
-
290
- form_params = []
291
- local_var_files = {}
292
-
293
- body_params = None
294
- # HTTP header `Accept`
295
- header_params['Accept'] = self.api_client.select_header_accept(
296
- ['application/json']) # noqa: E501
297
-
298
- # Authentication setting
299
- auth_settings = ['user'] # noqa: E501
300
-
301
- response_types_map = {}
302
-
303
- return self.api_client.call_api(
304
- '/files/{id}', 'DELETE',
305
- path_params,
306
- query_params,
307
- header_params,
308
- body=body_params,
309
- post_params=form_params,
310
- files=local_var_files,
311
- response_types_map=response_types_map,
312
- auth_settings=auth_settings,
313
- async_req=local_var_params.get('async_req'),
314
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
315
- _preload_content=local_var_params.get('_preload_content', True),
316
- _request_timeout=local_var_params.get('_request_timeout'),
317
- collection_formats=collection_formats,
318
- _request_auth=local_var_params.get('_request_auth'))
319
-
320
- def read_file_files_id_get(self, id, **kwargs): # noqa: E501
321
- """Retrieve file # noqa: E501
322
-
323
- Get file by ID. # noqa: E501
324
- This method makes a synchronous HTTP request by default. To make an
325
- asynchronous HTTP request, please pass async_req=True
326
-
327
- >>> thread = api.read_file_files_id_get(id, async_req=True)
328
- >>> result = thread.get()
565
+
566
+ # authentication setting
567
+ _auth_settings: List[str] = [
568
+ 'user'
569
+ ]
570
+
571
+ return self.api_client.param_serialize(
572
+ method='DELETE',
573
+ resource_path='/files/{id}',
574
+ path_params=_path_params,
575
+ query_params=_query_params,
576
+ header_params=_header_params,
577
+ body=_body_params,
578
+ post_params=_form_params,
579
+ files=_files,
580
+ auth_settings=_auth_settings,
581
+ collection_formats=_collection_formats,
582
+ _host=_host,
583
+ _request_auth=_request_auth
584
+ )
585
+
586
+
587
+
588
+
589
+ @validate_call
590
+ async def read_file_files_id_get(
591
+ self,
592
+ id: StrictInt,
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> File:
606
+ """Retrieve file
607
+
608
+ Get file by ID.
329
609
 
330
610
  :param id: (required)
331
611
  :type id: int
332
- :param async_req: Whether to execute the request asynchronously.
333
- :type async_req: bool, optional
334
- :param _preload_content: if False, the urllib3.HTTPResponse object will
335
- be returned without reading/decoding response
336
- data. Default is True.
337
- :type _preload_content: bool, optional
338
612
  :param _request_timeout: timeout setting for this request. If one
339
613
  number provided, it will be total request
340
614
  timeout. It can also be a pair (tuple) of
341
615
  (connection, read) timeouts.
616
+ :type _request_timeout: int, tuple(int, int), optional
617
+ :param _request_auth: set to override the auth_settings for an a single
618
+ request; this effectively ignores the
619
+ authentication in the spec for a single request.
620
+ :type _request_auth: dict, optional
621
+ :param _content_type: force content-type for the request.
622
+ :type _content_type: str, Optional
623
+ :param _headers: set to override the headers for a single
624
+ request; this effectively ignores the headers
625
+ in the spec for a single request.
626
+ :type _headers: dict, optional
627
+ :param _host_index: set to override the host_index for a single
628
+ request; this effectively ignores the host_index
629
+ in the spec for a single request.
630
+ :type _host_index: int, optional
342
631
  :return: Returns the result object.
343
- If the method is called asynchronously,
344
- returns the request thread.
345
- :rtype: File
346
- """
347
- kwargs['_return_http_data_only'] = True
348
- return self.read_file_files_id_get_with_http_info(id, **kwargs) # noqa: E501
349
-
350
- def read_file_files_id_get_with_http_info(self, id, **kwargs): # noqa: E501
351
- """Retrieve file # noqa: E501
632
+ """ # noqa: E501
633
+
634
+ _param = self._read_file_files_id_get_serialize(
635
+ id=id,
636
+ _request_auth=_request_auth,
637
+ _content_type=_content_type,
638
+ _headers=_headers,
639
+ _host_index=_host_index
640
+ )
352
641
 
353
- Get file by ID. # noqa: E501
354
- This method makes a synchronous HTTP request by default. To make an
355
- asynchronous HTTP request, please pass async_req=True
642
+ _response_types_map: Dict[str, Optional[str]] = {
643
+ '200': "File",
644
+ '404': "HTTPNotFoundError",
645
+ '422': "HTTPValidationError"
646
+
647
+ }
648
+ response_data = await self.api_client.call_api(
649
+ *_param,
650
+ _request_timeout=_request_timeout
651
+ )
652
+ await response_data.read()
653
+ return self.api_client.response_deserialize(
654
+ response_data=response_data,
655
+ response_types_map=_response_types_map,
656
+ ).data
657
+
658
+
659
+ @validate_call
660
+ async def read_file_files_id_get_with_http_info(
661
+ self,
662
+ id: StrictInt,
663
+ _request_timeout: Union[
664
+ None,
665
+ Annotated[StrictFloat, Field(gt=0)],
666
+ Tuple[
667
+ Annotated[StrictFloat, Field(gt=0)],
668
+ Annotated[StrictFloat, Field(gt=0)]
669
+ ]
670
+ ] = None,
671
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
672
+ _content_type: Optional[StrictStr] = None,
673
+ _headers: Optional[Dict[StrictStr, Any]] = None,
674
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
675
+ ) -> ApiResponse[File]:
676
+ """Retrieve file
356
677
 
357
- >>> thread = api.read_file_files_id_get_with_http_info(id, async_req=True)
358
- >>> result = thread.get()
678
+ Get file by ID.
359
679
 
360
680
  :param id: (required)
361
681
  :type id: int
362
- :param async_req: Whether to execute the request asynchronously.
363
- :type async_req: bool, optional
364
- :param _return_http_data_only: response data without head status code
365
- and headers
366
- :type _return_http_data_only: bool, optional
367
- :param _preload_content: if False, the urllib3.HTTPResponse object will
368
- be returned without reading/decoding response
369
- data. Default is True.
370
- :type _preload_content: bool, optional
371
682
  :param _request_timeout: timeout setting for this request. If one
372
683
  number provided, it will be total request
373
684
  timeout. It can also be a pair (tuple) of
374
685
  (connection, read) timeouts.
686
+ :type _request_timeout: int, tuple(int, int), optional
375
687
  :param _request_auth: set to override the auth_settings for an a single
376
- request; this effectively ignores the authentication
377
- in the spec for a single request.
688
+ request; this effectively ignores the
689
+ authentication in the spec for a single request.
378
690
  :type _request_auth: dict, optional
379
- :type _content_type: string, optional: force content-type for the request
691
+ :param _content_type: force content-type for the request.
692
+ :type _content_type: str, Optional
693
+ :param _headers: set to override the headers for a single
694
+ request; this effectively ignores the headers
695
+ in the spec for a single request.
696
+ :type _headers: dict, optional
697
+ :param _host_index: set to override the host_index for a single
698
+ request; this effectively ignores the host_index
699
+ in the spec for a single request.
700
+ :type _host_index: int, optional
380
701
  :return: Returns the result object.
381
- If the method is called asynchronously,
382
- returns the request thread.
383
- :rtype: tuple(File, status_code(int), headers(HTTPHeaderDict))
384
- """
702
+ """ # noqa: E501
703
+
704
+ _param = self._read_file_files_id_get_serialize(
705
+ id=id,
706
+ _request_auth=_request_auth,
707
+ _content_type=_content_type,
708
+ _headers=_headers,
709
+ _host_index=_host_index
710
+ )
711
+
712
+ _response_types_map: Dict[str, Optional[str]] = {
713
+ '200': "File",
714
+ '404': "HTTPNotFoundError",
715
+ '422': "HTTPValidationError"
716
+
717
+ }
718
+ response_data = await self.api_client.call_api(
719
+ *_param,
720
+ _request_timeout=_request_timeout
721
+ )
722
+ await response_data.read()
723
+ return self.api_client.response_deserialize(
724
+ response_data=response_data,
725
+ response_types_map=_response_types_map,
726
+ )
385
727
 
386
- local_var_params = locals()
387
728
 
388
- all_params = [
389
- 'id'
390
- ]
391
- all_params.extend(
392
- [
393
- 'async_req',
394
- '_return_http_data_only',
395
- '_preload_content',
396
- '_request_timeout',
397
- '_request_auth',
398
- '_content_type',
399
- '_headers'
729
+ @validate_call
730
+ async def read_file_files_id_get_without_preload_content(
731
+ self,
732
+ id: StrictInt,
733
+ _request_timeout: Union[
734
+ None,
735
+ Annotated[StrictFloat, Field(gt=0)],
736
+ Tuple[
737
+ Annotated[StrictFloat, Field(gt=0)],
738
+ Annotated[StrictFloat, Field(gt=0)]
400
739
  ]
740
+ ] = None,
741
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
742
+ _content_type: Optional[StrictStr] = None,
743
+ _headers: Optional[Dict[StrictStr, Any]] = None,
744
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
745
+ ) -> RESTResponseType:
746
+ """Retrieve file
747
+
748
+ Get file by ID.
749
+
750
+ :param id: (required)
751
+ :type id: int
752
+ :param _request_timeout: timeout setting for this request. If one
753
+ number provided, it will be total request
754
+ timeout. It can also be a pair (tuple) of
755
+ (connection, read) timeouts.
756
+ :type _request_timeout: int, tuple(int, int), optional
757
+ :param _request_auth: set to override the auth_settings for an a single
758
+ request; this effectively ignores the
759
+ authentication in the spec for a single request.
760
+ :type _request_auth: dict, optional
761
+ :param _content_type: force content-type for the request.
762
+ :type _content_type: str, Optional
763
+ :param _headers: set to override the headers for a single
764
+ request; this effectively ignores the headers
765
+ in the spec for a single request.
766
+ :type _headers: dict, optional
767
+ :param _host_index: set to override the host_index for a single
768
+ request; this effectively ignores the host_index
769
+ in the spec for a single request.
770
+ :type _host_index: int, optional
771
+ :return: Returns the result object.
772
+ """ # noqa: E501
773
+
774
+ _param = self._read_file_files_id_get_serialize(
775
+ id=id,
776
+ _request_auth=_request_auth,
777
+ _content_type=_content_type,
778
+ _headers=_headers,
779
+ _host_index=_host_index
401
780
  )
402
781
 
403
- for key, val in six.iteritems(local_var_params['kwargs']):
404
- if key not in all_params:
405
- raise ApiTypeError(
406
- "Got an unexpected keyword argument '%s'"
407
- " to method read_file_files_id_get" % key
408
- )
409
- local_var_params[key] = val
410
- del local_var_params['kwargs']
411
- # verify the required parameter 'id' is set
412
- if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
413
- raise ApiValueError("Missing the required parameter `id` when calling `read_file_files_id_get`") # noqa: E501
782
+ _response_types_map: Dict[str, Optional[str]] = {
783
+ '200': "File",
784
+ '404': "HTTPNotFoundError",
785
+ '422': "HTTPValidationError"
786
+
787
+ }
788
+ response_data = await self.api_client.call_api(
789
+ *_param,
790
+ _request_timeout=_request_timeout
791
+ )
792
+ return response_data.response
414
793
 
415
- collection_formats = {}
416
794
 
417
- path_params = {}
418
- if 'id' in local_var_params:
419
- path_params['id'] = local_var_params['id'] # noqa: E501
795
+ def _read_file_files_id_get_serialize(
796
+ self,
797
+ id,
798
+ _request_auth,
799
+ _content_type,
800
+ _headers,
801
+ _host_index,
802
+ ) -> Tuple:
420
803
 
421
- query_params = []
804
+ _host = None
422
805
 
423
- header_params = dict(local_var_params.get('_headers', {}))
806
+ _collection_formats: Dict[str, str] = {
807
+
808
+ }
424
809
 
425
- form_params = []
426
- local_var_files = {}
810
+ _path_params: Dict[str, str] = {}
811
+ _query_params: List[Tuple[str, str]] = []
812
+ _header_params: Dict[str, Optional[str]] = _headers or {}
813
+ _form_params: List[Tuple[str, str]] = []
814
+ _files: Dict[str, str] = {}
815
+ _body_params: Optional[bytes] = None
427
816
 
428
- body_params = None
429
- # HTTP header `Accept`
430
- header_params['Accept'] = self.api_client.select_header_accept(
431
- ['application/json']) # noqa: E501
817
+ # process the path parameters
818
+ if id is not None:
819
+ _path_params['id'] = id
820
+ # process the query parameters
821
+ # process the header parameters
822
+ # process the form parameters
823
+ # process the body parameter
824
+
825
+
826
+ # set the HTTP header `Accept`
827
+ _header_params['Accept'] = self.api_client.select_header_accept(
828
+ [
829
+ 'application/json'
830
+ ]
831
+ )
832
+
833
+
834
+ # authentication setting
835
+ _auth_settings: List[str] = [
836
+ 'backend',
837
+ 'user'
838
+ ]
839
+
840
+ return self.api_client.param_serialize(
841
+ method='GET',
842
+ resource_path='/files/{id}',
843
+ path_params=_path_params,
844
+ query_params=_query_params,
845
+ header_params=_header_params,
846
+ body=_body_params,
847
+ post_params=_form_params,
848
+ files=_files,
849
+ auth_settings=_auth_settings,
850
+ collection_formats=_collection_formats,
851
+ _host=_host,
852
+ _request_auth=_request_auth
853
+ )
432
854
 
433
- # Authentication setting
434
- auth_settings = ['runtime', 'user'] # noqa: E501
435
855
 
436
- response_types_map = {
437
- 200: "File",
438
- 404: "HTTPNotFoundError",
439
- 422: "HTTPValidationError",
440
- }
441
856
 
442
- return self.api_client.call_api(
443
- '/files/{id}', 'GET',
444
- path_params,
445
- query_params,
446
- header_params,
447
- body=body_params,
448
- post_params=form_params,
449
- files=local_var_files,
450
- response_types_map=response_types_map,
451
- auth_settings=auth_settings,
452
- async_req=local_var_params.get('async_req'),
453
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
454
- _preload_content=local_var_params.get('_preload_content', True),
455
- _request_timeout=local_var_params.get('_request_timeout'),
456
- collection_formats=collection_formats,
457
- _request_auth=local_var_params.get('_request_auth'))
458
-
459
- def read_files_files_get(self, **kwargs): # noqa: E501
460
- """List files # noqa: E501
461
-
462
- List files. # noqa: E501
463
- This method makes a synchronous HTTP request by default. To make an
464
- asynchronous HTTP request, please pass async_req=True
465
-
466
- >>> thread = api.read_files_files_get(async_req=True)
467
- >>> result = thread.get()
468
-
469
- :param async_req: Whether to execute the request asynchronously.
470
- :type async_req: bool, optional
471
- :param _preload_content: if False, the urllib3.HTTPResponse object will
472
- be returned without reading/decoding response
473
- data. Default is True.
474
- :type _preload_content: bool, optional
857
+
858
+ @validate_call
859
+ async def read_files_files_get(
860
+ self,
861
+ latest: Optional[StrictBool] = None,
862
+ id: Optional[StrictInt] = None,
863
+ commit_id: Optional[StrictInt] = None,
864
+ content: Optional[StrictStr] = None,
865
+ language_id: Optional[StrictInt] = None,
866
+ compile_stage: Optional[CompileStage] = None,
867
+ generated: Optional[StrictBool] = None,
868
+ _request_timeout: Union[
869
+ None,
870
+ Annotated[StrictFloat, Field(gt=0)],
871
+ Tuple[
872
+ Annotated[StrictFloat, Field(gt=0)],
873
+ Annotated[StrictFloat, Field(gt=0)]
874
+ ]
875
+ ] = None,
876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
877
+ _content_type: Optional[StrictStr] = None,
878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
880
+ ) -> List[File]:
881
+ """List files
882
+
883
+ List files.
884
+
885
+ :param latest:
886
+ :type latest: bool
887
+ :param id:
888
+ :type id: int
889
+ :param commit_id:
890
+ :type commit_id: int
891
+ :param content:
892
+ :type content: str
893
+ :param language_id:
894
+ :type language_id: int
895
+ :param compile_stage:
896
+ :type compile_stage: CompileStage
897
+ :param generated:
898
+ :type generated: bool
475
899
  :param _request_timeout: timeout setting for this request. If one
476
900
  number provided, it will be total request
477
901
  timeout. It can also be a pair (tuple) of
478
902
  (connection, read) timeouts.
903
+ :type _request_timeout: int, tuple(int, int), optional
904
+ :param _request_auth: set to override the auth_settings for an a single
905
+ request; this effectively ignores the
906
+ authentication in the spec for a single request.
907
+ :type _request_auth: dict, optional
908
+ :param _content_type: force content-type for the request.
909
+ :type _content_type: str, Optional
910
+ :param _headers: set to override the headers for a single
911
+ request; this effectively ignores the headers
912
+ in the spec for a single request.
913
+ :type _headers: dict, optional
914
+ :param _host_index: set to override the host_index for a single
915
+ request; this effectively ignores the host_index
916
+ in the spec for a single request.
917
+ :type _host_index: int, optional
479
918
  :return: Returns the result object.
480
- If the method is called asynchronously,
481
- returns the request thread.
482
- :rtype: list[File]
483
- """
484
- kwargs['_return_http_data_only'] = True
485
- return self.read_files_files_get_with_http_info(**kwargs) # noqa: E501
486
-
487
- def read_files_files_get_with_http_info(self, **kwargs): # noqa: E501
488
- """List files # noqa: E501
489
-
490
- List files. # noqa: E501
491
- This method makes a synchronous HTTP request by default. To make an
492
- asynchronous HTTP request, please pass async_req=True
493
-
494
- >>> thread = api.read_files_files_get_with_http_info(async_req=True)
495
- >>> result = thread.get()
496
-
497
- :param async_req: Whether to execute the request asynchronously.
498
- :type async_req: bool, optional
499
- :param _return_http_data_only: response data without head status code
500
- and headers
501
- :type _return_http_data_only: bool, optional
502
- :param _preload_content: if False, the urllib3.HTTPResponse object will
503
- be returned without reading/decoding response
504
- data. Default is True.
505
- :type _preload_content: bool, optional
919
+ """ # noqa: E501
920
+
921
+ _param = self._read_files_files_get_serialize(
922
+ latest=latest,
923
+ id=id,
924
+ commit_id=commit_id,
925
+ content=content,
926
+ language_id=language_id,
927
+ compile_stage=compile_stage,
928
+ generated=generated,
929
+ _request_auth=_request_auth,
930
+ _content_type=_content_type,
931
+ _headers=_headers,
932
+ _host_index=_host_index
933
+ )
934
+
935
+ _response_types_map: Dict[str, Optional[str]] = {
936
+ '200': "List[File]",
937
+ '422': "HTTPValidationError"
938
+
939
+ }
940
+ response_data = await self.api_client.call_api(
941
+ *_param,
942
+ _request_timeout=_request_timeout
943
+ )
944
+ await response_data.read()
945
+ return self.api_client.response_deserialize(
946
+ response_data=response_data,
947
+ response_types_map=_response_types_map,
948
+ ).data
949
+
950
+
951
+ @validate_call
952
+ async def read_files_files_get_with_http_info(
953
+ self,
954
+ latest: Optional[StrictBool] = None,
955
+ id: Optional[StrictInt] = None,
956
+ commit_id: Optional[StrictInt] = None,
957
+ content: Optional[StrictStr] = None,
958
+ language_id: Optional[StrictInt] = None,
959
+ compile_stage: Optional[CompileStage] = None,
960
+ generated: Optional[StrictBool] = None,
961
+ _request_timeout: Union[
962
+ None,
963
+ Annotated[StrictFloat, Field(gt=0)],
964
+ Tuple[
965
+ Annotated[StrictFloat, Field(gt=0)],
966
+ Annotated[StrictFloat, Field(gt=0)]
967
+ ]
968
+ ] = None,
969
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
970
+ _content_type: Optional[StrictStr] = None,
971
+ _headers: Optional[Dict[StrictStr, Any]] = None,
972
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
973
+ ) -> ApiResponse[List[File]]:
974
+ """List files
975
+
976
+ List files.
977
+
978
+ :param latest:
979
+ :type latest: bool
980
+ :param id:
981
+ :type id: int
982
+ :param commit_id:
983
+ :type commit_id: int
984
+ :param content:
985
+ :type content: str
986
+ :param language_id:
987
+ :type language_id: int
988
+ :param compile_stage:
989
+ :type compile_stage: CompileStage
990
+ :param generated:
991
+ :type generated: bool
506
992
  :param _request_timeout: timeout setting for this request. If one
507
993
  number provided, it will be total request
508
994
  timeout. It can also be a pair (tuple) of
509
995
  (connection, read) timeouts.
996
+ :type _request_timeout: int, tuple(int, int), optional
510
997
  :param _request_auth: set to override the auth_settings for an a single
511
- request; this effectively ignores the authentication
512
- in the spec for a single request.
998
+ request; this effectively ignores the
999
+ authentication in the spec for a single request.
513
1000
  :type _request_auth: dict, optional
514
- :type _content_type: string, optional: force content-type for the request
1001
+ :param _content_type: force content-type for the request.
1002
+ :type _content_type: str, Optional
1003
+ :param _headers: set to override the headers for a single
1004
+ request; this effectively ignores the headers
1005
+ in the spec for a single request.
1006
+ :type _headers: dict, optional
1007
+ :param _host_index: set to override the host_index for a single
1008
+ request; this effectively ignores the host_index
1009
+ in the spec for a single request.
1010
+ :type _host_index: int, optional
515
1011
  :return: Returns the result object.
516
- If the method is called asynchronously,
517
- returns the request thread.
518
- :rtype: tuple(list[File], status_code(int), headers(HTTPHeaderDict))
519
- """
520
-
521
- local_var_params = locals()
522
-
523
- all_params = [
524
- ]
525
- all_params.extend(
526
- [
527
- 'async_req',
528
- '_return_http_data_only',
529
- '_preload_content',
530
- '_request_timeout',
531
- '_request_auth',
532
- '_content_type',
533
- '_headers'
534
- ]
1012
+ """ # noqa: E501
1013
+
1014
+ _param = self._read_files_files_get_serialize(
1015
+ latest=latest,
1016
+ id=id,
1017
+ commit_id=commit_id,
1018
+ content=content,
1019
+ language_id=language_id,
1020
+ compile_stage=compile_stage,
1021
+ generated=generated,
1022
+ _request_auth=_request_auth,
1023
+ _content_type=_content_type,
1024
+ _headers=_headers,
1025
+ _host_index=_host_index
535
1026
  )
536
1027
 
537
- for key, val in six.iteritems(local_var_params['kwargs']):
538
- if key not in all_params:
539
- raise ApiTypeError(
540
- "Got an unexpected keyword argument '%s'"
541
- " to method read_files_files_get" % key
542
- )
543
- local_var_params[key] = val
544
- del local_var_params['kwargs']
1028
+ _response_types_map: Dict[str, Optional[str]] = {
1029
+ '200': "List[File]",
1030
+ '422': "HTTPValidationError"
1031
+
1032
+ }
1033
+ response_data = await self.api_client.call_api(
1034
+ *_param,
1035
+ _request_timeout=_request_timeout
1036
+ )
1037
+ await response_data.read()
1038
+ return self.api_client.response_deserialize(
1039
+ response_data=response_data,
1040
+ response_types_map=_response_types_map,
1041
+ )
545
1042
 
546
- collection_formats = {}
547
1043
 
548
- path_params = {}
1044
+ @validate_call
1045
+ async def read_files_files_get_without_preload_content(
1046
+ self,
1047
+ latest: Optional[StrictBool] = None,
1048
+ id: Optional[StrictInt] = None,
1049
+ commit_id: Optional[StrictInt] = None,
1050
+ content: Optional[StrictStr] = None,
1051
+ language_id: Optional[StrictInt] = None,
1052
+ compile_stage: Optional[CompileStage] = None,
1053
+ generated: Optional[StrictBool] = None,
1054
+ _request_timeout: Union[
1055
+ None,
1056
+ Annotated[StrictFloat, Field(gt=0)],
1057
+ Tuple[
1058
+ Annotated[StrictFloat, Field(gt=0)],
1059
+ Annotated[StrictFloat, Field(gt=0)]
1060
+ ]
1061
+ ] = None,
1062
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1063
+ _content_type: Optional[StrictStr] = None,
1064
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1065
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1066
+ ) -> RESTResponseType:
1067
+ """List files
1068
+
1069
+ List files.
1070
+
1071
+ :param latest:
1072
+ :type latest: bool
1073
+ :param id:
1074
+ :type id: int
1075
+ :param commit_id:
1076
+ :type commit_id: int
1077
+ :param content:
1078
+ :type content: str
1079
+ :param language_id:
1080
+ :type language_id: int
1081
+ :param compile_stage:
1082
+ :type compile_stage: CompileStage
1083
+ :param generated:
1084
+ :type generated: bool
1085
+ :param _request_timeout: timeout setting for this request. If one
1086
+ number provided, it will be total request
1087
+ timeout. It can also be a pair (tuple) of
1088
+ (connection, read) timeouts.
1089
+ :type _request_timeout: int, tuple(int, int), optional
1090
+ :param _request_auth: set to override the auth_settings for an a single
1091
+ request; this effectively ignores the
1092
+ authentication in the spec for a single request.
1093
+ :type _request_auth: dict, optional
1094
+ :param _content_type: force content-type for the request.
1095
+ :type _content_type: str, Optional
1096
+ :param _headers: set to override the headers for a single
1097
+ request; this effectively ignores the headers
1098
+ in the spec for a single request.
1099
+ :type _headers: dict, optional
1100
+ :param _host_index: set to override the host_index for a single
1101
+ request; this effectively ignores the host_index
1102
+ in the spec for a single request.
1103
+ :type _host_index: int, optional
1104
+ :return: Returns the result object.
1105
+ """ # noqa: E501
1106
+
1107
+ _param = self._read_files_files_get_serialize(
1108
+ latest=latest,
1109
+ id=id,
1110
+ commit_id=commit_id,
1111
+ content=content,
1112
+ language_id=language_id,
1113
+ compile_stage=compile_stage,
1114
+ generated=generated,
1115
+ _request_auth=_request_auth,
1116
+ _content_type=_content_type,
1117
+ _headers=_headers,
1118
+ _host_index=_host_index
1119
+ )
549
1120
 
550
- query_params = []
1121
+ _response_types_map: Dict[str, Optional[str]] = {
1122
+ '200': "List[File]",
1123
+ '422': "HTTPValidationError"
1124
+
1125
+ }
1126
+ response_data = await self.api_client.call_api(
1127
+ *_param,
1128
+ _request_timeout=_request_timeout
1129
+ )
1130
+ return response_data.response
1131
+
1132
+
1133
+ def _read_files_files_get_serialize(
1134
+ self,
1135
+ latest,
1136
+ id,
1137
+ commit_id,
1138
+ content,
1139
+ language_id,
1140
+ compile_stage,
1141
+ generated,
1142
+ _request_auth,
1143
+ _content_type,
1144
+ _headers,
1145
+ _host_index,
1146
+ ) -> Tuple:
1147
+
1148
+ _host = None
1149
+
1150
+ _collection_formats: Dict[str, str] = {
1151
+
1152
+ }
551
1153
 
552
- header_params = dict(local_var_params.get('_headers', {}))
1154
+ _path_params: Dict[str, str] = {}
1155
+ _query_params: List[Tuple[str, str]] = []
1156
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1157
+ _form_params: List[Tuple[str, str]] = []
1158
+ _files: Dict[str, str] = {}
1159
+ _body_params: Optional[bytes] = None
1160
+
1161
+ # process the path parameters
1162
+ # process the query parameters
1163
+ if latest is not None:
1164
+
1165
+ _query_params.append(('latest', latest))
1166
+
1167
+ if id is not None:
1168
+
1169
+ _query_params.append(('id', id))
1170
+
1171
+ if commit_id is not None:
1172
+
1173
+ _query_params.append(('commit_id', commit_id))
1174
+
1175
+ if content is not None:
1176
+
1177
+ _query_params.append(('content', content))
1178
+
1179
+ if language_id is not None:
1180
+
1181
+ _query_params.append(('language_id', language_id))
1182
+
1183
+ if compile_stage is not None:
1184
+
1185
+ _query_params.append(('compile_stage', compile_stage.value))
1186
+
1187
+ if generated is not None:
1188
+
1189
+ _query_params.append(('generated', generated))
1190
+
1191
+ # process the header parameters
1192
+ # process the form parameters
1193
+ # process the body parameter
1194
+
1195
+
1196
+ # set the HTTP header `Accept`
1197
+ _header_params['Accept'] = self.api_client.select_header_accept(
1198
+ [
1199
+ 'application/json'
1200
+ ]
1201
+ )
553
1202
 
554
- form_params = []
555
- local_var_files = {}
556
1203
 
557
- body_params = None
558
- # HTTP header `Accept`
559
- header_params['Accept'] = self.api_client.select_header_accept(
560
- ['application/json']) # noqa: E501
1204
+ # authentication setting
1205
+ _auth_settings: List[str] = [
1206
+ 'user'
1207
+ ]
561
1208
 
562
- # Authentication setting
563
- auth_settings = ['user'] # noqa: E501
1209
+ return self.api_client.param_serialize(
1210
+ method='GET',
1211
+ resource_path='/files',
1212
+ path_params=_path_params,
1213
+ query_params=_query_params,
1214
+ header_params=_header_params,
1215
+ body=_body_params,
1216
+ post_params=_form_params,
1217
+ files=_files,
1218
+ auth_settings=_auth_settings,
1219
+ collection_formats=_collection_formats,
1220
+ _host=_host,
1221
+ _request_auth=_request_auth
1222
+ )
564
1223
 
565
- response_types_map = {
566
- 200: "list[File]",
567
- }
568
1224
 
569
- return self.api_client.call_api(
570
- '/files', 'GET',
571
- path_params,
572
- query_params,
573
- header_params,
574
- body=body_params,
575
- post_params=form_params,
576
- files=local_var_files,
577
- response_types_map=response_types_map,
578
- auth_settings=auth_settings,
579
- async_req=local_var_params.get('async_req'),
580
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
581
- _preload_content=local_var_params.get('_preload_content', True),
582
- _request_timeout=local_var_params.get('_request_timeout'),
583
- collection_formats=collection_formats,
584
- _request_auth=local_var_params.get('_request_auth'))