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,812 @@
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, StrictInt, StrictStr
21
+ from typing import Optional, Union
22
+ from typing_extensions import Annotated
23
+ from across.sdk.v1.models.visibility_result import VisibilityResult
24
+
25
+ from across.sdk.v1.api_client import ApiClient, RequestSerialized
26
+ from across.sdk.v1.api_response import ApiResponse
27
+ from across.sdk.v1.rest import RESTResponseType
28
+
29
+
30
+ class ToolsApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get(
45
+ self,
46
+ instrument_id: StrictStr,
47
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
48
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
49
+ date_range_begin: datetime,
50
+ date_range_end: datetime,
51
+ hi_res: Optional[StrictBool] = None,
52
+ min_visibility_duration: Optional[StrictInt] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> VisibilityResult:
66
+ """Calculated Visibility Windows
67
+
68
+ Calculate visibility windows of a telescope from a given location.
69
+
70
+ :param instrument_id: (required)
71
+ :type instrument_id: str
72
+ :param ra: (required)
73
+ :type ra: float
74
+ :param dec: (required)
75
+ :type dec: float
76
+ :param date_range_begin: (required)
77
+ :type date_range_begin: datetime
78
+ :param date_range_end: (required)
79
+ :type date_range_end: datetime
80
+ :param hi_res:
81
+ :type hi_res: bool
82
+ :param min_visibility_duration:
83
+ :type min_visibility_duration: int
84
+ :param _request_timeout: timeout setting for this request. If one
85
+ number provided, it will be total request
86
+ timeout. It can also be a pair (tuple) of
87
+ (connection, read) timeouts.
88
+ :type _request_timeout: int, tuple(int, int), optional
89
+ :param _request_auth: set to override the auth_settings for an a single
90
+ request; this effectively ignores the
91
+ authentication in the spec for a single request.
92
+ :type _request_auth: dict, optional
93
+ :param _content_type: force content-type for the request.
94
+ :type _content_type: str, Optional
95
+ :param _headers: set to override the headers for a single
96
+ request; this effectively ignores the headers
97
+ in the spec for a single request.
98
+ :type _headers: dict, optional
99
+ :param _host_index: set to override the host_index for a single
100
+ request; this effectively ignores the host_index
101
+ in the spec for a single request.
102
+ :type _host_index: int, optional
103
+ :return: Returns the result object.
104
+ """ # noqa: E501
105
+
106
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_serialize(
107
+ instrument_id=instrument_id,
108
+ ra=ra,
109
+ dec=dec,
110
+ date_range_begin=date_range_begin,
111
+ date_range_end=date_range_end,
112
+ hi_res=hi_res,
113
+ min_visibility_duration=min_visibility_duration,
114
+ _request_auth=_request_auth,
115
+ _content_type=_content_type,
116
+ _headers=_headers,
117
+ _host_index=_host_index
118
+ )
119
+
120
+ _response_types_map: Dict[str, Optional[str]] = {
121
+ '200': "VisibilityResult",
122
+ '404': None,
123
+ '422': "HTTPValidationError",
124
+ }
125
+ response_data = self.api_client.call_api(
126
+ *_param,
127
+ _request_timeout=_request_timeout
128
+ )
129
+ response_data.read()
130
+ return self.api_client.response_deserialize(
131
+ response_data=response_data,
132
+ response_types_map=_response_types_map,
133
+ ).data
134
+
135
+
136
+ @validate_call
137
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get_with_http_info(
138
+ self,
139
+ instrument_id: StrictStr,
140
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
141
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
142
+ date_range_begin: datetime,
143
+ date_range_end: datetime,
144
+ hi_res: Optional[StrictBool] = None,
145
+ min_visibility_duration: Optional[StrictInt] = None,
146
+ _request_timeout: Union[
147
+ None,
148
+ Annotated[StrictFloat, Field(gt=0)],
149
+ Tuple[
150
+ Annotated[StrictFloat, Field(gt=0)],
151
+ Annotated[StrictFloat, Field(gt=0)]
152
+ ]
153
+ ] = None,
154
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
155
+ _content_type: Optional[StrictStr] = None,
156
+ _headers: Optional[Dict[StrictStr, Any]] = None,
157
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
158
+ ) -> ApiResponse[VisibilityResult]:
159
+ """Calculated Visibility Windows
160
+
161
+ Calculate visibility windows of a telescope from a given location.
162
+
163
+ :param instrument_id: (required)
164
+ :type instrument_id: str
165
+ :param ra: (required)
166
+ :type ra: float
167
+ :param dec: (required)
168
+ :type dec: float
169
+ :param date_range_begin: (required)
170
+ :type date_range_begin: datetime
171
+ :param date_range_end: (required)
172
+ :type date_range_end: datetime
173
+ :param hi_res:
174
+ :type hi_res: bool
175
+ :param min_visibility_duration:
176
+ :type min_visibility_duration: int
177
+ :param _request_timeout: timeout setting for this request. If one
178
+ number provided, it will be total request
179
+ timeout. It can also be a pair (tuple) of
180
+ (connection, read) timeouts.
181
+ :type _request_timeout: int, tuple(int, int), optional
182
+ :param _request_auth: set to override the auth_settings for an a single
183
+ request; this effectively ignores the
184
+ authentication in the spec for a single request.
185
+ :type _request_auth: dict, optional
186
+ :param _content_type: force content-type for the request.
187
+ :type _content_type: str, Optional
188
+ :param _headers: set to override the headers for a single
189
+ request; this effectively ignores the headers
190
+ in the spec for a single request.
191
+ :type _headers: dict, optional
192
+ :param _host_index: set to override the host_index for a single
193
+ request; this effectively ignores the host_index
194
+ in the spec for a single request.
195
+ :type _host_index: int, optional
196
+ :return: Returns the result object.
197
+ """ # noqa: E501
198
+
199
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_serialize(
200
+ instrument_id=instrument_id,
201
+ ra=ra,
202
+ dec=dec,
203
+ date_range_begin=date_range_begin,
204
+ date_range_end=date_range_end,
205
+ hi_res=hi_res,
206
+ min_visibility_duration=min_visibility_duration,
207
+ _request_auth=_request_auth,
208
+ _content_type=_content_type,
209
+ _headers=_headers,
210
+ _host_index=_host_index
211
+ )
212
+
213
+ _response_types_map: Dict[str, Optional[str]] = {
214
+ '200': "VisibilityResult",
215
+ '404': None,
216
+ '422': "HTTPValidationError",
217
+ }
218
+ response_data = self.api_client.call_api(
219
+ *_param,
220
+ _request_timeout=_request_timeout
221
+ )
222
+ response_data.read()
223
+ return self.api_client.response_deserialize(
224
+ response_data=response_data,
225
+ response_types_map=_response_types_map,
226
+ )
227
+
228
+
229
+ @validate_call
230
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get_without_preload_content(
231
+ self,
232
+ instrument_id: StrictStr,
233
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
234
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
235
+ date_range_begin: datetime,
236
+ date_range_end: datetime,
237
+ hi_res: Optional[StrictBool] = None,
238
+ min_visibility_duration: Optional[StrictInt] = None,
239
+ _request_timeout: Union[
240
+ None,
241
+ Annotated[StrictFloat, Field(gt=0)],
242
+ Tuple[
243
+ Annotated[StrictFloat, Field(gt=0)],
244
+ Annotated[StrictFloat, Field(gt=0)]
245
+ ]
246
+ ] = None,
247
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
248
+ _content_type: Optional[StrictStr] = None,
249
+ _headers: Optional[Dict[StrictStr, Any]] = None,
250
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
251
+ ) -> RESTResponseType:
252
+ """Calculated Visibility Windows
253
+
254
+ Calculate visibility windows of a telescope from a given location.
255
+
256
+ :param instrument_id: (required)
257
+ :type instrument_id: str
258
+ :param ra: (required)
259
+ :type ra: float
260
+ :param dec: (required)
261
+ :type dec: float
262
+ :param date_range_begin: (required)
263
+ :type date_range_begin: datetime
264
+ :param date_range_end: (required)
265
+ :type date_range_end: datetime
266
+ :param hi_res:
267
+ :type hi_res: bool
268
+ :param min_visibility_duration:
269
+ :type min_visibility_duration: int
270
+ :param _request_timeout: timeout setting for this request. If one
271
+ number provided, it will be total request
272
+ timeout. It can also be a pair (tuple) of
273
+ (connection, read) timeouts.
274
+ :type _request_timeout: int, tuple(int, int), optional
275
+ :param _request_auth: set to override the auth_settings for an a single
276
+ request; this effectively ignores the
277
+ authentication in the spec for a single request.
278
+ :type _request_auth: dict, optional
279
+ :param _content_type: force content-type for the request.
280
+ :type _content_type: str, Optional
281
+ :param _headers: set to override the headers for a single
282
+ request; this effectively ignores the headers
283
+ in the spec for a single request.
284
+ :type _headers: dict, optional
285
+ :param _host_index: set to override the host_index for a single
286
+ request; this effectively ignores the host_index
287
+ in the spec for a single request.
288
+ :type _host_index: int, optional
289
+ :return: Returns the result object.
290
+ """ # noqa: E501
291
+
292
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_serialize(
293
+ instrument_id=instrument_id,
294
+ ra=ra,
295
+ dec=dec,
296
+ date_range_begin=date_range_begin,
297
+ date_range_end=date_range_end,
298
+ hi_res=hi_res,
299
+ min_visibility_duration=min_visibility_duration,
300
+ _request_auth=_request_auth,
301
+ _content_type=_content_type,
302
+ _headers=_headers,
303
+ _host_index=_host_index
304
+ )
305
+
306
+ _response_types_map: Dict[str, Optional[str]] = {
307
+ '200': "VisibilityResult",
308
+ '404': None,
309
+ '422': "HTTPValidationError",
310
+ }
311
+ response_data = self.api_client.call_api(
312
+ *_param,
313
+ _request_timeout=_request_timeout
314
+ )
315
+ return response_data.response
316
+
317
+
318
+ def _calculate_windows_tools_visibility_calculator_windows_instrument_id_get_serialize(
319
+ self,
320
+ instrument_id,
321
+ ra,
322
+ dec,
323
+ date_range_begin,
324
+ date_range_end,
325
+ hi_res,
326
+ min_visibility_duration,
327
+ _request_auth,
328
+ _content_type,
329
+ _headers,
330
+ _host_index,
331
+ ) -> RequestSerialized:
332
+
333
+ _host = None
334
+
335
+ _collection_formats: Dict[str, str] = {
336
+ }
337
+
338
+ _path_params: Dict[str, str] = {}
339
+ _query_params: List[Tuple[str, str]] = []
340
+ _header_params: Dict[str, Optional[str]] = _headers or {}
341
+ _form_params: List[Tuple[str, str]] = []
342
+ _files: Dict[
343
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
344
+ ] = {}
345
+ _body_params: Optional[bytes] = None
346
+
347
+ # process the path parameters
348
+ if instrument_id is not None:
349
+ _path_params['instrument_id'] = instrument_id
350
+ # process the query parameters
351
+ if ra is not None:
352
+
353
+ _query_params.append(('ra', ra))
354
+
355
+ if dec is not None:
356
+
357
+ _query_params.append(('dec', dec))
358
+
359
+ if date_range_begin is not None:
360
+ if isinstance(date_range_begin, datetime):
361
+ _query_params.append(
362
+ (
363
+ 'date_range_begin',
364
+ date_range_begin.strftime(
365
+ self.api_client.configuration.datetime_format
366
+ )
367
+ )
368
+ )
369
+ else:
370
+ _query_params.append(('date_range_begin', date_range_begin))
371
+
372
+ if date_range_end is not None:
373
+ if isinstance(date_range_end, datetime):
374
+ _query_params.append(
375
+ (
376
+ 'date_range_end',
377
+ date_range_end.strftime(
378
+ self.api_client.configuration.datetime_format
379
+ )
380
+ )
381
+ )
382
+ else:
383
+ _query_params.append(('date_range_end', date_range_end))
384
+
385
+ if hi_res is not None:
386
+
387
+ _query_params.append(('hi_res', hi_res))
388
+
389
+ if min_visibility_duration is not None:
390
+
391
+ _query_params.append(('min_visibility_duration', min_visibility_duration))
392
+
393
+ # process the header parameters
394
+ # process the form parameters
395
+ # process the body parameter
396
+
397
+
398
+ # set the HTTP header `Accept`
399
+ if 'Accept' not in _header_params:
400
+ _header_params['Accept'] = self.api_client.select_header_accept(
401
+ [
402
+ 'application/json'
403
+ ]
404
+ )
405
+
406
+
407
+ # authentication setting
408
+ _auth_settings: List[str] = [
409
+ ]
410
+
411
+ return self.api_client.param_serialize(
412
+ method='GET',
413
+ resource_path='/tools/visibility-calculator/windows/{instrument_id}',
414
+ path_params=_path_params,
415
+ query_params=_query_params,
416
+ header_params=_header_params,
417
+ body=_body_params,
418
+ post_params=_form_params,
419
+ files=_files,
420
+ auth_settings=_auth_settings,
421
+ collection_formats=_collection_formats,
422
+ _host=_host,
423
+ _request_auth=_request_auth
424
+ )
425
+
426
+
427
+
428
+
429
+ @validate_call
430
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0(
431
+ self,
432
+ instrument_id: StrictStr,
433
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
434
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
435
+ date_range_begin: datetime,
436
+ date_range_end: datetime,
437
+ hi_res: Optional[StrictBool] = None,
438
+ min_visibility_duration: Optional[StrictInt] = None,
439
+ _request_timeout: Union[
440
+ None,
441
+ Annotated[StrictFloat, Field(gt=0)],
442
+ Tuple[
443
+ Annotated[StrictFloat, Field(gt=0)],
444
+ Annotated[StrictFloat, Field(gt=0)]
445
+ ]
446
+ ] = None,
447
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
448
+ _content_type: Optional[StrictStr] = None,
449
+ _headers: Optional[Dict[StrictStr, Any]] = None,
450
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
451
+ ) -> VisibilityResult:
452
+ """Calculated Visibility Windows
453
+
454
+ Calculate visibility windows of a telescope from a given location.
455
+
456
+ :param instrument_id: (required)
457
+ :type instrument_id: str
458
+ :param ra: (required)
459
+ :type ra: float
460
+ :param dec: (required)
461
+ :type dec: float
462
+ :param date_range_begin: (required)
463
+ :type date_range_begin: datetime
464
+ :param date_range_end: (required)
465
+ :type date_range_end: datetime
466
+ :param hi_res:
467
+ :type hi_res: bool
468
+ :param min_visibility_duration:
469
+ :type min_visibility_duration: int
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_serialize(
493
+ instrument_id=instrument_id,
494
+ ra=ra,
495
+ dec=dec,
496
+ date_range_begin=date_range_begin,
497
+ date_range_end=date_range_end,
498
+ hi_res=hi_res,
499
+ min_visibility_duration=min_visibility_duration,
500
+ _request_auth=_request_auth,
501
+ _content_type=_content_type,
502
+ _headers=_headers,
503
+ _host_index=_host_index
504
+ )
505
+
506
+ _response_types_map: Dict[str, Optional[str]] = {
507
+ '200': "VisibilityResult",
508
+ '404': None,
509
+ '422': "HTTPValidationError",
510
+ }
511
+ response_data = self.api_client.call_api(
512
+ *_param,
513
+ _request_timeout=_request_timeout
514
+ )
515
+ response_data.read()
516
+ return self.api_client.response_deserialize(
517
+ response_data=response_data,
518
+ response_types_map=_response_types_map,
519
+ ).data
520
+
521
+
522
+ @validate_call
523
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_with_http_info(
524
+ self,
525
+ instrument_id: StrictStr,
526
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
527
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
528
+ date_range_begin: datetime,
529
+ date_range_end: datetime,
530
+ hi_res: Optional[StrictBool] = None,
531
+ min_visibility_duration: Optional[StrictInt] = None,
532
+ _request_timeout: Union[
533
+ None,
534
+ Annotated[StrictFloat, Field(gt=0)],
535
+ Tuple[
536
+ Annotated[StrictFloat, Field(gt=0)],
537
+ Annotated[StrictFloat, Field(gt=0)]
538
+ ]
539
+ ] = None,
540
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
541
+ _content_type: Optional[StrictStr] = None,
542
+ _headers: Optional[Dict[StrictStr, Any]] = None,
543
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
544
+ ) -> ApiResponse[VisibilityResult]:
545
+ """Calculated Visibility Windows
546
+
547
+ Calculate visibility windows of a telescope from a given location.
548
+
549
+ :param instrument_id: (required)
550
+ :type instrument_id: str
551
+ :param ra: (required)
552
+ :type ra: float
553
+ :param dec: (required)
554
+ :type dec: float
555
+ :param date_range_begin: (required)
556
+ :type date_range_begin: datetime
557
+ :param date_range_end: (required)
558
+ :type date_range_end: datetime
559
+ :param hi_res:
560
+ :type hi_res: bool
561
+ :param min_visibility_duration:
562
+ :type min_visibility_duration: int
563
+ :param _request_timeout: timeout setting for this request. If one
564
+ number provided, it will be total request
565
+ timeout. It can also be a pair (tuple) of
566
+ (connection, read) timeouts.
567
+ :type _request_timeout: int, tuple(int, int), optional
568
+ :param _request_auth: set to override the auth_settings for an a single
569
+ request; this effectively ignores the
570
+ authentication in the spec for a single request.
571
+ :type _request_auth: dict, optional
572
+ :param _content_type: force content-type for the request.
573
+ :type _content_type: str, Optional
574
+ :param _headers: set to override the headers for a single
575
+ request; this effectively ignores the headers
576
+ in the spec for a single request.
577
+ :type _headers: dict, optional
578
+ :param _host_index: set to override the host_index for a single
579
+ request; this effectively ignores the host_index
580
+ in the spec for a single request.
581
+ :type _host_index: int, optional
582
+ :return: Returns the result object.
583
+ """ # noqa: E501
584
+
585
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_serialize(
586
+ instrument_id=instrument_id,
587
+ ra=ra,
588
+ dec=dec,
589
+ date_range_begin=date_range_begin,
590
+ date_range_end=date_range_end,
591
+ hi_res=hi_res,
592
+ min_visibility_duration=min_visibility_duration,
593
+ _request_auth=_request_auth,
594
+ _content_type=_content_type,
595
+ _headers=_headers,
596
+ _host_index=_host_index
597
+ )
598
+
599
+ _response_types_map: Dict[str, Optional[str]] = {
600
+ '200': "VisibilityResult",
601
+ '404': None,
602
+ '422': "HTTPValidationError",
603
+ }
604
+ response_data = self.api_client.call_api(
605
+ *_param,
606
+ _request_timeout=_request_timeout
607
+ )
608
+ response_data.read()
609
+ return self.api_client.response_deserialize(
610
+ response_data=response_data,
611
+ response_types_map=_response_types_map,
612
+ )
613
+
614
+
615
+ @validate_call
616
+ def calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_without_preload_content(
617
+ self,
618
+ instrument_id: StrictStr,
619
+ ra: Union[Annotated[float, Field(le=360.0, strict=True, ge=0.0)], Annotated[int, Field(le=360, strict=True, ge=0)]],
620
+ dec: Union[Annotated[float, Field(le=90.0, strict=True, ge=-90.0)], Annotated[int, Field(le=90, strict=True, ge=-90)]],
621
+ date_range_begin: datetime,
622
+ date_range_end: datetime,
623
+ hi_res: Optional[StrictBool] = None,
624
+ min_visibility_duration: Optional[StrictInt] = None,
625
+ _request_timeout: Union[
626
+ None,
627
+ Annotated[StrictFloat, Field(gt=0)],
628
+ Tuple[
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Annotated[StrictFloat, Field(gt=0)]
631
+ ]
632
+ ] = None,
633
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
634
+ _content_type: Optional[StrictStr] = None,
635
+ _headers: Optional[Dict[StrictStr, Any]] = None,
636
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
637
+ ) -> RESTResponseType:
638
+ """Calculated Visibility Windows
639
+
640
+ Calculate visibility windows of a telescope from a given location.
641
+
642
+ :param instrument_id: (required)
643
+ :type instrument_id: str
644
+ :param ra: (required)
645
+ :type ra: float
646
+ :param dec: (required)
647
+ :type dec: float
648
+ :param date_range_begin: (required)
649
+ :type date_range_begin: datetime
650
+ :param date_range_end: (required)
651
+ :type date_range_end: datetime
652
+ :param hi_res:
653
+ :type hi_res: bool
654
+ :param min_visibility_duration:
655
+ :type min_visibility_duration: int
656
+ :param _request_timeout: timeout setting for this request. If one
657
+ number provided, it will be total request
658
+ timeout. It can also be a pair (tuple) of
659
+ (connection, read) timeouts.
660
+ :type _request_timeout: int, tuple(int, int), optional
661
+ :param _request_auth: set to override the auth_settings for an a single
662
+ request; this effectively ignores the
663
+ authentication in the spec for a single request.
664
+ :type _request_auth: dict, optional
665
+ :param _content_type: force content-type for the request.
666
+ :type _content_type: str, Optional
667
+ :param _headers: set to override the headers for a single
668
+ request; this effectively ignores the headers
669
+ in the spec for a single request.
670
+ :type _headers: dict, optional
671
+ :param _host_index: set to override the host_index for a single
672
+ request; this effectively ignores the host_index
673
+ in the spec for a single request.
674
+ :type _host_index: int, optional
675
+ :return: Returns the result object.
676
+ """ # noqa: E501
677
+
678
+ _param = self._calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_serialize(
679
+ instrument_id=instrument_id,
680
+ ra=ra,
681
+ dec=dec,
682
+ date_range_begin=date_range_begin,
683
+ date_range_end=date_range_end,
684
+ hi_res=hi_res,
685
+ min_visibility_duration=min_visibility_duration,
686
+ _request_auth=_request_auth,
687
+ _content_type=_content_type,
688
+ _headers=_headers,
689
+ _host_index=_host_index
690
+ )
691
+
692
+ _response_types_map: Dict[str, Optional[str]] = {
693
+ '200': "VisibilityResult",
694
+ '404': None,
695
+ '422': "HTTPValidationError",
696
+ }
697
+ response_data = self.api_client.call_api(
698
+ *_param,
699
+ _request_timeout=_request_timeout
700
+ )
701
+ return response_data.response
702
+
703
+
704
+ def _calculate_windows_tools_visibility_calculator_windows_instrument_id_get_0_serialize(
705
+ self,
706
+ instrument_id,
707
+ ra,
708
+ dec,
709
+ date_range_begin,
710
+ date_range_end,
711
+ hi_res,
712
+ min_visibility_duration,
713
+ _request_auth,
714
+ _content_type,
715
+ _headers,
716
+ _host_index,
717
+ ) -> RequestSerialized:
718
+
719
+ _host = None
720
+
721
+ _collection_formats: Dict[str, str] = {
722
+ }
723
+
724
+ _path_params: Dict[str, str] = {}
725
+ _query_params: List[Tuple[str, str]] = []
726
+ _header_params: Dict[str, Optional[str]] = _headers or {}
727
+ _form_params: List[Tuple[str, str]] = []
728
+ _files: Dict[
729
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
730
+ ] = {}
731
+ _body_params: Optional[bytes] = None
732
+
733
+ # process the path parameters
734
+ if instrument_id is not None:
735
+ _path_params['instrument_id'] = instrument_id
736
+ # process the query parameters
737
+ if ra is not None:
738
+
739
+ _query_params.append(('ra', ra))
740
+
741
+ if dec is not None:
742
+
743
+ _query_params.append(('dec', dec))
744
+
745
+ if date_range_begin is not None:
746
+ if isinstance(date_range_begin, datetime):
747
+ _query_params.append(
748
+ (
749
+ 'date_range_begin',
750
+ date_range_begin.strftime(
751
+ self.api_client.configuration.datetime_format
752
+ )
753
+ )
754
+ )
755
+ else:
756
+ _query_params.append(('date_range_begin', date_range_begin))
757
+
758
+ if date_range_end is not None:
759
+ if isinstance(date_range_end, datetime):
760
+ _query_params.append(
761
+ (
762
+ 'date_range_end',
763
+ date_range_end.strftime(
764
+ self.api_client.configuration.datetime_format
765
+ )
766
+ )
767
+ )
768
+ else:
769
+ _query_params.append(('date_range_end', date_range_end))
770
+
771
+ if hi_res is not None:
772
+
773
+ _query_params.append(('hi_res', hi_res))
774
+
775
+ if min_visibility_duration is not None:
776
+
777
+ _query_params.append(('min_visibility_duration', min_visibility_duration))
778
+
779
+ # process the header parameters
780
+ # process the form parameters
781
+ # process the body parameter
782
+
783
+
784
+ # set the HTTP header `Accept`
785
+ if 'Accept' not in _header_params:
786
+ _header_params['Accept'] = self.api_client.select_header_accept(
787
+ [
788
+ 'application/json'
789
+ ]
790
+ )
791
+
792
+
793
+ # authentication setting
794
+ _auth_settings: List[str] = [
795
+ ]
796
+
797
+ return self.api_client.param_serialize(
798
+ method='GET',
799
+ resource_path='/tools/visibility-calculator/windows/{instrument_id}',
800
+ path_params=_path_params,
801
+ query_params=_query_params,
802
+ header_params=_header_params,
803
+ body=_body_params,
804
+ post_params=_form_params,
805
+ files=_files,
806
+ auth_settings=_auth_settings,
807
+ collection_formats=_collection_formats,
808
+ _host=_host,
809
+ _request_auth=_request_auth
810
+ )
811
+
812
+