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