qi-compute-api-client 0.4.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 (166) hide show
  1. compute_api_client/__init__.py +23 -20
  2. compute_api_client/api/__init__.py +5 -6
  3. compute_api_client/api/algorithms_api.py +1334 -554
  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 +1069 -436
  8. compute_api_client/api/files_api.py +1076 -436
  9. compute_api_client/api/final_results_api.py +737 -339
  10. compute_api_client/api/jobs_api.py +1653 -0
  11. compute_api_client/api/languages_api.py +557 -218
  12. compute_api_client/api/members_api.py +1058 -436
  13. compute_api_client/api/metadata_api.py +737 -338
  14. compute_api_client/api/permissions_api.py +1056 -422
  15. compute_api_client/api/projects_api.py +1605 -677
  16. compute_api_client/api/reservations_api.py +1125 -428
  17. compute_api_client/api/results_api.py +739 -338
  18. compute_api_client/api/teams_api.py +568 -221
  19. compute_api_client/api/transactions_api.py +680 -219
  20. compute_api_client/api/users_api.py +1091 -436
  21. compute_api_client/api_client.py +347 -305
  22. compute_api_client/api_response.py +21 -0
  23. compute_api_client/configuration.py +55 -68
  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/BatchJobsApi.md +524 -0
  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 +40 -74
  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 +20 -17
  90. compute_api_client/models/__init__.py +17 -15
  91. compute_api_client/models/algorithm.py +79 -238
  92. compute_api_client/models/algorithm_in.py +77 -205
  93. compute_api_client/models/algorithm_type.py +22 -88
  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 +73 -231
  103. compute_api_client/models/commit_in.py +68 -170
  104. compute_api_client/models/compile_stage.py +24 -90
  105. compute_api_client/models/domain.py +23 -89
  106. compute_api_client/models/file.py +75 -289
  107. compute_api_client/models/file_in.py +73 -255
  108. compute_api_client/models/final_result.py +69 -199
  109. compute_api_client/models/final_result_in.py +64 -138
  110. compute_api_client/models/http_not_found_error.py +61 -106
  111. compute_api_client/models/http_validation_error.py +70 -106
  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 +68 -173
  117. compute_api_client/models/location_inner.py +126 -85
  118. compute_api_client/models/member.py +71 -237
  119. compute_api_client/models/member_in.py +69 -204
  120. compute_api_client/models/metadata.py +69 -199
  121. compute_api_client/models/metadata_in.py +69 -138
  122. compute_api_client/models/permission.py +68 -173
  123. compute_api_client/models/permission_group.py +66 -143
  124. compute_api_client/models/project.py +75 -257
  125. compute_api_client/models/project_in.py +70 -196
  126. compute_api_client/models/project_patch.py +90 -193
  127. compute_api_client/models/reservation.py +80 -291
  128. compute_api_client/models/reservation_in.py +69 -201
  129. compute_api_client/models/result.py +102 -360
  130. compute_api_client/models/result_in.py +96 -293
  131. compute_api_client/models/role.py +22 -88
  132. compute_api_client/models/share_type.py +23 -89
  133. compute_api_client/models/team.py +70 -199
  134. compute_api_client/models/transaction.py +94 -300
  135. compute_api_client/models/user.py +76 -277
  136. compute_api_client/models/user_in.py +74 -244
  137. compute_api_client/models/validation_error.py +74 -161
  138. compute_api_client/rest.py +56 -115
  139. {qi_compute_api_client-0.4.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/BatchRunsApi.md +0 -600
  148. compute_api_client/docs/Run.md +0 -18
  149. compute_api_client/docs/RunIn.md +0 -13
  150. compute_api_client/docs/Runtime.md +0 -16
  151. compute_api_client/docs/RuntimeApi.md +0 -229
  152. compute_api_client/docs/RuntimeType.md +0 -19
  153. compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
  154. compute_api_client/models/batch_run.py +0 -423
  155. compute_api_client/models/batch_run_in.py +0 -171
  156. compute_api_client/models/batch_run_status.py +0 -114
  157. compute_api_client/models/run.py +0 -345
  158. compute_api_client/models/run_in.py +0 -202
  159. compute_api_client/models/run_status.py +0 -114
  160. compute_api_client/models/runtime.py +0 -290
  161. compute_api_client/models/runtime_status.py +0 -113
  162. compute_api_client/models/runtime_type.py +0 -357
  163. compute_api_client/models/runtime_with_authentication.py +0 -320
  164. qi_compute_api_client-0.4.0.dist-info/RECORD +0 -137
  165. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
  166. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
@@ -1,303 +1,650 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Compute Job Manager
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.team import Team
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 TeamsApi(object):
37
+ class TeamsApi:
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_team_teams_id_get(self, id, **kwargs): # noqa: E501
40
- """Retrieve teams # noqa: E501
41
49
 
42
- Get team 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_team_teams_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
+ ) -> Team:
67
+ """Retrieve teams
45
68
 
46
- >>> thread = api.read_team_teams_id_get(id, async_req=True)
47
- >>> result = thread.get()
69
+ Get team by ID.
48
70
 
49
71
  :param id: (required)
50
72
  :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
73
  :param _request_timeout: timeout setting for this request. If one
58
74
  number provided, it will be total request
59
75
  timeout. It can also be a pair (tuple) of
60
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
61
92
  :return: Returns the result object.
62
- If the method is called asynchronously,
63
- returns the request thread.
64
- :rtype: Team
65
- """
66
- kwargs['_return_http_data_only'] = True
67
- return self.read_team_teams_id_get_with_http_info(id, **kwargs) # noqa: E501
68
-
69
- def read_team_teams_id_get_with_http_info(self, id, **kwargs): # noqa: E501
70
- """Retrieve teams # noqa: E501
93
+ """ # noqa: E501
94
+
95
+ _param = self._read_team_teams_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
+ )
71
102
 
72
- Get team 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
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '200': "Team",
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_team_teams_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[Team]:
137
+ """Retrieve teams
75
138
 
76
- >>> thread = api.read_team_teams_id_get_with_http_info(id, async_req=True)
77
- >>> result = thread.get()
139
+ Get team by ID.
78
140
 
79
141
  :param id: (required)
80
142
  :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
143
  :param _request_timeout: timeout setting for this request. If one
91
144
  number provided, it will be total request
92
145
  timeout. It can also be a pair (tuple) of
93
146
  (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
94
148
  :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.
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
97
151
  :type _request_auth: dict, optional
98
- :type _content_type: string, optional: force content-type for the request
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
99
162
  :return: Returns the result object.
100
- If the method is called asynchronously,
101
- returns the request thread.
102
- :rtype: tuple(Team, status_code(int), headers(HTTPHeaderDict))
103
- """
163
+ """ # noqa: E501
164
+
165
+ _param = self._read_team_teams_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
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "Team",
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
+ )
104
188
 
105
- local_var_params = locals()
106
189
 
107
- all_params = [
108
- 'id'
109
- ]
110
- all_params.extend(
111
- [
112
- 'async_req',
113
- '_return_http_data_only',
114
- '_preload_content',
115
- '_request_timeout',
116
- '_request_auth',
117
- '_content_type',
118
- '_headers'
190
+ @validate_call
191
+ async def read_team_teams_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)]
119
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 teams
208
+
209
+ Get team by ID.
210
+
211
+ :param id: (required)
212
+ :type id: int
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
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
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._read_team_teams_id_get_serialize(
236
+ id=id,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
120
241
  )
121
242
 
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_team_teams_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_team_teams_id_get`") # noqa: E501
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "Team",
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
133
254
 
134
- collection_formats = {}
135
255
 
136
- path_params = {}
137
- if 'id' in local_var_params:
138
- path_params['id'] = local_var_params['id'] # noqa: E501
256
+ def _read_team_teams_id_get_serialize(
257
+ self,
258
+ id,
259
+ _request_auth,
260
+ _content_type,
261
+ _headers,
262
+ _host_index,
263
+ ) -> Tuple:
139
264
 
140
- query_params = []
265
+ _host = None
141
266
 
142
- header_params = dict(local_var_params.get('_headers', {}))
267
+ _collection_formats: Dict[str, str] = {
268
+
269
+ }
143
270
 
144
- form_params = []
145
- local_var_files = {}
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
146
277
 
147
- body_params = None
148
- # HTTP header `Accept`
149
- header_params['Accept'] = self.api_client.select_header_accept(
150
- ['application/json']) # noqa: E501
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
151
285
 
152
- # Authentication setting
153
- auth_settings = ['user'] # noqa: E501
154
286
 
155
- response_types_map = {
156
- 200: "Team",
157
- 404: "HTTPNotFoundError",
158
- 422: "HTTPValidationError",
159
- }
287
+ # set the HTTP header `Accept`
288
+ _header_params['Accept'] = self.api_client.select_header_accept(
289
+ [
290
+ 'application/json'
291
+ ]
292
+ )
293
+
294
+
295
+ # authentication setting
296
+ _auth_settings: List[str] = [
297
+ 'user'
298
+ ]
160
299
 
161
- return self.api_client.call_api(
162
- '/teams/{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_teams_teams_get(self, **kwargs): # noqa: E501
179
- """List teams # noqa: E501
180
-
181
- Read teams. # 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_teams_teams_get(async_req=True)
186
- >>> result = thread.get()
187
-
188
- :param async_req: Whether to execute the request asynchronously.
189
- :type async_req: bool, optional
190
- :param _preload_content: if False, the urllib3.HTTPResponse object will
191
- be returned without reading/decoding response
192
- data. Default is True.
193
- :type _preload_content: bool, optional
300
+ return self.api_client.param_serialize(
301
+ method='GET',
302
+ resource_path='/teams/{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
+ )
314
+
315
+
316
+
317
+
318
+ @validate_call
319
+ async def read_teams_teams_get(
320
+ self,
321
+ latest: Optional[StrictBool] = None,
322
+ id: Optional[StrictInt] = None,
323
+ name: Optional[StrictStr] = None,
324
+ slug: Optional[StrictStr] = None,
325
+ individual_user: Optional[StrictBool] = 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[Team]:
339
+ """List teams
340
+
341
+ Read teams.
342
+
343
+ :param latest:
344
+ :type latest: bool
345
+ :param id:
346
+ :type id: int
347
+ :param name:
348
+ :type name: str
349
+ :param slug:
350
+ :type slug: str
351
+ :param individual_user:
352
+ :type individual_user: bool
194
353
  :param _request_timeout: timeout setting for this request. If one
195
354
  number provided, it will be total request
196
355
  timeout. It can also be a pair (tuple) of
197
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
198
372
  :return: Returns the result object.
199
- If the method is called asynchronously,
200
- returns the request thread.
201
- :rtype: list[Team]
202
- """
203
- kwargs['_return_http_data_only'] = True
204
- return self.read_teams_teams_get_with_http_info(**kwargs) # noqa: E501
205
-
206
- def read_teams_teams_get_with_http_info(self, **kwargs): # noqa: E501
207
- """List teams # noqa: E501
208
-
209
- Read teams. # noqa: E501
210
- This method makes a synchronous HTTP request by default. To make an
211
- asynchronous HTTP request, please pass async_req=True
212
-
213
- >>> thread = api.read_teams_teams_get_with_http_info(async_req=True)
214
- >>> result = thread.get()
215
-
216
- :param async_req: Whether to execute the request asynchronously.
217
- :type async_req: bool, optional
218
- :param _return_http_data_only: response data without head status code
219
- and headers
220
- :type _return_http_data_only: bool, optional
221
- :param _preload_content: if False, the urllib3.HTTPResponse object will
222
- be returned without reading/decoding response
223
- data. Default is True.
224
- :type _preload_content: bool, optional
373
+ """ # noqa: E501
374
+
375
+ _param = self._read_teams_teams_get_serialize(
376
+ latest=latest,
377
+ id=id,
378
+ name=name,
379
+ slug=slug,
380
+ individual_user=individual_user,
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[Team]",
389
+ '422': "HTTPValidationError"
390
+
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_teams_teams_get_with_http_info(
405
+ self,
406
+ latest: Optional[StrictBool] = None,
407
+ id: Optional[StrictInt] = None,
408
+ name: Optional[StrictStr] = None,
409
+ slug: Optional[StrictStr] = None,
410
+ individual_user: Optional[StrictBool] = 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[Team]]:
424
+ """List teams
425
+
426
+ Read teams.
427
+
428
+ :param latest:
429
+ :type latest: bool
430
+ :param id:
431
+ :type id: int
432
+ :param name:
433
+ :type name: str
434
+ :param slug:
435
+ :type slug: str
436
+ :param individual_user:
437
+ :type individual_user: bool
225
438
  :param _request_timeout: timeout setting for this request. If one
226
439
  number provided, it will be total request
227
440
  timeout. It can also be a pair (tuple) of
228
441
  (connection, read) timeouts.
442
+ :type _request_timeout: int, tuple(int, int), optional
229
443
  :param _request_auth: set to override the auth_settings for an a single
230
- request; this effectively ignores the authentication
231
- in the spec for a single request.
444
+ request; this effectively ignores the
445
+ authentication in the spec for a single request.
232
446
  :type _request_auth: dict, optional
233
- :type _content_type: string, optional: force content-type for the request
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
234
457
  :return: Returns the result object.
235
- If the method is called asynchronously,
236
- returns the request thread.
237
- :rtype: tuple(list[Team], status_code(int), headers(HTTPHeaderDict))
238
- """
239
-
240
- local_var_params = locals()
241
-
242
- all_params = [
243
- ]
244
- all_params.extend(
245
- [
246
- 'async_req',
247
- '_return_http_data_only',
248
- '_preload_content',
249
- '_request_timeout',
250
- '_request_auth',
251
- '_content_type',
252
- '_headers'
253
- ]
458
+ """ # noqa: E501
459
+
460
+ _param = self._read_teams_teams_get_serialize(
461
+ latest=latest,
462
+ id=id,
463
+ name=name,
464
+ slug=slug,
465
+ individual_user=individual_user,
466
+ _request_auth=_request_auth,
467
+ _content_type=_content_type,
468
+ _headers=_headers,
469
+ _host_index=_host_index
254
470
  )
255
471
 
256
- for key, val in six.iteritems(local_var_params['kwargs']):
257
- if key not in all_params:
258
- raise ApiTypeError(
259
- "Got an unexpected keyword argument '%s'"
260
- " to method read_teams_teams_get" % key
261
- )
262
- local_var_params[key] = val
263
- del local_var_params['kwargs']
472
+ _response_types_map: Dict[str, Optional[str]] = {
473
+ '200': "List[Team]",
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
+ )
264
486
 
265
- collection_formats = {}
266
487
 
267
- path_params = {}
488
+ @validate_call
489
+ async def read_teams_teams_get_without_preload_content(
490
+ self,
491
+ latest: Optional[StrictBool] = None,
492
+ id: Optional[StrictInt] = None,
493
+ name: Optional[StrictStr] = None,
494
+ slug: Optional[StrictStr] = None,
495
+ individual_user: Optional[StrictBool] = 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 teams
510
+
511
+ Read teams.
512
+
513
+ :param latest:
514
+ :type latest: bool
515
+ :param id:
516
+ :type id: int
517
+ :param name:
518
+ :type name: str
519
+ :param slug:
520
+ :type slug: str
521
+ :param individual_user:
522
+ :type individual_user: bool
523
+ :param _request_timeout: timeout setting for this request. If one
524
+ number provided, it will be total request
525
+ timeout. It can also be a pair (tuple) of
526
+ (connection, read) timeouts.
527
+ :type _request_timeout: int, tuple(int, int), optional
528
+ :param _request_auth: set to override the auth_settings for an a single
529
+ request; this effectively ignores the
530
+ authentication in the spec for a single request.
531
+ :type _request_auth: dict, optional
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
542
+ :return: Returns the result object.
543
+ """ # noqa: E501
544
+
545
+ _param = self._read_teams_teams_get_serialize(
546
+ latest=latest,
547
+ id=id,
548
+ name=name,
549
+ slug=slug,
550
+ individual_user=individual_user,
551
+ _request_auth=_request_auth,
552
+ _content_type=_content_type,
553
+ _headers=_headers,
554
+ _host_index=_host_index
555
+ )
268
556
 
269
- query_params = []
557
+ _response_types_map: Dict[str, Optional[str]] = {
558
+ '200': "List[Team]",
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_teams_teams_get_serialize(
570
+ self,
571
+ latest,
572
+ id,
573
+ name,
574
+ slug,
575
+ individual_user,
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
+ }
270
587
 
271
- header_params = dict(local_var_params.get('_headers', {}))
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 latest is not None:
598
+
599
+ _query_params.append(('latest', latest))
600
+
601
+ if id is not None:
602
+
603
+ _query_params.append(('id', id))
604
+
605
+ if name is not None:
606
+
607
+ _query_params.append(('name', name))
608
+
609
+ if slug is not None:
610
+
611
+ _query_params.append(('slug', slug))
612
+
613
+ if individual_user is not None:
614
+
615
+ _query_params.append(('individual_user', individual_user))
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(
624
+ [
625
+ 'application/json'
626
+ ]
627
+ )
272
628
 
273
- form_params = []
274
- local_var_files = {}
275
629
 
276
- body_params = None
277
- # HTTP header `Accept`
278
- header_params['Accept'] = self.api_client.select_header_accept(
279
- ['application/json']) # noqa: E501
630
+ # authentication setting
631
+ _auth_settings: List[str] = [
632
+ 'user'
633
+ ]
280
634
 
281
- # Authentication setting
282
- auth_settings = ['user'] # noqa: E501
635
+ return self.api_client.param_serialize(
636
+ method='GET',
637
+ resource_path='/teams/',
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
+ )
283
649
 
284
- response_types_map = {
285
- 200: "list[Team]",
286
- }
287
650
 
288
- return self.api_client.call_api(
289
- '/teams/', 'GET',
290
- path_params,
291
- query_params,
292
- header_params,
293
- body=body_params,
294
- post_params=form_params,
295
- files=local_var_files,
296
- response_types_map=response_types_map,
297
- auth_settings=auth_settings,
298
- async_req=local_var_params.get('async_req'),
299
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
300
- _preload_content=local_var_params.get('_preload_content', True),
301
- _request_timeout=local_var_params.get('_request_timeout'),
302
- collection_formats=collection_formats,
303
- _request_auth=local_var_params.get('_request_auth'))