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

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

Potentially problematic release.


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

Files changed (166) hide show
  1. compute_api_client/__init__.py +23 -20
  2. compute_api_client/api/__init__.py +5 -6
  3. compute_api_client/api/algorithms_api.py +1334 -554
  4. compute_api_client/api/backend_api.py +1501 -0
  5. compute_api_client/api/backend_types_api.py +684 -0
  6. compute_api_client/api/batch_jobs_api.py +1937 -0
  7. compute_api_client/api/commits_api.py +1069 -436
  8. compute_api_client/api/files_api.py +1076 -436
  9. compute_api_client/api/final_results_api.py +737 -339
  10. compute_api_client/api/jobs_api.py +1653 -0
  11. compute_api_client/api/languages_api.py +557 -218
  12. compute_api_client/api/members_api.py +1058 -436
  13. compute_api_client/api/metadata_api.py +737 -338
  14. compute_api_client/api/permissions_api.py +1056 -422
  15. compute_api_client/api/projects_api.py +1605 -677
  16. compute_api_client/api/reservations_api.py +1125 -428
  17. compute_api_client/api/results_api.py +739 -338
  18. compute_api_client/api/teams_api.py +568 -221
  19. compute_api_client/api/transactions_api.py +680 -219
  20. compute_api_client/api/users_api.py +1091 -436
  21. compute_api_client/api_client.py +347 -305
  22. compute_api_client/api_response.py +21 -0
  23. compute_api_client/configuration.py +55 -68
  24. compute_api_client/docs/Algorithm.md +20 -3
  25. compute_api_client/docs/AlgorithmIn.md +20 -3
  26. compute_api_client/docs/AlgorithmType.md +0 -1
  27. compute_api_client/docs/AlgorithmsApi.md +78 -77
  28. compute_api_client/docs/Backend.md +33 -0
  29. compute_api_client/docs/BackendApi.md +419 -0
  30. compute_api_client/docs/BackendPatch.md +29 -0
  31. compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
  32. compute_api_client/docs/BackendType.md +36 -0
  33. compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
  34. compute_api_client/docs/BackendWithAuthentication.md +34 -0
  35. compute_api_client/docs/BatchJob.md +38 -0
  36. compute_api_client/docs/BatchJobIn.md +29 -0
  37. compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
  38. compute_api_client/docs/BatchJobsApi.md +524 -0
  39. compute_api_client/docs/Commit.md +18 -1
  40. compute_api_client/docs/CommitIn.md +17 -0
  41. compute_api_client/docs/CommitsApi.md +62 -71
  42. compute_api_client/docs/CompileStage.md +0 -1
  43. compute_api_client/docs/Domain.md +0 -1
  44. compute_api_client/docs/File.md +21 -4
  45. compute_api_client/docs/FileIn.md +21 -4
  46. compute_api_client/docs/FilesApi.md +65 -71
  47. compute_api_client/docs/FinalResult.md +20 -3
  48. compute_api_client/docs/FinalResultIn.md +19 -2
  49. compute_api_client/docs/FinalResultsApi.md +44 -71
  50. compute_api_client/docs/HTTPNotFoundError.md +17 -0
  51. compute_api_client/docs/HTTPValidationError.md +18 -1
  52. compute_api_client/docs/Job.md +36 -0
  53. compute_api_client/docs/JobIn.md +31 -0
  54. compute_api_client/docs/JobPatch.md +28 -0
  55. compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
  56. compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
  57. compute_api_client/docs/Language.md +17 -0
  58. compute_api_client/docs/LanguagesApi.md +30 -12
  59. compute_api_client/docs/LocationInner.md +17 -0
  60. compute_api_client/docs/Member.md +19 -2
  61. compute_api_client/docs/MemberIn.md +19 -2
  62. compute_api_client/docs/MembersApi.md +59 -24
  63. compute_api_client/docs/Metadata.md +20 -3
  64. compute_api_client/docs/MetadataApi.md +49 -33
  65. compute_api_client/docs/MetadataIn.md +19 -2
  66. compute_api_client/docs/Permission.md +17 -0
  67. compute_api_client/docs/PermissionGroup.md +17 -0
  68. compute_api_client/docs/PermissionsApi.md +68 -28
  69. compute_api_client/docs/Project.md +20 -3
  70. compute_api_client/docs/ProjectIn.md +18 -1
  71. compute_api_client/docs/ProjectPatch.md +19 -2
  72. compute_api_client/docs/ProjectsApi.md +84 -36
  73. compute_api_client/docs/Reservation.md +21 -4
  74. compute_api_client/docs/ReservationIn.md +19 -2
  75. compute_api_client/docs/ReservationsApi.md +66 -24
  76. compute_api_client/docs/Result.md +23 -6
  77. compute_api_client/docs/ResultIn.md +19 -2
  78. compute_api_client/docs/ResultsApi.md +40 -74
  79. compute_api_client/docs/Role.md +0 -1
  80. compute_api_client/docs/ShareType.md +0 -1
  81. compute_api_client/docs/Team.md +18 -1
  82. compute_api_client/docs/TeamsApi.md +37 -14
  83. compute_api_client/docs/Transaction.md +21 -4
  84. compute_api_client/docs/TransactionsApi.md +50 -14
  85. compute_api_client/docs/User.md +21 -4
  86. compute_api_client/docs/UserIn.md +17 -0
  87. compute_api_client/docs/UsersApi.md +62 -24
  88. compute_api_client/docs/ValidationError.md +18 -1
  89. compute_api_client/exceptions.py +20 -17
  90. compute_api_client/models/__init__.py +17 -15
  91. compute_api_client/models/algorithm.py +79 -238
  92. compute_api_client/models/algorithm_in.py +77 -205
  93. compute_api_client/models/algorithm_type.py +22 -88
  94. compute_api_client/models/backend.py +100 -0
  95. compute_api_client/models/backend_patch.py +90 -0
  96. compute_api_client/models/backend_status.py +47 -0
  97. compute_api_client/models/backend_type.py +105 -0
  98. compute_api_client/models/backend_with_authentication.py +102 -0
  99. compute_api_client/models/batch_job.py +129 -0
  100. compute_api_client/models/batch_job_in.py +89 -0
  101. compute_api_client/models/batch_job_status.py +48 -0
  102. compute_api_client/models/commit.py +73 -231
  103. compute_api_client/models/commit_in.py +68 -170
  104. compute_api_client/models/compile_stage.py +24 -90
  105. compute_api_client/models/domain.py +23 -89
  106. compute_api_client/models/file.py +75 -289
  107. compute_api_client/models/file_in.py +73 -255
  108. compute_api_client/models/final_result.py +69 -199
  109. compute_api_client/models/final_result_in.py +64 -138
  110. compute_api_client/models/http_not_found_error.py +61 -106
  111. compute_api_client/models/http_validation_error.py +70 -106
  112. compute_api_client/models/job.py +120 -0
  113. compute_api_client/models/job_in.py +99 -0
  114. compute_api_client/models/job_patch.py +88 -0
  115. compute_api_client/models/job_status.py +48 -0
  116. compute_api_client/models/language.py +68 -173
  117. compute_api_client/models/location_inner.py +126 -85
  118. compute_api_client/models/member.py +71 -237
  119. compute_api_client/models/member_in.py +69 -204
  120. compute_api_client/models/metadata.py +69 -199
  121. compute_api_client/models/metadata_in.py +69 -138
  122. compute_api_client/models/permission.py +68 -173
  123. compute_api_client/models/permission_group.py +66 -143
  124. compute_api_client/models/project.py +75 -257
  125. compute_api_client/models/project_in.py +70 -196
  126. compute_api_client/models/project_patch.py +90 -193
  127. compute_api_client/models/reservation.py +80 -291
  128. compute_api_client/models/reservation_in.py +69 -201
  129. compute_api_client/models/result.py +102 -360
  130. compute_api_client/models/result_in.py +96 -293
  131. compute_api_client/models/role.py +22 -88
  132. compute_api_client/models/share_type.py +23 -89
  133. compute_api_client/models/team.py +70 -199
  134. compute_api_client/models/transaction.py +94 -300
  135. compute_api_client/models/user.py +76 -277
  136. compute_api_client/models/user_in.py +74 -244
  137. compute_api_client/models/validation_error.py +74 -161
  138. compute_api_client/rest.py +56 -115
  139. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
  140. qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
  141. compute_api_client/api/batch_runs_api.py +0 -862
  142. compute_api_client/api/runs_api.py +0 -723
  143. compute_api_client/api/runtime_api.py +0 -449
  144. compute_api_client/api/runtime_types_api.py +0 -303
  145. compute_api_client/docs/BatchRun.md +0 -21
  146. compute_api_client/docs/BatchRunIn.md +0 -12
  147. compute_api_client/docs/BatchRunsApi.md +0 -600
  148. compute_api_client/docs/Run.md +0 -18
  149. compute_api_client/docs/RunIn.md +0 -13
  150. compute_api_client/docs/Runtime.md +0 -16
  151. compute_api_client/docs/RuntimeApi.md +0 -229
  152. compute_api_client/docs/RuntimeType.md +0 -19
  153. compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
  154. compute_api_client/models/batch_run.py +0 -423
  155. compute_api_client/models/batch_run_in.py +0 -171
  156. compute_api_client/models/batch_run_status.py +0 -114
  157. compute_api_client/models/run.py +0 -345
  158. compute_api_client/models/run_in.py +0 -202
  159. compute_api_client/models/run_status.py +0 -114
  160. compute_api_client/models/runtime.py +0 -290
  161. compute_api_client/models/runtime_status.py +0 -113
  162. compute_api_client/models/runtime_type.py +0 -357
  163. compute_api_client/models/runtime_with_authentication.py +0 -320
  164. qi_compute_api_client-0.4.0.dist-info/RECORD +0 -137
  165. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
  166. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
@@ -1,898 +1,1826 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Compute Job Manager
4
+ Quantum Inspire 2
5
5
 
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
8
  The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
11
14
 
15
+ import io
16
+ import warnings
12
17
 
13
- from __future__ import absolute_import
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
14
20
 
15
- import re # noqa: F401
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
16
25
 
17
- # python 2 and python 3 compatibility library
18
- import six
26
+ from datetime import datetime
27
+
28
+ from pydantic import StrictBool, StrictInt, StrictStr
29
+
30
+ from typing import List, Optional
31
+
32
+ from compute_api_client.models.project import Project
33
+ from compute_api_client.models.project_in import ProjectIn
34
+ from compute_api_client.models.project_patch import ProjectPatch
19
35
 
20
36
  from compute_api_client.api_client import ApiClient
21
- from compute_api_client.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
37
+ from compute_api_client.api_response import ApiResponse
38
+ from compute_api_client.rest import RESTResponseType
25
39
 
26
40
 
27
- class ProjectsApi(object):
41
+ class ProjectsApi:
28
42
  """NOTE: This class is auto generated by OpenAPI Generator
29
43
  Ref: https://openapi-generator.tech
30
44
 
31
45
  Do not edit the class manually.
32
46
  """
33
47
 
34
- def __init__(self, api_client=None):
48
+ def __init__(self, api_client=None) -> None:
35
49
  if api_client is None:
36
- api_client = ApiClient()
50
+ api_client = ApiClient.get_default()
37
51
  self.api_client = api_client
38
52
 
39
- def create_project_projects_post(self, project_in, **kwargs): # noqa: E501
40
- """Create project # noqa: E501
41
53
 
42
- Create new project. # noqa: E501
43
- This method makes a synchronous HTTP request by default. To make an
44
- asynchronous HTTP request, please pass async_req=True
54
+ @validate_call
55
+ async def create_project_projects_post(
56
+ self,
57
+ project_in: ProjectIn,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Annotated[StrictFloat, Field(gt=0)]
64
+ ]
65
+ ] = None,
66
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
+ _content_type: Optional[StrictStr] = None,
68
+ _headers: Optional[Dict[StrictStr, Any]] = None,
69
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
+ ) -> Project:
71
+ """Create project
45
72
 
46
- >>> thread = api.create_project_projects_post(project_in, async_req=True)
47
- >>> result = thread.get()
73
+ Create new project.
48
74
 
49
75
  :param project_in: (required)
50
76
  :type project_in: ProjectIn
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
77
  :param _request_timeout: timeout setting for this request. If one
58
78
  number provided, it will be total request
59
79
  timeout. It can also be a pair (tuple) of
60
80
  (connection, read) timeouts.
81
+ :type _request_timeout: int, tuple(int, int), optional
82
+ :param _request_auth: set to override the auth_settings for an a single
83
+ request; this effectively ignores the
84
+ authentication in the spec for a single request.
85
+ :type _request_auth: dict, optional
86
+ :param _content_type: force content-type for the request.
87
+ :type _content_type: str, Optional
88
+ :param _headers: set to override the headers for a single
89
+ request; this effectively ignores the headers
90
+ in the spec for a single request.
91
+ :type _headers: dict, optional
92
+ :param _host_index: set to override the host_index for a single
93
+ request; this effectively ignores the host_index
94
+ in the spec for a single request.
95
+ :type _host_index: int, optional
61
96
  :return: Returns the result object.
62
- If the method is called asynchronously,
63
- returns the request thread.
64
- :rtype: Project
65
- """
66
- kwargs['_return_http_data_only'] = True
67
- return self.create_project_projects_post_with_http_info(project_in, **kwargs) # noqa: E501
97
+ """ # noqa: E501
98
+
99
+ _param = self._create_project_projects_post_serialize(
100
+ project_in=project_in,
101
+ _request_auth=_request_auth,
102
+ _content_type=_content_type,
103
+ _headers=_headers,
104
+ _host_index=_host_index
105
+ )
106
+
107
+ _response_types_map: Dict[str, Optional[str]] = {
108
+ '201': "Project",
109
+ '422': "HTTPValidationError"
110
+
111
+ }
112
+ response_data = await self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ await response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ async def create_project_projects_post_with_http_info(
125
+ self,
126
+ project_in: ProjectIn,
127
+ _request_timeout: Union[
128
+ None,
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Tuple[
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Annotated[StrictFloat, Field(gt=0)]
133
+ ]
134
+ ] = None,
135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
136
+ _content_type: Optional[StrictStr] = None,
137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
139
+ ) -> ApiResponse[Project]:
140
+ """Create project
141
+
142
+ Create new project.
143
+
144
+ :param project_in: (required)
145
+ :type project_in: ProjectIn
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._create_project_projects_post_serialize(
169
+ project_in=project_in,
170
+ _request_auth=_request_auth,
171
+ _content_type=_content_type,
172
+ _headers=_headers,
173
+ _host_index=_host_index
174
+ )
175
+
176
+ _response_types_map: Dict[str, Optional[str]] = {
177
+ '201': "Project",
178
+ '422': "HTTPValidationError"
179
+
180
+ }
181
+ response_data = await self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ await response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
68
190
 
69
- def create_project_projects_post_with_http_info(self, project_in, **kwargs): # noqa: E501
70
- """Create project # noqa: E501
71
191
 
72
- Create new project. # noqa: E501
73
- This method makes a synchronous HTTP request by default. To make an
74
- asynchronous HTTP request, please pass async_req=True
192
+ @validate_call
193
+ async def create_project_projects_post_without_preload_content(
194
+ self,
195
+ project_in: ProjectIn,
196
+ _request_timeout: Union[
197
+ None,
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Tuple[
200
+ Annotated[StrictFloat, Field(gt=0)],
201
+ Annotated[StrictFloat, Field(gt=0)]
202
+ ]
203
+ ] = None,
204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
205
+ _content_type: Optional[StrictStr] = None,
206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
208
+ ) -> RESTResponseType:
209
+ """Create project
75
210
 
76
- >>> thread = api.create_project_projects_post_with_http_info(project_in, async_req=True)
77
- >>> result = thread.get()
211
+ Create new project.
78
212
 
79
213
  :param project_in: (required)
80
214
  :type project_in: ProjectIn
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
215
  :param _request_timeout: timeout setting for this request. If one
91
216
  number provided, it will be total request
92
217
  timeout. It can also be a pair (tuple) of
93
218
  (connection, read) timeouts.
219
+ :type _request_timeout: int, tuple(int, int), optional
94
220
  :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.
221
+ request; this effectively ignores the
222
+ authentication in the spec for a single request.
97
223
  :type _request_auth: dict, optional
98
- :type _content_type: string, optional: force content-type for the request
224
+ :param _content_type: force content-type for the request.
225
+ :type _content_type: str, Optional
226
+ :param _headers: set to override the headers for a single
227
+ request; this effectively ignores the headers
228
+ in the spec for a single request.
229
+ :type _headers: dict, optional
230
+ :param _host_index: set to override the host_index for a single
231
+ request; this effectively ignores the host_index
232
+ in the spec for a single request.
233
+ :type _host_index: int, optional
99
234
  :return: Returns the result object.
100
- If the method is called asynchronously,
101
- returns the request thread.
102
- :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict))
103
- """
235
+ """ # noqa: E501
236
+
237
+ _param = self._create_project_projects_post_serialize(
238
+ project_in=project_in,
239
+ _request_auth=_request_auth,
240
+ _content_type=_content_type,
241
+ _headers=_headers,
242
+ _host_index=_host_index
243
+ )
244
+
245
+ _response_types_map: Dict[str, Optional[str]] = {
246
+ '201': "Project",
247
+ '422': "HTTPValidationError"
248
+
249
+ }
250
+ response_data = await self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
104
255
 
105
- local_var_params = locals()
106
256
 
107
- all_params = [
108
- 'project_in'
109
- ]
110
- all_params.extend(
257
+ def _create_project_projects_post_serialize(
258
+ self,
259
+ project_in,
260
+ _request_auth,
261
+ _content_type,
262
+ _headers,
263
+ _host_index,
264
+ ) -> Tuple:
265
+
266
+ _host = None
267
+
268
+ _collection_formats: Dict[str, str] = {
269
+
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[str, str] = {}
277
+ _body_params: Optional[bytes] = None
278
+
279
+ # process the path parameters
280
+ # process the query parameters
281
+ # process the header parameters
282
+ # process the form parameters
283
+ # process the body parameter
284
+ if project_in is not None:
285
+ _body_params = project_in
286
+
287
+
288
+ # set the HTTP header `Accept`
289
+ _header_params['Accept'] = self.api_client.select_header_accept(
111
290
  [
112
- 'async_req',
113
- '_return_http_data_only',
114
- '_preload_content',
115
- '_request_timeout',
116
- '_request_auth',
117
- '_content_type',
118
- '_headers'
291
+ 'application/json'
119
292
  ]
120
293
  )
121
294
 
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_project_projects_post" % key
295
+ # set the HTTP header `Content-Type`
296
+ if _content_type:
297
+ _header_params['Content-Type'] = _content_type
298
+ else:
299
+ _default_content_type = (
300
+ self.api_client.select_header_content_type(
301
+ [
302
+ 'application/json'
303
+ ]
127
304
  )
128
- local_var_params[key] = val
129
- del local_var_params['kwargs']
130
- # verify the required parameter 'project_in' is set
131
- if self.api_client.client_side_validation and local_var_params.get('project_in') is None: # noqa: E501
132
- raise ApiValueError("Missing the required parameter `project_in` when calling `create_project_projects_post`") # noqa: E501
305
+ )
306
+ if _default_content_type is not None:
307
+ _header_params['Content-Type'] = _default_content_type
133
308
 
134
- collection_formats = {}
309
+ # authentication setting
310
+ _auth_settings: List[str] = [
311
+ 'user'
312
+ ]
135
313
 
136
- path_params = {}
314
+ return self.api_client.param_serialize(
315
+ method='POST',
316
+ resource_path='/projects',
317
+ path_params=_path_params,
318
+ query_params=_query_params,
319
+ header_params=_header_params,
320
+ body=_body_params,
321
+ post_params=_form_params,
322
+ files=_files,
323
+ auth_settings=_auth_settings,
324
+ collection_formats=_collection_formats,
325
+ _host=_host,
326
+ _request_auth=_request_auth
327
+ )
137
328
 
138
- query_params = []
139
329
 
140
- header_params = dict(local_var_params.get('_headers', {}))
141
330
 
142
- form_params = []
143
- local_var_files = {}
144
331
 
145
- body_params = None
146
- if 'project_in' in local_var_params:
147
- body_params = local_var_params['project_in']
148
- # HTTP header `Accept`
149
- header_params['Accept'] = self.api_client.select_header_accept(
150
- ['application/json']) # noqa: E501
332
+ @validate_call
333
+ async def delete_project_projects_id_delete(
334
+ self,
335
+ id: StrictInt,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Annotated[StrictFloat, Field(gt=0)]
342
+ ]
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> None:
349
+ """Destroy project
151
350
 
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
351
+ Delete a project.
159
352
 
160
- # Authentication setting
161
- auth_settings = ['user'] # noqa: E501
353
+ :param id: (required)
354
+ :type id: int
355
+ :param _request_timeout: timeout setting for this request. If one
356
+ number provided, it will be total request
357
+ timeout. It can also be a pair (tuple) of
358
+ (connection, read) timeouts.
359
+ :type _request_timeout: int, tuple(int, int), optional
360
+ :param _request_auth: set to override the auth_settings for an a single
361
+ request; this effectively ignores the
362
+ authentication in the spec for a single request.
363
+ :type _request_auth: dict, optional
364
+ :param _content_type: force content-type for the request.
365
+ :type _content_type: str, Optional
366
+ :param _headers: set to override the headers for a single
367
+ request; this effectively ignores the headers
368
+ in the spec for a single request.
369
+ :type _headers: dict, optional
370
+ :param _host_index: set to override the host_index for a single
371
+ request; this effectively ignores the host_index
372
+ in the spec for a single request.
373
+ :type _host_index: int, optional
374
+ :return: Returns the result object.
375
+ """ # noqa: E501
376
+
377
+ _param = self._delete_project_projects_id_delete_serialize(
378
+ id=id,
379
+ _request_auth=_request_auth,
380
+ _content_type=_content_type,
381
+ _headers=_headers,
382
+ _host_index=_host_index
383
+ )
162
384
 
163
- response_types_map = {
164
- 201: "Project",
165
- 422: "HTTPValidationError",
385
+ _response_types_map: Dict[str, Optional[str]] = {
386
+
166
387
  }
388
+ response_data = await self.api_client.call_api(
389
+ *_param,
390
+ _request_timeout=_request_timeout
391
+ )
392
+ await response_data.read()
393
+ return self.api_client.response_deserialize(
394
+ response_data=response_data,
395
+ response_types_map=_response_types_map,
396
+ ).data
397
+
398
+
399
+ @validate_call
400
+ async def delete_project_projects_id_delete_with_http_info(
401
+ self,
402
+ id: StrictInt,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Annotated[StrictFloat, Field(gt=0)]
409
+ ]
410
+ ] = None,
411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
412
+ _content_type: Optional[StrictStr] = None,
413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
415
+ ) -> ApiResponse[None]:
416
+ """Destroy project
167
417
 
168
- return self.api_client.call_api(
169
- '/projects', '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_project_projects_id_delete(self, id, **kwargs): # noqa: E501
186
- """Destroy project # noqa: E501
187
-
188
- Delete a project. # 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_project_projects_id_delete(id, async_req=True)
193
- >>> result = thread.get()
418
+ Delete a project.
194
419
 
195
420
  :param id: (required)
196
421
  :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
422
  :param _request_timeout: timeout setting for this request. If one
204
423
  number provided, it will be total request
205
424
  timeout. It can also be a pair (tuple) of
206
425
  (connection, read) timeouts.
426
+ :type _request_timeout: int, tuple(int, int), optional
427
+ :param _request_auth: set to override the auth_settings for an a single
428
+ request; this effectively ignores the
429
+ authentication in the spec for a single request.
430
+ :type _request_auth: dict, optional
431
+ :param _content_type: force content-type for the request.
432
+ :type _content_type: str, Optional
433
+ :param _headers: set to override the headers for a single
434
+ request; this effectively ignores the headers
435
+ in the spec for a single request.
436
+ :type _headers: dict, optional
437
+ :param _host_index: set to override the host_index for a single
438
+ request; this effectively ignores the host_index
439
+ in the spec for a single request.
440
+ :type _host_index: int, optional
207
441
  :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_project_projects_id_delete_with_http_info(id, **kwargs) # noqa: E501
442
+ """ # noqa: E501
443
+
444
+ _param = self._delete_project_projects_id_delete_serialize(
445
+ id=id,
446
+ _request_auth=_request_auth,
447
+ _content_type=_content_type,
448
+ _headers=_headers,
449
+ _host_index=_host_index
450
+ )
451
+
452
+ _response_types_map: Dict[str, Optional[str]] = {
453
+
454
+ }
455
+ response_data = await self.api_client.call_api(
456
+ *_param,
457
+ _request_timeout=_request_timeout
458
+ )
459
+ await response_data.read()
460
+ return self.api_client.response_deserialize(
461
+ response_data=response_data,
462
+ response_types_map=_response_types_map,
463
+ )
214
464
 
215
- def delete_project_projects_id_delete_with_http_info(self, id, **kwargs): # noqa: E501
216
- """Destroy project # noqa: E501
217
465
 
218
- Delete a project. # noqa: E501
219
- This method makes a synchronous HTTP request by default. To make an
220
- asynchronous HTTP request, please pass async_req=True
466
+ @validate_call
467
+ async def delete_project_projects_id_delete_without_preload_content(
468
+ self,
469
+ id: StrictInt,
470
+ _request_timeout: Union[
471
+ None,
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Tuple[
474
+ Annotated[StrictFloat, Field(gt=0)],
475
+ Annotated[StrictFloat, Field(gt=0)]
476
+ ]
477
+ ] = None,
478
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
479
+ _content_type: Optional[StrictStr] = None,
480
+ _headers: Optional[Dict[StrictStr, Any]] = None,
481
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
482
+ ) -> RESTResponseType:
483
+ """Destroy project
221
484
 
222
- >>> thread = api.delete_project_projects_id_delete_with_http_info(id, async_req=True)
223
- >>> result = thread.get()
485
+ Delete a project.
224
486
 
225
487
  :param id: (required)
226
488
  :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
489
  :param _request_timeout: timeout setting for this request. If one
237
490
  number provided, it will be total request
238
491
  timeout. It can also be a pair (tuple) of
239
492
  (connection, read) timeouts.
493
+ :type _request_timeout: int, tuple(int, int), optional
240
494
  :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.
495
+ request; this effectively ignores the
496
+ authentication in the spec for a single request.
243
497
  :type _request_auth: dict, optional
244
- :type _content_type: string, optional: force content-type for the request
498
+ :param _content_type: force content-type for the request.
499
+ :type _content_type: str, Optional
500
+ :param _headers: set to override the headers for a single
501
+ request; this effectively ignores the headers
502
+ in the spec for a single request.
503
+ :type _headers: dict, optional
504
+ :param _host_index: set to override the host_index for a single
505
+ request; this effectively ignores the host_index
506
+ in the spec for a single request.
507
+ :type _host_index: int, optional
245
508
  :return: Returns the result object.
246
- If the method is called asynchronously,
247
- returns the request thread.
248
- :rtype: None
249
- """
509
+ """ # noqa: E501
510
+
511
+ _param = self._delete_project_projects_id_delete_serialize(
512
+ id=id,
513
+ _request_auth=_request_auth,
514
+ _content_type=_content_type,
515
+ _headers=_headers,
516
+ _host_index=_host_index
517
+ )
518
+
519
+ _response_types_map: Dict[str, Optional[str]] = {
520
+
521
+ }
522
+ response_data = await self.api_client.call_api(
523
+ *_param,
524
+ _request_timeout=_request_timeout
525
+ )
526
+ return response_data.response
250
527
 
251
- local_var_params = locals()
252
528
 
253
- all_params = [
254
- 'id'
255
- ]
256
- all_params.extend(
529
+ def _delete_project_projects_id_delete_serialize(
530
+ self,
531
+ id,
532
+ _request_auth,
533
+ _content_type,
534
+ _headers,
535
+ _host_index,
536
+ ) -> Tuple:
537
+
538
+ _host = None
539
+
540
+ _collection_formats: Dict[str, str] = {
541
+
542
+ }
543
+
544
+ _path_params: Dict[str, str] = {}
545
+ _query_params: List[Tuple[str, str]] = []
546
+ _header_params: Dict[str, Optional[str]] = _headers or {}
547
+ _form_params: List[Tuple[str, str]] = []
548
+ _files: Dict[str, str] = {}
549
+ _body_params: Optional[bytes] = None
550
+
551
+ # process the path parameters
552
+ if id is not None:
553
+ _path_params['id'] = id
554
+ # process the query parameters
555
+ # process the header parameters
556
+ # process the form parameters
557
+ # process the body parameter
558
+
559
+
560
+ # set the HTTP header `Accept`
561
+ _header_params['Accept'] = self.api_client.select_header_accept(
257
562
  [
258
- 'async_req',
259
- '_return_http_data_only',
260
- '_preload_content',
261
- '_request_timeout',
262
- '_request_auth',
263
- '_content_type',
264
- '_headers'
563
+ 'application/json'
265
564
  ]
266
565
  )
267
566
 
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_project_projects_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_project_projects_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
- '/projects/{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 partial_update_project_projects_id_patch(self, id, project_patch, **kwargs): # noqa: E501
321
- """Partially update project # noqa: E501
322
-
323
- Partially update a project. # 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.partial_update_project_projects_id_patch(id, project_patch, async_req=True)
328
- >>> result = thread.get()
567
+
568
+ # authentication setting
569
+ _auth_settings: List[str] = [
570
+ 'user'
571
+ ]
572
+
573
+ return self.api_client.param_serialize(
574
+ method='DELETE',
575
+ resource_path='/projects/{id}',
576
+ path_params=_path_params,
577
+ query_params=_query_params,
578
+ header_params=_header_params,
579
+ body=_body_params,
580
+ post_params=_form_params,
581
+ files=_files,
582
+ auth_settings=_auth_settings,
583
+ collection_formats=_collection_formats,
584
+ _host=_host,
585
+ _request_auth=_request_auth
586
+ )
587
+
588
+
589
+
590
+
591
+ @validate_call
592
+ async def partial_update_project_projects_id_patch(
593
+ self,
594
+ id: StrictInt,
595
+ project_patch: ProjectPatch,
596
+ _request_timeout: Union[
597
+ None,
598
+ Annotated[StrictFloat, Field(gt=0)],
599
+ Tuple[
600
+ Annotated[StrictFloat, Field(gt=0)],
601
+ Annotated[StrictFloat, Field(gt=0)]
602
+ ]
603
+ ] = None,
604
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
605
+ _content_type: Optional[StrictStr] = None,
606
+ _headers: Optional[Dict[StrictStr, Any]] = None,
607
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
608
+ ) -> Project:
609
+ """Partially update project
610
+
611
+ Partially update a project.
329
612
 
330
613
  :param id: (required)
331
614
  :type id: int
332
615
  :param project_patch: (required)
333
616
  :type project_patch: ProjectPatch
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
340
617
  :param _request_timeout: timeout setting for this request. If one
341
618
  number provided, it will be total request
342
619
  timeout. It can also be a pair (tuple) of
343
620
  (connection, read) timeouts.
621
+ :type _request_timeout: int, tuple(int, int), optional
622
+ :param _request_auth: set to override the auth_settings for an a single
623
+ request; this effectively ignores the
624
+ authentication in the spec for a single request.
625
+ :type _request_auth: dict, optional
626
+ :param _content_type: force content-type for the request.
627
+ :type _content_type: str, Optional
628
+ :param _headers: set to override the headers for a single
629
+ request; this effectively ignores the headers
630
+ in the spec for a single request.
631
+ :type _headers: dict, optional
632
+ :param _host_index: set to override the host_index for a single
633
+ request; this effectively ignores the host_index
634
+ in the spec for a single request.
635
+ :type _host_index: int, optional
344
636
  :return: Returns the result object.
345
- If the method is called asynchronously,
346
- returns the request thread.
347
- :rtype: Project
348
- """
349
- kwargs['_return_http_data_only'] = True
350
- return self.partial_update_project_projects_id_patch_with_http_info(id, project_patch, **kwargs) # noqa: E501
637
+ """ # noqa: E501
638
+
639
+ _param = self._partial_update_project_projects_id_patch_serialize(
640
+ id=id,
641
+ project_patch=project_patch,
642
+ _request_auth=_request_auth,
643
+ _content_type=_content_type,
644
+ _headers=_headers,
645
+ _host_index=_host_index
646
+ )
351
647
 
352
- def partial_update_project_projects_id_patch_with_http_info(self, id, project_patch, **kwargs): # noqa: E501
353
- """Partially update project # noqa: E501
648
+ _response_types_map: Dict[str, Optional[str]] = {
649
+ '200': "Project",
650
+ '404': "HTTPNotFoundError",
651
+ '422': "HTTPValidationError"
652
+
653
+ }
654
+ response_data = await self.api_client.call_api(
655
+ *_param,
656
+ _request_timeout=_request_timeout
657
+ )
658
+ await response_data.read()
659
+ return self.api_client.response_deserialize(
660
+ response_data=response_data,
661
+ response_types_map=_response_types_map,
662
+ ).data
663
+
664
+
665
+ @validate_call
666
+ async def partial_update_project_projects_id_patch_with_http_info(
667
+ self,
668
+ id: StrictInt,
669
+ project_patch: ProjectPatch,
670
+ _request_timeout: Union[
671
+ None,
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Tuple[
674
+ Annotated[StrictFloat, Field(gt=0)],
675
+ Annotated[StrictFloat, Field(gt=0)]
676
+ ]
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> ApiResponse[Project]:
683
+ """Partially update project
684
+
685
+ Partially update a project.
686
+
687
+ :param id: (required)
688
+ :type id: int
689
+ :param project_patch: (required)
690
+ :type project_patch: ProjectPatch
691
+ :param _request_timeout: timeout setting for this request. If one
692
+ number provided, it will be total request
693
+ timeout. It can also be a pair (tuple) of
694
+ (connection, read) timeouts.
695
+ :type _request_timeout: int, tuple(int, int), optional
696
+ :param _request_auth: set to override the auth_settings for an a single
697
+ request; this effectively ignores the
698
+ authentication in the spec for a single request.
699
+ :type _request_auth: dict, optional
700
+ :param _content_type: force content-type for the request.
701
+ :type _content_type: str, Optional
702
+ :param _headers: set to override the headers for a single
703
+ request; this effectively ignores the headers
704
+ in the spec for a single request.
705
+ :type _headers: dict, optional
706
+ :param _host_index: set to override the host_index for a single
707
+ request; this effectively ignores the host_index
708
+ in the spec for a single request.
709
+ :type _host_index: int, optional
710
+ :return: Returns the result object.
711
+ """ # noqa: E501
712
+
713
+ _param = self._partial_update_project_projects_id_patch_serialize(
714
+ id=id,
715
+ project_patch=project_patch,
716
+ _request_auth=_request_auth,
717
+ _content_type=_content_type,
718
+ _headers=_headers,
719
+ _host_index=_host_index
720
+ )
721
+
722
+ _response_types_map: Dict[str, Optional[str]] = {
723
+ '200': "Project",
724
+ '404': "HTTPNotFoundError",
725
+ '422': "HTTPValidationError"
726
+
727
+ }
728
+ response_data = await self.api_client.call_api(
729
+ *_param,
730
+ _request_timeout=_request_timeout
731
+ )
732
+ await response_data.read()
733
+ return self.api_client.response_deserialize(
734
+ response_data=response_data,
735
+ response_types_map=_response_types_map,
736
+ )
354
737
 
355
- Partially update a project. # 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
738
 
359
- >>> thread = api.partial_update_project_projects_id_patch_with_http_info(id, project_patch, async_req=True)
360
- >>> result = thread.get()
739
+ @validate_call
740
+ async def partial_update_project_projects_id_patch_without_preload_content(
741
+ self,
742
+ id: StrictInt,
743
+ project_patch: ProjectPatch,
744
+ _request_timeout: Union[
745
+ None,
746
+ Annotated[StrictFloat, Field(gt=0)],
747
+ Tuple[
748
+ Annotated[StrictFloat, Field(gt=0)],
749
+ Annotated[StrictFloat, Field(gt=0)]
750
+ ]
751
+ ] = None,
752
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
753
+ _content_type: Optional[StrictStr] = None,
754
+ _headers: Optional[Dict[StrictStr, Any]] = None,
755
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
756
+ ) -> RESTResponseType:
757
+ """Partially update project
758
+
759
+ Partially update a project.
361
760
 
362
761
  :param id: (required)
363
762
  :type id: int
364
763
  :param project_patch: (required)
365
764
  :type project_patch: ProjectPatch
366
- :param async_req: Whether to execute the request asynchronously.
367
- :type async_req: bool, optional
368
- :param _return_http_data_only: response data without head status code
369
- and headers
370
- :type _return_http_data_only: bool, optional
371
- :param _preload_content: if False, the urllib3.HTTPResponse object will
372
- be returned without reading/decoding response
373
- data. Default is True.
374
- :type _preload_content: bool, optional
375
765
  :param _request_timeout: timeout setting for this request. If one
376
766
  number provided, it will be total request
377
767
  timeout. It can also be a pair (tuple) of
378
768
  (connection, read) timeouts.
769
+ :type _request_timeout: int, tuple(int, int), optional
379
770
  :param _request_auth: set to override the auth_settings for an a single
380
- request; this effectively ignores the authentication
381
- in the spec for a single request.
771
+ request; this effectively ignores the
772
+ authentication in the spec for a single request.
382
773
  :type _request_auth: dict, optional
383
- :type _content_type: string, optional: force content-type for the request
774
+ :param _content_type: force content-type for the request.
775
+ :type _content_type: str, Optional
776
+ :param _headers: set to override the headers for a single
777
+ request; this effectively ignores the headers
778
+ in the spec for a single request.
779
+ :type _headers: dict, optional
780
+ :param _host_index: set to override the host_index for a single
781
+ request; this effectively ignores the host_index
782
+ in the spec for a single request.
783
+ :type _host_index: int, optional
384
784
  :return: Returns the result object.
385
- If the method is called asynchronously,
386
- returns the request thread.
387
- :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict))
388
- """
785
+ """ # noqa: E501
786
+
787
+ _param = self._partial_update_project_projects_id_patch_serialize(
788
+ id=id,
789
+ project_patch=project_patch,
790
+ _request_auth=_request_auth,
791
+ _content_type=_content_type,
792
+ _headers=_headers,
793
+ _host_index=_host_index
794
+ )
389
795
 
390
- local_var_params = locals()
796
+ _response_types_map: Dict[str, Optional[str]] = {
797
+ '200': "Project",
798
+ '404': "HTTPNotFoundError",
799
+ '422': "HTTPValidationError"
800
+
801
+ }
802
+ response_data = await self.api_client.call_api(
803
+ *_param,
804
+ _request_timeout=_request_timeout
805
+ )
806
+ return response_data.response
391
807
 
392
- all_params = [
393
- 'id',
394
- 'project_patch'
395
- ]
396
- all_params.extend(
808
+
809
+ def _partial_update_project_projects_id_patch_serialize(
810
+ self,
811
+ id,
812
+ project_patch,
813
+ _request_auth,
814
+ _content_type,
815
+ _headers,
816
+ _host_index,
817
+ ) -> Tuple:
818
+
819
+ _host = None
820
+
821
+ _collection_formats: Dict[str, str] = {
822
+
823
+ }
824
+
825
+ _path_params: Dict[str, str] = {}
826
+ _query_params: List[Tuple[str, str]] = []
827
+ _header_params: Dict[str, Optional[str]] = _headers or {}
828
+ _form_params: List[Tuple[str, str]] = []
829
+ _files: Dict[str, str] = {}
830
+ _body_params: Optional[bytes] = None
831
+
832
+ # process the path parameters
833
+ if id is not None:
834
+ _path_params['id'] = id
835
+ # process the query parameters
836
+ # process the header parameters
837
+ # process the form parameters
838
+ # process the body parameter
839
+ if project_patch is not None:
840
+ _body_params = project_patch
841
+
842
+
843
+ # set the HTTP header `Accept`
844
+ _header_params['Accept'] = self.api_client.select_header_accept(
397
845
  [
398
- 'async_req',
399
- '_return_http_data_only',
400
- '_preload_content',
401
- '_request_timeout',
402
- '_request_auth',
403
- '_content_type',
404
- '_headers'
846
+ 'application/json'
405
847
  ]
406
848
  )
407
849
 
408
- for key, val in six.iteritems(local_var_params['kwargs']):
409
- if key not in all_params:
410
- raise ApiTypeError(
411
- "Got an unexpected keyword argument '%s'"
412
- " to method partial_update_project_projects_id_patch" % key
850
+ # set the HTTP header `Content-Type`
851
+ if _content_type:
852
+ _header_params['Content-Type'] = _content_type
853
+ else:
854
+ _default_content_type = (
855
+ self.api_client.select_header_content_type(
856
+ [
857
+ 'application/json'
858
+ ]
413
859
  )
414
- local_var_params[key] = val
415
- del local_var_params['kwargs']
416
- # verify the required parameter 'id' is set
417
- if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
418
- raise ApiValueError("Missing the required parameter `id` when calling `partial_update_project_projects_id_patch`") # noqa: E501
419
- # verify the required parameter 'project_patch' is set
420
- if self.api_client.client_side_validation and local_var_params.get('project_patch') is None: # noqa: E501
421
- raise ApiValueError("Missing the required parameter `project_patch` when calling `partial_update_project_projects_id_patch`") # noqa: E501
422
-
423
- collection_formats = {}
424
-
425
- path_params = {}
426
- if 'id' in local_var_params:
427
- path_params['id'] = local_var_params['id'] # noqa: E501
428
-
429
- query_params = []
430
-
431
- header_params = dict(local_var_params.get('_headers', {}))
432
-
433
- form_params = []
434
- local_var_files = {}
435
-
436
- body_params = None
437
- if 'project_patch' in local_var_params:
438
- body_params = local_var_params['project_patch']
439
- # HTTP header `Accept`
440
- header_params['Accept'] = self.api_client.select_header_accept(
441
- ['application/json']) # noqa: E501
442
-
443
- # HTTP header `Content-Type`
444
- content_types_list = local_var_params.get('_content_type',
445
- self.api_client.select_header_content_type(
446
- ['application/json'],
447
- 'PATCH', body_params)) # noqa: E501
448
- if content_types_list:
449
- header_params['Content-Type'] = content_types_list
450
-
451
- # Authentication setting
452
- auth_settings = ['user'] # noqa: E501
453
-
454
- response_types_map = {
455
- 200: "Project",
456
- 404: "HTTPNotFoundError",
457
- 422: "HTTPValidationError",
860
+ )
861
+ if _default_content_type is not None:
862
+ _header_params['Content-Type'] = _default_content_type
863
+
864
+ # authentication setting
865
+ _auth_settings: List[str] = [
866
+ 'user'
867
+ ]
868
+
869
+ return self.api_client.param_serialize(
870
+ method='PATCH',
871
+ resource_path='/projects/{id}',
872
+ path_params=_path_params,
873
+ query_params=_query_params,
874
+ header_params=_header_params,
875
+ body=_body_params,
876
+ post_params=_form_params,
877
+ files=_files,
878
+ auth_settings=_auth_settings,
879
+ collection_formats=_collection_formats,
880
+ _host=_host,
881
+ _request_auth=_request_auth
882
+ )
883
+
884
+
885
+
886
+
887
+ @validate_call
888
+ async def read_project_projects_id_get(
889
+ self,
890
+ id: StrictInt,
891
+ _request_timeout: Union[
892
+ None,
893
+ Annotated[StrictFloat, Field(gt=0)],
894
+ Tuple[
895
+ Annotated[StrictFloat, Field(gt=0)],
896
+ Annotated[StrictFloat, Field(gt=0)]
897
+ ]
898
+ ] = None,
899
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
900
+ _content_type: Optional[StrictStr] = None,
901
+ _headers: Optional[Dict[StrictStr, Any]] = None,
902
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
903
+ ) -> Project:
904
+ """Retrieve project
905
+
906
+ Get project by ID.
907
+
908
+ :param id: (required)
909
+ :type id: int
910
+ :param _request_timeout: timeout setting for this request. If one
911
+ number provided, it will be total request
912
+ timeout. It can also be a pair (tuple) of
913
+ (connection, read) timeouts.
914
+ :type _request_timeout: int, tuple(int, int), optional
915
+ :param _request_auth: set to override the auth_settings for an a single
916
+ request; this effectively ignores the
917
+ authentication in the spec for a single request.
918
+ :type _request_auth: dict, optional
919
+ :param _content_type: force content-type for the request.
920
+ :type _content_type: str, Optional
921
+ :param _headers: set to override the headers for a single
922
+ request; this effectively ignores the headers
923
+ in the spec for a single request.
924
+ :type _headers: dict, optional
925
+ :param _host_index: set to override the host_index for a single
926
+ request; this effectively ignores the host_index
927
+ in the spec for a single request.
928
+ :type _host_index: int, optional
929
+ :return: Returns the result object.
930
+ """ # noqa: E501
931
+
932
+ _param = self._read_project_projects_id_get_serialize(
933
+ id=id,
934
+ _request_auth=_request_auth,
935
+ _content_type=_content_type,
936
+ _headers=_headers,
937
+ _host_index=_host_index
938
+ )
939
+
940
+ _response_types_map: Dict[str, Optional[str]] = {
941
+ '200': "Project",
942
+ '404': "HTTPNotFoundError",
943
+ '422': "HTTPValidationError"
944
+
458
945
  }
946
+ response_data = await self.api_client.call_api(
947
+ *_param,
948
+ _request_timeout=_request_timeout
949
+ )
950
+ await response_data.read()
951
+ return self.api_client.response_deserialize(
952
+ response_data=response_data,
953
+ response_types_map=_response_types_map,
954
+ ).data
955
+
956
+
957
+ @validate_call
958
+ async def read_project_projects_id_get_with_http_info(
959
+ self,
960
+ id: StrictInt,
961
+ _request_timeout: Union[
962
+ None,
963
+ Annotated[StrictFloat, Field(gt=0)],
964
+ Tuple[
965
+ Annotated[StrictFloat, Field(gt=0)],
966
+ Annotated[StrictFloat, Field(gt=0)]
967
+ ]
968
+ ] = None,
969
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
970
+ _content_type: Optional[StrictStr] = None,
971
+ _headers: Optional[Dict[StrictStr, Any]] = None,
972
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
973
+ ) -> ApiResponse[Project]:
974
+ """Retrieve project
459
975
 
460
- return self.api_client.call_api(
461
- '/projects/{id}', 'PATCH',
462
- path_params,
463
- query_params,
464
- header_params,
465
- body=body_params,
466
- post_params=form_params,
467
- files=local_var_files,
468
- response_types_map=response_types_map,
469
- auth_settings=auth_settings,
470
- async_req=local_var_params.get('async_req'),
471
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
472
- _preload_content=local_var_params.get('_preload_content', True),
473
- _request_timeout=local_var_params.get('_request_timeout'),
474
- collection_formats=collection_formats,
475
- _request_auth=local_var_params.get('_request_auth'))
476
-
477
- def read_project_projects_id_get(self, id, **kwargs): # noqa: E501
478
- """Retrieve project # noqa: E501
479
-
480
- Get project by ID. # noqa: E501
481
- This method makes a synchronous HTTP request by default. To make an
482
- asynchronous HTTP request, please pass async_req=True
483
-
484
- >>> thread = api.read_project_projects_id_get(id, async_req=True)
485
- >>> result = thread.get()
976
+ Get project by ID.
486
977
 
487
978
  :param id: (required)
488
979
  :type id: int
489
- :param async_req: Whether to execute the request asynchronously.
490
- :type async_req: bool, optional
491
- :param _preload_content: if False, the urllib3.HTTPResponse object will
492
- be returned without reading/decoding response
493
- data. Default is True.
494
- :type _preload_content: bool, optional
495
980
  :param _request_timeout: timeout setting for this request. If one
496
981
  number provided, it will be total request
497
982
  timeout. It can also be a pair (tuple) of
498
983
  (connection, read) timeouts.
984
+ :type _request_timeout: int, tuple(int, int), optional
985
+ :param _request_auth: set to override the auth_settings for an a single
986
+ request; this effectively ignores the
987
+ authentication in the spec for a single request.
988
+ :type _request_auth: dict, optional
989
+ :param _content_type: force content-type for the request.
990
+ :type _content_type: str, Optional
991
+ :param _headers: set to override the headers for a single
992
+ request; this effectively ignores the headers
993
+ in the spec for a single request.
994
+ :type _headers: dict, optional
995
+ :param _host_index: set to override the host_index for a single
996
+ request; this effectively ignores the host_index
997
+ in the spec for a single request.
998
+ :type _host_index: int, optional
499
999
  :return: Returns the result object.
500
- If the method is called asynchronously,
501
- returns the request thread.
502
- :rtype: Project
503
- """
504
- kwargs['_return_http_data_only'] = True
505
- return self.read_project_projects_id_get_with_http_info(id, **kwargs) # noqa: E501
1000
+ """ # noqa: E501
1001
+
1002
+ _param = self._read_project_projects_id_get_serialize(
1003
+ id=id,
1004
+ _request_auth=_request_auth,
1005
+ _content_type=_content_type,
1006
+ _headers=_headers,
1007
+ _host_index=_host_index
1008
+ )
1009
+
1010
+ _response_types_map: Dict[str, Optional[str]] = {
1011
+ '200': "Project",
1012
+ '404': "HTTPNotFoundError",
1013
+ '422': "HTTPValidationError"
1014
+
1015
+ }
1016
+ response_data = await self.api_client.call_api(
1017
+ *_param,
1018
+ _request_timeout=_request_timeout
1019
+ )
1020
+ await response_data.read()
1021
+ return self.api_client.response_deserialize(
1022
+ response_data=response_data,
1023
+ response_types_map=_response_types_map,
1024
+ )
506
1025
 
507
- def read_project_projects_id_get_with_http_info(self, id, **kwargs): # noqa: E501
508
- """Retrieve project # noqa: E501
509
1026
 
510
- Get project by ID. # noqa: E501
511
- This method makes a synchronous HTTP request by default. To make an
512
- asynchronous HTTP request, please pass async_req=True
1027
+ @validate_call
1028
+ async def read_project_projects_id_get_without_preload_content(
1029
+ self,
1030
+ id: StrictInt,
1031
+ _request_timeout: Union[
1032
+ None,
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Tuple[
1035
+ Annotated[StrictFloat, Field(gt=0)],
1036
+ Annotated[StrictFloat, Field(gt=0)]
1037
+ ]
1038
+ ] = None,
1039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1040
+ _content_type: Optional[StrictStr] = None,
1041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1043
+ ) -> RESTResponseType:
1044
+ """Retrieve project
513
1045
 
514
- >>> thread = api.read_project_projects_id_get_with_http_info(id, async_req=True)
515
- >>> result = thread.get()
1046
+ Get project by ID.
516
1047
 
517
1048
  :param id: (required)
518
1049
  :type id: int
519
- :param async_req: Whether to execute the request asynchronously.
520
- :type async_req: bool, optional
521
- :param _return_http_data_only: response data without head status code
522
- and headers
523
- :type _return_http_data_only: bool, optional
524
- :param _preload_content: if False, the urllib3.HTTPResponse object will
525
- be returned without reading/decoding response
526
- data. Default is True.
527
- :type _preload_content: bool, optional
528
1050
  :param _request_timeout: timeout setting for this request. If one
529
1051
  number provided, it will be total request
530
1052
  timeout. It can also be a pair (tuple) of
531
1053
  (connection, read) timeouts.
1054
+ :type _request_timeout: int, tuple(int, int), optional
532
1055
  :param _request_auth: set to override the auth_settings for an a single
533
- request; this effectively ignores the authentication
534
- in the spec for a single request.
1056
+ request; this effectively ignores the
1057
+ authentication in the spec for a single request.
535
1058
  :type _request_auth: dict, optional
536
- :type _content_type: string, optional: force content-type for the request
1059
+ :param _content_type: force content-type for the request.
1060
+ :type _content_type: str, Optional
1061
+ :param _headers: set to override the headers for a single
1062
+ request; this effectively ignores the headers
1063
+ in the spec for a single request.
1064
+ :type _headers: dict, optional
1065
+ :param _host_index: set to override the host_index for a single
1066
+ request; this effectively ignores the host_index
1067
+ in the spec for a single request.
1068
+ :type _host_index: int, optional
537
1069
  :return: Returns the result object.
538
- If the method is called asynchronously,
539
- returns the request thread.
540
- :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict))
541
- """
1070
+ """ # noqa: E501
1071
+
1072
+ _param = self._read_project_projects_id_get_serialize(
1073
+ id=id,
1074
+ _request_auth=_request_auth,
1075
+ _content_type=_content_type,
1076
+ _headers=_headers,
1077
+ _host_index=_host_index
1078
+ )
542
1079
 
543
- local_var_params = locals()
1080
+ _response_types_map: Dict[str, Optional[str]] = {
1081
+ '200': "Project",
1082
+ '404': "HTTPNotFoundError",
1083
+ '422': "HTTPValidationError"
1084
+
1085
+ }
1086
+ response_data = await self.api_client.call_api(
1087
+ *_param,
1088
+ _request_timeout=_request_timeout
1089
+ )
1090
+ return response_data.response
544
1091
 
545
- all_params = [
546
- 'id'
547
- ]
548
- all_params.extend(
1092
+
1093
+ def _read_project_projects_id_get_serialize(
1094
+ self,
1095
+ id,
1096
+ _request_auth,
1097
+ _content_type,
1098
+ _headers,
1099
+ _host_index,
1100
+ ) -> Tuple:
1101
+
1102
+ _host = None
1103
+
1104
+ _collection_formats: Dict[str, str] = {
1105
+
1106
+ }
1107
+
1108
+ _path_params: Dict[str, str] = {}
1109
+ _query_params: List[Tuple[str, str]] = []
1110
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1111
+ _form_params: List[Tuple[str, str]] = []
1112
+ _files: Dict[str, str] = {}
1113
+ _body_params: Optional[bytes] = None
1114
+
1115
+ # process the path parameters
1116
+ if id is not None:
1117
+ _path_params['id'] = id
1118
+ # process the query parameters
1119
+ # process the header parameters
1120
+ # process the form parameters
1121
+ # process the body parameter
1122
+
1123
+
1124
+ # set the HTTP header `Accept`
1125
+ _header_params['Accept'] = self.api_client.select_header_accept(
549
1126
  [
550
- 'async_req',
551
- '_return_http_data_only',
552
- '_preload_content',
553
- '_request_timeout',
554
- '_request_auth',
555
- '_content_type',
556
- '_headers'
1127
+ 'application/json'
557
1128
  ]
558
1129
  )
559
1130
 
560
- for key, val in six.iteritems(local_var_params['kwargs']):
561
- if key not in all_params:
562
- raise ApiTypeError(
563
- "Got an unexpected keyword argument '%s'"
564
- " to method read_project_projects_id_get" % key
565
- )
566
- local_var_params[key] = val
567
- del local_var_params['kwargs']
568
- # verify the required parameter 'id' is set
569
- if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
570
- raise ApiValueError("Missing the required parameter `id` when calling `read_project_projects_id_get`") # noqa: E501
571
1131
 
572
- collection_formats = {}
573
-
574
- path_params = {}
575
- if 'id' in local_var_params:
576
- path_params['id'] = local_var_params['id'] # noqa: E501
1132
+ # authentication setting
1133
+ _auth_settings: List[str] = [
1134
+ 'user'
1135
+ ]
577
1136
 
578
- query_params = []
1137
+ return self.api_client.param_serialize(
1138
+ method='GET',
1139
+ resource_path='/projects/{id}',
1140
+ path_params=_path_params,
1141
+ query_params=_query_params,
1142
+ header_params=_header_params,
1143
+ body=_body_params,
1144
+ post_params=_form_params,
1145
+ files=_files,
1146
+ auth_settings=_auth_settings,
1147
+ collection_formats=_collection_formats,
1148
+ _host=_host,
1149
+ _request_auth=_request_auth
1150
+ )
579
1151
 
580
- header_params = dict(local_var_params.get('_headers', {}))
581
1152
 
582
- form_params = []
583
- local_var_files = {}
584
1153
 
585
- body_params = None
586
- # HTTP header `Accept`
587
- header_params['Accept'] = self.api_client.select_header_accept(
588
- ['application/json']) # noqa: E501
589
1154
 
590
- # Authentication setting
591
- auth_settings = ['user'] # noqa: E501
1155
+ @validate_call
1156
+ async def read_projects_projects_get(
1157
+ self,
1158
+ latest: Optional[StrictBool] = None,
1159
+ id: Optional[StrictInt] = None,
1160
+ created_on: Optional[datetime] = None,
1161
+ owner_id: Optional[StrictInt] = None,
1162
+ name: Optional[StrictStr] = None,
1163
+ description: Optional[StrictStr] = None,
1164
+ starred: Optional[StrictBool] = None,
1165
+ _request_timeout: Union[
1166
+ None,
1167
+ Annotated[StrictFloat, Field(gt=0)],
1168
+ Tuple[
1169
+ Annotated[StrictFloat, Field(gt=0)],
1170
+ Annotated[StrictFloat, Field(gt=0)]
1171
+ ]
1172
+ ] = None,
1173
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1174
+ _content_type: Optional[StrictStr] = None,
1175
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1176
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1177
+ ) -> List[Project]:
1178
+ """List projects
1179
+
1180
+ List projects.
1181
+
1182
+ :param latest:
1183
+ :type latest: bool
1184
+ :param id:
1185
+ :type id: int
1186
+ :param created_on:
1187
+ :type created_on: datetime
1188
+ :param owner_id:
1189
+ :type owner_id: int
1190
+ :param name:
1191
+ :type name: str
1192
+ :param description:
1193
+ :type description: str
1194
+ :param starred:
1195
+ :type starred: bool
1196
+ :param _request_timeout: timeout setting for this request. If one
1197
+ number provided, it will be total request
1198
+ timeout. It can also be a pair (tuple) of
1199
+ (connection, read) timeouts.
1200
+ :type _request_timeout: int, tuple(int, int), optional
1201
+ :param _request_auth: set to override the auth_settings for an a single
1202
+ request; this effectively ignores the
1203
+ authentication in the spec for a single request.
1204
+ :type _request_auth: dict, optional
1205
+ :param _content_type: force content-type for the request.
1206
+ :type _content_type: str, Optional
1207
+ :param _headers: set to override the headers for a single
1208
+ request; this effectively ignores the headers
1209
+ in the spec for a single request.
1210
+ :type _headers: dict, optional
1211
+ :param _host_index: set to override the host_index for a single
1212
+ request; this effectively ignores the host_index
1213
+ in the spec for a single request.
1214
+ :type _host_index: int, optional
1215
+ :return: Returns the result object.
1216
+ """ # noqa: E501
1217
+
1218
+ _param = self._read_projects_projects_get_serialize(
1219
+ latest=latest,
1220
+ id=id,
1221
+ created_on=created_on,
1222
+ owner_id=owner_id,
1223
+ name=name,
1224
+ description=description,
1225
+ starred=starred,
1226
+ _request_auth=_request_auth,
1227
+ _content_type=_content_type,
1228
+ _headers=_headers,
1229
+ _host_index=_host_index
1230
+ )
592
1231
 
593
- response_types_map = {
594
- 200: "Project",
595
- 404: "HTTPNotFoundError",
596
- 422: "HTTPValidationError",
1232
+ _response_types_map: Dict[str, Optional[str]] = {
1233
+ '200': "List[Project]",
1234
+ '422': "HTTPValidationError"
1235
+
597
1236
  }
598
-
599
- return self.api_client.call_api(
600
- '/projects/{id}', 'GET',
601
- path_params,
602
- query_params,
603
- header_params,
604
- body=body_params,
605
- post_params=form_params,
606
- files=local_var_files,
607
- response_types_map=response_types_map,
608
- auth_settings=auth_settings,
609
- async_req=local_var_params.get('async_req'),
610
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
611
- _preload_content=local_var_params.get('_preload_content', True),
612
- _request_timeout=local_var_params.get('_request_timeout'),
613
- collection_formats=collection_formats,
614
- _request_auth=local_var_params.get('_request_auth'))
615
-
616
- def read_projects_projects_get(self, **kwargs): # noqa: E501
617
- """List projects # noqa: E501
618
-
619
- List projects. # noqa: E501
620
- This method makes a synchronous HTTP request by default. To make an
621
- asynchronous HTTP request, please pass async_req=True
622
-
623
- >>> thread = api.read_projects_projects_get(async_req=True)
624
- >>> result = thread.get()
625
-
626
- :param async_req: Whether to execute the request asynchronously.
627
- :type async_req: bool, optional
628
- :param _preload_content: if False, the urllib3.HTTPResponse object will
629
- be returned without reading/decoding response
630
- data. Default is True.
631
- :type _preload_content: bool, optional
1237
+ response_data = await self.api_client.call_api(
1238
+ *_param,
1239
+ _request_timeout=_request_timeout
1240
+ )
1241
+ await response_data.read()
1242
+ return self.api_client.response_deserialize(
1243
+ response_data=response_data,
1244
+ response_types_map=_response_types_map,
1245
+ ).data
1246
+
1247
+
1248
+ @validate_call
1249
+ async def read_projects_projects_get_with_http_info(
1250
+ self,
1251
+ latest: Optional[StrictBool] = None,
1252
+ id: Optional[StrictInt] = None,
1253
+ created_on: Optional[datetime] = None,
1254
+ owner_id: Optional[StrictInt] = None,
1255
+ name: Optional[StrictStr] = None,
1256
+ description: Optional[StrictStr] = None,
1257
+ starred: Optional[StrictBool] = None,
1258
+ _request_timeout: Union[
1259
+ None,
1260
+ Annotated[StrictFloat, Field(gt=0)],
1261
+ Tuple[
1262
+ Annotated[StrictFloat, Field(gt=0)],
1263
+ Annotated[StrictFloat, Field(gt=0)]
1264
+ ]
1265
+ ] = None,
1266
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1267
+ _content_type: Optional[StrictStr] = None,
1268
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1269
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1270
+ ) -> ApiResponse[List[Project]]:
1271
+ """List projects
1272
+
1273
+ List projects.
1274
+
1275
+ :param latest:
1276
+ :type latest: bool
1277
+ :param id:
1278
+ :type id: int
1279
+ :param created_on:
1280
+ :type created_on: datetime
1281
+ :param owner_id:
1282
+ :type owner_id: int
1283
+ :param name:
1284
+ :type name: str
1285
+ :param description:
1286
+ :type description: str
1287
+ :param starred:
1288
+ :type starred: bool
632
1289
  :param _request_timeout: timeout setting for this request. If one
633
1290
  number provided, it will be total request
634
1291
  timeout. It can also be a pair (tuple) of
635
1292
  (connection, read) timeouts.
1293
+ :type _request_timeout: int, tuple(int, int), optional
1294
+ :param _request_auth: set to override the auth_settings for an a single
1295
+ request; this effectively ignores the
1296
+ authentication in the spec for a single request.
1297
+ :type _request_auth: dict, optional
1298
+ :param _content_type: force content-type for the request.
1299
+ :type _content_type: str, Optional
1300
+ :param _headers: set to override the headers for a single
1301
+ request; this effectively ignores the headers
1302
+ in the spec for a single request.
1303
+ :type _headers: dict, optional
1304
+ :param _host_index: set to override the host_index for a single
1305
+ request; this effectively ignores the host_index
1306
+ in the spec for a single request.
1307
+ :type _host_index: int, optional
636
1308
  :return: Returns the result object.
637
- If the method is called asynchronously,
638
- returns the request thread.
639
- :rtype: list[Project]
640
- """
641
- kwargs['_return_http_data_only'] = True
642
- return self.read_projects_projects_get_with_http_info(**kwargs) # noqa: E501
643
-
644
- def read_projects_projects_get_with_http_info(self, **kwargs): # noqa: E501
645
- """List projects # noqa: E501
646
-
647
- List projects. # noqa: E501
648
- This method makes a synchronous HTTP request by default. To make an
649
- asynchronous HTTP request, please pass async_req=True
650
-
651
- >>> thread = api.read_projects_projects_get_with_http_info(async_req=True)
652
- >>> result = thread.get()
653
-
654
- :param async_req: Whether to execute the request asynchronously.
655
- :type async_req: bool, optional
656
- :param _return_http_data_only: response data without head status code
657
- and headers
658
- :type _return_http_data_only: bool, optional
659
- :param _preload_content: if False, the urllib3.HTTPResponse object will
660
- be returned without reading/decoding response
661
- data. Default is True.
662
- :type _preload_content: bool, optional
1309
+ """ # noqa: E501
1310
+
1311
+ _param = self._read_projects_projects_get_serialize(
1312
+ latest=latest,
1313
+ id=id,
1314
+ created_on=created_on,
1315
+ owner_id=owner_id,
1316
+ name=name,
1317
+ description=description,
1318
+ starred=starred,
1319
+ _request_auth=_request_auth,
1320
+ _content_type=_content_type,
1321
+ _headers=_headers,
1322
+ _host_index=_host_index
1323
+ )
1324
+
1325
+ _response_types_map: Dict[str, Optional[str]] = {
1326
+ '200': "List[Project]",
1327
+ '422': "HTTPValidationError"
1328
+
1329
+ }
1330
+ response_data = await self.api_client.call_api(
1331
+ *_param,
1332
+ _request_timeout=_request_timeout
1333
+ )
1334
+ await response_data.read()
1335
+ return self.api_client.response_deserialize(
1336
+ response_data=response_data,
1337
+ response_types_map=_response_types_map,
1338
+ )
1339
+
1340
+
1341
+ @validate_call
1342
+ async def read_projects_projects_get_without_preload_content(
1343
+ self,
1344
+ latest: Optional[StrictBool] = None,
1345
+ id: Optional[StrictInt] = None,
1346
+ created_on: Optional[datetime] = None,
1347
+ owner_id: Optional[StrictInt] = None,
1348
+ name: Optional[StrictStr] = None,
1349
+ description: Optional[StrictStr] = None,
1350
+ starred: Optional[StrictBool] = None,
1351
+ _request_timeout: Union[
1352
+ None,
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Tuple[
1355
+ Annotated[StrictFloat, Field(gt=0)],
1356
+ Annotated[StrictFloat, Field(gt=0)]
1357
+ ]
1358
+ ] = None,
1359
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1360
+ _content_type: Optional[StrictStr] = None,
1361
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1362
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1363
+ ) -> RESTResponseType:
1364
+ """List projects
1365
+
1366
+ List projects.
1367
+
1368
+ :param latest:
1369
+ :type latest: bool
1370
+ :param id:
1371
+ :type id: int
1372
+ :param created_on:
1373
+ :type created_on: datetime
1374
+ :param owner_id:
1375
+ :type owner_id: int
1376
+ :param name:
1377
+ :type name: str
1378
+ :param description:
1379
+ :type description: str
1380
+ :param starred:
1381
+ :type starred: bool
663
1382
  :param _request_timeout: timeout setting for this request. If one
664
1383
  number provided, it will be total request
665
1384
  timeout. It can also be a pair (tuple) of
666
1385
  (connection, read) timeouts.
1386
+ :type _request_timeout: int, tuple(int, int), optional
667
1387
  :param _request_auth: set to override the auth_settings for an a single
668
- request; this effectively ignores the authentication
669
- in the spec for a single request.
1388
+ request; this effectively ignores the
1389
+ authentication in the spec for a single request.
670
1390
  :type _request_auth: dict, optional
671
- :type _content_type: string, optional: force content-type for the request
1391
+ :param _content_type: force content-type for the request.
1392
+ :type _content_type: str, Optional
1393
+ :param _headers: set to override the headers for a single
1394
+ request; this effectively ignores the headers
1395
+ in the spec for a single request.
1396
+ :type _headers: dict, optional
1397
+ :param _host_index: set to override the host_index for a single
1398
+ request; this effectively ignores the host_index
1399
+ in the spec for a single request.
1400
+ :type _host_index: int, optional
672
1401
  :return: Returns the result object.
673
- If the method is called asynchronously,
674
- returns the request thread.
675
- :rtype: tuple(list[Project], status_code(int), headers(HTTPHeaderDict))
676
- """
1402
+ """ # noqa: E501
1403
+
1404
+ _param = self._read_projects_projects_get_serialize(
1405
+ latest=latest,
1406
+ id=id,
1407
+ created_on=created_on,
1408
+ owner_id=owner_id,
1409
+ name=name,
1410
+ description=description,
1411
+ starred=starred,
1412
+ _request_auth=_request_auth,
1413
+ _content_type=_content_type,
1414
+ _headers=_headers,
1415
+ _host_index=_host_index
1416
+ )
677
1417
 
678
- local_var_params = locals()
1418
+ _response_types_map: Dict[str, Optional[str]] = {
1419
+ '200': "List[Project]",
1420
+ '422': "HTTPValidationError"
1421
+
1422
+ }
1423
+ response_data = await self.api_client.call_api(
1424
+ *_param,
1425
+ _request_timeout=_request_timeout
1426
+ )
1427
+ return response_data.response
1428
+
1429
+
1430
+ def _read_projects_projects_get_serialize(
1431
+ self,
1432
+ latest,
1433
+ id,
1434
+ created_on,
1435
+ owner_id,
1436
+ name,
1437
+ description,
1438
+ starred,
1439
+ _request_auth,
1440
+ _content_type,
1441
+ _headers,
1442
+ _host_index,
1443
+ ) -> Tuple:
1444
+
1445
+ _host = None
1446
+
1447
+ _collection_formats: Dict[str, str] = {
1448
+
1449
+ }
679
1450
 
680
- all_params = [
681
- ]
682
- all_params.extend(
1451
+ _path_params: Dict[str, str] = {}
1452
+ _query_params: List[Tuple[str, str]] = []
1453
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1454
+ _form_params: List[Tuple[str, str]] = []
1455
+ _files: Dict[str, str] = {}
1456
+ _body_params: Optional[bytes] = None
1457
+
1458
+ # process the path parameters
1459
+ # process the query parameters
1460
+ if latest is not None:
1461
+
1462
+ _query_params.append(('latest', latest))
1463
+
1464
+ if id is not None:
1465
+
1466
+ _query_params.append(('id', id))
1467
+
1468
+ if created_on is not None:
1469
+ if isinstance(created_on, datetime):
1470
+ _query_params.append(
1471
+ (
1472
+ 'created_on',
1473
+ created_on.strftime(
1474
+ self.api_client.configuration.datetime_format
1475
+ )
1476
+ )
1477
+ )
1478
+ else:
1479
+ _query_params.append(('created_on', created_on))
1480
+
1481
+ if owner_id is not None:
1482
+
1483
+ _query_params.append(('owner_id', owner_id))
1484
+
1485
+ if name is not None:
1486
+
1487
+ _query_params.append(('name', name))
1488
+
1489
+ if description is not None:
1490
+
1491
+ _query_params.append(('description', description))
1492
+
1493
+ if starred is not None:
1494
+
1495
+ _query_params.append(('starred', starred))
1496
+
1497
+ # process the header parameters
1498
+ # process the form parameters
1499
+ # process the body parameter
1500
+
1501
+
1502
+ # set the HTTP header `Accept`
1503
+ _header_params['Accept'] = self.api_client.select_header_accept(
683
1504
  [
684
- 'async_req',
685
- '_return_http_data_only',
686
- '_preload_content',
687
- '_request_timeout',
688
- '_request_auth',
689
- '_content_type',
690
- '_headers'
1505
+ 'application/json'
691
1506
  ]
692
1507
  )
693
1508
 
694
- for key, val in six.iteritems(local_var_params['kwargs']):
695
- if key not in all_params:
696
- raise ApiTypeError(
697
- "Got an unexpected keyword argument '%s'"
698
- " to method read_projects_projects_get" % key
699
- )
700
- local_var_params[key] = val
701
- del local_var_params['kwargs']
702
1509
 
703
- collection_formats = {}
1510
+ # authentication setting
1511
+ _auth_settings: List[str] = [
1512
+ 'user'
1513
+ ]
704
1514
 
705
- path_params = {}
1515
+ return self.api_client.param_serialize(
1516
+ method='GET',
1517
+ resource_path='/projects',
1518
+ path_params=_path_params,
1519
+ query_params=_query_params,
1520
+ header_params=_header_params,
1521
+ body=_body_params,
1522
+ post_params=_form_params,
1523
+ files=_files,
1524
+ auth_settings=_auth_settings,
1525
+ collection_formats=_collection_formats,
1526
+ _host=_host,
1527
+ _request_auth=_request_auth
1528
+ )
706
1529
 
707
- query_params = []
708
1530
 
709
- header_params = dict(local_var_params.get('_headers', {}))
710
1531
 
711
- form_params = []
712
- local_var_files = {}
713
1532
 
714
- body_params = None
715
- # HTTP header `Accept`
716
- header_params['Accept'] = self.api_client.select_header_accept(
717
- ['application/json']) # noqa: E501
1533
+ @validate_call
1534
+ async def update_project_projects_id_put(
1535
+ self,
1536
+ id: StrictInt,
1537
+ project_in: ProjectIn,
1538
+ _request_timeout: Union[
1539
+ None,
1540
+ Annotated[StrictFloat, Field(gt=0)],
1541
+ Tuple[
1542
+ Annotated[StrictFloat, Field(gt=0)],
1543
+ Annotated[StrictFloat, Field(gt=0)]
1544
+ ]
1545
+ ] = None,
1546
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1547
+ _content_type: Optional[StrictStr] = None,
1548
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1549
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1550
+ ) -> Project:
1551
+ """Update project
718
1552
 
719
- # Authentication setting
720
- auth_settings = ['user'] # noqa: E501
1553
+ Update a project.
721
1554
 
722
- response_types_map = {
723
- 200: "list[Project]",
1555
+ :param id: (required)
1556
+ :type id: int
1557
+ :param project_in: (required)
1558
+ :type project_in: ProjectIn
1559
+ :param _request_timeout: timeout setting for this request. If one
1560
+ number provided, it will be total request
1561
+ timeout. It can also be a pair (tuple) of
1562
+ (connection, read) timeouts.
1563
+ :type _request_timeout: int, tuple(int, int), optional
1564
+ :param _request_auth: set to override the auth_settings for an a single
1565
+ request; this effectively ignores the
1566
+ authentication in the spec for a single request.
1567
+ :type _request_auth: dict, optional
1568
+ :param _content_type: force content-type for the request.
1569
+ :type _content_type: str, Optional
1570
+ :param _headers: set to override the headers for a single
1571
+ request; this effectively ignores the headers
1572
+ in the spec for a single request.
1573
+ :type _headers: dict, optional
1574
+ :param _host_index: set to override the host_index for a single
1575
+ request; this effectively ignores the host_index
1576
+ in the spec for a single request.
1577
+ :type _host_index: int, optional
1578
+ :return: Returns the result object.
1579
+ """ # noqa: E501
1580
+
1581
+ _param = self._update_project_projects_id_put_serialize(
1582
+ id=id,
1583
+ project_in=project_in,
1584
+ _request_auth=_request_auth,
1585
+ _content_type=_content_type,
1586
+ _headers=_headers,
1587
+ _host_index=_host_index
1588
+ )
1589
+
1590
+ _response_types_map: Dict[str, Optional[str]] = {
1591
+ '200': "Project",
1592
+ '404': "HTTPNotFoundError",
1593
+ '422': "HTTPValidationError"
1594
+
724
1595
  }
1596
+ response_data = await self.api_client.call_api(
1597
+ *_param,
1598
+ _request_timeout=_request_timeout
1599
+ )
1600
+ await response_data.read()
1601
+ return self.api_client.response_deserialize(
1602
+ response_data=response_data,
1603
+ response_types_map=_response_types_map,
1604
+ ).data
1605
+
1606
+
1607
+ @validate_call
1608
+ async def update_project_projects_id_put_with_http_info(
1609
+ self,
1610
+ id: StrictInt,
1611
+ project_in: ProjectIn,
1612
+ _request_timeout: Union[
1613
+ None,
1614
+ Annotated[StrictFloat, Field(gt=0)],
1615
+ Tuple[
1616
+ Annotated[StrictFloat, Field(gt=0)],
1617
+ Annotated[StrictFloat, Field(gt=0)]
1618
+ ]
1619
+ ] = None,
1620
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1621
+ _content_type: Optional[StrictStr] = None,
1622
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1623
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1624
+ ) -> ApiResponse[Project]:
1625
+ """Update project
725
1626
 
726
- return self.api_client.call_api(
727
- '/projects', 'GET',
728
- path_params,
729
- query_params,
730
- header_params,
731
- body=body_params,
732
- post_params=form_params,
733
- files=local_var_files,
734
- response_types_map=response_types_map,
735
- auth_settings=auth_settings,
736
- async_req=local_var_params.get('async_req'),
737
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
738
- _preload_content=local_var_params.get('_preload_content', True),
739
- _request_timeout=local_var_params.get('_request_timeout'),
740
- collection_formats=collection_formats,
741
- _request_auth=local_var_params.get('_request_auth'))
742
-
743
- def update_project_projects_id_put(self, id, project_in, **kwargs): # noqa: E501
744
- """Update project # noqa: E501
745
-
746
- Update a project. # noqa: E501
747
- This method makes a synchronous HTTP request by default. To make an
748
- asynchronous HTTP request, please pass async_req=True
749
-
750
- >>> thread = api.update_project_projects_id_put(id, project_in, async_req=True)
751
- >>> result = thread.get()
1627
+ Update a project.
752
1628
 
753
1629
  :param id: (required)
754
1630
  :type id: int
755
1631
  :param project_in: (required)
756
1632
  :type project_in: ProjectIn
757
- :param async_req: Whether to execute the request asynchronously.
758
- :type async_req: bool, optional
759
- :param _preload_content: if False, the urllib3.HTTPResponse object will
760
- be returned without reading/decoding response
761
- data. Default is True.
762
- :type _preload_content: bool, optional
763
1633
  :param _request_timeout: timeout setting for this request. If one
764
1634
  number provided, it will be total request
765
1635
  timeout. It can also be a pair (tuple) of
766
1636
  (connection, read) timeouts.
1637
+ :type _request_timeout: int, tuple(int, int), optional
1638
+ :param _request_auth: set to override the auth_settings for an a single
1639
+ request; this effectively ignores the
1640
+ authentication in the spec for a single request.
1641
+ :type _request_auth: dict, optional
1642
+ :param _content_type: force content-type for the request.
1643
+ :type _content_type: str, Optional
1644
+ :param _headers: set to override the headers for a single
1645
+ request; this effectively ignores the headers
1646
+ in the spec for a single request.
1647
+ :type _headers: dict, optional
1648
+ :param _host_index: set to override the host_index for a single
1649
+ request; this effectively ignores the host_index
1650
+ in the spec for a single request.
1651
+ :type _host_index: int, optional
767
1652
  :return: Returns the result object.
768
- If the method is called asynchronously,
769
- returns the request thread.
770
- :rtype: Project
771
- """
772
- kwargs['_return_http_data_only'] = True
773
- return self.update_project_projects_id_put_with_http_info(id, project_in, **kwargs) # noqa: E501
1653
+ """ # noqa: E501
1654
+
1655
+ _param = self._update_project_projects_id_put_serialize(
1656
+ id=id,
1657
+ project_in=project_in,
1658
+ _request_auth=_request_auth,
1659
+ _content_type=_content_type,
1660
+ _headers=_headers,
1661
+ _host_index=_host_index
1662
+ )
1663
+
1664
+ _response_types_map: Dict[str, Optional[str]] = {
1665
+ '200': "Project",
1666
+ '404': "HTTPNotFoundError",
1667
+ '422': "HTTPValidationError"
1668
+
1669
+ }
1670
+ response_data = await self.api_client.call_api(
1671
+ *_param,
1672
+ _request_timeout=_request_timeout
1673
+ )
1674
+ await response_data.read()
1675
+ return self.api_client.response_deserialize(
1676
+ response_data=response_data,
1677
+ response_types_map=_response_types_map,
1678
+ )
774
1679
 
775
- def update_project_projects_id_put_with_http_info(self, id, project_in, **kwargs): # noqa: E501
776
- """Update project # noqa: E501
777
1680
 
778
- Update a project. # noqa: E501
779
- This method makes a synchronous HTTP request by default. To make an
780
- asynchronous HTTP request, please pass async_req=True
1681
+ @validate_call
1682
+ async def update_project_projects_id_put_without_preload_content(
1683
+ self,
1684
+ id: StrictInt,
1685
+ project_in: ProjectIn,
1686
+ _request_timeout: Union[
1687
+ None,
1688
+ Annotated[StrictFloat, Field(gt=0)],
1689
+ Tuple[
1690
+ Annotated[StrictFloat, Field(gt=0)],
1691
+ Annotated[StrictFloat, Field(gt=0)]
1692
+ ]
1693
+ ] = None,
1694
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1695
+ _content_type: Optional[StrictStr] = None,
1696
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1697
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1698
+ ) -> RESTResponseType:
1699
+ """Update project
781
1700
 
782
- >>> thread = api.update_project_projects_id_put_with_http_info(id, project_in, async_req=True)
783
- >>> result = thread.get()
1701
+ Update a project.
784
1702
 
785
1703
  :param id: (required)
786
1704
  :type id: int
787
1705
  :param project_in: (required)
788
1706
  :type project_in: ProjectIn
789
- :param async_req: Whether to execute the request asynchronously.
790
- :type async_req: bool, optional
791
- :param _return_http_data_only: response data without head status code
792
- and headers
793
- :type _return_http_data_only: bool, optional
794
- :param _preload_content: if False, the urllib3.HTTPResponse object will
795
- be returned without reading/decoding response
796
- data. Default is True.
797
- :type _preload_content: bool, optional
798
1707
  :param _request_timeout: timeout setting for this request. If one
799
1708
  number provided, it will be total request
800
1709
  timeout. It can also be a pair (tuple) of
801
1710
  (connection, read) timeouts.
1711
+ :type _request_timeout: int, tuple(int, int), optional
802
1712
  :param _request_auth: set to override the auth_settings for an a single
803
- request; this effectively ignores the authentication
804
- in the spec for a single request.
1713
+ request; this effectively ignores the
1714
+ authentication in the spec for a single request.
805
1715
  :type _request_auth: dict, optional
806
- :type _content_type: string, optional: force content-type for the request
1716
+ :param _content_type: force content-type for the request.
1717
+ :type _content_type: str, Optional
1718
+ :param _headers: set to override the headers for a single
1719
+ request; this effectively ignores the headers
1720
+ in the spec for a single request.
1721
+ :type _headers: dict, optional
1722
+ :param _host_index: set to override the host_index for a single
1723
+ request; this effectively ignores the host_index
1724
+ in the spec for a single request.
1725
+ :type _host_index: int, optional
807
1726
  :return: Returns the result object.
808
- If the method is called asynchronously,
809
- returns the request thread.
810
- :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict))
811
- """
1727
+ """ # noqa: E501
1728
+
1729
+ _param = self._update_project_projects_id_put_serialize(
1730
+ id=id,
1731
+ project_in=project_in,
1732
+ _request_auth=_request_auth,
1733
+ _content_type=_content_type,
1734
+ _headers=_headers,
1735
+ _host_index=_host_index
1736
+ )
812
1737
 
813
- local_var_params = locals()
1738
+ _response_types_map: Dict[str, Optional[str]] = {
1739
+ '200': "Project",
1740
+ '404': "HTTPNotFoundError",
1741
+ '422': "HTTPValidationError"
1742
+
1743
+ }
1744
+ response_data = await self.api_client.call_api(
1745
+ *_param,
1746
+ _request_timeout=_request_timeout
1747
+ )
1748
+ return response_data.response
814
1749
 
815
- all_params = [
816
- 'id',
817
- 'project_in'
818
- ]
819
- all_params.extend(
1750
+
1751
+ def _update_project_projects_id_put_serialize(
1752
+ self,
1753
+ id,
1754
+ project_in,
1755
+ _request_auth,
1756
+ _content_type,
1757
+ _headers,
1758
+ _host_index,
1759
+ ) -> Tuple:
1760
+
1761
+ _host = None
1762
+
1763
+ _collection_formats: Dict[str, str] = {
1764
+
1765
+ }
1766
+
1767
+ _path_params: Dict[str, str] = {}
1768
+ _query_params: List[Tuple[str, str]] = []
1769
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1770
+ _form_params: List[Tuple[str, str]] = []
1771
+ _files: Dict[str, str] = {}
1772
+ _body_params: Optional[bytes] = None
1773
+
1774
+ # process the path parameters
1775
+ if id is not None:
1776
+ _path_params['id'] = id
1777
+ # process the query parameters
1778
+ # process the header parameters
1779
+ # process the form parameters
1780
+ # process the body parameter
1781
+ if project_in is not None:
1782
+ _body_params = project_in
1783
+
1784
+
1785
+ # set the HTTP header `Accept`
1786
+ _header_params['Accept'] = self.api_client.select_header_accept(
820
1787
  [
821
- 'async_req',
822
- '_return_http_data_only',
823
- '_preload_content',
824
- '_request_timeout',
825
- '_request_auth',
826
- '_content_type',
827
- '_headers'
1788
+ 'application/json'
828
1789
  ]
829
1790
  )
830
1791
 
831
- for key, val in six.iteritems(local_var_params['kwargs']):
832
- if key not in all_params:
833
- raise ApiTypeError(
834
- "Got an unexpected keyword argument '%s'"
835
- " to method update_project_projects_id_put" % key
1792
+ # set the HTTP header `Content-Type`
1793
+ if _content_type:
1794
+ _header_params['Content-Type'] = _content_type
1795
+ else:
1796
+ _default_content_type = (
1797
+ self.api_client.select_header_content_type(
1798
+ [
1799
+ 'application/json'
1800
+ ]
836
1801
  )
837
- local_var_params[key] = val
838
- del local_var_params['kwargs']
839
- # verify the required parameter 'id' is set
840
- if self.api_client.client_side_validation and local_var_params.get('id') is None: # noqa: E501
841
- raise ApiValueError("Missing the required parameter `id` when calling `update_project_projects_id_put`") # noqa: E501
842
- # verify the required parameter 'project_in' is set
843
- if self.api_client.client_side_validation and local_var_params.get('project_in') is None: # noqa: E501
844
- raise ApiValueError("Missing the required parameter `project_in` when calling `update_project_projects_id_put`") # noqa: E501
845
-
846
- collection_formats = {}
847
-
848
- path_params = {}
849
- if 'id' in local_var_params:
850
- path_params['id'] = local_var_params['id'] # noqa: E501
851
-
852
- query_params = []
853
-
854
- header_params = dict(local_var_params.get('_headers', {}))
855
-
856
- form_params = []
857
- local_var_files = {}
858
-
859
- body_params = None
860
- if 'project_in' in local_var_params:
861
- body_params = local_var_params['project_in']
862
- # HTTP header `Accept`
863
- header_params['Accept'] = self.api_client.select_header_accept(
864
- ['application/json']) # noqa: E501
865
-
866
- # HTTP header `Content-Type`
867
- content_types_list = local_var_params.get('_content_type',
868
- self.api_client.select_header_content_type(
869
- ['application/json'],
870
- 'PUT', body_params)) # noqa: E501
871
- if content_types_list:
872
- header_params['Content-Type'] = content_types_list
873
-
874
- # Authentication setting
875
- auth_settings = ['user'] # noqa: E501
876
-
877
- response_types_map = {
878
- 200: "Project",
879
- 404: "HTTPNotFoundError",
880
- 422: "HTTPValidationError",
881
- }
1802
+ )
1803
+ if _default_content_type is not None:
1804
+ _header_params['Content-Type'] = _default_content_type
1805
+
1806
+ # authentication setting
1807
+ _auth_settings: List[str] = [
1808
+ 'user'
1809
+ ]
1810
+
1811
+ return self.api_client.param_serialize(
1812
+ method='PUT',
1813
+ resource_path='/projects/{id}',
1814
+ path_params=_path_params,
1815
+ query_params=_query_params,
1816
+ header_params=_header_params,
1817
+ body=_body_params,
1818
+ post_params=_form_params,
1819
+ files=_files,
1820
+ auth_settings=_auth_settings,
1821
+ collection_formats=_collection_formats,
1822
+ _host=_host,
1823
+ _request_auth=_request_auth
1824
+ )
1825
+
882
1826
 
883
- return self.api_client.call_api(
884
- '/projects/{id}', 'PUT',
885
- path_params,
886
- query_params,
887
- header_params,
888
- body=body_params,
889
- post_params=form_params,
890
- files=local_var_files,
891
- response_types_map=response_types_map,
892
- auth_settings=auth_settings,
893
- async_req=local_var_params.get('async_req'),
894
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
895
- _preload_content=local_var_params.get('_preload_content', True),
896
- _request_timeout=local_var_params.get('_request_timeout'),
897
- collection_formats=collection_formats,
898
- _request_auth=local_var_params.get('_request_auth'))