across-server-openapi-python 1.4.0__py3-none-any.whl → 2.0.0__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/sdk/v1/__init__.py +48 -19
- across/sdk/v1/api/__init__.py +1 -1
- across/sdk/v1/api/auth_api.py +17 -286
- across/sdk/v1/api/broker_alert_api.py +36 -36
- across/sdk/v1/api/broker_event_api.py +20 -20
- across/sdk/v1/api/filter_api.py +20 -20
- across/sdk/v1/api/group_api.py +25 -275
- across/sdk/v1/api/group_invite_api.py +65 -66
- across/sdk/v1/api/group_role_api.py +111 -112
- across/sdk/v1/api/instrument_api.py +20 -20
- across/sdk/v1/api/internal_api.py +19 -20
- across/sdk/v1/api/observation_api.py +106 -109
- across/sdk/v1/api/observation_request_api.py +2108 -0
- across/sdk/v1/api/observatory_api.py +24 -25
- across/sdk/v1/api/permission_api.py +5 -6
- across/sdk/v1/api/schedule_api.py +84 -86
- across/sdk/v1/api/service_account_api.py +121 -122
- across/sdk/v1/api/telescope_api.py +26 -26
- across/sdk/v1/api/tle_api.py +7 -8
- across/sdk/v1/api/tools_api.py +55 -55
- across/sdk/v1/api/user_api.py +100 -349
- across/sdk/v1/api_client.py +111 -47
- across/sdk/v1/configuration.py +106 -33
- across/sdk/v1/exceptions.py +8 -6
- across/sdk/v1/models/__init__.py +24 -10
- across/sdk/v1/models/access_token_response.py +5 -4
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group.py +7 -5
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +20 -15
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +107 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +7 -5
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +12 -12
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +8 -7
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +11 -10
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +8 -6
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +8 -7
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +14 -16
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +8 -7
- across/sdk/v1/models/bandpass.py +1 -1
- across/sdk/v1/models/bandpass_type.py +1 -1
- across/sdk/v1/models/broker_alert.py +8 -6
- across/sdk/v1/models/broker_alert_create.py +6 -6
- across/sdk/v1/models/broker_alert_data_source.py +1 -1
- across/sdk/v1/models/broker_alert_status.py +1 -1
- across/sdk/v1/models/broker_event.py +9 -9
- across/sdk/v1/models/broker_event_type.py +1 -1
- across/sdk/v1/models/constrained_date.py +8 -6
- across/sdk/v1/models/constraint_reason.py +5 -4
- across/sdk/v1/models/constraint_type.py +1 -1
- across/sdk/v1/models/coordinate.py +5 -4
- across/sdk/v1/models/date_range.py +5 -4
- across/sdk/v1/models/date_range_create.py +96 -0
- across/sdk/v1/models/depth_unit.py +1 -1
- across/sdk/v1/models/energy_bandpass.py +5 -4
- across/sdk/v1/models/energy_unit.py +1 -1
- across/sdk/v1/models/ephemeris_type.py +1 -1
- across/sdk/v1/models/filter.py +8 -6
- across/sdk/v1/models/frequency_bandpass.py +5 -4
- across/sdk/v1/models/frequency_unit.py +1 -1
- across/sdk/v1/models/grant_type.py +1 -1
- across/sdk/v1/models/ground_parameters.py +5 -4
- across/sdk/v1/models/group_base.py +7 -5
- across/sdk/v1/models/group_invite_create.py +5 -4
- across/sdk/v1/models/group_invite_group_details.py +7 -5
- across/sdk/v1/models/group_read.py +7 -5
- across/sdk/v1/models/group_role_create.py +7 -5
- across/sdk/v1/models/group_role_read.py +8 -7
- across/sdk/v1/models/http_validation_error.py +6 -6
- across/sdk/v1/models/id_name_schema.py +7 -5
- across/sdk/v1/models/instrument.py +31 -15
- across/sdk/v1/models/ivoa_obs_category.py +1 -1
- across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
- across/sdk/v1/models/joint_visibility_result.py +23 -23
- across/sdk/v1/models/jpl_parameters.py +5 -4
- across/sdk/v1/models/localization.py +11 -10
- across/sdk/v1/models/localization_contour_base.py +6 -6
- across/sdk/v1/models/localization_create.py +6 -6
- across/sdk/v1/models/location_inner.py +1 -1
- across/sdk/v1/models/name_resolver.py +5 -4
- across/sdk/v1/models/nullable_date_range.py +5 -4
- across/sdk/v1/models/nullable_end_date_range.py +96 -0
- across/sdk/v1/models/observation.py +11 -10
- across/sdk/v1/models/observation_create.py +9 -8
- across/sdk/v1/models/observation_footprint.py +10 -9
- across/sdk/v1/models/observation_footprint_create.py +6 -6
- across/sdk/v1/models/observation_request.py +202 -0
- across/sdk/v1/models/observation_request_create.py +148 -0
- across/sdk/v1/models/observation_request_create_many.py +95 -0
- across/sdk/v1/models/observation_request_status.py +40 -0
- across/sdk/v1/models/observation_request_update.py +213 -0
- across/sdk/v1/models/observation_request_version.py +99 -0
- across/sdk/v1/models/observation_status.py +1 -1
- across/sdk/v1/models/observation_strategy.py +1 -1
- across/sdk/v1/models/observation_type.py +1 -1
- across/sdk/v1/models/observation_window.py +134 -0
- across/sdk/v1/models/observation_window1.py +140 -0
- across/sdk/v1/models/observatory.py +9 -9
- across/sdk/v1/models/observatory_ephemeris_type.py +5 -4
- across/sdk/v1/models/observatory_type.py +1 -1
- across/sdk/v1/models/observing_proposal.py +93 -0
- across/sdk/v1/models/observing_proposal_create.py +98 -0
- across/sdk/v1/models/page_broker_alert.py +6 -6
- across/sdk/v1/models/page_broker_event.py +6 -6
- across/sdk/v1/models/page_observation.py +6 -6
- across/sdk/v1/models/page_observation_request.py +116 -0
- across/sdk/v1/models/page_schedule.py +6 -6
- across/sdk/v1/models/parameters.py +1 -1
- across/sdk/v1/models/permission.py +7 -5
- across/sdk/v1/models/point.py +5 -4
- across/sdk/v1/models/proper_motion.py +93 -0
- across/sdk/v1/models/role_base.py +7 -5
- across/sdk/v1/models/schedule.py +10 -9
- across/sdk/v1/models/schedule_cadence.py +8 -6
- across/sdk/v1/models/schedule_create.py +8 -7
- across/sdk/v1/models/schedule_create_many.py +9 -8
- across/sdk/v1/models/schedule_fidelity.py +1 -1
- across/sdk/v1/models/schedule_status.py +1 -1
- across/sdk/v1/models/service_account_create.py +5 -4
- across/sdk/v1/models/service_account_secret.py +7 -5
- across/sdk/v1/models/service_account_update.py +5 -4
- across/sdk/v1/models/setting.py +100 -0
- across/sdk/v1/models/setting_type.py +39 -0
- across/sdk/v1/models/spice_parameters.py +5 -4
- across/sdk/v1/models/system_service_account.py +9 -9
- across/sdk/v1/models/telescope.py +9 -9
- across/sdk/v1/models/telescope_instrument.py +31 -15
- across/sdk/v1/models/tle.py +5 -4
- across/sdk/v1/models/tle_create.py +5 -4
- across/sdk/v1/models/tle_parameters.py +5 -4
- across/sdk/v1/models/unit_value.py +5 -4
- across/sdk/v1/models/user_create.py +5 -4
- across/sdk/v1/models/user_info.py +7 -5
- across/sdk/v1/models/user_update.py +5 -4
- across/sdk/v1/models/validation_error.py +21 -12
- across/sdk/v1/models/validation_error_loc_inner.py +1 -1
- across/sdk/v1/models/visibility_result.py +14 -11
- across/sdk/v1/models/visibility_type.py +1 -1
- across/sdk/v1/models/visibility_window.py +5 -4
- across/sdk/v1/models/wavelength_bandpass.py +5 -4
- across/sdk/v1/models/wavelength_unit.py +1 -1
- across/sdk/v1/models/window.py +5 -4
- across/sdk/v1/rest.py +88 -12
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/METADATA +103 -45
- across_server_openapi_python-2.0.0.dist-info/RECORD +162 -0
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/WHEEL +1 -1
- across_server_openapi_python-1.4.0.dist-info/RECORD +0 -143
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,2108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ACROSS Server
|
|
3
|
+
|
|
4
|
+
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.2
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, List, Optional, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from uuid import UUID
|
|
23
|
+
from across.sdk.v1.models.observation_request import ObservationRequest
|
|
24
|
+
from across.sdk.v1.models.observation_request_create import ObservationRequestCreate
|
|
25
|
+
from across.sdk.v1.models.observation_request_create_many import ObservationRequestCreateMany
|
|
26
|
+
from across.sdk.v1.models.observation_request_update import ObservationRequestUpdate
|
|
27
|
+
from across.sdk.v1.models.page_observation_request import PageObservationRequest
|
|
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 ObservationRequestApi:
|
|
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 archive_observation_request(
|
|
49
|
+
self,
|
|
50
|
+
observation_request_id: UUID,
|
|
51
|
+
reason: Optional[StrictStr] = None,
|
|
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
|
+
) -> UUID:
|
|
65
|
+
"""Archive an observation request
|
|
66
|
+
|
|
67
|
+
Archive an existing observation request for ACROSS.
|
|
68
|
+
|
|
69
|
+
:param observation_request_id: (required)
|
|
70
|
+
:type observation_request_id: UUID
|
|
71
|
+
:param reason:
|
|
72
|
+
:type reason: str
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._archive_observation_request_serialize(
|
|
96
|
+
observation_request_id=observation_request_id,
|
|
97
|
+
reason=reason,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'200': "UUID",
|
|
106
|
+
'404': None,
|
|
107
|
+
'422': "HTTPValidationError",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def archive_observation_request_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
observation_request_id: UUID,
|
|
124
|
+
reason: Optional[StrictStr] = None,
|
|
125
|
+
_request_timeout: Union[
|
|
126
|
+
None,
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Tuple[
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
131
|
+
]
|
|
132
|
+
] = None,
|
|
133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_content_type: Optional[StrictStr] = None,
|
|
135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
137
|
+
) -> ApiResponse[UUID]:
|
|
138
|
+
"""Archive an observation request
|
|
139
|
+
|
|
140
|
+
Archive an existing observation request for ACROSS.
|
|
141
|
+
|
|
142
|
+
:param observation_request_id: (required)
|
|
143
|
+
:type observation_request_id: UUID
|
|
144
|
+
:param reason:
|
|
145
|
+
:type reason: str
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._archive_observation_request_serialize(
|
|
169
|
+
observation_request_id=observation_request_id,
|
|
170
|
+
reason=reason,
|
|
171
|
+
_request_auth=_request_auth,
|
|
172
|
+
_content_type=_content_type,
|
|
173
|
+
_headers=_headers,
|
|
174
|
+
_host_index=_host_index
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
178
|
+
'200': "UUID",
|
|
179
|
+
'404': None,
|
|
180
|
+
'422': "HTTPValidationError",
|
|
181
|
+
}
|
|
182
|
+
response_data = self.api_client.call_api(
|
|
183
|
+
*_param,
|
|
184
|
+
_request_timeout=_request_timeout
|
|
185
|
+
)
|
|
186
|
+
response_data.read()
|
|
187
|
+
return self.api_client.response_deserialize(
|
|
188
|
+
response_data=response_data,
|
|
189
|
+
response_types_map=_response_types_map,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@validate_call
|
|
194
|
+
def archive_observation_request_without_preload_content(
|
|
195
|
+
self,
|
|
196
|
+
observation_request_id: UUID,
|
|
197
|
+
reason: Optional[StrictStr] = None,
|
|
198
|
+
_request_timeout: Union[
|
|
199
|
+
None,
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Tuple[
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
204
|
+
]
|
|
205
|
+
] = None,
|
|
206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_content_type: Optional[StrictStr] = None,
|
|
208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
210
|
+
) -> RESTResponseType:
|
|
211
|
+
"""Archive an observation request
|
|
212
|
+
|
|
213
|
+
Archive an existing observation request for ACROSS.
|
|
214
|
+
|
|
215
|
+
:param observation_request_id: (required)
|
|
216
|
+
:type observation_request_id: UUID
|
|
217
|
+
:param reason:
|
|
218
|
+
:type reason: str
|
|
219
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
220
|
+
number provided, it will be total request
|
|
221
|
+
timeout. It can also be a pair (tuple) of
|
|
222
|
+
(connection, read) timeouts.
|
|
223
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
224
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
225
|
+
request; this effectively ignores the
|
|
226
|
+
authentication in the spec for a single request.
|
|
227
|
+
:type _request_auth: dict, optional
|
|
228
|
+
:param _content_type: force content-type for the request.
|
|
229
|
+
:type _content_type: str, Optional
|
|
230
|
+
:param _headers: set to override the headers for a single
|
|
231
|
+
request; this effectively ignores the headers
|
|
232
|
+
in the spec for a single request.
|
|
233
|
+
:type _headers: dict, optional
|
|
234
|
+
:param _host_index: set to override the host_index for a single
|
|
235
|
+
request; this effectively ignores the host_index
|
|
236
|
+
in the spec for a single request.
|
|
237
|
+
:type _host_index: int, optional
|
|
238
|
+
:return: Returns the result object.
|
|
239
|
+
""" # noqa: E501
|
|
240
|
+
|
|
241
|
+
_param = self._archive_observation_request_serialize(
|
|
242
|
+
observation_request_id=observation_request_id,
|
|
243
|
+
reason=reason,
|
|
244
|
+
_request_auth=_request_auth,
|
|
245
|
+
_content_type=_content_type,
|
|
246
|
+
_headers=_headers,
|
|
247
|
+
_host_index=_host_index
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
251
|
+
'200': "UUID",
|
|
252
|
+
'404': None,
|
|
253
|
+
'422': "HTTPValidationError",
|
|
254
|
+
}
|
|
255
|
+
response_data = self.api_client.call_api(
|
|
256
|
+
*_param,
|
|
257
|
+
_request_timeout=_request_timeout
|
|
258
|
+
)
|
|
259
|
+
return response_data.response
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def _archive_observation_request_serialize(
|
|
263
|
+
self,
|
|
264
|
+
observation_request_id,
|
|
265
|
+
reason,
|
|
266
|
+
_request_auth,
|
|
267
|
+
_content_type,
|
|
268
|
+
_headers,
|
|
269
|
+
_host_index,
|
|
270
|
+
) -> RequestSerialized:
|
|
271
|
+
|
|
272
|
+
_host = None
|
|
273
|
+
|
|
274
|
+
_collection_formats: Dict[str, str] = {
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
_path_params: Dict[str, str] = {}
|
|
278
|
+
_query_params: List[Tuple[str, str]] = []
|
|
279
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
280
|
+
_form_params: List[Tuple[str, str]] = []
|
|
281
|
+
_files: Dict[
|
|
282
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
283
|
+
] = {}
|
|
284
|
+
_body_params: Optional[bytes] = None
|
|
285
|
+
|
|
286
|
+
# process the path parameters
|
|
287
|
+
if observation_request_id is not None:
|
|
288
|
+
_path_params['observation_request_id'] = observation_request_id
|
|
289
|
+
# process the query parameters
|
|
290
|
+
if reason is not None:
|
|
291
|
+
|
|
292
|
+
_query_params.append(('reason', reason))
|
|
293
|
+
|
|
294
|
+
# process the header parameters
|
|
295
|
+
# process the form parameters
|
|
296
|
+
# process the body parameter
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
# set the HTTP header `Accept`
|
|
300
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
301
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
302
|
+
[
|
|
303
|
+
'application/json'
|
|
304
|
+
]
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# authentication setting
|
|
309
|
+
_auth_settings: List[str] = [
|
|
310
|
+
'Authorization'
|
|
311
|
+
]
|
|
312
|
+
|
|
313
|
+
return self.api_client.param_serialize(
|
|
314
|
+
method='DELETE',
|
|
315
|
+
resource_path='/observation-request/{observation_request_id}',
|
|
316
|
+
path_params=_path_params,
|
|
317
|
+
query_params=_query_params,
|
|
318
|
+
header_params=_header_params,
|
|
319
|
+
body=_body_params,
|
|
320
|
+
post_params=_form_params,
|
|
321
|
+
files=_files,
|
|
322
|
+
auth_settings=_auth_settings,
|
|
323
|
+
collection_formats=_collection_formats,
|
|
324
|
+
_host=_host,
|
|
325
|
+
_request_auth=_request_auth
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
@validate_call
|
|
332
|
+
def create_observation_request(
|
|
333
|
+
self,
|
|
334
|
+
observation_request_create: ObservationRequestCreate,
|
|
335
|
+
_request_timeout: Union[
|
|
336
|
+
None,
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Tuple[
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
340
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
341
|
+
]
|
|
342
|
+
] = None,
|
|
343
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_content_type: Optional[StrictStr] = None,
|
|
345
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
346
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
347
|
+
) -> UUID:
|
|
348
|
+
"""Create an observation request
|
|
349
|
+
|
|
350
|
+
Create a new observation request for ACROSS.
|
|
351
|
+
|
|
352
|
+
:param observation_request_create: (required)
|
|
353
|
+
:type observation_request_create: ObservationRequestCreate
|
|
354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
355
|
+
number provided, it will be total request
|
|
356
|
+
timeout. It can also be a pair (tuple) of
|
|
357
|
+
(connection, read) timeouts.
|
|
358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
360
|
+
request; this effectively ignores the
|
|
361
|
+
authentication in the spec for a single request.
|
|
362
|
+
:type _request_auth: dict, optional
|
|
363
|
+
:param _content_type: force content-type for the request.
|
|
364
|
+
:type _content_type: str, Optional
|
|
365
|
+
:param _headers: set to override the headers for a single
|
|
366
|
+
request; this effectively ignores the headers
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _headers: dict, optional
|
|
369
|
+
:param _host_index: set to override the host_index for a single
|
|
370
|
+
request; this effectively ignores the host_index
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _host_index: int, optional
|
|
373
|
+
:return: Returns the result object.
|
|
374
|
+
""" # noqa: E501
|
|
375
|
+
|
|
376
|
+
_param = self._create_observation_request_serialize(
|
|
377
|
+
observation_request_create=observation_request_create,
|
|
378
|
+
_request_auth=_request_auth,
|
|
379
|
+
_content_type=_content_type,
|
|
380
|
+
_headers=_headers,
|
|
381
|
+
_host_index=_host_index
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
385
|
+
'201': "UUID",
|
|
386
|
+
'404': None,
|
|
387
|
+
'409': None,
|
|
388
|
+
'422': "HTTPValidationError",
|
|
389
|
+
}
|
|
390
|
+
response_data = self.api_client.call_api(
|
|
391
|
+
*_param,
|
|
392
|
+
_request_timeout=_request_timeout
|
|
393
|
+
)
|
|
394
|
+
response_data.read()
|
|
395
|
+
return self.api_client.response_deserialize(
|
|
396
|
+
response_data=response_data,
|
|
397
|
+
response_types_map=_response_types_map,
|
|
398
|
+
).data
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
@validate_call
|
|
402
|
+
def create_observation_request_with_http_info(
|
|
403
|
+
self,
|
|
404
|
+
observation_request_create: ObservationRequestCreate,
|
|
405
|
+
_request_timeout: Union[
|
|
406
|
+
None,
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Tuple[
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
411
|
+
]
|
|
412
|
+
] = None,
|
|
413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_content_type: Optional[StrictStr] = None,
|
|
415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
417
|
+
) -> ApiResponse[UUID]:
|
|
418
|
+
"""Create an observation request
|
|
419
|
+
|
|
420
|
+
Create a new observation request for ACROSS.
|
|
421
|
+
|
|
422
|
+
:param observation_request_create: (required)
|
|
423
|
+
:type observation_request_create: ObservationRequestCreate
|
|
424
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
425
|
+
number provided, it will be total request
|
|
426
|
+
timeout. It can also be a pair (tuple) of
|
|
427
|
+
(connection, read) timeouts.
|
|
428
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
429
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
430
|
+
request; this effectively ignores the
|
|
431
|
+
authentication in the spec for a single request.
|
|
432
|
+
:type _request_auth: dict, optional
|
|
433
|
+
:param _content_type: force content-type for the request.
|
|
434
|
+
:type _content_type: str, Optional
|
|
435
|
+
:param _headers: set to override the headers for a single
|
|
436
|
+
request; this effectively ignores the headers
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _headers: dict, optional
|
|
439
|
+
:param _host_index: set to override the host_index for a single
|
|
440
|
+
request; this effectively ignores the host_index
|
|
441
|
+
in the spec for a single request.
|
|
442
|
+
:type _host_index: int, optional
|
|
443
|
+
:return: Returns the result object.
|
|
444
|
+
""" # noqa: E501
|
|
445
|
+
|
|
446
|
+
_param = self._create_observation_request_serialize(
|
|
447
|
+
observation_request_create=observation_request_create,
|
|
448
|
+
_request_auth=_request_auth,
|
|
449
|
+
_content_type=_content_type,
|
|
450
|
+
_headers=_headers,
|
|
451
|
+
_host_index=_host_index
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
455
|
+
'201': "UUID",
|
|
456
|
+
'404': None,
|
|
457
|
+
'409': None,
|
|
458
|
+
'422': "HTTPValidationError",
|
|
459
|
+
}
|
|
460
|
+
response_data = self.api_client.call_api(
|
|
461
|
+
*_param,
|
|
462
|
+
_request_timeout=_request_timeout
|
|
463
|
+
)
|
|
464
|
+
response_data.read()
|
|
465
|
+
return self.api_client.response_deserialize(
|
|
466
|
+
response_data=response_data,
|
|
467
|
+
response_types_map=_response_types_map,
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@validate_call
|
|
472
|
+
def create_observation_request_without_preload_content(
|
|
473
|
+
self,
|
|
474
|
+
observation_request_create: ObservationRequestCreate,
|
|
475
|
+
_request_timeout: Union[
|
|
476
|
+
None,
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Tuple[
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
481
|
+
]
|
|
482
|
+
] = None,
|
|
483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_content_type: Optional[StrictStr] = None,
|
|
485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
487
|
+
) -> RESTResponseType:
|
|
488
|
+
"""Create an observation request
|
|
489
|
+
|
|
490
|
+
Create a new observation request for ACROSS.
|
|
491
|
+
|
|
492
|
+
:param observation_request_create: (required)
|
|
493
|
+
:type observation_request_create: ObservationRequestCreate
|
|
494
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
495
|
+
number provided, it will be total request
|
|
496
|
+
timeout. It can also be a pair (tuple) of
|
|
497
|
+
(connection, read) timeouts.
|
|
498
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
499
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
500
|
+
request; this effectively ignores the
|
|
501
|
+
authentication in the spec for a single request.
|
|
502
|
+
:type _request_auth: dict, optional
|
|
503
|
+
:param _content_type: force content-type for the request.
|
|
504
|
+
:type _content_type: str, Optional
|
|
505
|
+
:param _headers: set to override the headers for a single
|
|
506
|
+
request; this effectively ignores the headers
|
|
507
|
+
in the spec for a single request.
|
|
508
|
+
:type _headers: dict, optional
|
|
509
|
+
:param _host_index: set to override the host_index for a single
|
|
510
|
+
request; this effectively ignores the host_index
|
|
511
|
+
in the spec for a single request.
|
|
512
|
+
:type _host_index: int, optional
|
|
513
|
+
:return: Returns the result object.
|
|
514
|
+
""" # noqa: E501
|
|
515
|
+
|
|
516
|
+
_param = self._create_observation_request_serialize(
|
|
517
|
+
observation_request_create=observation_request_create,
|
|
518
|
+
_request_auth=_request_auth,
|
|
519
|
+
_content_type=_content_type,
|
|
520
|
+
_headers=_headers,
|
|
521
|
+
_host_index=_host_index
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
525
|
+
'201': "UUID",
|
|
526
|
+
'404': None,
|
|
527
|
+
'409': None,
|
|
528
|
+
'422': "HTTPValidationError",
|
|
529
|
+
}
|
|
530
|
+
response_data = self.api_client.call_api(
|
|
531
|
+
*_param,
|
|
532
|
+
_request_timeout=_request_timeout
|
|
533
|
+
)
|
|
534
|
+
return response_data.response
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
def _create_observation_request_serialize(
|
|
538
|
+
self,
|
|
539
|
+
observation_request_create,
|
|
540
|
+
_request_auth,
|
|
541
|
+
_content_type,
|
|
542
|
+
_headers,
|
|
543
|
+
_host_index,
|
|
544
|
+
) -> RequestSerialized:
|
|
545
|
+
|
|
546
|
+
_host = None
|
|
547
|
+
|
|
548
|
+
_collection_formats: Dict[str, str] = {
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
_path_params: Dict[str, str] = {}
|
|
552
|
+
_query_params: List[Tuple[str, str]] = []
|
|
553
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
554
|
+
_form_params: List[Tuple[str, str]] = []
|
|
555
|
+
_files: Dict[
|
|
556
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
557
|
+
] = {}
|
|
558
|
+
_body_params: Optional[bytes] = None
|
|
559
|
+
|
|
560
|
+
# process the path parameters
|
|
561
|
+
# process the query parameters
|
|
562
|
+
# process the header parameters
|
|
563
|
+
# process the form parameters
|
|
564
|
+
# process the body parameter
|
|
565
|
+
if observation_request_create is not None:
|
|
566
|
+
_body_params = observation_request_create
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# set the HTTP header `Accept`
|
|
570
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
571
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
572
|
+
[
|
|
573
|
+
'application/json'
|
|
574
|
+
]
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Content-Type`
|
|
578
|
+
if _content_type:
|
|
579
|
+
self.api_client._set_header(_header_params, 'Content-Type', _content_type)
|
|
580
|
+
else:
|
|
581
|
+
_default_content_type = (
|
|
582
|
+
self.api_client.select_header_content_type(
|
|
583
|
+
[
|
|
584
|
+
'application/json'
|
|
585
|
+
]
|
|
586
|
+
)
|
|
587
|
+
)
|
|
588
|
+
if _default_content_type is not None:
|
|
589
|
+
self.api_client._set_header(_header_params, 'Content-Type', _default_content_type)
|
|
590
|
+
|
|
591
|
+
# authentication setting
|
|
592
|
+
_auth_settings: List[str] = [
|
|
593
|
+
'Authorization'
|
|
594
|
+
]
|
|
595
|
+
|
|
596
|
+
return self.api_client.param_serialize(
|
|
597
|
+
method='POST',
|
|
598
|
+
resource_path='/observation-request',
|
|
599
|
+
path_params=_path_params,
|
|
600
|
+
query_params=_query_params,
|
|
601
|
+
header_params=_header_params,
|
|
602
|
+
body=_body_params,
|
|
603
|
+
post_params=_form_params,
|
|
604
|
+
files=_files,
|
|
605
|
+
auth_settings=_auth_settings,
|
|
606
|
+
collection_formats=_collection_formats,
|
|
607
|
+
_host=_host,
|
|
608
|
+
_request_auth=_request_auth
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
@validate_call
|
|
615
|
+
def create_observation_requests_bulk(
|
|
616
|
+
self,
|
|
617
|
+
observation_request_create_many: ObservationRequestCreateMany,
|
|
618
|
+
_request_timeout: Union[
|
|
619
|
+
None,
|
|
620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
621
|
+
Tuple[
|
|
622
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
623
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
624
|
+
]
|
|
625
|
+
] = None,
|
|
626
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_content_type: Optional[StrictStr] = None,
|
|
628
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
629
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
630
|
+
) -> List[Optional[UUID]]:
|
|
631
|
+
"""Create many observation requests
|
|
632
|
+
|
|
633
|
+
Create new observation requests for ACROSS.
|
|
634
|
+
|
|
635
|
+
:param observation_request_create_many: (required)
|
|
636
|
+
:type observation_request_create_many: ObservationRequestCreateMany
|
|
637
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
638
|
+
number provided, it will be total request
|
|
639
|
+
timeout. It can also be a pair (tuple) of
|
|
640
|
+
(connection, read) timeouts.
|
|
641
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
642
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
643
|
+
request; this effectively ignores the
|
|
644
|
+
authentication in the spec for a single request.
|
|
645
|
+
:type _request_auth: dict, optional
|
|
646
|
+
:param _content_type: force content-type for the request.
|
|
647
|
+
:type _content_type: str, Optional
|
|
648
|
+
:param _headers: set to override the headers for a single
|
|
649
|
+
request; this effectively ignores the headers
|
|
650
|
+
in the spec for a single request.
|
|
651
|
+
:type _headers: dict, optional
|
|
652
|
+
:param _host_index: set to override the host_index for a single
|
|
653
|
+
request; this effectively ignores the host_index
|
|
654
|
+
in the spec for a single request.
|
|
655
|
+
:type _host_index: int, optional
|
|
656
|
+
:return: Returns the result object.
|
|
657
|
+
""" # noqa: E501
|
|
658
|
+
|
|
659
|
+
_param = self._create_observation_requests_bulk_serialize(
|
|
660
|
+
observation_request_create_many=observation_request_create_many,
|
|
661
|
+
_request_auth=_request_auth,
|
|
662
|
+
_content_type=_content_type,
|
|
663
|
+
_headers=_headers,
|
|
664
|
+
_host_index=_host_index
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
668
|
+
'201': "List",
|
|
669
|
+
'404': None,
|
|
670
|
+
'409': None,
|
|
671
|
+
'422': "HTTPValidationError",
|
|
672
|
+
}
|
|
673
|
+
response_data = self.api_client.call_api(
|
|
674
|
+
*_param,
|
|
675
|
+
_request_timeout=_request_timeout
|
|
676
|
+
)
|
|
677
|
+
response_data.read()
|
|
678
|
+
return self.api_client.response_deserialize(
|
|
679
|
+
response_data=response_data,
|
|
680
|
+
response_types_map=_response_types_map,
|
|
681
|
+
).data
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
@validate_call
|
|
685
|
+
def create_observation_requests_bulk_with_http_info(
|
|
686
|
+
self,
|
|
687
|
+
observation_request_create_many: ObservationRequestCreateMany,
|
|
688
|
+
_request_timeout: Union[
|
|
689
|
+
None,
|
|
690
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
691
|
+
Tuple[
|
|
692
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
694
|
+
]
|
|
695
|
+
] = None,
|
|
696
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
697
|
+
_content_type: Optional[StrictStr] = None,
|
|
698
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
699
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
700
|
+
) -> ApiResponse[List[Optional[UUID]]]:
|
|
701
|
+
"""Create many observation requests
|
|
702
|
+
|
|
703
|
+
Create new observation requests for ACROSS.
|
|
704
|
+
|
|
705
|
+
:param observation_request_create_many: (required)
|
|
706
|
+
:type observation_request_create_many: ObservationRequestCreateMany
|
|
707
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
708
|
+
number provided, it will be total request
|
|
709
|
+
timeout. It can also be a pair (tuple) of
|
|
710
|
+
(connection, read) timeouts.
|
|
711
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
712
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
713
|
+
request; this effectively ignores the
|
|
714
|
+
authentication in the spec for a single request.
|
|
715
|
+
:type _request_auth: dict, optional
|
|
716
|
+
:param _content_type: force content-type for the request.
|
|
717
|
+
:type _content_type: str, Optional
|
|
718
|
+
:param _headers: set to override the headers for a single
|
|
719
|
+
request; this effectively ignores the headers
|
|
720
|
+
in the spec for a single request.
|
|
721
|
+
:type _headers: dict, optional
|
|
722
|
+
:param _host_index: set to override the host_index for a single
|
|
723
|
+
request; this effectively ignores the host_index
|
|
724
|
+
in the spec for a single request.
|
|
725
|
+
:type _host_index: int, optional
|
|
726
|
+
:return: Returns the result object.
|
|
727
|
+
""" # noqa: E501
|
|
728
|
+
|
|
729
|
+
_param = self._create_observation_requests_bulk_serialize(
|
|
730
|
+
observation_request_create_many=observation_request_create_many,
|
|
731
|
+
_request_auth=_request_auth,
|
|
732
|
+
_content_type=_content_type,
|
|
733
|
+
_headers=_headers,
|
|
734
|
+
_host_index=_host_index
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
738
|
+
'201': "List",
|
|
739
|
+
'404': None,
|
|
740
|
+
'409': None,
|
|
741
|
+
'422': "HTTPValidationError",
|
|
742
|
+
}
|
|
743
|
+
response_data = self.api_client.call_api(
|
|
744
|
+
*_param,
|
|
745
|
+
_request_timeout=_request_timeout
|
|
746
|
+
)
|
|
747
|
+
response_data.read()
|
|
748
|
+
return self.api_client.response_deserialize(
|
|
749
|
+
response_data=response_data,
|
|
750
|
+
response_types_map=_response_types_map,
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
@validate_call
|
|
755
|
+
def create_observation_requests_bulk_without_preload_content(
|
|
756
|
+
self,
|
|
757
|
+
observation_request_create_many: ObservationRequestCreateMany,
|
|
758
|
+
_request_timeout: Union[
|
|
759
|
+
None,
|
|
760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
761
|
+
Tuple[
|
|
762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
763
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
764
|
+
]
|
|
765
|
+
] = None,
|
|
766
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
767
|
+
_content_type: Optional[StrictStr] = None,
|
|
768
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
769
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
770
|
+
) -> RESTResponseType:
|
|
771
|
+
"""Create many observation requests
|
|
772
|
+
|
|
773
|
+
Create new observation requests for ACROSS.
|
|
774
|
+
|
|
775
|
+
:param observation_request_create_many: (required)
|
|
776
|
+
:type observation_request_create_many: ObservationRequestCreateMany
|
|
777
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
778
|
+
number provided, it will be total request
|
|
779
|
+
timeout. It can also be a pair (tuple) of
|
|
780
|
+
(connection, read) timeouts.
|
|
781
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
782
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
783
|
+
request; this effectively ignores the
|
|
784
|
+
authentication in the spec for a single request.
|
|
785
|
+
:type _request_auth: dict, optional
|
|
786
|
+
:param _content_type: force content-type for the request.
|
|
787
|
+
:type _content_type: str, Optional
|
|
788
|
+
:param _headers: set to override the headers for a single
|
|
789
|
+
request; this effectively ignores the headers
|
|
790
|
+
in the spec for a single request.
|
|
791
|
+
:type _headers: dict, optional
|
|
792
|
+
:param _host_index: set to override the host_index for a single
|
|
793
|
+
request; this effectively ignores the host_index
|
|
794
|
+
in the spec for a single request.
|
|
795
|
+
:type _host_index: int, optional
|
|
796
|
+
:return: Returns the result object.
|
|
797
|
+
""" # noqa: E501
|
|
798
|
+
|
|
799
|
+
_param = self._create_observation_requests_bulk_serialize(
|
|
800
|
+
observation_request_create_many=observation_request_create_many,
|
|
801
|
+
_request_auth=_request_auth,
|
|
802
|
+
_content_type=_content_type,
|
|
803
|
+
_headers=_headers,
|
|
804
|
+
_host_index=_host_index
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
808
|
+
'201': "List",
|
|
809
|
+
'404': None,
|
|
810
|
+
'409': None,
|
|
811
|
+
'422': "HTTPValidationError",
|
|
812
|
+
}
|
|
813
|
+
response_data = self.api_client.call_api(
|
|
814
|
+
*_param,
|
|
815
|
+
_request_timeout=_request_timeout
|
|
816
|
+
)
|
|
817
|
+
return response_data.response
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
def _create_observation_requests_bulk_serialize(
|
|
821
|
+
self,
|
|
822
|
+
observation_request_create_many,
|
|
823
|
+
_request_auth,
|
|
824
|
+
_content_type,
|
|
825
|
+
_headers,
|
|
826
|
+
_host_index,
|
|
827
|
+
) -> RequestSerialized:
|
|
828
|
+
|
|
829
|
+
_host = None
|
|
830
|
+
|
|
831
|
+
_collection_formats: Dict[str, str] = {
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
_path_params: Dict[str, str] = {}
|
|
835
|
+
_query_params: List[Tuple[str, str]] = []
|
|
836
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
837
|
+
_form_params: List[Tuple[str, str]] = []
|
|
838
|
+
_files: Dict[
|
|
839
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
840
|
+
] = {}
|
|
841
|
+
_body_params: Optional[bytes] = None
|
|
842
|
+
|
|
843
|
+
# process the path parameters
|
|
844
|
+
# process the query parameters
|
|
845
|
+
# process the header parameters
|
|
846
|
+
# process the form parameters
|
|
847
|
+
# process the body parameter
|
|
848
|
+
if observation_request_create_many is not None:
|
|
849
|
+
_body_params = observation_request_create_many
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
# set the HTTP header `Accept`
|
|
853
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
854
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
855
|
+
[
|
|
856
|
+
'application/json'
|
|
857
|
+
]
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
# set the HTTP header `Content-Type`
|
|
861
|
+
if _content_type:
|
|
862
|
+
self.api_client._set_header(_header_params, 'Content-Type', _content_type)
|
|
863
|
+
else:
|
|
864
|
+
_default_content_type = (
|
|
865
|
+
self.api_client.select_header_content_type(
|
|
866
|
+
[
|
|
867
|
+
'application/json'
|
|
868
|
+
]
|
|
869
|
+
)
|
|
870
|
+
)
|
|
871
|
+
if _default_content_type is not None:
|
|
872
|
+
self.api_client._set_header(_header_params, 'Content-Type', _default_content_type)
|
|
873
|
+
|
|
874
|
+
# authentication setting
|
|
875
|
+
_auth_settings: List[str] = [
|
|
876
|
+
'Authorization'
|
|
877
|
+
]
|
|
878
|
+
|
|
879
|
+
return self.api_client.param_serialize(
|
|
880
|
+
method='POST',
|
|
881
|
+
resource_path='/observation-request/bulk',
|
|
882
|
+
path_params=_path_params,
|
|
883
|
+
query_params=_query_params,
|
|
884
|
+
header_params=_header_params,
|
|
885
|
+
body=_body_params,
|
|
886
|
+
post_params=_form_params,
|
|
887
|
+
files=_files,
|
|
888
|
+
auth_settings=_auth_settings,
|
|
889
|
+
collection_formats=_collection_formats,
|
|
890
|
+
_host=_host,
|
|
891
|
+
_request_auth=_request_auth
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
@validate_call
|
|
898
|
+
def get_observation_request(
|
|
899
|
+
self,
|
|
900
|
+
observation_request_id: UUID,
|
|
901
|
+
_request_timeout: Union[
|
|
902
|
+
None,
|
|
903
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
904
|
+
Tuple[
|
|
905
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
906
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
907
|
+
]
|
|
908
|
+
] = None,
|
|
909
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
910
|
+
_content_type: Optional[StrictStr] = None,
|
|
911
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
912
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
913
|
+
) -> ObservationRequest:
|
|
914
|
+
"""Read an observation request
|
|
915
|
+
|
|
916
|
+
Read an observation request by its ID.
|
|
917
|
+
|
|
918
|
+
:param observation_request_id: (required)
|
|
919
|
+
:type observation_request_id: UUID
|
|
920
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
921
|
+
number provided, it will be total request
|
|
922
|
+
timeout. It can also be a pair (tuple) of
|
|
923
|
+
(connection, read) timeouts.
|
|
924
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
925
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
926
|
+
request; this effectively ignores the
|
|
927
|
+
authentication in the spec for a single request.
|
|
928
|
+
:type _request_auth: dict, optional
|
|
929
|
+
:param _content_type: force content-type for the request.
|
|
930
|
+
:type _content_type: str, Optional
|
|
931
|
+
:param _headers: set to override the headers for a single
|
|
932
|
+
request; this effectively ignores the headers
|
|
933
|
+
in the spec for a single request.
|
|
934
|
+
:type _headers: dict, optional
|
|
935
|
+
:param _host_index: set to override the host_index for a single
|
|
936
|
+
request; this effectively ignores the host_index
|
|
937
|
+
in the spec for a single request.
|
|
938
|
+
:type _host_index: int, optional
|
|
939
|
+
:return: Returns the result object.
|
|
940
|
+
""" # noqa: E501
|
|
941
|
+
|
|
942
|
+
_param = self._get_observation_request_serialize(
|
|
943
|
+
observation_request_id=observation_request_id,
|
|
944
|
+
_request_auth=_request_auth,
|
|
945
|
+
_content_type=_content_type,
|
|
946
|
+
_headers=_headers,
|
|
947
|
+
_host_index=_host_index
|
|
948
|
+
)
|
|
949
|
+
|
|
950
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
951
|
+
'200': "ObservationRequest",
|
|
952
|
+
'404': None,
|
|
953
|
+
'422': "HTTPValidationError",
|
|
954
|
+
}
|
|
955
|
+
response_data = self.api_client.call_api(
|
|
956
|
+
*_param,
|
|
957
|
+
_request_timeout=_request_timeout
|
|
958
|
+
)
|
|
959
|
+
response_data.read()
|
|
960
|
+
return self.api_client.response_deserialize(
|
|
961
|
+
response_data=response_data,
|
|
962
|
+
response_types_map=_response_types_map,
|
|
963
|
+
).data
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
@validate_call
|
|
967
|
+
def get_observation_request_with_http_info(
|
|
968
|
+
self,
|
|
969
|
+
observation_request_id: UUID,
|
|
970
|
+
_request_timeout: Union[
|
|
971
|
+
None,
|
|
972
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
973
|
+
Tuple[
|
|
974
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
975
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
976
|
+
]
|
|
977
|
+
] = None,
|
|
978
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
979
|
+
_content_type: Optional[StrictStr] = None,
|
|
980
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
981
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
982
|
+
) -> ApiResponse[ObservationRequest]:
|
|
983
|
+
"""Read an observation request
|
|
984
|
+
|
|
985
|
+
Read an observation request by its ID.
|
|
986
|
+
|
|
987
|
+
:param observation_request_id: (required)
|
|
988
|
+
:type observation_request_id: UUID
|
|
989
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
990
|
+
number provided, it will be total request
|
|
991
|
+
timeout. It can also be a pair (tuple) of
|
|
992
|
+
(connection, read) timeouts.
|
|
993
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
994
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
995
|
+
request; this effectively ignores the
|
|
996
|
+
authentication in the spec for a single request.
|
|
997
|
+
:type _request_auth: dict, optional
|
|
998
|
+
:param _content_type: force content-type for the request.
|
|
999
|
+
:type _content_type: str, Optional
|
|
1000
|
+
:param _headers: set to override the headers for a single
|
|
1001
|
+
request; this effectively ignores the headers
|
|
1002
|
+
in the spec for a single request.
|
|
1003
|
+
:type _headers: dict, optional
|
|
1004
|
+
:param _host_index: set to override the host_index for a single
|
|
1005
|
+
request; this effectively ignores the host_index
|
|
1006
|
+
in the spec for a single request.
|
|
1007
|
+
:type _host_index: int, optional
|
|
1008
|
+
:return: Returns the result object.
|
|
1009
|
+
""" # noqa: E501
|
|
1010
|
+
|
|
1011
|
+
_param = self._get_observation_request_serialize(
|
|
1012
|
+
observation_request_id=observation_request_id,
|
|
1013
|
+
_request_auth=_request_auth,
|
|
1014
|
+
_content_type=_content_type,
|
|
1015
|
+
_headers=_headers,
|
|
1016
|
+
_host_index=_host_index
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1020
|
+
'200': "ObservationRequest",
|
|
1021
|
+
'404': None,
|
|
1022
|
+
'422': "HTTPValidationError",
|
|
1023
|
+
}
|
|
1024
|
+
response_data = self.api_client.call_api(
|
|
1025
|
+
*_param,
|
|
1026
|
+
_request_timeout=_request_timeout
|
|
1027
|
+
)
|
|
1028
|
+
response_data.read()
|
|
1029
|
+
return self.api_client.response_deserialize(
|
|
1030
|
+
response_data=response_data,
|
|
1031
|
+
response_types_map=_response_types_map,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
@validate_call
|
|
1036
|
+
def get_observation_request_without_preload_content(
|
|
1037
|
+
self,
|
|
1038
|
+
observation_request_id: UUID,
|
|
1039
|
+
_request_timeout: Union[
|
|
1040
|
+
None,
|
|
1041
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1042
|
+
Tuple[
|
|
1043
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1044
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1045
|
+
]
|
|
1046
|
+
] = None,
|
|
1047
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1048
|
+
_content_type: Optional[StrictStr] = None,
|
|
1049
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1050
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1051
|
+
) -> RESTResponseType:
|
|
1052
|
+
"""Read an observation request
|
|
1053
|
+
|
|
1054
|
+
Read an observation request by its ID.
|
|
1055
|
+
|
|
1056
|
+
:param observation_request_id: (required)
|
|
1057
|
+
:type observation_request_id: UUID
|
|
1058
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1059
|
+
number provided, it will be total request
|
|
1060
|
+
timeout. It can also be a pair (tuple) of
|
|
1061
|
+
(connection, read) timeouts.
|
|
1062
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1063
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1064
|
+
request; this effectively ignores the
|
|
1065
|
+
authentication in the spec for a single request.
|
|
1066
|
+
:type _request_auth: dict, optional
|
|
1067
|
+
:param _content_type: force content-type for the request.
|
|
1068
|
+
:type _content_type: str, Optional
|
|
1069
|
+
:param _headers: set to override the headers for a single
|
|
1070
|
+
request; this effectively ignores the headers
|
|
1071
|
+
in the spec for a single request.
|
|
1072
|
+
:type _headers: dict, optional
|
|
1073
|
+
:param _host_index: set to override the host_index for a single
|
|
1074
|
+
request; this effectively ignores the host_index
|
|
1075
|
+
in the spec for a single request.
|
|
1076
|
+
:type _host_index: int, optional
|
|
1077
|
+
:return: Returns the result object.
|
|
1078
|
+
""" # noqa: E501
|
|
1079
|
+
|
|
1080
|
+
_param = self._get_observation_request_serialize(
|
|
1081
|
+
observation_request_id=observation_request_id,
|
|
1082
|
+
_request_auth=_request_auth,
|
|
1083
|
+
_content_type=_content_type,
|
|
1084
|
+
_headers=_headers,
|
|
1085
|
+
_host_index=_host_index
|
|
1086
|
+
)
|
|
1087
|
+
|
|
1088
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1089
|
+
'200': "ObservationRequest",
|
|
1090
|
+
'404': None,
|
|
1091
|
+
'422': "HTTPValidationError",
|
|
1092
|
+
}
|
|
1093
|
+
response_data = self.api_client.call_api(
|
|
1094
|
+
*_param,
|
|
1095
|
+
_request_timeout=_request_timeout
|
|
1096
|
+
)
|
|
1097
|
+
return response_data.response
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
def _get_observation_request_serialize(
|
|
1101
|
+
self,
|
|
1102
|
+
observation_request_id,
|
|
1103
|
+
_request_auth,
|
|
1104
|
+
_content_type,
|
|
1105
|
+
_headers,
|
|
1106
|
+
_host_index,
|
|
1107
|
+
) -> RequestSerialized:
|
|
1108
|
+
|
|
1109
|
+
_host = None
|
|
1110
|
+
|
|
1111
|
+
_collection_formats: Dict[str, str] = {
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
_path_params: Dict[str, str] = {}
|
|
1115
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1116
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
1117
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1118
|
+
_files: Dict[
|
|
1119
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1120
|
+
] = {}
|
|
1121
|
+
_body_params: Optional[bytes] = None
|
|
1122
|
+
|
|
1123
|
+
# process the path parameters
|
|
1124
|
+
if observation_request_id is not None:
|
|
1125
|
+
_path_params['observation_request_id'] = observation_request_id
|
|
1126
|
+
# process the query parameters
|
|
1127
|
+
# process the header parameters
|
|
1128
|
+
# process the form parameters
|
|
1129
|
+
# process the body parameter
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
# set the HTTP header `Accept`
|
|
1133
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
1134
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1135
|
+
[
|
|
1136
|
+
'application/json'
|
|
1137
|
+
]
|
|
1138
|
+
)
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
# authentication setting
|
|
1142
|
+
_auth_settings: List[str] = [
|
|
1143
|
+
'Authorization'
|
|
1144
|
+
]
|
|
1145
|
+
|
|
1146
|
+
return self.api_client.param_serialize(
|
|
1147
|
+
method='GET',
|
|
1148
|
+
resource_path='/observation-request/{observation_request_id}',
|
|
1149
|
+
path_params=_path_params,
|
|
1150
|
+
query_params=_query_params,
|
|
1151
|
+
header_params=_header_params,
|
|
1152
|
+
body=_body_params,
|
|
1153
|
+
post_params=_form_params,
|
|
1154
|
+
files=_files,
|
|
1155
|
+
auth_settings=_auth_settings,
|
|
1156
|
+
collection_formats=_collection_formats,
|
|
1157
|
+
_host=_host,
|
|
1158
|
+
_request_auth=_request_auth
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
@validate_call
|
|
1165
|
+
def get_observation_requests(
|
|
1166
|
+
self,
|
|
1167
|
+
page: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1168
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=100)]], Field(description="Records per page")] = None,
|
|
1169
|
+
ids: Optional[List[UUID]] = None,
|
|
1170
|
+
observatory_names: Optional[List[Optional[StrictStr]]] = None,
|
|
1171
|
+
observatory_ids: Optional[List[UUID]] = None,
|
|
1172
|
+
telescope_names: Optional[List[StrictStr]] = None,
|
|
1173
|
+
telescope_ids: Optional[List[UUID]] = None,
|
|
1174
|
+
instrument_names: Optional[List[StrictStr]] = None,
|
|
1175
|
+
instrument_ids: Optional[List[UUID]] = None,
|
|
1176
|
+
object_name: Optional[StrictStr] = None,
|
|
1177
|
+
object_cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1178
|
+
object_cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1179
|
+
object_cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1180
|
+
begin_date: Optional[datetime] = None,
|
|
1181
|
+
end_date: Optional[datetime] = None,
|
|
1182
|
+
status: Optional[Any] = None,
|
|
1183
|
+
proposal_name: Optional[StrictStr] = None,
|
|
1184
|
+
proposal_code: Optional[StrictStr] = None,
|
|
1185
|
+
proposal_ids: Optional[List[StrictStr]] = None,
|
|
1186
|
+
is_too: Optional[StrictBool] = None,
|
|
1187
|
+
parent_id: Optional[UUID] = None,
|
|
1188
|
+
include_versions: Optional[StrictBool] = None,
|
|
1189
|
+
_request_timeout: Union[
|
|
1190
|
+
None,
|
|
1191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1192
|
+
Tuple[
|
|
1193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1195
|
+
]
|
|
1196
|
+
] = None,
|
|
1197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1198
|
+
_content_type: Optional[StrictStr] = None,
|
|
1199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1201
|
+
) -> PageObservationRequest:
|
|
1202
|
+
"""Read observation request(s)
|
|
1203
|
+
|
|
1204
|
+
Read most recent observation requests based on query params
|
|
1205
|
+
|
|
1206
|
+
:param page: Page number
|
|
1207
|
+
:type page: int
|
|
1208
|
+
:param page_limit: Records per page
|
|
1209
|
+
:type page_limit: int
|
|
1210
|
+
:param ids:
|
|
1211
|
+
:type ids: List[UUID]
|
|
1212
|
+
:param observatory_names:
|
|
1213
|
+
:type observatory_names: List[Optional[str]]
|
|
1214
|
+
:param observatory_ids:
|
|
1215
|
+
:type observatory_ids: List[UUID]
|
|
1216
|
+
:param telescope_names:
|
|
1217
|
+
:type telescope_names: List[str]
|
|
1218
|
+
:param telescope_ids:
|
|
1219
|
+
:type telescope_ids: List[UUID]
|
|
1220
|
+
:param instrument_names:
|
|
1221
|
+
:type instrument_names: List[str]
|
|
1222
|
+
:param instrument_ids:
|
|
1223
|
+
:type instrument_ids: List[UUID]
|
|
1224
|
+
:param object_name:
|
|
1225
|
+
:type object_name: str
|
|
1226
|
+
:param object_cone_search_ra:
|
|
1227
|
+
:type object_cone_search_ra: float
|
|
1228
|
+
:param object_cone_search_dec:
|
|
1229
|
+
:type object_cone_search_dec: float
|
|
1230
|
+
:param object_cone_search_radius:
|
|
1231
|
+
:type object_cone_search_radius: float
|
|
1232
|
+
:param begin_date:
|
|
1233
|
+
:type begin_date: datetime
|
|
1234
|
+
:param end_date:
|
|
1235
|
+
:type end_date: datetime
|
|
1236
|
+
:param status:
|
|
1237
|
+
:type status: ObservationRequestStatus
|
|
1238
|
+
:param proposal_name:
|
|
1239
|
+
:type proposal_name: str
|
|
1240
|
+
:param proposal_code:
|
|
1241
|
+
:type proposal_code: str
|
|
1242
|
+
:param proposal_ids:
|
|
1243
|
+
:type proposal_ids: List[str]
|
|
1244
|
+
:param is_too:
|
|
1245
|
+
:type is_too: bool
|
|
1246
|
+
:param parent_id:
|
|
1247
|
+
:type parent_id: UUID
|
|
1248
|
+
:param include_versions:
|
|
1249
|
+
:type include_versions: bool
|
|
1250
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1251
|
+
number provided, it will be total request
|
|
1252
|
+
timeout. It can also be a pair (tuple) of
|
|
1253
|
+
(connection, read) timeouts.
|
|
1254
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1255
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1256
|
+
request; this effectively ignores the
|
|
1257
|
+
authentication in the spec for a single request.
|
|
1258
|
+
:type _request_auth: dict, optional
|
|
1259
|
+
:param _content_type: force content-type for the request.
|
|
1260
|
+
:type _content_type: str, Optional
|
|
1261
|
+
:param _headers: set to override the headers for a single
|
|
1262
|
+
request; this effectively ignores the headers
|
|
1263
|
+
in the spec for a single request.
|
|
1264
|
+
:type _headers: dict, optional
|
|
1265
|
+
:param _host_index: set to override the host_index for a single
|
|
1266
|
+
request; this effectively ignores the host_index
|
|
1267
|
+
in the spec for a single request.
|
|
1268
|
+
:type _host_index: int, optional
|
|
1269
|
+
:return: Returns the result object.
|
|
1270
|
+
""" # noqa: E501
|
|
1271
|
+
|
|
1272
|
+
_param = self._get_observation_requests_serialize(
|
|
1273
|
+
page=page,
|
|
1274
|
+
page_limit=page_limit,
|
|
1275
|
+
ids=ids,
|
|
1276
|
+
observatory_names=observatory_names,
|
|
1277
|
+
observatory_ids=observatory_ids,
|
|
1278
|
+
telescope_names=telescope_names,
|
|
1279
|
+
telescope_ids=telescope_ids,
|
|
1280
|
+
instrument_names=instrument_names,
|
|
1281
|
+
instrument_ids=instrument_ids,
|
|
1282
|
+
object_name=object_name,
|
|
1283
|
+
object_cone_search_ra=object_cone_search_ra,
|
|
1284
|
+
object_cone_search_dec=object_cone_search_dec,
|
|
1285
|
+
object_cone_search_radius=object_cone_search_radius,
|
|
1286
|
+
begin_date=begin_date,
|
|
1287
|
+
end_date=end_date,
|
|
1288
|
+
status=status,
|
|
1289
|
+
proposal_name=proposal_name,
|
|
1290
|
+
proposal_code=proposal_code,
|
|
1291
|
+
proposal_ids=proposal_ids,
|
|
1292
|
+
is_too=is_too,
|
|
1293
|
+
parent_id=parent_id,
|
|
1294
|
+
include_versions=include_versions,
|
|
1295
|
+
_request_auth=_request_auth,
|
|
1296
|
+
_content_type=_content_type,
|
|
1297
|
+
_headers=_headers,
|
|
1298
|
+
_host_index=_host_index
|
|
1299
|
+
)
|
|
1300
|
+
|
|
1301
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1302
|
+
'200': "PageObservationRequest",
|
|
1303
|
+
'404': None,
|
|
1304
|
+
'422': "HTTPValidationError",
|
|
1305
|
+
}
|
|
1306
|
+
response_data = self.api_client.call_api(
|
|
1307
|
+
*_param,
|
|
1308
|
+
_request_timeout=_request_timeout
|
|
1309
|
+
)
|
|
1310
|
+
response_data.read()
|
|
1311
|
+
return self.api_client.response_deserialize(
|
|
1312
|
+
response_data=response_data,
|
|
1313
|
+
response_types_map=_response_types_map,
|
|
1314
|
+
).data
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
@validate_call
|
|
1318
|
+
def get_observation_requests_with_http_info(
|
|
1319
|
+
self,
|
|
1320
|
+
page: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1321
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=100)]], Field(description="Records per page")] = None,
|
|
1322
|
+
ids: Optional[List[UUID]] = None,
|
|
1323
|
+
observatory_names: Optional[List[Optional[StrictStr]]] = None,
|
|
1324
|
+
observatory_ids: Optional[List[UUID]] = None,
|
|
1325
|
+
telescope_names: Optional[List[StrictStr]] = None,
|
|
1326
|
+
telescope_ids: Optional[List[UUID]] = None,
|
|
1327
|
+
instrument_names: Optional[List[StrictStr]] = None,
|
|
1328
|
+
instrument_ids: Optional[List[UUID]] = None,
|
|
1329
|
+
object_name: Optional[StrictStr] = None,
|
|
1330
|
+
object_cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1331
|
+
object_cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1332
|
+
object_cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1333
|
+
begin_date: Optional[datetime] = None,
|
|
1334
|
+
end_date: Optional[datetime] = None,
|
|
1335
|
+
status: Optional[Any] = None,
|
|
1336
|
+
proposal_name: Optional[StrictStr] = None,
|
|
1337
|
+
proposal_code: Optional[StrictStr] = None,
|
|
1338
|
+
proposal_ids: Optional[List[StrictStr]] = None,
|
|
1339
|
+
is_too: Optional[StrictBool] = None,
|
|
1340
|
+
parent_id: Optional[UUID] = None,
|
|
1341
|
+
include_versions: Optional[StrictBool] = None,
|
|
1342
|
+
_request_timeout: Union[
|
|
1343
|
+
None,
|
|
1344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1345
|
+
Tuple[
|
|
1346
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1347
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1348
|
+
]
|
|
1349
|
+
] = None,
|
|
1350
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1351
|
+
_content_type: Optional[StrictStr] = None,
|
|
1352
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1353
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1354
|
+
) -> ApiResponse[PageObservationRequest]:
|
|
1355
|
+
"""Read observation request(s)
|
|
1356
|
+
|
|
1357
|
+
Read most recent observation requests based on query params
|
|
1358
|
+
|
|
1359
|
+
:param page: Page number
|
|
1360
|
+
:type page: int
|
|
1361
|
+
:param page_limit: Records per page
|
|
1362
|
+
:type page_limit: int
|
|
1363
|
+
:param ids:
|
|
1364
|
+
:type ids: List[UUID]
|
|
1365
|
+
:param observatory_names:
|
|
1366
|
+
:type observatory_names: List[Optional[str]]
|
|
1367
|
+
:param observatory_ids:
|
|
1368
|
+
:type observatory_ids: List[UUID]
|
|
1369
|
+
:param telescope_names:
|
|
1370
|
+
:type telescope_names: List[str]
|
|
1371
|
+
:param telescope_ids:
|
|
1372
|
+
:type telescope_ids: List[UUID]
|
|
1373
|
+
:param instrument_names:
|
|
1374
|
+
:type instrument_names: List[str]
|
|
1375
|
+
:param instrument_ids:
|
|
1376
|
+
:type instrument_ids: List[UUID]
|
|
1377
|
+
:param object_name:
|
|
1378
|
+
:type object_name: str
|
|
1379
|
+
:param object_cone_search_ra:
|
|
1380
|
+
:type object_cone_search_ra: float
|
|
1381
|
+
:param object_cone_search_dec:
|
|
1382
|
+
:type object_cone_search_dec: float
|
|
1383
|
+
:param object_cone_search_radius:
|
|
1384
|
+
:type object_cone_search_radius: float
|
|
1385
|
+
:param begin_date:
|
|
1386
|
+
:type begin_date: datetime
|
|
1387
|
+
:param end_date:
|
|
1388
|
+
:type end_date: datetime
|
|
1389
|
+
:param status:
|
|
1390
|
+
:type status: ObservationRequestStatus
|
|
1391
|
+
:param proposal_name:
|
|
1392
|
+
:type proposal_name: str
|
|
1393
|
+
:param proposal_code:
|
|
1394
|
+
:type proposal_code: str
|
|
1395
|
+
:param proposal_ids:
|
|
1396
|
+
:type proposal_ids: List[str]
|
|
1397
|
+
:param is_too:
|
|
1398
|
+
:type is_too: bool
|
|
1399
|
+
:param parent_id:
|
|
1400
|
+
:type parent_id: UUID
|
|
1401
|
+
:param include_versions:
|
|
1402
|
+
:type include_versions: bool
|
|
1403
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1404
|
+
number provided, it will be total request
|
|
1405
|
+
timeout. It can also be a pair (tuple) of
|
|
1406
|
+
(connection, read) timeouts.
|
|
1407
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1408
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1409
|
+
request; this effectively ignores the
|
|
1410
|
+
authentication in the spec for a single request.
|
|
1411
|
+
:type _request_auth: dict, optional
|
|
1412
|
+
:param _content_type: force content-type for the request.
|
|
1413
|
+
:type _content_type: str, Optional
|
|
1414
|
+
:param _headers: set to override the headers for a single
|
|
1415
|
+
request; this effectively ignores the headers
|
|
1416
|
+
in the spec for a single request.
|
|
1417
|
+
:type _headers: dict, optional
|
|
1418
|
+
:param _host_index: set to override the host_index for a single
|
|
1419
|
+
request; this effectively ignores the host_index
|
|
1420
|
+
in the spec for a single request.
|
|
1421
|
+
:type _host_index: int, optional
|
|
1422
|
+
:return: Returns the result object.
|
|
1423
|
+
""" # noqa: E501
|
|
1424
|
+
|
|
1425
|
+
_param = self._get_observation_requests_serialize(
|
|
1426
|
+
page=page,
|
|
1427
|
+
page_limit=page_limit,
|
|
1428
|
+
ids=ids,
|
|
1429
|
+
observatory_names=observatory_names,
|
|
1430
|
+
observatory_ids=observatory_ids,
|
|
1431
|
+
telescope_names=telescope_names,
|
|
1432
|
+
telescope_ids=telescope_ids,
|
|
1433
|
+
instrument_names=instrument_names,
|
|
1434
|
+
instrument_ids=instrument_ids,
|
|
1435
|
+
object_name=object_name,
|
|
1436
|
+
object_cone_search_ra=object_cone_search_ra,
|
|
1437
|
+
object_cone_search_dec=object_cone_search_dec,
|
|
1438
|
+
object_cone_search_radius=object_cone_search_radius,
|
|
1439
|
+
begin_date=begin_date,
|
|
1440
|
+
end_date=end_date,
|
|
1441
|
+
status=status,
|
|
1442
|
+
proposal_name=proposal_name,
|
|
1443
|
+
proposal_code=proposal_code,
|
|
1444
|
+
proposal_ids=proposal_ids,
|
|
1445
|
+
is_too=is_too,
|
|
1446
|
+
parent_id=parent_id,
|
|
1447
|
+
include_versions=include_versions,
|
|
1448
|
+
_request_auth=_request_auth,
|
|
1449
|
+
_content_type=_content_type,
|
|
1450
|
+
_headers=_headers,
|
|
1451
|
+
_host_index=_host_index
|
|
1452
|
+
)
|
|
1453
|
+
|
|
1454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1455
|
+
'200': "PageObservationRequest",
|
|
1456
|
+
'404': None,
|
|
1457
|
+
'422': "HTTPValidationError",
|
|
1458
|
+
}
|
|
1459
|
+
response_data = self.api_client.call_api(
|
|
1460
|
+
*_param,
|
|
1461
|
+
_request_timeout=_request_timeout
|
|
1462
|
+
)
|
|
1463
|
+
response_data.read()
|
|
1464
|
+
return self.api_client.response_deserialize(
|
|
1465
|
+
response_data=response_data,
|
|
1466
|
+
response_types_map=_response_types_map,
|
|
1467
|
+
)
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
@validate_call
|
|
1471
|
+
def get_observation_requests_without_preload_content(
|
|
1472
|
+
self,
|
|
1473
|
+
page: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1474
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=100)]], Field(description="Records per page")] = None,
|
|
1475
|
+
ids: Optional[List[UUID]] = None,
|
|
1476
|
+
observatory_names: Optional[List[Optional[StrictStr]]] = None,
|
|
1477
|
+
observatory_ids: Optional[List[UUID]] = None,
|
|
1478
|
+
telescope_names: Optional[List[StrictStr]] = None,
|
|
1479
|
+
telescope_ids: Optional[List[UUID]] = None,
|
|
1480
|
+
instrument_names: Optional[List[StrictStr]] = None,
|
|
1481
|
+
instrument_ids: Optional[List[UUID]] = None,
|
|
1482
|
+
object_name: Optional[StrictStr] = None,
|
|
1483
|
+
object_cone_search_ra: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1484
|
+
object_cone_search_dec: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1485
|
+
object_cone_search_radius: Optional[Union[StrictFloat, StrictInt]] = None,
|
|
1486
|
+
begin_date: Optional[datetime] = None,
|
|
1487
|
+
end_date: Optional[datetime] = None,
|
|
1488
|
+
status: Optional[Any] = None,
|
|
1489
|
+
proposal_name: Optional[StrictStr] = None,
|
|
1490
|
+
proposal_code: Optional[StrictStr] = None,
|
|
1491
|
+
proposal_ids: Optional[List[StrictStr]] = None,
|
|
1492
|
+
is_too: Optional[StrictBool] = None,
|
|
1493
|
+
parent_id: Optional[UUID] = None,
|
|
1494
|
+
include_versions: Optional[StrictBool] = None,
|
|
1495
|
+
_request_timeout: Union[
|
|
1496
|
+
None,
|
|
1497
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1498
|
+
Tuple[
|
|
1499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1500
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1501
|
+
]
|
|
1502
|
+
] = None,
|
|
1503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1504
|
+
_content_type: Optional[StrictStr] = None,
|
|
1505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1507
|
+
) -> RESTResponseType:
|
|
1508
|
+
"""Read observation request(s)
|
|
1509
|
+
|
|
1510
|
+
Read most recent observation requests based on query params
|
|
1511
|
+
|
|
1512
|
+
:param page: Page number
|
|
1513
|
+
:type page: int
|
|
1514
|
+
:param page_limit: Records per page
|
|
1515
|
+
:type page_limit: int
|
|
1516
|
+
:param ids:
|
|
1517
|
+
:type ids: List[UUID]
|
|
1518
|
+
:param observatory_names:
|
|
1519
|
+
:type observatory_names: List[Optional[str]]
|
|
1520
|
+
:param observatory_ids:
|
|
1521
|
+
:type observatory_ids: List[UUID]
|
|
1522
|
+
:param telescope_names:
|
|
1523
|
+
:type telescope_names: List[str]
|
|
1524
|
+
:param telescope_ids:
|
|
1525
|
+
:type telescope_ids: List[UUID]
|
|
1526
|
+
:param instrument_names:
|
|
1527
|
+
:type instrument_names: List[str]
|
|
1528
|
+
:param instrument_ids:
|
|
1529
|
+
:type instrument_ids: List[UUID]
|
|
1530
|
+
:param object_name:
|
|
1531
|
+
:type object_name: str
|
|
1532
|
+
:param object_cone_search_ra:
|
|
1533
|
+
:type object_cone_search_ra: float
|
|
1534
|
+
:param object_cone_search_dec:
|
|
1535
|
+
:type object_cone_search_dec: float
|
|
1536
|
+
:param object_cone_search_radius:
|
|
1537
|
+
:type object_cone_search_radius: float
|
|
1538
|
+
:param begin_date:
|
|
1539
|
+
:type begin_date: datetime
|
|
1540
|
+
:param end_date:
|
|
1541
|
+
:type end_date: datetime
|
|
1542
|
+
:param status:
|
|
1543
|
+
:type status: ObservationRequestStatus
|
|
1544
|
+
:param proposal_name:
|
|
1545
|
+
:type proposal_name: str
|
|
1546
|
+
:param proposal_code:
|
|
1547
|
+
:type proposal_code: str
|
|
1548
|
+
:param proposal_ids:
|
|
1549
|
+
:type proposal_ids: List[str]
|
|
1550
|
+
:param is_too:
|
|
1551
|
+
:type is_too: bool
|
|
1552
|
+
:param parent_id:
|
|
1553
|
+
:type parent_id: UUID
|
|
1554
|
+
:param include_versions:
|
|
1555
|
+
:type include_versions: bool
|
|
1556
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1557
|
+
number provided, it will be total request
|
|
1558
|
+
timeout. It can also be a pair (tuple) of
|
|
1559
|
+
(connection, read) timeouts.
|
|
1560
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1561
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1562
|
+
request; this effectively ignores the
|
|
1563
|
+
authentication in the spec for a single request.
|
|
1564
|
+
:type _request_auth: dict, optional
|
|
1565
|
+
:param _content_type: force content-type for the request.
|
|
1566
|
+
:type _content_type: str, Optional
|
|
1567
|
+
:param _headers: set to override the headers for a single
|
|
1568
|
+
request; this effectively ignores the headers
|
|
1569
|
+
in the spec for a single request.
|
|
1570
|
+
:type _headers: dict, optional
|
|
1571
|
+
:param _host_index: set to override the host_index for a single
|
|
1572
|
+
request; this effectively ignores the host_index
|
|
1573
|
+
in the spec for a single request.
|
|
1574
|
+
:type _host_index: int, optional
|
|
1575
|
+
:return: Returns the result object.
|
|
1576
|
+
""" # noqa: E501
|
|
1577
|
+
|
|
1578
|
+
_param = self._get_observation_requests_serialize(
|
|
1579
|
+
page=page,
|
|
1580
|
+
page_limit=page_limit,
|
|
1581
|
+
ids=ids,
|
|
1582
|
+
observatory_names=observatory_names,
|
|
1583
|
+
observatory_ids=observatory_ids,
|
|
1584
|
+
telescope_names=telescope_names,
|
|
1585
|
+
telescope_ids=telescope_ids,
|
|
1586
|
+
instrument_names=instrument_names,
|
|
1587
|
+
instrument_ids=instrument_ids,
|
|
1588
|
+
object_name=object_name,
|
|
1589
|
+
object_cone_search_ra=object_cone_search_ra,
|
|
1590
|
+
object_cone_search_dec=object_cone_search_dec,
|
|
1591
|
+
object_cone_search_radius=object_cone_search_radius,
|
|
1592
|
+
begin_date=begin_date,
|
|
1593
|
+
end_date=end_date,
|
|
1594
|
+
status=status,
|
|
1595
|
+
proposal_name=proposal_name,
|
|
1596
|
+
proposal_code=proposal_code,
|
|
1597
|
+
proposal_ids=proposal_ids,
|
|
1598
|
+
is_too=is_too,
|
|
1599
|
+
parent_id=parent_id,
|
|
1600
|
+
include_versions=include_versions,
|
|
1601
|
+
_request_auth=_request_auth,
|
|
1602
|
+
_content_type=_content_type,
|
|
1603
|
+
_headers=_headers,
|
|
1604
|
+
_host_index=_host_index
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1608
|
+
'200': "PageObservationRequest",
|
|
1609
|
+
'404': None,
|
|
1610
|
+
'422': "HTTPValidationError",
|
|
1611
|
+
}
|
|
1612
|
+
response_data = self.api_client.call_api(
|
|
1613
|
+
*_param,
|
|
1614
|
+
_request_timeout=_request_timeout
|
|
1615
|
+
)
|
|
1616
|
+
return response_data.response
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
def _get_observation_requests_serialize(
|
|
1620
|
+
self,
|
|
1621
|
+
page,
|
|
1622
|
+
page_limit,
|
|
1623
|
+
ids,
|
|
1624
|
+
observatory_names,
|
|
1625
|
+
observatory_ids,
|
|
1626
|
+
telescope_names,
|
|
1627
|
+
telescope_ids,
|
|
1628
|
+
instrument_names,
|
|
1629
|
+
instrument_ids,
|
|
1630
|
+
object_name,
|
|
1631
|
+
object_cone_search_ra,
|
|
1632
|
+
object_cone_search_dec,
|
|
1633
|
+
object_cone_search_radius,
|
|
1634
|
+
begin_date,
|
|
1635
|
+
end_date,
|
|
1636
|
+
status,
|
|
1637
|
+
proposal_name,
|
|
1638
|
+
proposal_code,
|
|
1639
|
+
proposal_ids,
|
|
1640
|
+
is_too,
|
|
1641
|
+
parent_id,
|
|
1642
|
+
include_versions,
|
|
1643
|
+
_request_auth,
|
|
1644
|
+
_content_type,
|
|
1645
|
+
_headers,
|
|
1646
|
+
_host_index,
|
|
1647
|
+
) -> RequestSerialized:
|
|
1648
|
+
|
|
1649
|
+
_host = None
|
|
1650
|
+
|
|
1651
|
+
_collection_formats: Dict[str, str] = {
|
|
1652
|
+
'ids': 'multi',
|
|
1653
|
+
'observatory_names': 'multi',
|
|
1654
|
+
'observatory_ids': 'multi',
|
|
1655
|
+
'telescope_names': 'multi',
|
|
1656
|
+
'telescope_ids': 'multi',
|
|
1657
|
+
'instrument_names': 'multi',
|
|
1658
|
+
'instrument_ids': 'multi',
|
|
1659
|
+
'proposal_ids': 'multi',
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
_path_params: Dict[str, str] = {}
|
|
1663
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1664
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
1665
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1666
|
+
_files: Dict[
|
|
1667
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1668
|
+
] = {}
|
|
1669
|
+
_body_params: Optional[bytes] = None
|
|
1670
|
+
|
|
1671
|
+
# process the path parameters
|
|
1672
|
+
# process the query parameters
|
|
1673
|
+
if page is not None:
|
|
1674
|
+
|
|
1675
|
+
_query_params.append(('page', page))
|
|
1676
|
+
|
|
1677
|
+
if page_limit is not None:
|
|
1678
|
+
|
|
1679
|
+
_query_params.append(('page_limit', page_limit))
|
|
1680
|
+
|
|
1681
|
+
if ids is not None:
|
|
1682
|
+
|
|
1683
|
+
_query_params.append(('ids', ids))
|
|
1684
|
+
|
|
1685
|
+
if observatory_names is not None:
|
|
1686
|
+
|
|
1687
|
+
_query_params.append(('observatory_names', observatory_names))
|
|
1688
|
+
|
|
1689
|
+
if observatory_ids is not None:
|
|
1690
|
+
|
|
1691
|
+
_query_params.append(('observatory_ids', observatory_ids))
|
|
1692
|
+
|
|
1693
|
+
if telescope_names is not None:
|
|
1694
|
+
|
|
1695
|
+
_query_params.append(('telescope_names', telescope_names))
|
|
1696
|
+
|
|
1697
|
+
if telescope_ids is not None:
|
|
1698
|
+
|
|
1699
|
+
_query_params.append(('telescope_ids', telescope_ids))
|
|
1700
|
+
|
|
1701
|
+
if instrument_names is not None:
|
|
1702
|
+
|
|
1703
|
+
_query_params.append(('instrument_names', instrument_names))
|
|
1704
|
+
|
|
1705
|
+
if instrument_ids is not None:
|
|
1706
|
+
|
|
1707
|
+
_query_params.append(('instrument_ids', instrument_ids))
|
|
1708
|
+
|
|
1709
|
+
if object_name is not None:
|
|
1710
|
+
|
|
1711
|
+
_query_params.append(('object_name', object_name))
|
|
1712
|
+
|
|
1713
|
+
if object_cone_search_ra is not None:
|
|
1714
|
+
|
|
1715
|
+
_query_params.append(('object_cone_search_ra', object_cone_search_ra))
|
|
1716
|
+
|
|
1717
|
+
if object_cone_search_dec is not None:
|
|
1718
|
+
|
|
1719
|
+
_query_params.append(('object_cone_search_dec', object_cone_search_dec))
|
|
1720
|
+
|
|
1721
|
+
if object_cone_search_radius is not None:
|
|
1722
|
+
|
|
1723
|
+
_query_params.append(('object_cone_search_radius', object_cone_search_radius))
|
|
1724
|
+
|
|
1725
|
+
if begin_date is not None:
|
|
1726
|
+
if isinstance(begin_date, datetime):
|
|
1727
|
+
_query_params.append(
|
|
1728
|
+
(
|
|
1729
|
+
'begin_date',
|
|
1730
|
+
begin_date.strftime(
|
|
1731
|
+
self.api_client.configuration.datetime_format
|
|
1732
|
+
)
|
|
1733
|
+
)
|
|
1734
|
+
)
|
|
1735
|
+
else:
|
|
1736
|
+
_query_params.append(('begin_date', begin_date))
|
|
1737
|
+
|
|
1738
|
+
if end_date is not None:
|
|
1739
|
+
if isinstance(end_date, datetime):
|
|
1740
|
+
_query_params.append(
|
|
1741
|
+
(
|
|
1742
|
+
'end_date',
|
|
1743
|
+
end_date.strftime(
|
|
1744
|
+
self.api_client.configuration.datetime_format
|
|
1745
|
+
)
|
|
1746
|
+
)
|
|
1747
|
+
)
|
|
1748
|
+
else:
|
|
1749
|
+
_query_params.append(('end_date', end_date))
|
|
1750
|
+
|
|
1751
|
+
if status is not None:
|
|
1752
|
+
|
|
1753
|
+
_query_params.append(('status', status.value))
|
|
1754
|
+
|
|
1755
|
+
if proposal_name is not None:
|
|
1756
|
+
|
|
1757
|
+
_query_params.append(('proposal_name', proposal_name))
|
|
1758
|
+
|
|
1759
|
+
if proposal_code is not None:
|
|
1760
|
+
|
|
1761
|
+
_query_params.append(('proposal_code', proposal_code))
|
|
1762
|
+
|
|
1763
|
+
if proposal_ids is not None:
|
|
1764
|
+
|
|
1765
|
+
_query_params.append(('proposal_ids', proposal_ids))
|
|
1766
|
+
|
|
1767
|
+
if is_too is not None:
|
|
1768
|
+
|
|
1769
|
+
_query_params.append(('is_too', is_too))
|
|
1770
|
+
|
|
1771
|
+
if parent_id is not None:
|
|
1772
|
+
|
|
1773
|
+
_query_params.append(('parent_id', parent_id))
|
|
1774
|
+
|
|
1775
|
+
if include_versions is not None:
|
|
1776
|
+
|
|
1777
|
+
_query_params.append(('include_versions', include_versions))
|
|
1778
|
+
|
|
1779
|
+
# process the header parameters
|
|
1780
|
+
# process the form parameters
|
|
1781
|
+
# process the body parameter
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
# set the HTTP header `Accept`
|
|
1785
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
1786
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1787
|
+
[
|
|
1788
|
+
'application/json'
|
|
1789
|
+
]
|
|
1790
|
+
)
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
# authentication setting
|
|
1794
|
+
_auth_settings: List[str] = [
|
|
1795
|
+
'Authorization'
|
|
1796
|
+
]
|
|
1797
|
+
|
|
1798
|
+
return self.api_client.param_serialize(
|
|
1799
|
+
method='GET',
|
|
1800
|
+
resource_path='/observation-request',
|
|
1801
|
+
path_params=_path_params,
|
|
1802
|
+
query_params=_query_params,
|
|
1803
|
+
header_params=_header_params,
|
|
1804
|
+
body=_body_params,
|
|
1805
|
+
post_params=_form_params,
|
|
1806
|
+
files=_files,
|
|
1807
|
+
auth_settings=_auth_settings,
|
|
1808
|
+
collection_formats=_collection_formats,
|
|
1809
|
+
_host=_host,
|
|
1810
|
+
_request_auth=_request_auth
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
@validate_call
|
|
1817
|
+
def update_observation_request(
|
|
1818
|
+
self,
|
|
1819
|
+
observation_request_id: UUID,
|
|
1820
|
+
observation_request_update: ObservationRequestUpdate,
|
|
1821
|
+
_request_timeout: Union[
|
|
1822
|
+
None,
|
|
1823
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1824
|
+
Tuple[
|
|
1825
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1827
|
+
]
|
|
1828
|
+
] = None,
|
|
1829
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1830
|
+
_content_type: Optional[StrictStr] = None,
|
|
1831
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1832
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1833
|
+
) -> UUID:
|
|
1834
|
+
"""Update an observation request
|
|
1835
|
+
|
|
1836
|
+
Update an existing observation request for ACROSS. Partial updates are acceptable.
|
|
1837
|
+
|
|
1838
|
+
:param observation_request_id: (required)
|
|
1839
|
+
:type observation_request_id: UUID
|
|
1840
|
+
:param observation_request_update: (required)
|
|
1841
|
+
:type observation_request_update: ObservationRequestUpdate
|
|
1842
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1843
|
+
number provided, it will be total request
|
|
1844
|
+
timeout. It can also be a pair (tuple) of
|
|
1845
|
+
(connection, read) timeouts.
|
|
1846
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1847
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1848
|
+
request; this effectively ignores the
|
|
1849
|
+
authentication in the spec for a single request.
|
|
1850
|
+
:type _request_auth: dict, optional
|
|
1851
|
+
:param _content_type: force content-type for the request.
|
|
1852
|
+
:type _content_type: str, Optional
|
|
1853
|
+
:param _headers: set to override the headers for a single
|
|
1854
|
+
request; this effectively ignores the headers
|
|
1855
|
+
in the spec for a single request.
|
|
1856
|
+
:type _headers: dict, optional
|
|
1857
|
+
:param _host_index: set to override the host_index for a single
|
|
1858
|
+
request; this effectively ignores the host_index
|
|
1859
|
+
in the spec for a single request.
|
|
1860
|
+
:type _host_index: int, optional
|
|
1861
|
+
:return: Returns the result object.
|
|
1862
|
+
""" # noqa: E501
|
|
1863
|
+
|
|
1864
|
+
_param = self._update_observation_request_serialize(
|
|
1865
|
+
observation_request_id=observation_request_id,
|
|
1866
|
+
observation_request_update=observation_request_update,
|
|
1867
|
+
_request_auth=_request_auth,
|
|
1868
|
+
_content_type=_content_type,
|
|
1869
|
+
_headers=_headers,
|
|
1870
|
+
_host_index=_host_index
|
|
1871
|
+
)
|
|
1872
|
+
|
|
1873
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1874
|
+
'200': "UUID",
|
|
1875
|
+
'404': None,
|
|
1876
|
+
'422': "HTTPValidationError",
|
|
1877
|
+
}
|
|
1878
|
+
response_data = self.api_client.call_api(
|
|
1879
|
+
*_param,
|
|
1880
|
+
_request_timeout=_request_timeout
|
|
1881
|
+
)
|
|
1882
|
+
response_data.read()
|
|
1883
|
+
return self.api_client.response_deserialize(
|
|
1884
|
+
response_data=response_data,
|
|
1885
|
+
response_types_map=_response_types_map,
|
|
1886
|
+
).data
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
@validate_call
|
|
1890
|
+
def update_observation_request_with_http_info(
|
|
1891
|
+
self,
|
|
1892
|
+
observation_request_id: UUID,
|
|
1893
|
+
observation_request_update: ObservationRequestUpdate,
|
|
1894
|
+
_request_timeout: Union[
|
|
1895
|
+
None,
|
|
1896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1897
|
+
Tuple[
|
|
1898
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1900
|
+
]
|
|
1901
|
+
] = None,
|
|
1902
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1903
|
+
_content_type: Optional[StrictStr] = None,
|
|
1904
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1905
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1906
|
+
) -> ApiResponse[UUID]:
|
|
1907
|
+
"""Update an observation request
|
|
1908
|
+
|
|
1909
|
+
Update an existing observation request for ACROSS. Partial updates are acceptable.
|
|
1910
|
+
|
|
1911
|
+
:param observation_request_id: (required)
|
|
1912
|
+
:type observation_request_id: UUID
|
|
1913
|
+
:param observation_request_update: (required)
|
|
1914
|
+
:type observation_request_update: ObservationRequestUpdate
|
|
1915
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1916
|
+
number provided, it will be total request
|
|
1917
|
+
timeout. It can also be a pair (tuple) of
|
|
1918
|
+
(connection, read) timeouts.
|
|
1919
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1920
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1921
|
+
request; this effectively ignores the
|
|
1922
|
+
authentication in the spec for a single request.
|
|
1923
|
+
:type _request_auth: dict, optional
|
|
1924
|
+
:param _content_type: force content-type for the request.
|
|
1925
|
+
:type _content_type: str, Optional
|
|
1926
|
+
:param _headers: set to override the headers for a single
|
|
1927
|
+
request; this effectively ignores the headers
|
|
1928
|
+
in the spec for a single request.
|
|
1929
|
+
:type _headers: dict, optional
|
|
1930
|
+
:param _host_index: set to override the host_index for a single
|
|
1931
|
+
request; this effectively ignores the host_index
|
|
1932
|
+
in the spec for a single request.
|
|
1933
|
+
:type _host_index: int, optional
|
|
1934
|
+
:return: Returns the result object.
|
|
1935
|
+
""" # noqa: E501
|
|
1936
|
+
|
|
1937
|
+
_param = self._update_observation_request_serialize(
|
|
1938
|
+
observation_request_id=observation_request_id,
|
|
1939
|
+
observation_request_update=observation_request_update,
|
|
1940
|
+
_request_auth=_request_auth,
|
|
1941
|
+
_content_type=_content_type,
|
|
1942
|
+
_headers=_headers,
|
|
1943
|
+
_host_index=_host_index
|
|
1944
|
+
)
|
|
1945
|
+
|
|
1946
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1947
|
+
'200': "UUID",
|
|
1948
|
+
'404': None,
|
|
1949
|
+
'422': "HTTPValidationError",
|
|
1950
|
+
}
|
|
1951
|
+
response_data = self.api_client.call_api(
|
|
1952
|
+
*_param,
|
|
1953
|
+
_request_timeout=_request_timeout
|
|
1954
|
+
)
|
|
1955
|
+
response_data.read()
|
|
1956
|
+
return self.api_client.response_deserialize(
|
|
1957
|
+
response_data=response_data,
|
|
1958
|
+
response_types_map=_response_types_map,
|
|
1959
|
+
)
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
@validate_call
|
|
1963
|
+
def update_observation_request_without_preload_content(
|
|
1964
|
+
self,
|
|
1965
|
+
observation_request_id: UUID,
|
|
1966
|
+
observation_request_update: ObservationRequestUpdate,
|
|
1967
|
+
_request_timeout: Union[
|
|
1968
|
+
None,
|
|
1969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1970
|
+
Tuple[
|
|
1971
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1972
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1973
|
+
]
|
|
1974
|
+
] = None,
|
|
1975
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1976
|
+
_content_type: Optional[StrictStr] = None,
|
|
1977
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1978
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1979
|
+
) -> RESTResponseType:
|
|
1980
|
+
"""Update an observation request
|
|
1981
|
+
|
|
1982
|
+
Update an existing observation request for ACROSS. Partial updates are acceptable.
|
|
1983
|
+
|
|
1984
|
+
:param observation_request_id: (required)
|
|
1985
|
+
:type observation_request_id: UUID
|
|
1986
|
+
:param observation_request_update: (required)
|
|
1987
|
+
:type observation_request_update: ObservationRequestUpdate
|
|
1988
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1989
|
+
number provided, it will be total request
|
|
1990
|
+
timeout. It can also be a pair (tuple) of
|
|
1991
|
+
(connection, read) timeouts.
|
|
1992
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1993
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1994
|
+
request; this effectively ignores the
|
|
1995
|
+
authentication in the spec for a single request.
|
|
1996
|
+
:type _request_auth: dict, optional
|
|
1997
|
+
:param _content_type: force content-type for the request.
|
|
1998
|
+
:type _content_type: str, Optional
|
|
1999
|
+
:param _headers: set to override the headers for a single
|
|
2000
|
+
request; this effectively ignores the headers
|
|
2001
|
+
in the spec for a single request.
|
|
2002
|
+
:type _headers: dict, optional
|
|
2003
|
+
:param _host_index: set to override the host_index for a single
|
|
2004
|
+
request; this effectively ignores the host_index
|
|
2005
|
+
in the spec for a single request.
|
|
2006
|
+
:type _host_index: int, optional
|
|
2007
|
+
:return: Returns the result object.
|
|
2008
|
+
""" # noqa: E501
|
|
2009
|
+
|
|
2010
|
+
_param = self._update_observation_request_serialize(
|
|
2011
|
+
observation_request_id=observation_request_id,
|
|
2012
|
+
observation_request_update=observation_request_update,
|
|
2013
|
+
_request_auth=_request_auth,
|
|
2014
|
+
_content_type=_content_type,
|
|
2015
|
+
_headers=_headers,
|
|
2016
|
+
_host_index=_host_index
|
|
2017
|
+
)
|
|
2018
|
+
|
|
2019
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2020
|
+
'200': "UUID",
|
|
2021
|
+
'404': None,
|
|
2022
|
+
'422': "HTTPValidationError",
|
|
2023
|
+
}
|
|
2024
|
+
response_data = self.api_client.call_api(
|
|
2025
|
+
*_param,
|
|
2026
|
+
_request_timeout=_request_timeout
|
|
2027
|
+
)
|
|
2028
|
+
return response_data.response
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
def _update_observation_request_serialize(
|
|
2032
|
+
self,
|
|
2033
|
+
observation_request_id,
|
|
2034
|
+
observation_request_update,
|
|
2035
|
+
_request_auth,
|
|
2036
|
+
_content_type,
|
|
2037
|
+
_headers,
|
|
2038
|
+
_host_index,
|
|
2039
|
+
) -> RequestSerialized:
|
|
2040
|
+
|
|
2041
|
+
_host = None
|
|
2042
|
+
|
|
2043
|
+
_collection_formats: Dict[str, str] = {
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
_path_params: Dict[str, str] = {}
|
|
2047
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2048
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
2049
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2050
|
+
_files: Dict[
|
|
2051
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2052
|
+
] = {}
|
|
2053
|
+
_body_params: Optional[bytes] = None
|
|
2054
|
+
|
|
2055
|
+
# process the path parameters
|
|
2056
|
+
if observation_request_id is not None:
|
|
2057
|
+
_path_params['observation_request_id'] = observation_request_id
|
|
2058
|
+
# process the query parameters
|
|
2059
|
+
# process the header parameters
|
|
2060
|
+
# process the form parameters
|
|
2061
|
+
# process the body parameter
|
|
2062
|
+
if observation_request_update is not None:
|
|
2063
|
+
_body_params = observation_request_update
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
# set the HTTP header `Accept`
|
|
2067
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
2068
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2069
|
+
[
|
|
2070
|
+
'application/json'
|
|
2071
|
+
]
|
|
2072
|
+
)
|
|
2073
|
+
|
|
2074
|
+
# set the HTTP header `Content-Type`
|
|
2075
|
+
if _content_type:
|
|
2076
|
+
self.api_client._set_header(_header_params, 'Content-Type', _content_type)
|
|
2077
|
+
else:
|
|
2078
|
+
_default_content_type = (
|
|
2079
|
+
self.api_client.select_header_content_type(
|
|
2080
|
+
[
|
|
2081
|
+
'application/json'
|
|
2082
|
+
]
|
|
2083
|
+
)
|
|
2084
|
+
)
|
|
2085
|
+
if _default_content_type is not None:
|
|
2086
|
+
self.api_client._set_header(_header_params, 'Content-Type', _default_content_type)
|
|
2087
|
+
|
|
2088
|
+
# authentication setting
|
|
2089
|
+
_auth_settings: List[str] = [
|
|
2090
|
+
'Authorization'
|
|
2091
|
+
]
|
|
2092
|
+
|
|
2093
|
+
return self.api_client.param_serialize(
|
|
2094
|
+
method='PATCH',
|
|
2095
|
+
resource_path='/observation-request/{observation_request_id}',
|
|
2096
|
+
path_params=_path_params,
|
|
2097
|
+
query_params=_query_params,
|
|
2098
|
+
header_params=_header_params,
|
|
2099
|
+
body=_body_params,
|
|
2100
|
+
post_params=_form_params,
|
|
2101
|
+
files=_files,
|
|
2102
|
+
auth_settings=_auth_settings,
|
|
2103
|
+
collection_formats=_collection_formats,
|
|
2104
|
+
_host=_host,
|
|
2105
|
+
_request_auth=_request_auth
|
|
2106
|
+
)
|
|
2107
|
+
|
|
2108
|
+
|