qi-compute-api-client 0.7.0__py3-none-any.whl → 0.17.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of qi-compute-api-client might be problematic. Click here for more details.

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