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,1097 @@
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 typing import Any, Dict
21
+ from across.sdk.v1.models.access_token_response import AccessTokenResponse
22
+ from across.sdk.v1.models.grant_type import GrantType
23
+
24
+ from across.sdk.v1.api_client import ApiClient, RequestSerialized
25
+ from across.sdk.v1.api_response import ApiResponse
26
+ from across.sdk.v1.rest import RESTResponseType
27
+
28
+
29
+ class AuthApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def login(
44
+ self,
45
+ email: StrictStr,
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> Dict[str, object]:
59
+ """Login
60
+
61
+
62
+ :param email: (required)
63
+ :type email: str
64
+ :param _request_timeout: timeout setting for this request. If one
65
+ number provided, it will be total request
66
+ timeout. It can also be a pair (tuple) of
67
+ (connection, read) timeouts.
68
+ :type _request_timeout: int, tuple(int, int), optional
69
+ :param _request_auth: set to override the auth_settings for an a single
70
+ request; this effectively ignores the
71
+ authentication in the spec for a single request.
72
+ :type _request_auth: dict, optional
73
+ :param _content_type: force content-type for the request.
74
+ :type _content_type: str, Optional
75
+ :param _headers: set to override the headers for a single
76
+ request; this effectively ignores the headers
77
+ in the spec for a single request.
78
+ :type _headers: dict, optional
79
+ :param _host_index: set to override the host_index for a single
80
+ request; this effectively ignores the host_index
81
+ in the spec for a single request.
82
+ :type _host_index: int, optional
83
+ :return: Returns the result object.
84
+ """ # noqa: E501
85
+
86
+ _param = self._login_serialize(
87
+ email=email,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '200': "Dict[str, object]",
96
+ '404': None,
97
+ '422': "HTTPValidationError",
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def login_with_http_info(
112
+ self,
113
+ email: StrictStr,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[Dict[str, object]]:
127
+ """Login
128
+
129
+
130
+ :param email: (required)
131
+ :type email: 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._login_serialize(
155
+ email=email,
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': "Dict[str, object]",
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 login_without_preload_content(
180
+ self,
181
+ email: 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
+ """Login
196
+
197
+
198
+ :param email: (required)
199
+ :type email: str
200
+ :param _request_timeout: timeout setting for this request. If one
201
+ number provided, it will be total request
202
+ timeout. It can also be a pair (tuple) of
203
+ (connection, read) timeouts.
204
+ :type _request_timeout: int, tuple(int, int), optional
205
+ :param _request_auth: set to override the auth_settings for an a single
206
+ request; this effectively ignores the
207
+ authentication in the spec for a single request.
208
+ :type _request_auth: dict, optional
209
+ :param _content_type: force content-type for the request.
210
+ :type _content_type: str, Optional
211
+ :param _headers: set to override the headers for a single
212
+ request; this effectively ignores the headers
213
+ in the spec for a single request.
214
+ :type _headers: dict, optional
215
+ :param _host_index: set to override the host_index for a single
216
+ request; this effectively ignores the host_index
217
+ in the spec for a single request.
218
+ :type _host_index: int, optional
219
+ :return: Returns the result object.
220
+ """ # noqa: E501
221
+
222
+ _param = self._login_serialize(
223
+ email=email,
224
+ _request_auth=_request_auth,
225
+ _content_type=_content_type,
226
+ _headers=_headers,
227
+ _host_index=_host_index
228
+ )
229
+
230
+ _response_types_map: Dict[str, Optional[str]] = {
231
+ '200': "Dict[str, object]",
232
+ '404': None,
233
+ '422': "HTTPValidationError",
234
+ }
235
+ response_data = self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _login_serialize(
243
+ self,
244
+ email,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ # process the query parameters
267
+ if email is not None:
268
+
269
+ _query_params.append(('email', email))
270
+
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+
275
+
276
+ # set the HTTP header `Accept`
277
+ if 'Accept' not in _header_params:
278
+ _header_params['Accept'] = self.api_client.select_header_accept(
279
+ [
280
+ 'application/json'
281
+ ]
282
+ )
283
+
284
+
285
+ # authentication setting
286
+ _auth_settings: List[str] = [
287
+ 'Authorization'
288
+ ]
289
+
290
+ return self.api_client.param_serialize(
291
+ method='POST',
292
+ resource_path='/auth/login',
293
+ path_params=_path_params,
294
+ query_params=_query_params,
295
+ header_params=_header_params,
296
+ body=_body_params,
297
+ post_params=_form_params,
298
+ files=_files,
299
+ auth_settings=_auth_settings,
300
+ collection_formats=_collection_formats,
301
+ _host=_host,
302
+ _request_auth=_request_auth
303
+ )
304
+
305
+
306
+
307
+
308
+ @validate_call
309
+ def refresh(
310
+ self,
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
+ ) -> AccessTokenResponse:
324
+ """Refresh Token
325
+
326
+
327
+ :param _request_timeout: timeout setting for this request. If one
328
+ number provided, it will be total request
329
+ timeout. It can also be a pair (tuple) of
330
+ (connection, read) timeouts.
331
+ :type _request_timeout: int, tuple(int, int), optional
332
+ :param _request_auth: set to override the auth_settings for an a single
333
+ request; this effectively ignores the
334
+ authentication in the spec for a single request.
335
+ :type _request_auth: dict, optional
336
+ :param _content_type: force content-type for the request.
337
+ :type _content_type: str, Optional
338
+ :param _headers: set to override the headers for a single
339
+ request; this effectively ignores the headers
340
+ in the spec for a single request.
341
+ :type _headers: dict, optional
342
+ :param _host_index: set to override the host_index for a single
343
+ request; this effectively ignores the host_index
344
+ in the spec for a single request.
345
+ :type _host_index: int, optional
346
+ :return: Returns the result object.
347
+ """ # noqa: E501
348
+
349
+ _param = self._refresh_serialize(
350
+ _request_auth=_request_auth,
351
+ _content_type=_content_type,
352
+ _headers=_headers,
353
+ _host_index=_host_index
354
+ )
355
+
356
+ _response_types_map: Dict[str, Optional[str]] = {
357
+ '200': "AccessTokenResponse",
358
+ '404': None,
359
+ }
360
+ response_data = self.api_client.call_api(
361
+ *_param,
362
+ _request_timeout=_request_timeout
363
+ )
364
+ response_data.read()
365
+ return self.api_client.response_deserialize(
366
+ response_data=response_data,
367
+ response_types_map=_response_types_map,
368
+ ).data
369
+
370
+
371
+ @validate_call
372
+ def refresh_with_http_info(
373
+ self,
374
+ _request_timeout: Union[
375
+ None,
376
+ Annotated[StrictFloat, Field(gt=0)],
377
+ Tuple[
378
+ Annotated[StrictFloat, Field(gt=0)],
379
+ Annotated[StrictFloat, Field(gt=0)]
380
+ ]
381
+ ] = None,
382
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
383
+ _content_type: Optional[StrictStr] = None,
384
+ _headers: Optional[Dict[StrictStr, Any]] = None,
385
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
386
+ ) -> ApiResponse[AccessTokenResponse]:
387
+ """Refresh Token
388
+
389
+
390
+ :param _request_timeout: timeout setting for this request. If one
391
+ number provided, it will be total request
392
+ timeout. It can also be a pair (tuple) of
393
+ (connection, read) timeouts.
394
+ :type _request_timeout: int, tuple(int, int), optional
395
+ :param _request_auth: set to override the auth_settings for an a single
396
+ request; this effectively ignores the
397
+ authentication in the spec for a single request.
398
+ :type _request_auth: dict, optional
399
+ :param _content_type: force content-type for the request.
400
+ :type _content_type: str, Optional
401
+ :param _headers: set to override the headers for a single
402
+ request; this effectively ignores the headers
403
+ in the spec for a single request.
404
+ :type _headers: dict, optional
405
+ :param _host_index: set to override the host_index for a single
406
+ request; this effectively ignores the host_index
407
+ in the spec for a single request.
408
+ :type _host_index: int, optional
409
+ :return: Returns the result object.
410
+ """ # noqa: E501
411
+
412
+ _param = self._refresh_serialize(
413
+ _request_auth=_request_auth,
414
+ _content_type=_content_type,
415
+ _headers=_headers,
416
+ _host_index=_host_index
417
+ )
418
+
419
+ _response_types_map: Dict[str, Optional[str]] = {
420
+ '200': "AccessTokenResponse",
421
+ '404': None,
422
+ }
423
+ response_data = self.api_client.call_api(
424
+ *_param,
425
+ _request_timeout=_request_timeout
426
+ )
427
+ response_data.read()
428
+ return self.api_client.response_deserialize(
429
+ response_data=response_data,
430
+ response_types_map=_response_types_map,
431
+ )
432
+
433
+
434
+ @validate_call
435
+ def refresh_without_preload_content(
436
+ self,
437
+ _request_timeout: Union[
438
+ None,
439
+ Annotated[StrictFloat, Field(gt=0)],
440
+ Tuple[
441
+ Annotated[StrictFloat, Field(gt=0)],
442
+ Annotated[StrictFloat, Field(gt=0)]
443
+ ]
444
+ ] = None,
445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
446
+ _content_type: Optional[StrictStr] = None,
447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
+ ) -> RESTResponseType:
450
+ """Refresh Token
451
+
452
+
453
+ :param _request_timeout: timeout setting for this request. If one
454
+ number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :type _request_timeout: int, tuple(int, int), optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the
460
+ authentication in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :param _content_type: force content-type for the request.
463
+ :type _content_type: str, Optional
464
+ :param _headers: set to override the headers for a single
465
+ request; this effectively ignores the headers
466
+ in the spec for a single request.
467
+ :type _headers: dict, optional
468
+ :param _host_index: set to override the host_index for a single
469
+ request; this effectively ignores the host_index
470
+ in the spec for a single request.
471
+ :type _host_index: int, optional
472
+ :return: Returns the result object.
473
+ """ # noqa: E501
474
+
475
+ _param = self._refresh_serialize(
476
+ _request_auth=_request_auth,
477
+ _content_type=_content_type,
478
+ _headers=_headers,
479
+ _host_index=_host_index
480
+ )
481
+
482
+ _response_types_map: Dict[str, Optional[str]] = {
483
+ '200': "AccessTokenResponse",
484
+ '404': None,
485
+ }
486
+ response_data = self.api_client.call_api(
487
+ *_param,
488
+ _request_timeout=_request_timeout
489
+ )
490
+ return response_data.response
491
+
492
+
493
+ def _refresh_serialize(
494
+ self,
495
+ _request_auth,
496
+ _content_type,
497
+ _headers,
498
+ _host_index,
499
+ ) -> RequestSerialized:
500
+
501
+ _host = None
502
+
503
+ _collection_formats: Dict[str, str] = {
504
+ }
505
+
506
+ _path_params: Dict[str, str] = {}
507
+ _query_params: List[Tuple[str, str]] = []
508
+ _header_params: Dict[str, Optional[str]] = _headers or {}
509
+ _form_params: List[Tuple[str, str]] = []
510
+ _files: Dict[
511
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
512
+ ] = {}
513
+ _body_params: Optional[bytes] = None
514
+
515
+ # process the path parameters
516
+ # process the query parameters
517
+ # process the header parameters
518
+ # process the form parameters
519
+ # process the body parameter
520
+
521
+
522
+ # set the HTTP header `Accept`
523
+ if 'Accept' not in _header_params:
524
+ _header_params['Accept'] = self.api_client.select_header_accept(
525
+ [
526
+ 'application/json'
527
+ ]
528
+ )
529
+
530
+
531
+ # authentication setting
532
+ _auth_settings: List[str] = [
533
+ 'Authorization'
534
+ ]
535
+
536
+ return self.api_client.param_serialize(
537
+ method='POST',
538
+ resource_path='/auth/refresh',
539
+ path_params=_path_params,
540
+ query_params=_query_params,
541
+ header_params=_header_params,
542
+ body=_body_params,
543
+ post_params=_form_params,
544
+ files=_files,
545
+ auth_settings=_auth_settings,
546
+ collection_formats=_collection_formats,
547
+ _host=_host,
548
+ _request_auth=_request_auth
549
+ )
550
+
551
+
552
+
553
+
554
+ @validate_call
555
+ def token(
556
+ self,
557
+ grant_type: GrantType,
558
+ _request_timeout: Union[
559
+ None,
560
+ Annotated[StrictFloat, Field(gt=0)],
561
+ Tuple[
562
+ Annotated[StrictFloat, Field(gt=0)],
563
+ Annotated[StrictFloat, Field(gt=0)]
564
+ ]
565
+ ] = None,
566
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
567
+ _content_type: Optional[StrictStr] = None,
568
+ _headers: Optional[Dict[StrictStr, Any]] = None,
569
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
570
+ ) -> AccessTokenResponse:
571
+ """Token
572
+
573
+ Retrieve a token for authorization once authentication has been successful. A `grant_type` must be provided. For JWTs: `urn:ietf:params:oauth:grant-type:jwt-bearer` or for client credentials: `client_credentials`.
574
+
575
+ :param grant_type: (required)
576
+ :type grant_type: GrantType
577
+ :param _request_timeout: timeout setting for this request. If one
578
+ number provided, it will be total request
579
+ timeout. It can also be a pair (tuple) of
580
+ (connection, read) timeouts.
581
+ :type _request_timeout: int, tuple(int, int), optional
582
+ :param _request_auth: set to override the auth_settings for an a single
583
+ request; this effectively ignores the
584
+ authentication in the spec for a single request.
585
+ :type _request_auth: dict, optional
586
+ :param _content_type: force content-type for the request.
587
+ :type _content_type: str, Optional
588
+ :param _headers: set to override the headers for a single
589
+ request; this effectively ignores the headers
590
+ in the spec for a single request.
591
+ :type _headers: dict, optional
592
+ :param _host_index: set to override the host_index for a single
593
+ request; this effectively ignores the host_index
594
+ in the spec for a single request.
595
+ :type _host_index: int, optional
596
+ :return: Returns the result object.
597
+ """ # noqa: E501
598
+
599
+ _param = self._token_serialize(
600
+ grant_type=grant_type,
601
+ _request_auth=_request_auth,
602
+ _content_type=_content_type,
603
+ _headers=_headers,
604
+ _host_index=_host_index
605
+ )
606
+
607
+ _response_types_map: Dict[str, Optional[str]] = {
608
+ '200': "AccessTokenResponse",
609
+ '404': None,
610
+ '422': "HTTPValidationError",
611
+ }
612
+ response_data = self.api_client.call_api(
613
+ *_param,
614
+ _request_timeout=_request_timeout
615
+ )
616
+ response_data.read()
617
+ return self.api_client.response_deserialize(
618
+ response_data=response_data,
619
+ response_types_map=_response_types_map,
620
+ ).data
621
+
622
+
623
+ @validate_call
624
+ def token_with_http_info(
625
+ self,
626
+ grant_type: GrantType,
627
+ _request_timeout: Union[
628
+ None,
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Tuple[
631
+ Annotated[StrictFloat, Field(gt=0)],
632
+ Annotated[StrictFloat, Field(gt=0)]
633
+ ]
634
+ ] = None,
635
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
636
+ _content_type: Optional[StrictStr] = None,
637
+ _headers: Optional[Dict[StrictStr, Any]] = None,
638
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
639
+ ) -> ApiResponse[AccessTokenResponse]:
640
+ """Token
641
+
642
+ Retrieve a token for authorization once authentication has been successful. A `grant_type` must be provided. For JWTs: `urn:ietf:params:oauth:grant-type:jwt-bearer` or for client credentials: `client_credentials`.
643
+
644
+ :param grant_type: (required)
645
+ :type grant_type: GrantType
646
+ :param _request_timeout: timeout setting for this request. If one
647
+ number provided, it will be total request
648
+ timeout. It can also be a pair (tuple) of
649
+ (connection, read) timeouts.
650
+ :type _request_timeout: int, tuple(int, int), optional
651
+ :param _request_auth: set to override the auth_settings for an a single
652
+ request; this effectively ignores the
653
+ authentication in the spec for a single request.
654
+ :type _request_auth: dict, optional
655
+ :param _content_type: force content-type for the request.
656
+ :type _content_type: str, Optional
657
+ :param _headers: set to override the headers for a single
658
+ request; this effectively ignores the headers
659
+ in the spec for a single request.
660
+ :type _headers: dict, optional
661
+ :param _host_index: set to override the host_index for a single
662
+ request; this effectively ignores the host_index
663
+ in the spec for a single request.
664
+ :type _host_index: int, optional
665
+ :return: Returns the result object.
666
+ """ # noqa: E501
667
+
668
+ _param = self._token_serialize(
669
+ grant_type=grant_type,
670
+ _request_auth=_request_auth,
671
+ _content_type=_content_type,
672
+ _headers=_headers,
673
+ _host_index=_host_index
674
+ )
675
+
676
+ _response_types_map: Dict[str, Optional[str]] = {
677
+ '200': "AccessTokenResponse",
678
+ '404': None,
679
+ '422': "HTTPValidationError",
680
+ }
681
+ response_data = self.api_client.call_api(
682
+ *_param,
683
+ _request_timeout=_request_timeout
684
+ )
685
+ response_data.read()
686
+ return self.api_client.response_deserialize(
687
+ response_data=response_data,
688
+ response_types_map=_response_types_map,
689
+ )
690
+
691
+
692
+ @validate_call
693
+ def token_without_preload_content(
694
+ self,
695
+ grant_type: GrantType,
696
+ _request_timeout: Union[
697
+ None,
698
+ Annotated[StrictFloat, Field(gt=0)],
699
+ Tuple[
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Annotated[StrictFloat, Field(gt=0)]
702
+ ]
703
+ ] = None,
704
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
705
+ _content_type: Optional[StrictStr] = None,
706
+ _headers: Optional[Dict[StrictStr, Any]] = None,
707
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
708
+ ) -> RESTResponseType:
709
+ """Token
710
+
711
+ Retrieve a token for authorization once authentication has been successful. A `grant_type` must be provided. For JWTs: `urn:ietf:params:oauth:grant-type:jwt-bearer` or for client credentials: `client_credentials`.
712
+
713
+ :param grant_type: (required)
714
+ :type grant_type: GrantType
715
+ :param _request_timeout: timeout setting for this request. If one
716
+ number provided, it will be total request
717
+ timeout. It can also be a pair (tuple) of
718
+ (connection, read) timeouts.
719
+ :type _request_timeout: int, tuple(int, int), optional
720
+ :param _request_auth: set to override the auth_settings for an a single
721
+ request; this effectively ignores the
722
+ authentication in the spec for a single request.
723
+ :type _request_auth: dict, optional
724
+ :param _content_type: force content-type for the request.
725
+ :type _content_type: str, Optional
726
+ :param _headers: set to override the headers for a single
727
+ request; this effectively ignores the headers
728
+ in the spec for a single request.
729
+ :type _headers: dict, optional
730
+ :param _host_index: set to override the host_index for a single
731
+ request; this effectively ignores the host_index
732
+ in the spec for a single request.
733
+ :type _host_index: int, optional
734
+ :return: Returns the result object.
735
+ """ # noqa: E501
736
+
737
+ _param = self._token_serialize(
738
+ grant_type=grant_type,
739
+ _request_auth=_request_auth,
740
+ _content_type=_content_type,
741
+ _headers=_headers,
742
+ _host_index=_host_index
743
+ )
744
+
745
+ _response_types_map: Dict[str, Optional[str]] = {
746
+ '200': "AccessTokenResponse",
747
+ '404': None,
748
+ '422': "HTTPValidationError",
749
+ }
750
+ response_data = self.api_client.call_api(
751
+ *_param,
752
+ _request_timeout=_request_timeout
753
+ )
754
+ return response_data.response
755
+
756
+
757
+ def _token_serialize(
758
+ self,
759
+ grant_type,
760
+ _request_auth,
761
+ _content_type,
762
+ _headers,
763
+ _host_index,
764
+ ) -> RequestSerialized:
765
+
766
+ _host = None
767
+
768
+ _collection_formats: Dict[str, str] = {
769
+ }
770
+
771
+ _path_params: Dict[str, str] = {}
772
+ _query_params: List[Tuple[str, str]] = []
773
+ _header_params: Dict[str, Optional[str]] = _headers or {}
774
+ _form_params: List[Tuple[str, str]] = []
775
+ _files: Dict[
776
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
777
+ ] = {}
778
+ _body_params: Optional[bytes] = None
779
+
780
+ # process the path parameters
781
+ # process the query parameters
782
+ # process the header parameters
783
+ # process the form parameters
784
+ if grant_type is not None:
785
+ _form_params.append(('grant_type', grant_type))
786
+ # process the body parameter
787
+
788
+
789
+ # set the HTTP header `Accept`
790
+ if 'Accept' not in _header_params:
791
+ _header_params['Accept'] = self.api_client.select_header_accept(
792
+ [
793
+ 'application/json'
794
+ ]
795
+ )
796
+
797
+ # set the HTTP header `Content-Type`
798
+ if _content_type:
799
+ _header_params['Content-Type'] = _content_type
800
+ else:
801
+ _default_content_type = (
802
+ self.api_client.select_header_content_type(
803
+ [
804
+ 'application/x-www-form-urlencoded'
805
+ ]
806
+ )
807
+ )
808
+ if _default_content_type is not None:
809
+ _header_params['Content-Type'] = _default_content_type
810
+
811
+ # authentication setting
812
+ _auth_settings: List[str] = [
813
+ 'Authorization',
814
+ 'ServiceAccountAuthorization'
815
+ ]
816
+
817
+ return self.api_client.param_serialize(
818
+ method='POST',
819
+ resource_path='/auth/token',
820
+ path_params=_path_params,
821
+ query_params=_query_params,
822
+ header_params=_header_params,
823
+ body=_body_params,
824
+ post_params=_form_params,
825
+ files=_files,
826
+ auth_settings=_auth_settings,
827
+ collection_formats=_collection_formats,
828
+ _host=_host,
829
+ _request_auth=_request_auth
830
+ )
831
+
832
+
833
+
834
+
835
+ @validate_call
836
+ def verify(
837
+ self,
838
+ token: StrictStr,
839
+ _request_timeout: Union[
840
+ None,
841
+ Annotated[StrictFloat, Field(gt=0)],
842
+ Tuple[
843
+ Annotated[StrictFloat, Field(gt=0)],
844
+ Annotated[StrictFloat, Field(gt=0)]
845
+ ]
846
+ ] = None,
847
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
848
+ _content_type: Optional[StrictStr] = None,
849
+ _headers: Optional[Dict[StrictStr, Any]] = None,
850
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
851
+ ) -> AccessTokenResponse:
852
+ """Verify
853
+
854
+
855
+ :param token: (required)
856
+ :type token: str
857
+ :param _request_timeout: timeout setting for this request. If one
858
+ number provided, it will be total request
859
+ timeout. It can also be a pair (tuple) of
860
+ (connection, read) timeouts.
861
+ :type _request_timeout: int, tuple(int, int), optional
862
+ :param _request_auth: set to override the auth_settings for an a single
863
+ request; this effectively ignores the
864
+ authentication in the spec for a single request.
865
+ :type _request_auth: dict, optional
866
+ :param _content_type: force content-type for the request.
867
+ :type _content_type: str, Optional
868
+ :param _headers: set to override the headers for a single
869
+ request; this effectively ignores the headers
870
+ in the spec for a single request.
871
+ :type _headers: dict, optional
872
+ :param _host_index: set to override the host_index for a single
873
+ request; this effectively ignores the host_index
874
+ in the spec for a single request.
875
+ :type _host_index: int, optional
876
+ :return: Returns the result object.
877
+ """ # noqa: E501
878
+
879
+ _param = self._verify_serialize(
880
+ token=token,
881
+ _request_auth=_request_auth,
882
+ _content_type=_content_type,
883
+ _headers=_headers,
884
+ _host_index=_host_index
885
+ )
886
+
887
+ _response_types_map: Dict[str, Optional[str]] = {
888
+ '200': "AccessTokenResponse",
889
+ '404': None,
890
+ '422': "HTTPValidationError",
891
+ }
892
+ response_data = self.api_client.call_api(
893
+ *_param,
894
+ _request_timeout=_request_timeout
895
+ )
896
+ response_data.read()
897
+ return self.api_client.response_deserialize(
898
+ response_data=response_data,
899
+ response_types_map=_response_types_map,
900
+ ).data
901
+
902
+
903
+ @validate_call
904
+ def verify_with_http_info(
905
+ self,
906
+ token: StrictStr,
907
+ _request_timeout: Union[
908
+ None,
909
+ Annotated[StrictFloat, Field(gt=0)],
910
+ Tuple[
911
+ Annotated[StrictFloat, Field(gt=0)],
912
+ Annotated[StrictFloat, Field(gt=0)]
913
+ ]
914
+ ] = None,
915
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
916
+ _content_type: Optional[StrictStr] = None,
917
+ _headers: Optional[Dict[StrictStr, Any]] = None,
918
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
919
+ ) -> ApiResponse[AccessTokenResponse]:
920
+ """Verify
921
+
922
+
923
+ :param token: (required)
924
+ :type token: str
925
+ :param _request_timeout: timeout setting for this request. If one
926
+ number provided, it will be total request
927
+ timeout. It can also be a pair (tuple) of
928
+ (connection, read) timeouts.
929
+ :type _request_timeout: int, tuple(int, int), optional
930
+ :param _request_auth: set to override the auth_settings for an a single
931
+ request; this effectively ignores the
932
+ authentication in the spec for a single request.
933
+ :type _request_auth: dict, optional
934
+ :param _content_type: force content-type for the request.
935
+ :type _content_type: str, Optional
936
+ :param _headers: set to override the headers for a single
937
+ request; this effectively ignores the headers
938
+ in the spec for a single request.
939
+ :type _headers: dict, optional
940
+ :param _host_index: set to override the host_index for a single
941
+ request; this effectively ignores the host_index
942
+ in the spec for a single request.
943
+ :type _host_index: int, optional
944
+ :return: Returns the result object.
945
+ """ # noqa: E501
946
+
947
+ _param = self._verify_serialize(
948
+ token=token,
949
+ _request_auth=_request_auth,
950
+ _content_type=_content_type,
951
+ _headers=_headers,
952
+ _host_index=_host_index
953
+ )
954
+
955
+ _response_types_map: Dict[str, Optional[str]] = {
956
+ '200': "AccessTokenResponse",
957
+ '404': None,
958
+ '422': "HTTPValidationError",
959
+ }
960
+ response_data = self.api_client.call_api(
961
+ *_param,
962
+ _request_timeout=_request_timeout
963
+ )
964
+ response_data.read()
965
+ return self.api_client.response_deserialize(
966
+ response_data=response_data,
967
+ response_types_map=_response_types_map,
968
+ )
969
+
970
+
971
+ @validate_call
972
+ def verify_without_preload_content(
973
+ self,
974
+ token: StrictStr,
975
+ _request_timeout: Union[
976
+ None,
977
+ Annotated[StrictFloat, Field(gt=0)],
978
+ Tuple[
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Annotated[StrictFloat, Field(gt=0)]
981
+ ]
982
+ ] = None,
983
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
984
+ _content_type: Optional[StrictStr] = None,
985
+ _headers: Optional[Dict[StrictStr, Any]] = None,
986
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
987
+ ) -> RESTResponseType:
988
+ """Verify
989
+
990
+
991
+ :param token: (required)
992
+ :type token: str
993
+ :param _request_timeout: timeout setting for this request. If one
994
+ number provided, it will be total request
995
+ timeout. It can also be a pair (tuple) of
996
+ (connection, read) timeouts.
997
+ :type _request_timeout: int, tuple(int, int), optional
998
+ :param _request_auth: set to override the auth_settings for an a single
999
+ request; this effectively ignores the
1000
+ authentication in the spec for a single request.
1001
+ :type _request_auth: dict, optional
1002
+ :param _content_type: force content-type for the request.
1003
+ :type _content_type: str, Optional
1004
+ :param _headers: set to override the headers for a single
1005
+ request; this effectively ignores the headers
1006
+ in the spec for a single request.
1007
+ :type _headers: dict, optional
1008
+ :param _host_index: set to override the host_index for a single
1009
+ request; this effectively ignores the host_index
1010
+ in the spec for a single request.
1011
+ :type _host_index: int, optional
1012
+ :return: Returns the result object.
1013
+ """ # noqa: E501
1014
+
1015
+ _param = self._verify_serialize(
1016
+ token=token,
1017
+ _request_auth=_request_auth,
1018
+ _content_type=_content_type,
1019
+ _headers=_headers,
1020
+ _host_index=_host_index
1021
+ )
1022
+
1023
+ _response_types_map: Dict[str, Optional[str]] = {
1024
+ '200': "AccessTokenResponse",
1025
+ '404': None,
1026
+ '422': "HTTPValidationError",
1027
+ }
1028
+ response_data = self.api_client.call_api(
1029
+ *_param,
1030
+ _request_timeout=_request_timeout
1031
+ )
1032
+ return response_data.response
1033
+
1034
+
1035
+ def _verify_serialize(
1036
+ self,
1037
+ token,
1038
+ _request_auth,
1039
+ _content_type,
1040
+ _headers,
1041
+ _host_index,
1042
+ ) -> RequestSerialized:
1043
+
1044
+ _host = None
1045
+
1046
+ _collection_formats: Dict[str, str] = {
1047
+ }
1048
+
1049
+ _path_params: Dict[str, str] = {}
1050
+ _query_params: List[Tuple[str, str]] = []
1051
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1052
+ _form_params: List[Tuple[str, str]] = []
1053
+ _files: Dict[
1054
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1055
+ ] = {}
1056
+ _body_params: Optional[bytes] = None
1057
+
1058
+ # process the path parameters
1059
+ # process the query parameters
1060
+ if token is not None:
1061
+
1062
+ _query_params.append(('token', token))
1063
+
1064
+ # process the header parameters
1065
+ # process the form parameters
1066
+ # process the body parameter
1067
+
1068
+
1069
+ # set the HTTP header `Accept`
1070
+ if 'Accept' not in _header_params:
1071
+ _header_params['Accept'] = self.api_client.select_header_accept(
1072
+ [
1073
+ 'application/json'
1074
+ ]
1075
+ )
1076
+
1077
+
1078
+ # authentication setting
1079
+ _auth_settings: List[str] = [
1080
+ ]
1081
+
1082
+ return self.api_client.param_serialize(
1083
+ method='GET',
1084
+ resource_path='/auth/verify',
1085
+ path_params=_path_params,
1086
+ query_params=_query_params,
1087
+ header_params=_header_params,
1088
+ body=_body_params,
1089
+ post_params=_form_params,
1090
+ files=_files,
1091
+ auth_settings=_auth_settings,
1092
+ collection_formats=_collection_formats,
1093
+ _host=_host,
1094
+ _request_auth=_request_auth
1095
+ )
1096
+
1097
+