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