across-server-openapi-python 0.0.1__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 (128) hide show
  1. across/__init__.py +0 -0
  2. across/sdk/__init__.py +0 -0
  3. across/sdk/v1/__init__.py +251 -0
  4. across/sdk/v1/abstract_credential_storage.py +16 -0
  5. across/sdk/v1/api/__init__.py +20 -0
  6. across/sdk/v1/api/auth_api.py +1097 -0
  7. across/sdk/v1/api/filter_api.py +623 -0
  8. across/sdk/v1/api/group_api.py +586 -0
  9. across/sdk/v1/api/group_invite_api.py +1165 -0
  10. across/sdk/v1/api/group_role_api.py +2070 -0
  11. across/sdk/v1/api/instrument_api.py +633 -0
  12. across/sdk/v1/api/internal_api.py +571 -0
  13. across/sdk/v1/api/observation_api.py +940 -0
  14. across/sdk/v1/api/observatory_api.py +670 -0
  15. across/sdk/v1/api/permission_api.py +285 -0
  16. across/sdk/v1/api/role_api.py +552 -0
  17. across/sdk/v1/api/schedule_api.py +1914 -0
  18. across/sdk/v1/api/service_account_api.py +2353 -0
  19. across/sdk/v1/api/telescope_api.py +667 -0
  20. across/sdk/v1/api/tle_api.py +317 -0
  21. across/sdk/v1/api/tools_api.py +812 -0
  22. across/sdk/v1/api/user_api.py +2263 -0
  23. across/sdk/v1/api_client.py +801 -0
  24. across/sdk/v1/api_client_wrapper.py +239 -0
  25. across/sdk/v1/api_response.py +21 -0
  26. across/sdk/v1/configuration.py +605 -0
  27. across/sdk/v1/exceptions.py +216 -0
  28. across/sdk/v1/models/__init__.py +103 -0
  29. across/sdk/v1/models/access_token_response.py +89 -0
  30. across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +104 -0
  31. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +124 -0
  32. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +106 -0
  33. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +95 -0
  34. across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +111 -0
  35. across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
  36. across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +96 -0
  37. across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account.py +90 -0
  38. across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account_secret.py +92 -0
  39. across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
  40. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +99 -0
  41. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +99 -0
  42. across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +135 -0
  43. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +111 -0
  44. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +118 -0
  45. across/sdk/v1/models/alt_az_constraint.py +130 -0
  46. across/sdk/v1/models/bandpass.py +149 -0
  47. across/sdk/v1/models/bandpass_type.py +155 -0
  48. across/sdk/v1/models/constrained_date.py +93 -0
  49. across/sdk/v1/models/constraint_reason.py +89 -0
  50. across/sdk/v1/models/constraint_type.py +43 -0
  51. across/sdk/v1/models/coordinate.py +100 -0
  52. across/sdk/v1/models/date_range.py +90 -0
  53. across/sdk/v1/models/depth_unit.py +39 -0
  54. across/sdk/v1/models/earth_limb_constraint.py +124 -0
  55. across/sdk/v1/models/energy_bandpass.py +121 -0
  56. across/sdk/v1/models/energy_unit.py +40 -0
  57. across/sdk/v1/models/ephemeris_type.py +39 -0
  58. across/sdk/v1/models/filter.py +135 -0
  59. across/sdk/v1/models/frequency_bandpass.py +121 -0
  60. across/sdk/v1/models/frequency_unit.py +40 -0
  61. across/sdk/v1/models/grant_type.py +37 -0
  62. across/sdk/v1/models/ground_parameters.py +91 -0
  63. across/sdk/v1/models/group_invite_create.py +87 -0
  64. across/sdk/v1/models/group_invite_group_details.py +94 -0
  65. across/sdk/v1/models/group_read.py +91 -0
  66. across/sdk/v1/models/group_role_create.py +89 -0
  67. across/sdk/v1/models/group_role_read.py +99 -0
  68. across/sdk/v1/models/http_validation_error.py +95 -0
  69. across/sdk/v1/models/id_name_schema.py +96 -0
  70. across/sdk/v1/models/instrument.py +163 -0
  71. across/sdk/v1/models/instrument_constraints_inner.py +237 -0
  72. across/sdk/v1/models/ivoa_obs_category.py +39 -0
  73. across/sdk/v1/models/ivoa_obs_tracking_type.py +38 -0
  74. across/sdk/v1/models/jpl_parameters.py +87 -0
  75. across/sdk/v1/models/moon_angle_constraint.py +124 -0
  76. across/sdk/v1/models/nullable_date_range.py +100 -0
  77. across/sdk/v1/models/observation.py +248 -0
  78. across/sdk/v1/models/observation_create.py +249 -0
  79. across/sdk/v1/models/observation_status.py +40 -0
  80. across/sdk/v1/models/observation_type.py +39 -0
  81. across/sdk/v1/models/observatory.py +145 -0
  82. across/sdk/v1/models/observatory_ephemeris_type.py +96 -0
  83. across/sdk/v1/models/observatory_type.py +37 -0
  84. across/sdk/v1/models/page_observation.py +116 -0
  85. across/sdk/v1/models/page_schedule.py +116 -0
  86. across/sdk/v1/models/parameters.py +164 -0
  87. across/sdk/v1/models/permission.py +89 -0
  88. across/sdk/v1/models/point.py +89 -0
  89. across/sdk/v1/models/role.py +100 -0
  90. across/sdk/v1/models/role_base.py +89 -0
  91. across/sdk/v1/models/saa_polygon_constraint.py +101 -0
  92. across/sdk/v1/models/schedule.py +144 -0
  93. across/sdk/v1/models/schedule_cadence.py +99 -0
  94. across/sdk/v1/models/schedule_create.py +123 -0
  95. across/sdk/v1/models/schedule_create_many.py +97 -0
  96. across/sdk/v1/models/schedule_fidelity.py +37 -0
  97. across/sdk/v1/models/schedule_status.py +38 -0
  98. across/sdk/v1/models/service_account_create.py +101 -0
  99. across/sdk/v1/models/service_account_secret.py +103 -0
  100. across/sdk/v1/models/service_account_update.py +106 -0
  101. across/sdk/v1/models/spice_parameters.py +89 -0
  102. across/sdk/v1/models/sun_angle_constraint.py +124 -0
  103. across/sdk/v1/models/system_service_account.py +121 -0
  104. across/sdk/v1/models/system_service_account_secret.py +123 -0
  105. across/sdk/v1/models/telescope.py +135 -0
  106. across/sdk/v1/models/telescope_instrument.py +163 -0
  107. across/sdk/v1/models/tle.py +99 -0
  108. across/sdk/v1/models/tle_create.py +94 -0
  109. across/sdk/v1/models/tle_parameters.py +89 -0
  110. across/sdk/v1/models/unit_value.py +94 -0
  111. across/sdk/v1/models/user_create.py +93 -0
  112. across/sdk/v1/models/user_info.py +95 -0
  113. across/sdk/v1/models/user_update.py +106 -0
  114. across/sdk/v1/models/validation_error.py +99 -0
  115. across/sdk/v1/models/validation_error_loc_inner.py +138 -0
  116. across/sdk/v1/models/visibility_result.py +97 -0
  117. across/sdk/v1/models/visibility_type.py +38 -0
  118. across/sdk/v1/models/visibility_window.py +99 -0
  119. across/sdk/v1/models/wavelength_bandpass.py +142 -0
  120. across/sdk/v1/models/wavelength_unit.py +39 -0
  121. across/sdk/v1/models/window.py +96 -0
  122. across/sdk/v1/py.typed +0 -0
  123. across/sdk/v1/rest.py +258 -0
  124. across_server_openapi_python-0.0.1.dist-info/METADATA +326 -0
  125. across_server_openapi_python-0.0.1.dist-info/RECORD +128 -0
  126. across_server_openapi_python-0.0.1.dist-info/WHEEL +5 -0
  127. across_server_openapi_python-0.0.1.dist-info/licenses/LICENSE +42 -0
  128. across_server_openapi_python-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,571 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ACROSS Server
5
+
6
+ Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
7
+
8
+ The version of the OpenAPI document: 0.3.2
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 pydantic import StrictStr
20
+ from across.sdk.v1.models.system_service_account import SystemServiceAccount
21
+
22
+ from across.sdk.v1.api_client import ApiClient, RequestSerialized
23
+ from across.sdk.v1.api_response import ApiResponse
24
+ from across.sdk.v1.rest import RESTResponseType
25
+
26
+
27
+ class InternalApi:
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None) -> None:
35
+ if api_client is None:
36
+ api_client = ApiClient.get_default()
37
+ self.api_client = api_client
38
+
39
+
40
+ @validate_call
41
+ def get_service_account(
42
+ self,
43
+ service_account_id: StrictStr,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Annotated[StrictFloat, Field(gt=0)]
50
+ ]
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> SystemServiceAccount:
57
+ """Get a system service account
58
+
59
+ Rotate service account key and reset expiration based on expiration duration
60
+
61
+ :param service_account_id: (required)
62
+ :type service_account_id: str
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._get_service_account_serialize(
86
+ service_account_id=service_account_id,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ '200': "SystemServiceAccount",
95
+ '404': None,
96
+ '422': "HTTPValidationError",
97
+ }
98
+ response_data = self.api_client.call_api(
99
+ *_param,
100
+ _request_timeout=_request_timeout
101
+ )
102
+ response_data.read()
103
+ return self.api_client.response_deserialize(
104
+ response_data=response_data,
105
+ response_types_map=_response_types_map,
106
+ ).data
107
+
108
+
109
+ @validate_call
110
+ def get_service_account_with_http_info(
111
+ self,
112
+ service_account_id: StrictStr,
113
+ _request_timeout: Union[
114
+ None,
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Tuple[
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Annotated[StrictFloat, Field(gt=0)]
119
+ ]
120
+ ] = None,
121
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
122
+ _content_type: Optional[StrictStr] = None,
123
+ _headers: Optional[Dict[StrictStr, Any]] = None,
124
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
125
+ ) -> ApiResponse[SystemServiceAccount]:
126
+ """Get a system service account
127
+
128
+ Rotate service account key and reset expiration based on expiration duration
129
+
130
+ :param service_account_id: (required)
131
+ :type service_account_id: str
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._get_service_account_serialize(
155
+ service_account_id=service_account_id,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '200': "SystemServiceAccount",
164
+ '404': None,
165
+ '422': "HTTPValidationError",
166
+ }
167
+ response_data = self.api_client.call_api(
168
+ *_param,
169
+ _request_timeout=_request_timeout
170
+ )
171
+ response_data.read()
172
+ return self.api_client.response_deserialize(
173
+ response_data=response_data,
174
+ response_types_map=_response_types_map,
175
+ )
176
+
177
+
178
+ @validate_call
179
+ def get_service_account_without_preload_content(
180
+ self,
181
+ service_account_id: StrictStr,
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Annotated[StrictFloat, Field(gt=0)]
188
+ ]
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Get a system service account
196
+
197
+ Rotate service account key and reset expiration based on expiration duration
198
+
199
+ :param service_account_id: (required)
200
+ :type service_account_id: str
201
+ :param _request_timeout: timeout setting for this request. If one
202
+ number provided, it will be total request
203
+ timeout. It can also be a pair (tuple) of
204
+ (connection, read) timeouts.
205
+ :type _request_timeout: int, tuple(int, int), optional
206
+ :param _request_auth: set to override the auth_settings for an a single
207
+ request; this effectively ignores the
208
+ authentication in the spec for a single request.
209
+ :type _request_auth: dict, optional
210
+ :param _content_type: force content-type for the request.
211
+ :type _content_type: str, Optional
212
+ :param _headers: set to override the headers for a single
213
+ request; this effectively ignores the headers
214
+ in the spec for a single request.
215
+ :type _headers: dict, optional
216
+ :param _host_index: set to override the host_index for a single
217
+ request; this effectively ignores the host_index
218
+ in the spec for a single request.
219
+ :type _host_index: int, optional
220
+ :return: Returns the result object.
221
+ """ # noqa: E501
222
+
223
+ _param = self._get_service_account_serialize(
224
+ service_account_id=service_account_id,
225
+ _request_auth=_request_auth,
226
+ _content_type=_content_type,
227
+ _headers=_headers,
228
+ _host_index=_host_index
229
+ )
230
+
231
+ _response_types_map: Dict[str, Optional[str]] = {
232
+ '200': "SystemServiceAccount",
233
+ '404': None,
234
+ '422': "HTTPValidationError",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ return response_data.response
241
+
242
+
243
+ def _get_service_account_serialize(
244
+ self,
245
+ service_account_id,
246
+ _request_auth,
247
+ _content_type,
248
+ _headers,
249
+ _host_index,
250
+ ) -> RequestSerialized:
251
+
252
+ _host = None
253
+
254
+ _collection_formats: Dict[str, str] = {
255
+ }
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[
262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
263
+ ] = {}
264
+ _body_params: Optional[bytes] = None
265
+
266
+ # process the path parameters
267
+ if service_account_id is not None:
268
+ _path_params['service_account_id'] = service_account_id
269
+ # process the query parameters
270
+ # process the header parameters
271
+ # process the form parameters
272
+ # process the body parameter
273
+
274
+
275
+ # set the HTTP header `Accept`
276
+ if 'Accept' not in _header_params:
277
+ _header_params['Accept'] = self.api_client.select_header_accept(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+
283
+
284
+ # authentication setting
285
+ _auth_settings: List[str] = [
286
+ 'Authorization'
287
+ ]
288
+
289
+ return self.api_client.param_serialize(
290
+ method='GET',
291
+ resource_path='/service-account/{service_account_id}',
292
+ path_params=_path_params,
293
+ query_params=_query_params,
294
+ header_params=_header_params,
295
+ body=_body_params,
296
+ post_params=_form_params,
297
+ files=_files,
298
+ auth_settings=_auth_settings,
299
+ collection_formats=_collection_formats,
300
+ _host=_host,
301
+ _request_auth=_request_auth
302
+ )
303
+
304
+
305
+
306
+
307
+ @validate_call
308
+ def service_account_rotate_key(
309
+ self,
310
+ service_account_id: StrictStr,
311
+ _request_timeout: Union[
312
+ None,
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Tuple[
315
+ Annotated[StrictFloat, Field(gt=0)],
316
+ Annotated[StrictFloat, Field(gt=0)]
317
+ ]
318
+ ] = None,
319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
320
+ _content_type: Optional[StrictStr] = None,
321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
323
+ ) -> SystemServiceAccount:
324
+ """Rotate a service account key
325
+
326
+ Rotate service account key and reset expiration based on expiration duration
327
+
328
+ :param service_account_id: (required)
329
+ :type service_account_id: str
330
+ :param _request_timeout: timeout setting for this request. If one
331
+ number provided, it will be total request
332
+ timeout. It can also be a pair (tuple) of
333
+ (connection, read) timeouts.
334
+ :type _request_timeout: int, tuple(int, int), optional
335
+ :param _request_auth: set to override the auth_settings for an a single
336
+ request; this effectively ignores the
337
+ authentication in the spec for a single request.
338
+ :type _request_auth: dict, optional
339
+ :param _content_type: force content-type for the request.
340
+ :type _content_type: str, Optional
341
+ :param _headers: set to override the headers for a single
342
+ request; this effectively ignores the headers
343
+ in the spec for a single request.
344
+ :type _headers: dict, optional
345
+ :param _host_index: set to override the host_index for a single
346
+ request; this effectively ignores the host_index
347
+ in the spec for a single request.
348
+ :type _host_index: int, optional
349
+ :return: Returns the result object.
350
+ """ # noqa: E501
351
+
352
+ _param = self._service_account_rotate_key_serialize(
353
+ service_account_id=service_account_id,
354
+ _request_auth=_request_auth,
355
+ _content_type=_content_type,
356
+ _headers=_headers,
357
+ _host_index=_host_index
358
+ )
359
+
360
+ _response_types_map: Dict[str, Optional[str]] = {
361
+ '200': "SystemServiceAccount",
362
+ '404': None,
363
+ '422': "HTTPValidationError",
364
+ }
365
+ response_data = self.api_client.call_api(
366
+ *_param,
367
+ _request_timeout=_request_timeout
368
+ )
369
+ response_data.read()
370
+ return self.api_client.response_deserialize(
371
+ response_data=response_data,
372
+ response_types_map=_response_types_map,
373
+ ).data
374
+
375
+
376
+ @validate_call
377
+ def service_account_rotate_key_with_http_info(
378
+ self,
379
+ service_account_id: StrictStr,
380
+ _request_timeout: Union[
381
+ None,
382
+ Annotated[StrictFloat, Field(gt=0)],
383
+ Tuple[
384
+ Annotated[StrictFloat, Field(gt=0)],
385
+ Annotated[StrictFloat, Field(gt=0)]
386
+ ]
387
+ ] = None,
388
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
389
+ _content_type: Optional[StrictStr] = None,
390
+ _headers: Optional[Dict[StrictStr, Any]] = None,
391
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
392
+ ) -> ApiResponse[SystemServiceAccount]:
393
+ """Rotate a service account key
394
+
395
+ Rotate service account key and reset expiration based on expiration duration
396
+
397
+ :param service_account_id: (required)
398
+ :type service_account_id: str
399
+ :param _request_timeout: timeout setting for this request. If one
400
+ number provided, it will be total request
401
+ timeout. It can also be a pair (tuple) of
402
+ (connection, read) timeouts.
403
+ :type _request_timeout: int, tuple(int, int), optional
404
+ :param _request_auth: set to override the auth_settings for an a single
405
+ request; this effectively ignores the
406
+ authentication in the spec for a single request.
407
+ :type _request_auth: dict, optional
408
+ :param _content_type: force content-type for the request.
409
+ :type _content_type: str, Optional
410
+ :param _headers: set to override the headers for a single
411
+ request; this effectively ignores the headers
412
+ in the spec for a single request.
413
+ :type _headers: dict, optional
414
+ :param _host_index: set to override the host_index for a single
415
+ request; this effectively ignores the host_index
416
+ in the spec for a single request.
417
+ :type _host_index: int, optional
418
+ :return: Returns the result object.
419
+ """ # noqa: E501
420
+
421
+ _param = self._service_account_rotate_key_serialize(
422
+ service_account_id=service_account_id,
423
+ _request_auth=_request_auth,
424
+ _content_type=_content_type,
425
+ _headers=_headers,
426
+ _host_index=_host_index
427
+ )
428
+
429
+ _response_types_map: Dict[str, Optional[str]] = {
430
+ '200': "SystemServiceAccount",
431
+ '404': None,
432
+ '422': "HTTPValidationError",
433
+ }
434
+ response_data = self.api_client.call_api(
435
+ *_param,
436
+ _request_timeout=_request_timeout
437
+ )
438
+ response_data.read()
439
+ return self.api_client.response_deserialize(
440
+ response_data=response_data,
441
+ response_types_map=_response_types_map,
442
+ )
443
+
444
+
445
+ @validate_call
446
+ def service_account_rotate_key_without_preload_content(
447
+ self,
448
+ service_account_id: StrictStr,
449
+ _request_timeout: Union[
450
+ None,
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Tuple[
453
+ Annotated[StrictFloat, Field(gt=0)],
454
+ Annotated[StrictFloat, Field(gt=0)]
455
+ ]
456
+ ] = None,
457
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
458
+ _content_type: Optional[StrictStr] = None,
459
+ _headers: Optional[Dict[StrictStr, Any]] = None,
460
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
461
+ ) -> RESTResponseType:
462
+ """Rotate a service account key
463
+
464
+ Rotate service account key and reset expiration based on expiration duration
465
+
466
+ :param service_account_id: (required)
467
+ :type service_account_id: str
468
+ :param _request_timeout: timeout setting for this request. If one
469
+ number provided, it will be total request
470
+ timeout. It can also be a pair (tuple) of
471
+ (connection, read) timeouts.
472
+ :type _request_timeout: int, tuple(int, int), optional
473
+ :param _request_auth: set to override the auth_settings for an a single
474
+ request; this effectively ignores the
475
+ authentication in the spec for a single request.
476
+ :type _request_auth: dict, optional
477
+ :param _content_type: force content-type for the request.
478
+ :type _content_type: str, Optional
479
+ :param _headers: set to override the headers for a single
480
+ request; this effectively ignores the headers
481
+ in the spec for a single request.
482
+ :type _headers: dict, optional
483
+ :param _host_index: set to override the host_index for a single
484
+ request; this effectively ignores the host_index
485
+ in the spec for a single request.
486
+ :type _host_index: int, optional
487
+ :return: Returns the result object.
488
+ """ # noqa: E501
489
+
490
+ _param = self._service_account_rotate_key_serialize(
491
+ service_account_id=service_account_id,
492
+ _request_auth=_request_auth,
493
+ _content_type=_content_type,
494
+ _headers=_headers,
495
+ _host_index=_host_index
496
+ )
497
+
498
+ _response_types_map: Dict[str, Optional[str]] = {
499
+ '200': "SystemServiceAccount",
500
+ '404': None,
501
+ '422': "HTTPValidationError",
502
+ }
503
+ response_data = self.api_client.call_api(
504
+ *_param,
505
+ _request_timeout=_request_timeout
506
+ )
507
+ return response_data.response
508
+
509
+
510
+ def _service_account_rotate_key_serialize(
511
+ self,
512
+ service_account_id,
513
+ _request_auth,
514
+ _content_type,
515
+ _headers,
516
+ _host_index,
517
+ ) -> RequestSerialized:
518
+
519
+ _host = None
520
+
521
+ _collection_formats: Dict[str, str] = {
522
+ }
523
+
524
+ _path_params: Dict[str, str] = {}
525
+ _query_params: List[Tuple[str, str]] = []
526
+ _header_params: Dict[str, Optional[str]] = _headers or {}
527
+ _form_params: List[Tuple[str, str]] = []
528
+ _files: Dict[
529
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
530
+ ] = {}
531
+ _body_params: Optional[bytes] = None
532
+
533
+ # process the path parameters
534
+ if service_account_id is not None:
535
+ _path_params['service_account_id'] = service_account_id
536
+ # process the query parameters
537
+ # process the header parameters
538
+ # process the form parameters
539
+ # process the body parameter
540
+
541
+
542
+ # set the HTTP header `Accept`
543
+ if 'Accept' not in _header_params:
544
+ _header_params['Accept'] = self.api_client.select_header_accept(
545
+ [
546
+ 'application/json'
547
+ ]
548
+ )
549
+
550
+
551
+ # authentication setting
552
+ _auth_settings: List[str] = [
553
+ 'Authorization'
554
+ ]
555
+
556
+ return self.api_client.param_serialize(
557
+ method='PATCH',
558
+ resource_path='/service-account/{service_account_id}/rotate_key',
559
+ path_params=_path_params,
560
+ query_params=_query_params,
561
+ header_params=_header_params,
562
+ body=_body_params,
563
+ post_params=_form_params,
564
+ files=_files,
565
+ auth_settings=_auth_settings,
566
+ collection_formats=_collection_formats,
567
+ _host=_host,
568
+ _request_auth=_request_auth
569
+ )
570
+
571
+