across-server-openapi-python 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- across/__init__.py +0 -0
- across/sdk/__init__.py +0 -0
- across/sdk/v1/__init__.py +251 -0
- across/sdk/v1/abstract_credential_storage.py +16 -0
- across/sdk/v1/api/__init__.py +20 -0
- across/sdk/v1/api/auth_api.py +1097 -0
- across/sdk/v1/api/filter_api.py +623 -0
- across/sdk/v1/api/group_api.py +586 -0
- across/sdk/v1/api/group_invite_api.py +1165 -0
- across/sdk/v1/api/group_role_api.py +2070 -0
- across/sdk/v1/api/instrument_api.py +633 -0
- across/sdk/v1/api/internal_api.py +571 -0
- across/sdk/v1/api/observation_api.py +940 -0
- across/sdk/v1/api/observatory_api.py +670 -0
- across/sdk/v1/api/permission_api.py +285 -0
- across/sdk/v1/api/role_api.py +552 -0
- across/sdk/v1/api/schedule_api.py +1914 -0
- across/sdk/v1/api/service_account_api.py +2353 -0
- across/sdk/v1/api/telescope_api.py +667 -0
- across/sdk/v1/api/tle_api.py +317 -0
- across/sdk/v1/api/tools_api.py +812 -0
- across/sdk/v1/api/user_api.py +2263 -0
- across/sdk/v1/api_client.py +801 -0
- across/sdk/v1/api_client_wrapper.py +239 -0
- across/sdk/v1/api_response.py +21 -0
- across/sdk/v1/configuration.py +605 -0
- across/sdk/v1/exceptions.py +216 -0
- across/sdk/v1/models/__init__.py +103 -0
- across/sdk/v1/models/access_token_response.py +89 -0
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +104 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +124 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +95 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
- across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +96 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account.py +90 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account_secret.py +92 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +135 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +118 -0
- across/sdk/v1/models/alt_az_constraint.py +130 -0
- across/sdk/v1/models/bandpass.py +149 -0
- across/sdk/v1/models/bandpass_type.py +155 -0
- across/sdk/v1/models/constrained_date.py +93 -0
- across/sdk/v1/models/constraint_reason.py +89 -0
- across/sdk/v1/models/constraint_type.py +43 -0
- across/sdk/v1/models/coordinate.py +100 -0
- across/sdk/v1/models/date_range.py +90 -0
- across/sdk/v1/models/depth_unit.py +39 -0
- across/sdk/v1/models/earth_limb_constraint.py +124 -0
- across/sdk/v1/models/energy_bandpass.py +121 -0
- across/sdk/v1/models/energy_unit.py +40 -0
- across/sdk/v1/models/ephemeris_type.py +39 -0
- across/sdk/v1/models/filter.py +135 -0
- across/sdk/v1/models/frequency_bandpass.py +121 -0
- across/sdk/v1/models/frequency_unit.py +40 -0
- across/sdk/v1/models/grant_type.py +37 -0
- across/sdk/v1/models/ground_parameters.py +91 -0
- across/sdk/v1/models/group_invite_create.py +87 -0
- across/sdk/v1/models/group_invite_group_details.py +94 -0
- across/sdk/v1/models/group_read.py +91 -0
- across/sdk/v1/models/group_role_create.py +89 -0
- across/sdk/v1/models/group_role_read.py +99 -0
- across/sdk/v1/models/http_validation_error.py +95 -0
- across/sdk/v1/models/id_name_schema.py +96 -0
- across/sdk/v1/models/instrument.py +163 -0
- across/sdk/v1/models/instrument_constraints_inner.py +237 -0
- across/sdk/v1/models/ivoa_obs_category.py +39 -0
- across/sdk/v1/models/ivoa_obs_tracking_type.py +38 -0
- across/sdk/v1/models/jpl_parameters.py +87 -0
- across/sdk/v1/models/moon_angle_constraint.py +124 -0
- across/sdk/v1/models/nullable_date_range.py +100 -0
- across/sdk/v1/models/observation.py +248 -0
- across/sdk/v1/models/observation_create.py +249 -0
- across/sdk/v1/models/observation_status.py +40 -0
- across/sdk/v1/models/observation_type.py +39 -0
- across/sdk/v1/models/observatory.py +145 -0
- across/sdk/v1/models/observatory_ephemeris_type.py +96 -0
- across/sdk/v1/models/observatory_type.py +37 -0
- across/sdk/v1/models/page_observation.py +116 -0
- across/sdk/v1/models/page_schedule.py +116 -0
- across/sdk/v1/models/parameters.py +164 -0
- across/sdk/v1/models/permission.py +89 -0
- across/sdk/v1/models/point.py +89 -0
- across/sdk/v1/models/role.py +100 -0
- across/sdk/v1/models/role_base.py +89 -0
- across/sdk/v1/models/saa_polygon_constraint.py +101 -0
- across/sdk/v1/models/schedule.py +144 -0
- across/sdk/v1/models/schedule_cadence.py +99 -0
- across/sdk/v1/models/schedule_create.py +123 -0
- across/sdk/v1/models/schedule_create_many.py +97 -0
- across/sdk/v1/models/schedule_fidelity.py +37 -0
- across/sdk/v1/models/schedule_status.py +38 -0
- across/sdk/v1/models/service_account_create.py +101 -0
- across/sdk/v1/models/service_account_secret.py +103 -0
- across/sdk/v1/models/service_account_update.py +106 -0
- across/sdk/v1/models/spice_parameters.py +89 -0
- across/sdk/v1/models/sun_angle_constraint.py +124 -0
- across/sdk/v1/models/system_service_account.py +121 -0
- across/sdk/v1/models/system_service_account_secret.py +123 -0
- across/sdk/v1/models/telescope.py +135 -0
- across/sdk/v1/models/telescope_instrument.py +163 -0
- across/sdk/v1/models/tle.py +99 -0
- across/sdk/v1/models/tle_create.py +94 -0
- across/sdk/v1/models/tle_parameters.py +89 -0
- across/sdk/v1/models/unit_value.py +94 -0
- across/sdk/v1/models/user_create.py +93 -0
- across/sdk/v1/models/user_info.py +95 -0
- across/sdk/v1/models/user_update.py +106 -0
- across/sdk/v1/models/validation_error.py +99 -0
- across/sdk/v1/models/validation_error_loc_inner.py +138 -0
- across/sdk/v1/models/visibility_result.py +97 -0
- across/sdk/v1/models/visibility_type.py +38 -0
- across/sdk/v1/models/visibility_window.py +99 -0
- across/sdk/v1/models/wavelength_bandpass.py +142 -0
- across/sdk/v1/models/wavelength_unit.py +39 -0
- across/sdk/v1/models/window.py +96 -0
- across/sdk/v1/py.typed +0 -0
- across/sdk/v1/rest.py +258 -0
- across_server_openapi_python-0.0.1.dist-info/METADATA +326 -0
- across_server_openapi_python-0.0.1.dist-info/RECORD +128 -0
- across_server_openapi_python-0.0.1.dist-info/WHEEL +5 -0
- across_server_openapi_python-0.0.1.dist-info/licenses/LICENSE +42 -0
- across_server_openapi_python-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ACROSS Server
|
|
5
|
+
|
|
6
|
+
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.3.2
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import StrictStr
|
|
21
|
+
from typing import List, Optional
|
|
22
|
+
from across.sdk.v1.models.instrument import Instrument
|
|
23
|
+
|
|
24
|
+
from across.sdk.v1.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from across.sdk.v1.api_response import ApiResponse
|
|
26
|
+
from across.sdk.v1.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class InstrumentApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def get_instrument(
|
|
44
|
+
self,
|
|
45
|
+
instrument_id: StrictStr,
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> Instrument:
|
|
59
|
+
"""Read an instrument
|
|
60
|
+
|
|
61
|
+
Read an instrument by a instrument ID.
|
|
62
|
+
|
|
63
|
+
:param instrument_id: (required)
|
|
64
|
+
:type instrument_id: str
|
|
65
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
66
|
+
number provided, it will be total request
|
|
67
|
+
timeout. It can also be a pair (tuple) of
|
|
68
|
+
(connection, read) timeouts.
|
|
69
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
70
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
71
|
+
request; this effectively ignores the
|
|
72
|
+
authentication in the spec for a single request.
|
|
73
|
+
:type _request_auth: dict, optional
|
|
74
|
+
:param _content_type: force content-type for the request.
|
|
75
|
+
:type _content_type: str, Optional
|
|
76
|
+
:param _headers: set to override the headers for a single
|
|
77
|
+
request; this effectively ignores the headers
|
|
78
|
+
in the spec for a single request.
|
|
79
|
+
:type _headers: dict, optional
|
|
80
|
+
:param _host_index: set to override the host_index for a single
|
|
81
|
+
request; this effectively ignores the host_index
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _host_index: int, optional
|
|
84
|
+
:return: Returns the result object.
|
|
85
|
+
""" # noqa: E501
|
|
86
|
+
|
|
87
|
+
_param = self._get_instrument_serialize(
|
|
88
|
+
instrument_id=instrument_id,
|
|
89
|
+
_request_auth=_request_auth,
|
|
90
|
+
_content_type=_content_type,
|
|
91
|
+
_headers=_headers,
|
|
92
|
+
_host_index=_host_index
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
|
+
'200': "Instrument",
|
|
97
|
+
'404': None,
|
|
98
|
+
'422': "HTTPValidationError",
|
|
99
|
+
}
|
|
100
|
+
response_data = self.api_client.call_api(
|
|
101
|
+
*_param,
|
|
102
|
+
_request_timeout=_request_timeout
|
|
103
|
+
)
|
|
104
|
+
response_data.read()
|
|
105
|
+
return self.api_client.response_deserialize(
|
|
106
|
+
response_data=response_data,
|
|
107
|
+
response_types_map=_response_types_map,
|
|
108
|
+
).data
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@validate_call
|
|
112
|
+
def get_instrument_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
instrument_id: StrictStr,
|
|
115
|
+
_request_timeout: Union[
|
|
116
|
+
None,
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Tuple[
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
+
]
|
|
122
|
+
] = None,
|
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
+
) -> ApiResponse[Instrument]:
|
|
128
|
+
"""Read an instrument
|
|
129
|
+
|
|
130
|
+
Read an instrument by a instrument ID.
|
|
131
|
+
|
|
132
|
+
:param instrument_id: (required)
|
|
133
|
+
:type instrument_id: str
|
|
134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
135
|
+
number provided, it will be total request
|
|
136
|
+
timeout. It can also be a pair (tuple) of
|
|
137
|
+
(connection, read) timeouts.
|
|
138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
140
|
+
request; this effectively ignores the
|
|
141
|
+
authentication in the spec for a single request.
|
|
142
|
+
:type _request_auth: dict, optional
|
|
143
|
+
:param _content_type: force content-type for the request.
|
|
144
|
+
:type _content_type: str, Optional
|
|
145
|
+
:param _headers: set to override the headers for a single
|
|
146
|
+
request; this effectively ignores the headers
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _headers: dict, optional
|
|
149
|
+
:param _host_index: set to override the host_index for a single
|
|
150
|
+
request; this effectively ignores the host_index
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _host_index: int, optional
|
|
153
|
+
:return: Returns the result object.
|
|
154
|
+
""" # noqa: E501
|
|
155
|
+
|
|
156
|
+
_param = self._get_instrument_serialize(
|
|
157
|
+
instrument_id=instrument_id,
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "Instrument",
|
|
166
|
+
'404': None,
|
|
167
|
+
'422': "HTTPValidationError",
|
|
168
|
+
}
|
|
169
|
+
response_data = self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
def get_instrument_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
instrument_id: StrictStr,
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Read an instrument
|
|
198
|
+
|
|
199
|
+
Read an instrument by a instrument ID.
|
|
200
|
+
|
|
201
|
+
:param instrument_id: (required)
|
|
202
|
+
:type instrument_id: str
|
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
204
|
+
number provided, it will be total request
|
|
205
|
+
timeout. It can also be a pair (tuple) of
|
|
206
|
+
(connection, read) timeouts.
|
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
209
|
+
request; this effectively ignores the
|
|
210
|
+
authentication in the spec for a single request.
|
|
211
|
+
:type _request_auth: dict, optional
|
|
212
|
+
:param _content_type: force content-type for the request.
|
|
213
|
+
:type _content_type: str, Optional
|
|
214
|
+
:param _headers: set to override the headers for a single
|
|
215
|
+
request; this effectively ignores the headers
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _headers: dict, optional
|
|
218
|
+
:param _host_index: set to override the host_index for a single
|
|
219
|
+
request; this effectively ignores the host_index
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _host_index: int, optional
|
|
222
|
+
:return: Returns the result object.
|
|
223
|
+
""" # noqa: E501
|
|
224
|
+
|
|
225
|
+
_param = self._get_instrument_serialize(
|
|
226
|
+
instrument_id=instrument_id,
|
|
227
|
+
_request_auth=_request_auth,
|
|
228
|
+
_content_type=_content_type,
|
|
229
|
+
_headers=_headers,
|
|
230
|
+
_host_index=_host_index
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
+
'200': "Instrument",
|
|
235
|
+
'404': None,
|
|
236
|
+
'422': "HTTPValidationError",
|
|
237
|
+
}
|
|
238
|
+
response_data = self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _get_instrument_serialize(
|
|
246
|
+
self,
|
|
247
|
+
instrument_id,
|
|
248
|
+
_request_auth,
|
|
249
|
+
_content_type,
|
|
250
|
+
_headers,
|
|
251
|
+
_host_index,
|
|
252
|
+
) -> RequestSerialized:
|
|
253
|
+
|
|
254
|
+
_host = None
|
|
255
|
+
|
|
256
|
+
_collection_formats: Dict[str, str] = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_path_params: Dict[str, str] = {}
|
|
260
|
+
_query_params: List[Tuple[str, str]] = []
|
|
261
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
262
|
+
_form_params: List[Tuple[str, str]] = []
|
|
263
|
+
_files: Dict[
|
|
264
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
265
|
+
] = {}
|
|
266
|
+
_body_params: Optional[bytes] = None
|
|
267
|
+
|
|
268
|
+
# process the path parameters
|
|
269
|
+
if instrument_id is not None:
|
|
270
|
+
_path_params['instrument_id'] = instrument_id
|
|
271
|
+
# process the query parameters
|
|
272
|
+
# process the header parameters
|
|
273
|
+
# process the form parameters
|
|
274
|
+
# process the body parameter
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# set the HTTP header `Accept`
|
|
278
|
+
if 'Accept' not in _header_params:
|
|
279
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
280
|
+
[
|
|
281
|
+
'application/json'
|
|
282
|
+
]
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# authentication setting
|
|
287
|
+
_auth_settings: List[str] = [
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
return self.api_client.param_serialize(
|
|
291
|
+
method='GET',
|
|
292
|
+
resource_path='/instrument/{instrument_id}',
|
|
293
|
+
path_params=_path_params,
|
|
294
|
+
query_params=_query_params,
|
|
295
|
+
header_params=_header_params,
|
|
296
|
+
body=_body_params,
|
|
297
|
+
post_params=_form_params,
|
|
298
|
+
files=_files,
|
|
299
|
+
auth_settings=_auth_settings,
|
|
300
|
+
collection_formats=_collection_formats,
|
|
301
|
+
_host=_host,
|
|
302
|
+
_request_auth=_request_auth
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
@validate_call
|
|
309
|
+
def get_instruments(
|
|
310
|
+
self,
|
|
311
|
+
name: Optional[StrictStr] = None,
|
|
312
|
+
telescope_id: Optional[StrictStr] = None,
|
|
313
|
+
telescope_name: Optional[StrictStr] = None,
|
|
314
|
+
created_on: Optional[datetime] = None,
|
|
315
|
+
_request_timeout: Union[
|
|
316
|
+
None,
|
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
+
Tuple[
|
|
319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
321
|
+
]
|
|
322
|
+
] = None,
|
|
323
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
+
_content_type: Optional[StrictStr] = None,
|
|
325
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
326
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
327
|
+
) -> List[Instrument]:
|
|
328
|
+
"""Read instruments(s)
|
|
329
|
+
|
|
330
|
+
Read many instruments based on query params
|
|
331
|
+
|
|
332
|
+
:param name:
|
|
333
|
+
:type name: str
|
|
334
|
+
:param telescope_id:
|
|
335
|
+
:type telescope_id: str
|
|
336
|
+
:param telescope_name:
|
|
337
|
+
:type telescope_name: str
|
|
338
|
+
:param created_on:
|
|
339
|
+
:type created_on: datetime
|
|
340
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
341
|
+
number provided, it will be total request
|
|
342
|
+
timeout. It can also be a pair (tuple) of
|
|
343
|
+
(connection, read) timeouts.
|
|
344
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
345
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
346
|
+
request; this effectively ignores the
|
|
347
|
+
authentication in the spec for a single request.
|
|
348
|
+
:type _request_auth: dict, optional
|
|
349
|
+
:param _content_type: force content-type for the request.
|
|
350
|
+
:type _content_type: str, Optional
|
|
351
|
+
:param _headers: set to override the headers for a single
|
|
352
|
+
request; this effectively ignores the headers
|
|
353
|
+
in the spec for a single request.
|
|
354
|
+
:type _headers: dict, optional
|
|
355
|
+
:param _host_index: set to override the host_index for a single
|
|
356
|
+
request; this effectively ignores the host_index
|
|
357
|
+
in the spec for a single request.
|
|
358
|
+
:type _host_index: int, optional
|
|
359
|
+
:return: Returns the result object.
|
|
360
|
+
""" # noqa: E501
|
|
361
|
+
|
|
362
|
+
_param = self._get_instruments_serialize(
|
|
363
|
+
name=name,
|
|
364
|
+
telescope_id=telescope_id,
|
|
365
|
+
telescope_name=telescope_name,
|
|
366
|
+
created_on=created_on,
|
|
367
|
+
_request_auth=_request_auth,
|
|
368
|
+
_content_type=_content_type,
|
|
369
|
+
_headers=_headers,
|
|
370
|
+
_host_index=_host_index
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
374
|
+
'200': "List[Instrument]",
|
|
375
|
+
'404': None,
|
|
376
|
+
'422': "HTTPValidationError",
|
|
377
|
+
}
|
|
378
|
+
response_data = self.api_client.call_api(
|
|
379
|
+
*_param,
|
|
380
|
+
_request_timeout=_request_timeout
|
|
381
|
+
)
|
|
382
|
+
response_data.read()
|
|
383
|
+
return self.api_client.response_deserialize(
|
|
384
|
+
response_data=response_data,
|
|
385
|
+
response_types_map=_response_types_map,
|
|
386
|
+
).data
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
@validate_call
|
|
390
|
+
def get_instruments_with_http_info(
|
|
391
|
+
self,
|
|
392
|
+
name: Optional[StrictStr] = None,
|
|
393
|
+
telescope_id: Optional[StrictStr] = None,
|
|
394
|
+
telescope_name: Optional[StrictStr] = None,
|
|
395
|
+
created_on: Optional[datetime] = None,
|
|
396
|
+
_request_timeout: Union[
|
|
397
|
+
None,
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Tuple[
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
402
|
+
]
|
|
403
|
+
] = None,
|
|
404
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_content_type: Optional[StrictStr] = None,
|
|
406
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
407
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
408
|
+
) -> ApiResponse[List[Instrument]]:
|
|
409
|
+
"""Read instruments(s)
|
|
410
|
+
|
|
411
|
+
Read many instruments based on query params
|
|
412
|
+
|
|
413
|
+
:param name:
|
|
414
|
+
:type name: str
|
|
415
|
+
:param telescope_id:
|
|
416
|
+
:type telescope_id: str
|
|
417
|
+
:param telescope_name:
|
|
418
|
+
:type telescope_name: str
|
|
419
|
+
:param created_on:
|
|
420
|
+
:type created_on: datetime
|
|
421
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
422
|
+
number provided, it will be total request
|
|
423
|
+
timeout. It can also be a pair (tuple) of
|
|
424
|
+
(connection, read) timeouts.
|
|
425
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
426
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
427
|
+
request; this effectively ignores the
|
|
428
|
+
authentication in the spec for a single request.
|
|
429
|
+
:type _request_auth: dict, optional
|
|
430
|
+
:param _content_type: force content-type for the request.
|
|
431
|
+
:type _content_type: str, Optional
|
|
432
|
+
:param _headers: set to override the headers for a single
|
|
433
|
+
request; this effectively ignores the headers
|
|
434
|
+
in the spec for a single request.
|
|
435
|
+
:type _headers: dict, optional
|
|
436
|
+
:param _host_index: set to override the host_index for a single
|
|
437
|
+
request; this effectively ignores the host_index
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _host_index: int, optional
|
|
440
|
+
:return: Returns the result object.
|
|
441
|
+
""" # noqa: E501
|
|
442
|
+
|
|
443
|
+
_param = self._get_instruments_serialize(
|
|
444
|
+
name=name,
|
|
445
|
+
telescope_id=telescope_id,
|
|
446
|
+
telescope_name=telescope_name,
|
|
447
|
+
created_on=created_on,
|
|
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
|
+
'200': "List[Instrument]",
|
|
456
|
+
'404': None,
|
|
457
|
+
'422': "HTTPValidationError",
|
|
458
|
+
}
|
|
459
|
+
response_data = self.api_client.call_api(
|
|
460
|
+
*_param,
|
|
461
|
+
_request_timeout=_request_timeout
|
|
462
|
+
)
|
|
463
|
+
response_data.read()
|
|
464
|
+
return self.api_client.response_deserialize(
|
|
465
|
+
response_data=response_data,
|
|
466
|
+
response_types_map=_response_types_map,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
@validate_call
|
|
471
|
+
def get_instruments_without_preload_content(
|
|
472
|
+
self,
|
|
473
|
+
name: Optional[StrictStr] = None,
|
|
474
|
+
telescope_id: Optional[StrictStr] = None,
|
|
475
|
+
telescope_name: Optional[StrictStr] = None,
|
|
476
|
+
created_on: Optional[datetime] = None,
|
|
477
|
+
_request_timeout: Union[
|
|
478
|
+
None,
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Tuple[
|
|
481
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
482
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
483
|
+
]
|
|
484
|
+
] = None,
|
|
485
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
486
|
+
_content_type: Optional[StrictStr] = None,
|
|
487
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
488
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
489
|
+
) -> RESTResponseType:
|
|
490
|
+
"""Read instruments(s)
|
|
491
|
+
|
|
492
|
+
Read many instruments based on query params
|
|
493
|
+
|
|
494
|
+
:param name:
|
|
495
|
+
:type name: str
|
|
496
|
+
:param telescope_id:
|
|
497
|
+
:type telescope_id: str
|
|
498
|
+
:param telescope_name:
|
|
499
|
+
:type telescope_name: str
|
|
500
|
+
:param created_on:
|
|
501
|
+
:type created_on: datetime
|
|
502
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
503
|
+
number provided, it will be total request
|
|
504
|
+
timeout. It can also be a pair (tuple) of
|
|
505
|
+
(connection, read) timeouts.
|
|
506
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
507
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
508
|
+
request; this effectively ignores the
|
|
509
|
+
authentication in the spec for a single request.
|
|
510
|
+
:type _request_auth: dict, optional
|
|
511
|
+
:param _content_type: force content-type for the request.
|
|
512
|
+
:type _content_type: str, Optional
|
|
513
|
+
:param _headers: set to override the headers for a single
|
|
514
|
+
request; this effectively ignores the headers
|
|
515
|
+
in the spec for a single request.
|
|
516
|
+
:type _headers: dict, optional
|
|
517
|
+
:param _host_index: set to override the host_index for a single
|
|
518
|
+
request; this effectively ignores the host_index
|
|
519
|
+
in the spec for a single request.
|
|
520
|
+
:type _host_index: int, optional
|
|
521
|
+
:return: Returns the result object.
|
|
522
|
+
""" # noqa: E501
|
|
523
|
+
|
|
524
|
+
_param = self._get_instruments_serialize(
|
|
525
|
+
name=name,
|
|
526
|
+
telescope_id=telescope_id,
|
|
527
|
+
telescope_name=telescope_name,
|
|
528
|
+
created_on=created_on,
|
|
529
|
+
_request_auth=_request_auth,
|
|
530
|
+
_content_type=_content_type,
|
|
531
|
+
_headers=_headers,
|
|
532
|
+
_host_index=_host_index
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
536
|
+
'200': "List[Instrument]",
|
|
537
|
+
'404': None,
|
|
538
|
+
'422': "HTTPValidationError",
|
|
539
|
+
}
|
|
540
|
+
response_data = self.api_client.call_api(
|
|
541
|
+
*_param,
|
|
542
|
+
_request_timeout=_request_timeout
|
|
543
|
+
)
|
|
544
|
+
return response_data.response
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
def _get_instruments_serialize(
|
|
548
|
+
self,
|
|
549
|
+
name,
|
|
550
|
+
telescope_id,
|
|
551
|
+
telescope_name,
|
|
552
|
+
created_on,
|
|
553
|
+
_request_auth,
|
|
554
|
+
_content_type,
|
|
555
|
+
_headers,
|
|
556
|
+
_host_index,
|
|
557
|
+
) -> RequestSerialized:
|
|
558
|
+
|
|
559
|
+
_host = None
|
|
560
|
+
|
|
561
|
+
_collection_formats: Dict[str, str] = {
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
_path_params: Dict[str, str] = {}
|
|
565
|
+
_query_params: List[Tuple[str, str]] = []
|
|
566
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
567
|
+
_form_params: List[Tuple[str, str]] = []
|
|
568
|
+
_files: Dict[
|
|
569
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
570
|
+
] = {}
|
|
571
|
+
_body_params: Optional[bytes] = None
|
|
572
|
+
|
|
573
|
+
# process the path parameters
|
|
574
|
+
# process the query parameters
|
|
575
|
+
if name is not None:
|
|
576
|
+
|
|
577
|
+
_query_params.append(('name', name))
|
|
578
|
+
|
|
579
|
+
if telescope_id is not None:
|
|
580
|
+
|
|
581
|
+
_query_params.append(('telescope_id', telescope_id))
|
|
582
|
+
|
|
583
|
+
if telescope_name is not None:
|
|
584
|
+
|
|
585
|
+
_query_params.append(('telescope_name', telescope_name))
|
|
586
|
+
|
|
587
|
+
if created_on is not None:
|
|
588
|
+
if isinstance(created_on, datetime):
|
|
589
|
+
_query_params.append(
|
|
590
|
+
(
|
|
591
|
+
'created_on',
|
|
592
|
+
created_on.strftime(
|
|
593
|
+
self.api_client.configuration.datetime_format
|
|
594
|
+
)
|
|
595
|
+
)
|
|
596
|
+
)
|
|
597
|
+
else:
|
|
598
|
+
_query_params.append(('created_on', created_on))
|
|
599
|
+
|
|
600
|
+
# process the header parameters
|
|
601
|
+
# process the form parameters
|
|
602
|
+
# process the body parameter
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
# set the HTTP header `Accept`
|
|
606
|
+
if 'Accept' not in _header_params:
|
|
607
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
608
|
+
[
|
|
609
|
+
'application/json'
|
|
610
|
+
]
|
|
611
|
+
)
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
# authentication setting
|
|
615
|
+
_auth_settings: List[str] = [
|
|
616
|
+
]
|
|
617
|
+
|
|
618
|
+
return self.api_client.param_serialize(
|
|
619
|
+
method='GET',
|
|
620
|
+
resource_path='/instrument/',
|
|
621
|
+
path_params=_path_params,
|
|
622
|
+
query_params=_query_params,
|
|
623
|
+
header_params=_header_params,
|
|
624
|
+
body=_body_params,
|
|
625
|
+
post_params=_form_params,
|
|
626
|
+
files=_files,
|
|
627
|
+
auth_settings=_auth_settings,
|
|
628
|
+
collection_formats=_collection_formats,
|
|
629
|
+
_host=_host,
|
|
630
|
+
_request_auth=_request_auth
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
|