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