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