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,249 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from across.sdk.v1.models.bandpass import Bandpass
|
|
24
|
+
from across.sdk.v1.models.coordinate import Coordinate
|
|
25
|
+
from across.sdk.v1.models.date_range import DateRange
|
|
26
|
+
from across.sdk.v1.models.ivoa_obs_category import IVOAObsCategory
|
|
27
|
+
from across.sdk.v1.models.ivoa_obs_tracking_type import IVOAObsTrackingType
|
|
28
|
+
from across.sdk.v1.models.observation_status import ObservationStatus
|
|
29
|
+
from across.sdk.v1.models.observation_type import ObservationType
|
|
30
|
+
from across.sdk.v1.models.unit_value import UnitValue
|
|
31
|
+
from typing import Optional, Set
|
|
32
|
+
from typing_extensions import Self
|
|
33
|
+
|
|
34
|
+
class ObservationCreate(BaseModel):
|
|
35
|
+
"""
|
|
36
|
+
ObservationCreate
|
|
37
|
+
""" # noqa: E501
|
|
38
|
+
instrument_id: StrictStr
|
|
39
|
+
object_name: StrictStr
|
|
40
|
+
pointing_position: Optional[Coordinate] = None
|
|
41
|
+
date_range: DateRange
|
|
42
|
+
external_observation_id: StrictStr
|
|
43
|
+
type: ObservationType
|
|
44
|
+
status: ObservationStatus
|
|
45
|
+
pointing_angle: Optional[Union[StrictFloat, StrictInt]] = None
|
|
46
|
+
exposure_time: Optional[Union[StrictFloat, StrictInt]] = None
|
|
47
|
+
reason: Optional[StrictStr] = None
|
|
48
|
+
description: Optional[StrictStr] = None
|
|
49
|
+
proposal_reference: Optional[StrictStr] = None
|
|
50
|
+
object_position: Optional[Coordinate] = None
|
|
51
|
+
depth: Optional[UnitValue] = None
|
|
52
|
+
bandpass: Bandpass
|
|
53
|
+
t_resolution: Optional[Union[StrictFloat, StrictInt]] = None
|
|
54
|
+
em_res_power: Optional[Union[StrictFloat, StrictInt]] = None
|
|
55
|
+
o_ucd: Optional[StrictStr] = None
|
|
56
|
+
pol_states: Optional[StrictStr] = None
|
|
57
|
+
pol_xel: Optional[StrictStr] = None
|
|
58
|
+
category: Optional[IVOAObsCategory] = None
|
|
59
|
+
priority: Optional[StrictInt] = None
|
|
60
|
+
tracking_type: Optional[IVOAObsTrackingType] = None
|
|
61
|
+
created_on: Optional[datetime] = None
|
|
62
|
+
created_by_id: Optional[StrictStr] = None
|
|
63
|
+
__properties: ClassVar[List[str]] = ["instrument_id", "object_name", "pointing_position", "date_range", "external_observation_id", "type", "status", "pointing_angle", "exposure_time", "reason", "description", "proposal_reference", "object_position", "depth", "bandpass", "t_resolution", "em_res_power", "o_ucd", "pol_states", "pol_xel", "category", "priority", "tracking_type", "created_on", "created_by_id"]
|
|
64
|
+
|
|
65
|
+
model_config = ConfigDict(
|
|
66
|
+
populate_by_name=True,
|
|
67
|
+
validate_assignment=True,
|
|
68
|
+
protected_namespaces=(),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ObservationCreate from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
"""
|
|
96
|
+
excluded_fields: Set[str] = set([
|
|
97
|
+
])
|
|
98
|
+
|
|
99
|
+
_dict = self.model_dump(
|
|
100
|
+
by_alias=True,
|
|
101
|
+
exclude=excluded_fields,
|
|
102
|
+
exclude_none=True,
|
|
103
|
+
)
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of pointing_position
|
|
105
|
+
if self.pointing_position:
|
|
106
|
+
_dict['pointing_position'] = self.pointing_position.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of date_range
|
|
108
|
+
if self.date_range:
|
|
109
|
+
_dict['date_range'] = self.date_range.to_dict()
|
|
110
|
+
# override the default output from pydantic by calling `to_dict()` of object_position
|
|
111
|
+
if self.object_position:
|
|
112
|
+
_dict['object_position'] = self.object_position.to_dict()
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of depth
|
|
114
|
+
if self.depth:
|
|
115
|
+
_dict['depth'] = self.depth.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of bandpass
|
|
117
|
+
if self.bandpass:
|
|
118
|
+
_dict['bandpass'] = self.bandpass.to_dict()
|
|
119
|
+
# set to None if pointing_position (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.pointing_position is None and "pointing_position" in self.model_fields_set:
|
|
122
|
+
_dict['pointing_position'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if pointing_angle (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.pointing_angle is None and "pointing_angle" in self.model_fields_set:
|
|
127
|
+
_dict['pointing_angle'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if exposure_time (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.exposure_time is None and "exposure_time" in self.model_fields_set:
|
|
132
|
+
_dict['exposure_time'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if reason (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.reason is None and "reason" in self.model_fields_set:
|
|
137
|
+
_dict['reason'] = None
|
|
138
|
+
|
|
139
|
+
# set to None if description (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.description is None and "description" in self.model_fields_set:
|
|
142
|
+
_dict['description'] = None
|
|
143
|
+
|
|
144
|
+
# set to None if proposal_reference (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.proposal_reference is None and "proposal_reference" in self.model_fields_set:
|
|
147
|
+
_dict['proposal_reference'] = None
|
|
148
|
+
|
|
149
|
+
# set to None if object_position (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.object_position is None and "object_position" in self.model_fields_set:
|
|
152
|
+
_dict['object_position'] = None
|
|
153
|
+
|
|
154
|
+
# set to None if depth (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.depth is None and "depth" in self.model_fields_set:
|
|
157
|
+
_dict['depth'] = None
|
|
158
|
+
|
|
159
|
+
# set to None if t_resolution (nullable) is None
|
|
160
|
+
# and model_fields_set contains the field
|
|
161
|
+
if self.t_resolution is None and "t_resolution" in self.model_fields_set:
|
|
162
|
+
_dict['t_resolution'] = None
|
|
163
|
+
|
|
164
|
+
# set to None if em_res_power (nullable) is None
|
|
165
|
+
# and model_fields_set contains the field
|
|
166
|
+
if self.em_res_power is None and "em_res_power" in self.model_fields_set:
|
|
167
|
+
_dict['em_res_power'] = None
|
|
168
|
+
|
|
169
|
+
# set to None if o_ucd (nullable) is None
|
|
170
|
+
# and model_fields_set contains the field
|
|
171
|
+
if self.o_ucd is None and "o_ucd" in self.model_fields_set:
|
|
172
|
+
_dict['o_ucd'] = None
|
|
173
|
+
|
|
174
|
+
# set to None if pol_states (nullable) is None
|
|
175
|
+
# and model_fields_set contains the field
|
|
176
|
+
if self.pol_states is None and "pol_states" in self.model_fields_set:
|
|
177
|
+
_dict['pol_states'] = None
|
|
178
|
+
|
|
179
|
+
# set to None if pol_xel (nullable) is None
|
|
180
|
+
# and model_fields_set contains the field
|
|
181
|
+
if self.pol_xel is None and "pol_xel" in self.model_fields_set:
|
|
182
|
+
_dict['pol_xel'] = None
|
|
183
|
+
|
|
184
|
+
# set to None if category (nullable) is None
|
|
185
|
+
# and model_fields_set contains the field
|
|
186
|
+
if self.category is None and "category" in self.model_fields_set:
|
|
187
|
+
_dict['category'] = None
|
|
188
|
+
|
|
189
|
+
# set to None if priority (nullable) is None
|
|
190
|
+
# and model_fields_set contains the field
|
|
191
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
192
|
+
_dict['priority'] = None
|
|
193
|
+
|
|
194
|
+
# set to None if tracking_type (nullable) is None
|
|
195
|
+
# and model_fields_set contains the field
|
|
196
|
+
if self.tracking_type is None and "tracking_type" in self.model_fields_set:
|
|
197
|
+
_dict['tracking_type'] = None
|
|
198
|
+
|
|
199
|
+
# set to None if created_on (nullable) is None
|
|
200
|
+
# and model_fields_set contains the field
|
|
201
|
+
if self.created_on is None and "created_on" in self.model_fields_set:
|
|
202
|
+
_dict['created_on'] = None
|
|
203
|
+
|
|
204
|
+
# set to None if created_by_id (nullable) is None
|
|
205
|
+
# and model_fields_set contains the field
|
|
206
|
+
if self.created_by_id is None and "created_by_id" in self.model_fields_set:
|
|
207
|
+
_dict['created_by_id'] = None
|
|
208
|
+
|
|
209
|
+
return _dict
|
|
210
|
+
|
|
211
|
+
@classmethod
|
|
212
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
213
|
+
"""Create an instance of ObservationCreate from a dict"""
|
|
214
|
+
if obj is None:
|
|
215
|
+
return None
|
|
216
|
+
|
|
217
|
+
if not isinstance(obj, dict):
|
|
218
|
+
return cls.model_validate(obj)
|
|
219
|
+
|
|
220
|
+
_obj = cls.model_validate({
|
|
221
|
+
"instrument_id": obj.get("instrument_id"),
|
|
222
|
+
"object_name": obj.get("object_name"),
|
|
223
|
+
"pointing_position": Coordinate.from_dict(obj["pointing_position"]) if obj.get("pointing_position") is not None else None,
|
|
224
|
+
"date_range": DateRange.from_dict(obj["date_range"]) if obj.get("date_range") is not None else None,
|
|
225
|
+
"external_observation_id": obj.get("external_observation_id"),
|
|
226
|
+
"type": obj.get("type"),
|
|
227
|
+
"status": obj.get("status"),
|
|
228
|
+
"pointing_angle": obj.get("pointing_angle"),
|
|
229
|
+
"exposure_time": obj.get("exposure_time"),
|
|
230
|
+
"reason": obj.get("reason"),
|
|
231
|
+
"description": obj.get("description"),
|
|
232
|
+
"proposal_reference": obj.get("proposal_reference"),
|
|
233
|
+
"object_position": Coordinate.from_dict(obj["object_position"]) if obj.get("object_position") is not None else None,
|
|
234
|
+
"depth": UnitValue.from_dict(obj["depth"]) if obj.get("depth") is not None else None,
|
|
235
|
+
"bandpass": Bandpass.from_dict(obj["bandpass"]) if obj.get("bandpass") is not None else None,
|
|
236
|
+
"t_resolution": obj.get("t_resolution"),
|
|
237
|
+
"em_res_power": obj.get("em_res_power"),
|
|
238
|
+
"o_ucd": obj.get("o_ucd"),
|
|
239
|
+
"pol_states": obj.get("pol_states"),
|
|
240
|
+
"pol_xel": obj.get("pol_xel"),
|
|
241
|
+
"category": obj.get("category"),
|
|
242
|
+
"priority": obj.get("priority"),
|
|
243
|
+
"tracking_type": obj.get("tracking_type"),
|
|
244
|
+
"created_on": obj.get("created_on"),
|
|
245
|
+
"created_by_id": obj.get("created_by_id")
|
|
246
|
+
})
|
|
247
|
+
return _obj
|
|
248
|
+
|
|
249
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ObservationStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
ObservationStatus
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
PLANNED = 'planned'
|
|
30
|
+
SCHEDULED = 'scheduled'
|
|
31
|
+
UNSCHEDULED = 'unscheduled'
|
|
32
|
+
PERFORMED = 'performed'
|
|
33
|
+
ABORTED = 'aborted'
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of ObservationStatus from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ObservationType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
ObservationType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
IMAGING = 'imaging'
|
|
30
|
+
TIMING = 'timing'
|
|
31
|
+
SPECTROSCOPY = 'spectroscopy'
|
|
32
|
+
SLEW = 'slew'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of ObservationType from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from across.sdk.v1.models.id_name_schema import IDNameSchema
|
|
24
|
+
from across.sdk.v1.models.nullable_date_range import NullableDateRange
|
|
25
|
+
from across.sdk.v1.models.observatory_ephemeris_type import ObservatoryEphemerisType
|
|
26
|
+
from across.sdk.v1.models.observatory_type import ObservatoryType
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class Observatory(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
A Pydantic model class representing a created observatory Notes ----- Inherits from ObservatoryBase
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
id: StrictStr
|
|
35
|
+
created_on: datetime
|
|
36
|
+
name: StrictStr
|
|
37
|
+
short_name: StrictStr
|
|
38
|
+
type: ObservatoryType
|
|
39
|
+
telescopes: Optional[List[IDNameSchema]] = None
|
|
40
|
+
ephemeris_types: Optional[List[ObservatoryEphemerisType]] = None
|
|
41
|
+
reference_url: Optional[StrictStr]
|
|
42
|
+
operational: Optional[NullableDateRange]
|
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "name", "short_name", "type", "telescopes", "ephemeris_types", "reference_url", "operational"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of Observatory from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each item in telescopes (list)
|
|
85
|
+
_items = []
|
|
86
|
+
if self.telescopes:
|
|
87
|
+
for _item_telescopes in self.telescopes:
|
|
88
|
+
if _item_telescopes:
|
|
89
|
+
_items.append(_item_telescopes.to_dict())
|
|
90
|
+
_dict['telescopes'] = _items
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of each item in ephemeris_types (list)
|
|
92
|
+
_items = []
|
|
93
|
+
if self.ephemeris_types:
|
|
94
|
+
for _item_ephemeris_types in self.ephemeris_types:
|
|
95
|
+
if _item_ephemeris_types:
|
|
96
|
+
_items.append(_item_ephemeris_types.to_dict())
|
|
97
|
+
_dict['ephemeris_types'] = _items
|
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of operational
|
|
99
|
+
if self.operational:
|
|
100
|
+
_dict['operational'] = self.operational.to_dict()
|
|
101
|
+
# set to None if telescopes (nullable) is None
|
|
102
|
+
# and model_fields_set contains the field
|
|
103
|
+
if self.telescopes is None and "telescopes" in self.model_fields_set:
|
|
104
|
+
_dict['telescopes'] = None
|
|
105
|
+
|
|
106
|
+
# set to None if ephemeris_types (nullable) is None
|
|
107
|
+
# and model_fields_set contains the field
|
|
108
|
+
if self.ephemeris_types is None and "ephemeris_types" in self.model_fields_set:
|
|
109
|
+
_dict['ephemeris_types'] = None
|
|
110
|
+
|
|
111
|
+
# set to None if reference_url (nullable) is None
|
|
112
|
+
# and model_fields_set contains the field
|
|
113
|
+
if self.reference_url is None and "reference_url" in self.model_fields_set:
|
|
114
|
+
_dict['reference_url'] = None
|
|
115
|
+
|
|
116
|
+
# set to None if operational (nullable) is None
|
|
117
|
+
# and model_fields_set contains the field
|
|
118
|
+
if self.operational is None and "operational" in self.model_fields_set:
|
|
119
|
+
_dict['operational'] = None
|
|
120
|
+
|
|
121
|
+
return _dict
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
125
|
+
"""Create an instance of Observatory from a dict"""
|
|
126
|
+
if obj is None:
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
if not isinstance(obj, dict):
|
|
130
|
+
return cls.model_validate(obj)
|
|
131
|
+
|
|
132
|
+
_obj = cls.model_validate({
|
|
133
|
+
"id": obj.get("id"),
|
|
134
|
+
"created_on": obj.get("created_on"),
|
|
135
|
+
"name": obj.get("name"),
|
|
136
|
+
"short_name": obj.get("short_name"),
|
|
137
|
+
"type": obj.get("type"),
|
|
138
|
+
"telescopes": [IDNameSchema.from_dict(_item) for _item in obj["telescopes"]] if obj.get("telescopes") is not None else None,
|
|
139
|
+
"ephemeris_types": [ObservatoryEphemerisType.from_dict(_item) for _item in obj["ephemeris_types"]] if obj.get("ephemeris_types") is not None else None,
|
|
140
|
+
"reference_url": obj.get("reference_url"),
|
|
141
|
+
"operational": NullableDateRange.from_dict(obj["operational"]) if obj.get("operational") is not None else None
|
|
142
|
+
})
|
|
143
|
+
return _obj
|
|
144
|
+
|
|
145
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from across.sdk.v1.models.ephemeris_type import EphemerisType
|
|
23
|
+
from across.sdk.v1.models.parameters import Parameters
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ObservatoryEphemerisType(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ObservatoryEphemerisType
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
ephemeris_type: EphemerisType
|
|
32
|
+
priority: StrictInt
|
|
33
|
+
parameters: Parameters
|
|
34
|
+
__properties: ClassVar[List[str]] = ["ephemeris_type", "priority", "parameters"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of ObservatoryEphemerisType from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of parameters
|
|
76
|
+
if self.parameters:
|
|
77
|
+
_dict['parameters'] = self.parameters.to_dict()
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of ObservatoryEphemerisType from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"ephemeris_type": obj.get("ephemeris_type"),
|
|
91
|
+
"priority": obj.get("priority"),
|
|
92
|
+
"parameters": Parameters.from_dict(obj["parameters"]) if obj.get("parameters") is not None else None
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ObservatoryType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
ObservatoryType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
SPACE_BASED = 'SPACE_BASED'
|
|
30
|
+
GROUND_BASED = 'GROUND_BASED'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of ObservatoryType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|