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.
- across/__init__.py +0 -0
- across/sdk/__init__.py +0 -0
- across/sdk/v1/__init__.py +251 -0
- across/sdk/v1/abstract_credential_storage.py +16 -0
- across/sdk/v1/api/__init__.py +20 -0
- across/sdk/v1/api/auth_api.py +1097 -0
- across/sdk/v1/api/filter_api.py +623 -0
- across/sdk/v1/api/group_api.py +586 -0
- across/sdk/v1/api/group_invite_api.py +1165 -0
- across/sdk/v1/api/group_role_api.py +2070 -0
- across/sdk/v1/api/instrument_api.py +633 -0
- across/sdk/v1/api/internal_api.py +571 -0
- across/sdk/v1/api/observation_api.py +940 -0
- across/sdk/v1/api/observatory_api.py +670 -0
- across/sdk/v1/api/permission_api.py +285 -0
- across/sdk/v1/api/role_api.py +552 -0
- across/sdk/v1/api/schedule_api.py +1914 -0
- across/sdk/v1/api/service_account_api.py +2353 -0
- across/sdk/v1/api/telescope_api.py +667 -0
- across/sdk/v1/api/tle_api.py +317 -0
- across/sdk/v1/api/tools_api.py +812 -0
- across/sdk/v1/api/user_api.py +2263 -0
- across/sdk/v1/api_client.py +801 -0
- across/sdk/v1/api_client_wrapper.py +239 -0
- across/sdk/v1/api_response.py +21 -0
- across/sdk/v1/configuration.py +605 -0
- across/sdk/v1/exceptions.py +216 -0
- across/sdk/v1/models/__init__.py +103 -0
- across/sdk/v1/models/access_token_response.py +89 -0
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +104 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +124 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +95 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
- across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +96 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account.py +90 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account_secret.py +92 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +135 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +118 -0
- across/sdk/v1/models/alt_az_constraint.py +130 -0
- across/sdk/v1/models/bandpass.py +149 -0
- across/sdk/v1/models/bandpass_type.py +155 -0
- across/sdk/v1/models/constrained_date.py +93 -0
- across/sdk/v1/models/constraint_reason.py +89 -0
- across/sdk/v1/models/constraint_type.py +43 -0
- across/sdk/v1/models/coordinate.py +100 -0
- across/sdk/v1/models/date_range.py +90 -0
- across/sdk/v1/models/depth_unit.py +39 -0
- across/sdk/v1/models/earth_limb_constraint.py +124 -0
- across/sdk/v1/models/energy_bandpass.py +121 -0
- across/sdk/v1/models/energy_unit.py +40 -0
- across/sdk/v1/models/ephemeris_type.py +39 -0
- across/sdk/v1/models/filter.py +135 -0
- across/sdk/v1/models/frequency_bandpass.py +121 -0
- across/sdk/v1/models/frequency_unit.py +40 -0
- across/sdk/v1/models/grant_type.py +37 -0
- across/sdk/v1/models/ground_parameters.py +91 -0
- across/sdk/v1/models/group_invite_create.py +87 -0
- across/sdk/v1/models/group_invite_group_details.py +94 -0
- across/sdk/v1/models/group_read.py +91 -0
- across/sdk/v1/models/group_role_create.py +89 -0
- across/sdk/v1/models/group_role_read.py +99 -0
- across/sdk/v1/models/http_validation_error.py +95 -0
- across/sdk/v1/models/id_name_schema.py +96 -0
- across/sdk/v1/models/instrument.py +163 -0
- across/sdk/v1/models/instrument_constraints_inner.py +237 -0
- across/sdk/v1/models/ivoa_obs_category.py +39 -0
- across/sdk/v1/models/ivoa_obs_tracking_type.py +38 -0
- across/sdk/v1/models/jpl_parameters.py +87 -0
- across/sdk/v1/models/moon_angle_constraint.py +124 -0
- across/sdk/v1/models/nullable_date_range.py +100 -0
- across/sdk/v1/models/observation.py +248 -0
- across/sdk/v1/models/observation_create.py +249 -0
- across/sdk/v1/models/observation_status.py +40 -0
- across/sdk/v1/models/observation_type.py +39 -0
- across/sdk/v1/models/observatory.py +145 -0
- across/sdk/v1/models/observatory_ephemeris_type.py +96 -0
- across/sdk/v1/models/observatory_type.py +37 -0
- across/sdk/v1/models/page_observation.py +116 -0
- across/sdk/v1/models/page_schedule.py +116 -0
- across/sdk/v1/models/parameters.py +164 -0
- across/sdk/v1/models/permission.py +89 -0
- across/sdk/v1/models/point.py +89 -0
- across/sdk/v1/models/role.py +100 -0
- across/sdk/v1/models/role_base.py +89 -0
- across/sdk/v1/models/saa_polygon_constraint.py +101 -0
- across/sdk/v1/models/schedule.py +144 -0
- across/sdk/v1/models/schedule_cadence.py +99 -0
- across/sdk/v1/models/schedule_create.py +123 -0
- across/sdk/v1/models/schedule_create_many.py +97 -0
- across/sdk/v1/models/schedule_fidelity.py +37 -0
- across/sdk/v1/models/schedule_status.py +38 -0
- across/sdk/v1/models/service_account_create.py +101 -0
- across/sdk/v1/models/service_account_secret.py +103 -0
- across/sdk/v1/models/service_account_update.py +106 -0
- across/sdk/v1/models/spice_parameters.py +89 -0
- across/sdk/v1/models/sun_angle_constraint.py +124 -0
- across/sdk/v1/models/system_service_account.py +121 -0
- across/sdk/v1/models/system_service_account_secret.py +123 -0
- across/sdk/v1/models/telescope.py +135 -0
- across/sdk/v1/models/telescope_instrument.py +163 -0
- across/sdk/v1/models/tle.py +99 -0
- across/sdk/v1/models/tle_create.py +94 -0
- across/sdk/v1/models/tle_parameters.py +89 -0
- across/sdk/v1/models/unit_value.py +94 -0
- across/sdk/v1/models/user_create.py +93 -0
- across/sdk/v1/models/user_info.py +95 -0
- across/sdk/v1/models/user_update.py +106 -0
- across/sdk/v1/models/validation_error.py +99 -0
- across/sdk/v1/models/validation_error_loc_inner.py +138 -0
- across/sdk/v1/models/visibility_result.py +97 -0
- across/sdk/v1/models/visibility_type.py +38 -0
- across/sdk/v1/models/visibility_window.py +99 -0
- across/sdk/v1/models/wavelength_bandpass.py +142 -0
- across/sdk/v1/models/wavelength_unit.py +39 -0
- across/sdk/v1/models/window.py +96 -0
- across/sdk/v1/py.typed +0 -0
- across/sdk/v1/rest.py +258 -0
- across_server_openapi_python-0.0.1.dist-info/METADATA +326 -0
- across_server_openapi_python-0.0.1.dist-info/RECORD +128 -0
- across_server_openapi_python-0.0.1.dist-info/WHEEL +5 -0
- across_server_openapi_python-0.0.1.dist-info/licenses/LICENSE +42 -0
- across_server_openapi_python-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,940 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, List, Optional, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from across.sdk.v1.models.depth_unit import DepthUnit
|
|
24
|
+
from across.sdk.v1.models.observation import Observation
|
|
25
|
+
from across.sdk.v1.models.observation_status import ObservationStatus
|
|
26
|
+
from across.sdk.v1.models.observation_type import ObservationType
|
|
27
|
+
from across.sdk.v1.models.page_observation import PageObservation
|
|
28
|
+
|
|
29
|
+
from across.sdk.v1.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from across.sdk.v1.api_response import ApiResponse
|
|
31
|
+
from across.sdk.v1.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ObservationApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def get_observation(
|
|
49
|
+
self,
|
|
50
|
+
observation_id: StrictStr,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> Observation:
|
|
64
|
+
"""Read an observation
|
|
65
|
+
|
|
66
|
+
Read an observation by an observation ID.
|
|
67
|
+
|
|
68
|
+
:param observation_id: (required)
|
|
69
|
+
:type observation_id: str
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._get_observation_serialize(
|
|
93
|
+
observation_id=observation_id,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "Observation",
|
|
102
|
+
'404': None,
|
|
103
|
+
'422': "HTTPValidationError",
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def get_observation_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
observation_id: StrictStr,
|
|
120
|
+
_request_timeout: Union[
|
|
121
|
+
None,
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Tuple[
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
126
|
+
]
|
|
127
|
+
] = None,
|
|
128
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_content_type: Optional[StrictStr] = None,
|
|
130
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
+
) -> ApiResponse[Observation]:
|
|
133
|
+
"""Read an observation
|
|
134
|
+
|
|
135
|
+
Read an observation by an observation ID.
|
|
136
|
+
|
|
137
|
+
:param observation_id: (required)
|
|
138
|
+
:type observation_id: str
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._get_observation_serialize(
|
|
162
|
+
observation_id=observation_id,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'200': "Observation",
|
|
171
|
+
'404': None,
|
|
172
|
+
'422': "HTTPValidationError",
|
|
173
|
+
}
|
|
174
|
+
response_data = self.api_client.call_api(
|
|
175
|
+
*_param,
|
|
176
|
+
_request_timeout=_request_timeout
|
|
177
|
+
)
|
|
178
|
+
response_data.read()
|
|
179
|
+
return self.api_client.response_deserialize(
|
|
180
|
+
response_data=response_data,
|
|
181
|
+
response_types_map=_response_types_map,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@validate_call
|
|
186
|
+
def get_observation_without_preload_content(
|
|
187
|
+
self,
|
|
188
|
+
observation_id: StrictStr,
|
|
189
|
+
_request_timeout: Union[
|
|
190
|
+
None,
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Tuple[
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_content_type: Optional[StrictStr] = None,
|
|
199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
201
|
+
) -> RESTResponseType:
|
|
202
|
+
"""Read an observation
|
|
203
|
+
|
|
204
|
+
Read an observation by an observation ID.
|
|
205
|
+
|
|
206
|
+
:param observation_id: (required)
|
|
207
|
+
:type observation_id: str
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._get_observation_serialize(
|
|
231
|
+
observation_id=observation_id,
|
|
232
|
+
_request_auth=_request_auth,
|
|
233
|
+
_content_type=_content_type,
|
|
234
|
+
_headers=_headers,
|
|
235
|
+
_host_index=_host_index
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
+
'200': "Observation",
|
|
240
|
+
'404': None,
|
|
241
|
+
'422': "HTTPValidationError",
|
|
242
|
+
}
|
|
243
|
+
response_data = self.api_client.call_api(
|
|
244
|
+
*_param,
|
|
245
|
+
_request_timeout=_request_timeout
|
|
246
|
+
)
|
|
247
|
+
return response_data.response
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _get_observation_serialize(
|
|
251
|
+
self,
|
|
252
|
+
observation_id,
|
|
253
|
+
_request_auth,
|
|
254
|
+
_content_type,
|
|
255
|
+
_headers,
|
|
256
|
+
_host_index,
|
|
257
|
+
) -> RequestSerialized:
|
|
258
|
+
|
|
259
|
+
_host = None
|
|
260
|
+
|
|
261
|
+
_collection_formats: Dict[str, str] = {
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
_path_params: Dict[str, str] = {}
|
|
265
|
+
_query_params: List[Tuple[str, str]] = []
|
|
266
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
267
|
+
_form_params: List[Tuple[str, str]] = []
|
|
268
|
+
_files: Dict[
|
|
269
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
270
|
+
] = {}
|
|
271
|
+
_body_params: Optional[bytes] = None
|
|
272
|
+
|
|
273
|
+
# process the path parameters
|
|
274
|
+
if observation_id is not None:
|
|
275
|
+
_path_params['observation_id'] = observation_id
|
|
276
|
+
# process the query parameters
|
|
277
|
+
# process the header parameters
|
|
278
|
+
# process the form parameters
|
|
279
|
+
# process the body parameter
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# set the HTTP header `Accept`
|
|
283
|
+
if 'Accept' not in _header_params:
|
|
284
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
285
|
+
[
|
|
286
|
+
'application/json'
|
|
287
|
+
]
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
# authentication setting
|
|
292
|
+
_auth_settings: List[str] = [
|
|
293
|
+
]
|
|
294
|
+
|
|
295
|
+
return self.api_client.param_serialize(
|
|
296
|
+
method='GET',
|
|
297
|
+
resource_path='/observation/{observation_id}',
|
|
298
|
+
path_params=_path_params,
|
|
299
|
+
query_params=_query_params,
|
|
300
|
+
header_params=_header_params,
|
|
301
|
+
body=_body_params,
|
|
302
|
+
post_params=_form_params,
|
|
303
|
+
files=_files,
|
|
304
|
+
auth_settings=_auth_settings,
|
|
305
|
+
collection_formats=_collection_formats,
|
|
306
|
+
_host=_host,
|
|
307
|
+
_request_auth=_request_auth
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
@validate_call
|
|
314
|
+
def get_observations(
|
|
315
|
+
self,
|
|
316
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
317
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
318
|
+
external_id: Optional[StrictStr] = None,
|
|
319
|
+
schedule_ids: Optional[List[Optional[StrictStr]]] = None,
|
|
320
|
+
observatory_ids: Optional[List[StrictStr]] = None,
|
|
321
|
+
telescope_ids: Optional[List[StrictStr]] = None,
|
|
322
|
+
instrument_ids: Optional[List[StrictStr]] = None,
|
|
323
|
+
status: Optional[ObservationStatus] = None,
|
|
324
|
+
proposal: Optional[StrictStr] = None,
|
|
325
|
+
object_name: Optional[StrictStr] = None,
|
|
326
|
+
date_range_begin: Optional[datetime] = None,
|
|
327
|
+
date_range_end: Optional[datetime] = None,
|
|
328
|
+
bandpass_min: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
329
|
+
bandpass_max: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
330
|
+
bandpass_type: Optional[Any] = None,
|
|
331
|
+
cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
332
|
+
cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
333
|
+
cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
334
|
+
type: Optional[ObservationType] = None,
|
|
335
|
+
depth_value: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
336
|
+
depth_unit: Optional[DepthUnit] = None,
|
|
337
|
+
_request_timeout: Union[
|
|
338
|
+
None,
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
340
|
+
Tuple[
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
342
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
343
|
+
]
|
|
344
|
+
] = None,
|
|
345
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
346
|
+
_content_type: Optional[StrictStr] = None,
|
|
347
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
348
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
349
|
+
) -> PageObservation:
|
|
350
|
+
"""Read observations(s)
|
|
351
|
+
|
|
352
|
+
Read the observations based on query params
|
|
353
|
+
|
|
354
|
+
:param page: Page number
|
|
355
|
+
:type page: int
|
|
356
|
+
:param page_limit: Records per page
|
|
357
|
+
:type page_limit: int
|
|
358
|
+
:param external_id:
|
|
359
|
+
:type external_id: str
|
|
360
|
+
:param schedule_ids:
|
|
361
|
+
:type schedule_ids: List[Optional[str]]
|
|
362
|
+
:param observatory_ids:
|
|
363
|
+
:type observatory_ids: List[str]
|
|
364
|
+
:param telescope_ids:
|
|
365
|
+
:type telescope_ids: List[str]
|
|
366
|
+
:param instrument_ids:
|
|
367
|
+
:type instrument_ids: List[str]
|
|
368
|
+
:param status:
|
|
369
|
+
:type status: ObservationStatus
|
|
370
|
+
:param proposal:
|
|
371
|
+
:type proposal: str
|
|
372
|
+
:param object_name:
|
|
373
|
+
:type object_name: str
|
|
374
|
+
:param date_range_begin:
|
|
375
|
+
:type date_range_begin: datetime
|
|
376
|
+
:param date_range_end:
|
|
377
|
+
:type date_range_end: datetime
|
|
378
|
+
:param bandpass_min:
|
|
379
|
+
:type bandpass_min: float
|
|
380
|
+
:param bandpass_max:
|
|
381
|
+
:type bandpass_max: float
|
|
382
|
+
:param bandpass_type:
|
|
383
|
+
:type bandpass_type: BandpassType
|
|
384
|
+
:param cone_search_ra:
|
|
385
|
+
:type cone_search_ra: float
|
|
386
|
+
:param cone_search_dec:
|
|
387
|
+
:type cone_search_dec: float
|
|
388
|
+
:param cone_search_radius:
|
|
389
|
+
:type cone_search_radius: float
|
|
390
|
+
:param type:
|
|
391
|
+
:type type: ObservationType
|
|
392
|
+
:param depth_value:
|
|
393
|
+
:type depth_value: float
|
|
394
|
+
:param depth_unit:
|
|
395
|
+
:type depth_unit: DepthUnit
|
|
396
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
397
|
+
number provided, it will be total request
|
|
398
|
+
timeout. It can also be a pair (tuple) of
|
|
399
|
+
(connection, read) timeouts.
|
|
400
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
401
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
402
|
+
request; this effectively ignores the
|
|
403
|
+
authentication in the spec for a single request.
|
|
404
|
+
:type _request_auth: dict, optional
|
|
405
|
+
:param _content_type: force content-type for the request.
|
|
406
|
+
:type _content_type: str, Optional
|
|
407
|
+
:param _headers: set to override the headers for a single
|
|
408
|
+
request; this effectively ignores the headers
|
|
409
|
+
in the spec for a single request.
|
|
410
|
+
:type _headers: dict, optional
|
|
411
|
+
:param _host_index: set to override the host_index for a single
|
|
412
|
+
request; this effectively ignores the host_index
|
|
413
|
+
in the spec for a single request.
|
|
414
|
+
:type _host_index: int, optional
|
|
415
|
+
:return: Returns the result object.
|
|
416
|
+
""" # noqa: E501
|
|
417
|
+
|
|
418
|
+
_param = self._get_observations_serialize(
|
|
419
|
+
page=page,
|
|
420
|
+
page_limit=page_limit,
|
|
421
|
+
external_id=external_id,
|
|
422
|
+
schedule_ids=schedule_ids,
|
|
423
|
+
observatory_ids=observatory_ids,
|
|
424
|
+
telescope_ids=telescope_ids,
|
|
425
|
+
instrument_ids=instrument_ids,
|
|
426
|
+
status=status,
|
|
427
|
+
proposal=proposal,
|
|
428
|
+
object_name=object_name,
|
|
429
|
+
date_range_begin=date_range_begin,
|
|
430
|
+
date_range_end=date_range_end,
|
|
431
|
+
bandpass_min=bandpass_min,
|
|
432
|
+
bandpass_max=bandpass_max,
|
|
433
|
+
bandpass_type=bandpass_type,
|
|
434
|
+
cone_search_ra=cone_search_ra,
|
|
435
|
+
cone_search_dec=cone_search_dec,
|
|
436
|
+
cone_search_radius=cone_search_radius,
|
|
437
|
+
type=type,
|
|
438
|
+
depth_value=depth_value,
|
|
439
|
+
depth_unit=depth_unit,
|
|
440
|
+
_request_auth=_request_auth,
|
|
441
|
+
_content_type=_content_type,
|
|
442
|
+
_headers=_headers,
|
|
443
|
+
_host_index=_host_index
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
447
|
+
'200': "PageObservation",
|
|
448
|
+
'404': None,
|
|
449
|
+
'422': "HTTPValidationError",
|
|
450
|
+
}
|
|
451
|
+
response_data = self.api_client.call_api(
|
|
452
|
+
*_param,
|
|
453
|
+
_request_timeout=_request_timeout
|
|
454
|
+
)
|
|
455
|
+
response_data.read()
|
|
456
|
+
return self.api_client.response_deserialize(
|
|
457
|
+
response_data=response_data,
|
|
458
|
+
response_types_map=_response_types_map,
|
|
459
|
+
).data
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@validate_call
|
|
463
|
+
def get_observations_with_http_info(
|
|
464
|
+
self,
|
|
465
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
466
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
467
|
+
external_id: Optional[StrictStr] = None,
|
|
468
|
+
schedule_ids: Optional[List[Optional[StrictStr]]] = None,
|
|
469
|
+
observatory_ids: Optional[List[StrictStr]] = None,
|
|
470
|
+
telescope_ids: Optional[List[StrictStr]] = None,
|
|
471
|
+
instrument_ids: Optional[List[StrictStr]] = None,
|
|
472
|
+
status: Optional[ObservationStatus] = None,
|
|
473
|
+
proposal: Optional[StrictStr] = None,
|
|
474
|
+
object_name: Optional[StrictStr] = None,
|
|
475
|
+
date_range_begin: Optional[datetime] = None,
|
|
476
|
+
date_range_end: Optional[datetime] = None,
|
|
477
|
+
bandpass_min: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
478
|
+
bandpass_max: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
479
|
+
bandpass_type: Optional[Any] = None,
|
|
480
|
+
cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
481
|
+
cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
482
|
+
cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
483
|
+
type: Optional[ObservationType] = None,
|
|
484
|
+
depth_value: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
485
|
+
depth_unit: Optional[DepthUnit] = None,
|
|
486
|
+
_request_timeout: Union[
|
|
487
|
+
None,
|
|
488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
489
|
+
Tuple[
|
|
490
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
491
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
492
|
+
]
|
|
493
|
+
] = None,
|
|
494
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
495
|
+
_content_type: Optional[StrictStr] = None,
|
|
496
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
497
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
498
|
+
) -> ApiResponse[PageObservation]:
|
|
499
|
+
"""Read observations(s)
|
|
500
|
+
|
|
501
|
+
Read the observations based on query params
|
|
502
|
+
|
|
503
|
+
:param page: Page number
|
|
504
|
+
:type page: int
|
|
505
|
+
:param page_limit: Records per page
|
|
506
|
+
:type page_limit: int
|
|
507
|
+
:param external_id:
|
|
508
|
+
:type external_id: str
|
|
509
|
+
:param schedule_ids:
|
|
510
|
+
:type schedule_ids: List[Optional[str]]
|
|
511
|
+
:param observatory_ids:
|
|
512
|
+
:type observatory_ids: List[str]
|
|
513
|
+
:param telescope_ids:
|
|
514
|
+
:type telescope_ids: List[str]
|
|
515
|
+
:param instrument_ids:
|
|
516
|
+
:type instrument_ids: List[str]
|
|
517
|
+
:param status:
|
|
518
|
+
:type status: ObservationStatus
|
|
519
|
+
:param proposal:
|
|
520
|
+
:type proposal: str
|
|
521
|
+
:param object_name:
|
|
522
|
+
:type object_name: str
|
|
523
|
+
:param date_range_begin:
|
|
524
|
+
:type date_range_begin: datetime
|
|
525
|
+
:param date_range_end:
|
|
526
|
+
:type date_range_end: datetime
|
|
527
|
+
:param bandpass_min:
|
|
528
|
+
:type bandpass_min: float
|
|
529
|
+
:param bandpass_max:
|
|
530
|
+
:type bandpass_max: float
|
|
531
|
+
:param bandpass_type:
|
|
532
|
+
:type bandpass_type: BandpassType
|
|
533
|
+
:param cone_search_ra:
|
|
534
|
+
:type cone_search_ra: float
|
|
535
|
+
:param cone_search_dec:
|
|
536
|
+
:type cone_search_dec: float
|
|
537
|
+
:param cone_search_radius:
|
|
538
|
+
:type cone_search_radius: float
|
|
539
|
+
:param type:
|
|
540
|
+
:type type: ObservationType
|
|
541
|
+
:param depth_value:
|
|
542
|
+
:type depth_value: float
|
|
543
|
+
:param depth_unit:
|
|
544
|
+
:type depth_unit: DepthUnit
|
|
545
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
546
|
+
number provided, it will be total request
|
|
547
|
+
timeout. It can also be a pair (tuple) of
|
|
548
|
+
(connection, read) timeouts.
|
|
549
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
550
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
551
|
+
request; this effectively ignores the
|
|
552
|
+
authentication in the spec for a single request.
|
|
553
|
+
:type _request_auth: dict, optional
|
|
554
|
+
:param _content_type: force content-type for the request.
|
|
555
|
+
:type _content_type: str, Optional
|
|
556
|
+
:param _headers: set to override the headers for a single
|
|
557
|
+
request; this effectively ignores the headers
|
|
558
|
+
in the spec for a single request.
|
|
559
|
+
:type _headers: dict, optional
|
|
560
|
+
:param _host_index: set to override the host_index for a single
|
|
561
|
+
request; this effectively ignores the host_index
|
|
562
|
+
in the spec for a single request.
|
|
563
|
+
:type _host_index: int, optional
|
|
564
|
+
:return: Returns the result object.
|
|
565
|
+
""" # noqa: E501
|
|
566
|
+
|
|
567
|
+
_param = self._get_observations_serialize(
|
|
568
|
+
page=page,
|
|
569
|
+
page_limit=page_limit,
|
|
570
|
+
external_id=external_id,
|
|
571
|
+
schedule_ids=schedule_ids,
|
|
572
|
+
observatory_ids=observatory_ids,
|
|
573
|
+
telescope_ids=telescope_ids,
|
|
574
|
+
instrument_ids=instrument_ids,
|
|
575
|
+
status=status,
|
|
576
|
+
proposal=proposal,
|
|
577
|
+
object_name=object_name,
|
|
578
|
+
date_range_begin=date_range_begin,
|
|
579
|
+
date_range_end=date_range_end,
|
|
580
|
+
bandpass_min=bandpass_min,
|
|
581
|
+
bandpass_max=bandpass_max,
|
|
582
|
+
bandpass_type=bandpass_type,
|
|
583
|
+
cone_search_ra=cone_search_ra,
|
|
584
|
+
cone_search_dec=cone_search_dec,
|
|
585
|
+
cone_search_radius=cone_search_radius,
|
|
586
|
+
type=type,
|
|
587
|
+
depth_value=depth_value,
|
|
588
|
+
depth_unit=depth_unit,
|
|
589
|
+
_request_auth=_request_auth,
|
|
590
|
+
_content_type=_content_type,
|
|
591
|
+
_headers=_headers,
|
|
592
|
+
_host_index=_host_index
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
596
|
+
'200': "PageObservation",
|
|
597
|
+
'404': None,
|
|
598
|
+
'422': "HTTPValidationError",
|
|
599
|
+
}
|
|
600
|
+
response_data = self.api_client.call_api(
|
|
601
|
+
*_param,
|
|
602
|
+
_request_timeout=_request_timeout
|
|
603
|
+
)
|
|
604
|
+
response_data.read()
|
|
605
|
+
return self.api_client.response_deserialize(
|
|
606
|
+
response_data=response_data,
|
|
607
|
+
response_types_map=_response_types_map,
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
@validate_call
|
|
612
|
+
def get_observations_without_preload_content(
|
|
613
|
+
self,
|
|
614
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
615
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
616
|
+
external_id: Optional[StrictStr] = None,
|
|
617
|
+
schedule_ids: Optional[List[Optional[StrictStr]]] = None,
|
|
618
|
+
observatory_ids: Optional[List[StrictStr]] = None,
|
|
619
|
+
telescope_ids: Optional[List[StrictStr]] = None,
|
|
620
|
+
instrument_ids: Optional[List[StrictStr]] = None,
|
|
621
|
+
status: Optional[ObservationStatus] = None,
|
|
622
|
+
proposal: Optional[StrictStr] = None,
|
|
623
|
+
object_name: Optional[StrictStr] = None,
|
|
624
|
+
date_range_begin: Optional[datetime] = None,
|
|
625
|
+
date_range_end: Optional[datetime] = None,
|
|
626
|
+
bandpass_min: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
627
|
+
bandpass_max: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
628
|
+
bandpass_type: Optional[Any] = None,
|
|
629
|
+
cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
630
|
+
cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
631
|
+
cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
632
|
+
type: Optional[ObservationType] = None,
|
|
633
|
+
depth_value: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
634
|
+
depth_unit: Optional[DepthUnit] = None,
|
|
635
|
+
_request_timeout: Union[
|
|
636
|
+
None,
|
|
637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
638
|
+
Tuple[
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
641
|
+
]
|
|
642
|
+
] = None,
|
|
643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_content_type: Optional[StrictStr] = None,
|
|
645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
647
|
+
) -> RESTResponseType:
|
|
648
|
+
"""Read observations(s)
|
|
649
|
+
|
|
650
|
+
Read the observations based on query params
|
|
651
|
+
|
|
652
|
+
:param page: Page number
|
|
653
|
+
:type page: int
|
|
654
|
+
:param page_limit: Records per page
|
|
655
|
+
:type page_limit: int
|
|
656
|
+
:param external_id:
|
|
657
|
+
:type external_id: str
|
|
658
|
+
:param schedule_ids:
|
|
659
|
+
:type schedule_ids: List[Optional[str]]
|
|
660
|
+
:param observatory_ids:
|
|
661
|
+
:type observatory_ids: List[str]
|
|
662
|
+
:param telescope_ids:
|
|
663
|
+
:type telescope_ids: List[str]
|
|
664
|
+
:param instrument_ids:
|
|
665
|
+
:type instrument_ids: List[str]
|
|
666
|
+
:param status:
|
|
667
|
+
:type status: ObservationStatus
|
|
668
|
+
:param proposal:
|
|
669
|
+
:type proposal: str
|
|
670
|
+
:param object_name:
|
|
671
|
+
:type object_name: str
|
|
672
|
+
:param date_range_begin:
|
|
673
|
+
:type date_range_begin: datetime
|
|
674
|
+
:param date_range_end:
|
|
675
|
+
:type date_range_end: datetime
|
|
676
|
+
:param bandpass_min:
|
|
677
|
+
:type bandpass_min: float
|
|
678
|
+
:param bandpass_max:
|
|
679
|
+
:type bandpass_max: float
|
|
680
|
+
:param bandpass_type:
|
|
681
|
+
:type bandpass_type: BandpassType
|
|
682
|
+
:param cone_search_ra:
|
|
683
|
+
:type cone_search_ra: float
|
|
684
|
+
:param cone_search_dec:
|
|
685
|
+
:type cone_search_dec: float
|
|
686
|
+
:param cone_search_radius:
|
|
687
|
+
:type cone_search_radius: float
|
|
688
|
+
:param type:
|
|
689
|
+
:type type: ObservationType
|
|
690
|
+
:param depth_value:
|
|
691
|
+
:type depth_value: float
|
|
692
|
+
:param depth_unit:
|
|
693
|
+
:type depth_unit: DepthUnit
|
|
694
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
695
|
+
number provided, it will be total request
|
|
696
|
+
timeout. It can also be a pair (tuple) of
|
|
697
|
+
(connection, read) timeouts.
|
|
698
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
699
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
700
|
+
request; this effectively ignores the
|
|
701
|
+
authentication in the spec for a single request.
|
|
702
|
+
:type _request_auth: dict, optional
|
|
703
|
+
:param _content_type: force content-type for the request.
|
|
704
|
+
:type _content_type: str, Optional
|
|
705
|
+
:param _headers: set to override the headers for a single
|
|
706
|
+
request; this effectively ignores the headers
|
|
707
|
+
in the spec for a single request.
|
|
708
|
+
:type _headers: dict, optional
|
|
709
|
+
:param _host_index: set to override the host_index for a single
|
|
710
|
+
request; this effectively ignores the host_index
|
|
711
|
+
in the spec for a single request.
|
|
712
|
+
:type _host_index: int, optional
|
|
713
|
+
:return: Returns the result object.
|
|
714
|
+
""" # noqa: E501
|
|
715
|
+
|
|
716
|
+
_param = self._get_observations_serialize(
|
|
717
|
+
page=page,
|
|
718
|
+
page_limit=page_limit,
|
|
719
|
+
external_id=external_id,
|
|
720
|
+
schedule_ids=schedule_ids,
|
|
721
|
+
observatory_ids=observatory_ids,
|
|
722
|
+
telescope_ids=telescope_ids,
|
|
723
|
+
instrument_ids=instrument_ids,
|
|
724
|
+
status=status,
|
|
725
|
+
proposal=proposal,
|
|
726
|
+
object_name=object_name,
|
|
727
|
+
date_range_begin=date_range_begin,
|
|
728
|
+
date_range_end=date_range_end,
|
|
729
|
+
bandpass_min=bandpass_min,
|
|
730
|
+
bandpass_max=bandpass_max,
|
|
731
|
+
bandpass_type=bandpass_type,
|
|
732
|
+
cone_search_ra=cone_search_ra,
|
|
733
|
+
cone_search_dec=cone_search_dec,
|
|
734
|
+
cone_search_radius=cone_search_radius,
|
|
735
|
+
type=type,
|
|
736
|
+
depth_value=depth_value,
|
|
737
|
+
depth_unit=depth_unit,
|
|
738
|
+
_request_auth=_request_auth,
|
|
739
|
+
_content_type=_content_type,
|
|
740
|
+
_headers=_headers,
|
|
741
|
+
_host_index=_host_index
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
745
|
+
'200': "PageObservation",
|
|
746
|
+
'404': None,
|
|
747
|
+
'422': "HTTPValidationError",
|
|
748
|
+
}
|
|
749
|
+
response_data = self.api_client.call_api(
|
|
750
|
+
*_param,
|
|
751
|
+
_request_timeout=_request_timeout
|
|
752
|
+
)
|
|
753
|
+
return response_data.response
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
def _get_observations_serialize(
|
|
757
|
+
self,
|
|
758
|
+
page,
|
|
759
|
+
page_limit,
|
|
760
|
+
external_id,
|
|
761
|
+
schedule_ids,
|
|
762
|
+
observatory_ids,
|
|
763
|
+
telescope_ids,
|
|
764
|
+
instrument_ids,
|
|
765
|
+
status,
|
|
766
|
+
proposal,
|
|
767
|
+
object_name,
|
|
768
|
+
date_range_begin,
|
|
769
|
+
date_range_end,
|
|
770
|
+
bandpass_min,
|
|
771
|
+
bandpass_max,
|
|
772
|
+
bandpass_type,
|
|
773
|
+
cone_search_ra,
|
|
774
|
+
cone_search_dec,
|
|
775
|
+
cone_search_radius,
|
|
776
|
+
type,
|
|
777
|
+
depth_value,
|
|
778
|
+
depth_unit,
|
|
779
|
+
_request_auth,
|
|
780
|
+
_content_type,
|
|
781
|
+
_headers,
|
|
782
|
+
_host_index,
|
|
783
|
+
) -> RequestSerialized:
|
|
784
|
+
|
|
785
|
+
_host = None
|
|
786
|
+
|
|
787
|
+
_collection_formats: Dict[str, str] = {
|
|
788
|
+
'schedule_ids': 'multi',
|
|
789
|
+
'observatory_ids': 'multi',
|
|
790
|
+
'telescope_ids': 'multi',
|
|
791
|
+
'instrument_ids': 'multi',
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
_path_params: Dict[str, str] = {}
|
|
795
|
+
_query_params: List[Tuple[str, str]] = []
|
|
796
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
797
|
+
_form_params: List[Tuple[str, str]] = []
|
|
798
|
+
_files: Dict[
|
|
799
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
800
|
+
] = {}
|
|
801
|
+
_body_params: Optional[bytes] = None
|
|
802
|
+
|
|
803
|
+
# process the path parameters
|
|
804
|
+
# process the query parameters
|
|
805
|
+
if page is not None:
|
|
806
|
+
|
|
807
|
+
_query_params.append(('page', page))
|
|
808
|
+
|
|
809
|
+
if page_limit is not None:
|
|
810
|
+
|
|
811
|
+
_query_params.append(('page_limit', page_limit))
|
|
812
|
+
|
|
813
|
+
if external_id is not None:
|
|
814
|
+
|
|
815
|
+
_query_params.append(('external_id', external_id))
|
|
816
|
+
|
|
817
|
+
if schedule_ids is not None:
|
|
818
|
+
|
|
819
|
+
_query_params.append(('schedule_ids', schedule_ids))
|
|
820
|
+
|
|
821
|
+
if observatory_ids is not None:
|
|
822
|
+
|
|
823
|
+
_query_params.append(('observatory_ids', observatory_ids))
|
|
824
|
+
|
|
825
|
+
if telescope_ids is not None:
|
|
826
|
+
|
|
827
|
+
_query_params.append(('telescope_ids', telescope_ids))
|
|
828
|
+
|
|
829
|
+
if instrument_ids is not None:
|
|
830
|
+
|
|
831
|
+
_query_params.append(('instrument_ids', instrument_ids))
|
|
832
|
+
|
|
833
|
+
if status is not None:
|
|
834
|
+
|
|
835
|
+
_query_params.append(('status', status.value))
|
|
836
|
+
|
|
837
|
+
if proposal is not None:
|
|
838
|
+
|
|
839
|
+
_query_params.append(('proposal', proposal))
|
|
840
|
+
|
|
841
|
+
if object_name is not None:
|
|
842
|
+
|
|
843
|
+
_query_params.append(('object_name', object_name))
|
|
844
|
+
|
|
845
|
+
if date_range_begin is not None:
|
|
846
|
+
if isinstance(date_range_begin, datetime):
|
|
847
|
+
_query_params.append(
|
|
848
|
+
(
|
|
849
|
+
'date_range_begin',
|
|
850
|
+
date_range_begin.strftime(
|
|
851
|
+
self.api_client.configuration.datetime_format
|
|
852
|
+
)
|
|
853
|
+
)
|
|
854
|
+
)
|
|
855
|
+
else:
|
|
856
|
+
_query_params.append(('date_range_begin', date_range_begin))
|
|
857
|
+
|
|
858
|
+
if date_range_end is not None:
|
|
859
|
+
if isinstance(date_range_end, datetime):
|
|
860
|
+
_query_params.append(
|
|
861
|
+
(
|
|
862
|
+
'date_range_end',
|
|
863
|
+
date_range_end.strftime(
|
|
864
|
+
self.api_client.configuration.datetime_format
|
|
865
|
+
)
|
|
866
|
+
)
|
|
867
|
+
)
|
|
868
|
+
else:
|
|
869
|
+
_query_params.append(('date_range_end', date_range_end))
|
|
870
|
+
|
|
871
|
+
if bandpass_min is not None:
|
|
872
|
+
|
|
873
|
+
_query_params.append(('bandpass_min', bandpass_min))
|
|
874
|
+
|
|
875
|
+
if bandpass_max is not None:
|
|
876
|
+
|
|
877
|
+
_query_params.append(('bandpass_max', bandpass_max))
|
|
878
|
+
|
|
879
|
+
if bandpass_type is not None:
|
|
880
|
+
|
|
881
|
+
_query_params.append(('bandpass_type', bandpass_type))
|
|
882
|
+
|
|
883
|
+
if cone_search_ra is not None:
|
|
884
|
+
|
|
885
|
+
_query_params.append(('cone_search_ra', cone_search_ra))
|
|
886
|
+
|
|
887
|
+
if cone_search_dec is not None:
|
|
888
|
+
|
|
889
|
+
_query_params.append(('cone_search_dec', cone_search_dec))
|
|
890
|
+
|
|
891
|
+
if cone_search_radius is not None:
|
|
892
|
+
|
|
893
|
+
_query_params.append(('cone_search_radius', cone_search_radius))
|
|
894
|
+
|
|
895
|
+
if type is not None:
|
|
896
|
+
|
|
897
|
+
_query_params.append(('type', type.value))
|
|
898
|
+
|
|
899
|
+
if depth_value is not None:
|
|
900
|
+
|
|
901
|
+
_query_params.append(('depth_value', depth_value))
|
|
902
|
+
|
|
903
|
+
if depth_unit is not None:
|
|
904
|
+
|
|
905
|
+
_query_params.append(('depth_unit', depth_unit.value))
|
|
906
|
+
|
|
907
|
+
# process the header parameters
|
|
908
|
+
# process the form parameters
|
|
909
|
+
# process the body parameter
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
# set the HTTP header `Accept`
|
|
913
|
+
if 'Accept' not in _header_params:
|
|
914
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
915
|
+
[
|
|
916
|
+
'application/json'
|
|
917
|
+
]
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
# authentication setting
|
|
922
|
+
_auth_settings: List[str] = [
|
|
923
|
+
]
|
|
924
|
+
|
|
925
|
+
return self.api_client.param_serialize(
|
|
926
|
+
method='GET',
|
|
927
|
+
resource_path='/observation/',
|
|
928
|
+
path_params=_path_params,
|
|
929
|
+
query_params=_query_params,
|
|
930
|
+
header_params=_header_params,
|
|
931
|
+
body=_body_params,
|
|
932
|
+
post_params=_form_params,
|
|
933
|
+
files=_files,
|
|
934
|
+
auth_settings=_auth_settings,
|
|
935
|
+
collection_formats=_collection_formats,
|
|
936
|
+
_host=_host,
|
|
937
|
+
_request_auth=_request_auth
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
|