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