across-server-openapi-python 1.3.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 +76 -17
- across/sdk/v1/api/__init__.py +3 -1
- across/sdk/v1/api/auth_api.py +17 -286
- across/sdk/v1/api/broker_alert_api.py +1017 -0
- across/sdk/v1/api/broker_event_api.py +697 -0
- across/sdk/v1/api/filter_api.py +20 -20
- across/sdk/v1/api/group_api.py +31 -281
- across/sdk/v1/api/group_invite_api.py +65 -66
- across/sdk/v1/api/group_role_api.py +105 -106
- across/sdk/v1/api/instrument_api.py +20 -20
- across/sdk/v1/api/internal_api.py +20 -21
- across/sdk/v1/api/observation_api.py +762 -135
- 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/role_api.py +1 -1
- across/sdk/v1/api/schedule_api.py +84 -86
- across/sdk/v1/api/service_account_api.py +125 -126
- 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 +84 -333
- 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 +36 -9
- 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 +93 -0
- 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_role_schemas_user.py +95 -0
- 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 +106 -0
- 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 +106 -0
- across/sdk/v1/models/broker_alert_create.py +115 -0
- across/sdk/v1/models/broker_alert_data_source.py +39 -0
- across/sdk/v1/models/broker_alert_status.py +41 -0
- across/sdk/v1/models/broker_event.py +115 -0
- across/sdk/v1/models/broker_event_type.py +41 -0
- 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.py +5 -15
- across/sdk/v1/models/group_base.py +93 -0
- across/sdk/v1/models/group_invite.py +1 -1
- 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.py +37 -6
- across/sdk/v1/models/group_role_create.py +7 -5
- across/sdk/v1/models/group_role_read.py +16 -9
- 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 +128 -0
- across/sdk/v1/models/localization_contour_base.py +95 -0
- across/sdk/v1/models/localization_create.py +121 -0
- 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 +116 -0
- across/sdk/v1/models/page_broker_event.py +116 -0
- 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.py +4 -4
- 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.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.py +47 -7
- 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.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/METADATA +122 -45
- across_server_openapi_python-2.0.0.dist-info/RECORD +162 -0
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/WHEEL +1 -1
- across_server_openapi_python-1.3.0.dist-info/RECORD +0 -126
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
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: 2.0.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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from across.sdk.v1.models.setting_type import SettingType
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
26
|
+
|
|
27
|
+
class Setting(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Setting
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
name: StrictStr
|
|
32
|
+
value: StrictStr
|
|
33
|
+
display_name: Optional[StrictStr]
|
|
34
|
+
type: SettingType
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "value", "display_name", "type"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of Setting from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# set to None if display_name (nullable) is None
|
|
77
|
+
# and model_fields_set contains the field
|
|
78
|
+
if self.display_name is None and "display_name" in self.model_fields_set:
|
|
79
|
+
_dict['display_name'] = None
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of Setting from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"name": obj.get("name"),
|
|
94
|
+
"value": obj.get("value"),
|
|
95
|
+
"display_name": obj.get("display_name"),
|
|
96
|
+
"type": obj.get("type")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -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: 2.0.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 SettingType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
SettingType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
STRING = 'string'
|
|
30
|
+
INT = 'int'
|
|
31
|
+
BOOLEAN = 'boolean'
|
|
32
|
+
FLOAT = 'float'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of SettingType from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class SPICEParameters(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,7 +32,8 @@ class SPICEParameters(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["naif_id", "spice_kernel_url"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class SPICEParameters(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -20,16 +20,18 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from uuid import UUID
|
|
23
24
|
from across.sdk.v1.models.group_role_read import GroupRoleRead
|
|
24
25
|
from across.sdk.v1.models.role_base import RoleBase
|
|
25
26
|
from typing import Optional, Set
|
|
26
27
|
from typing_extensions import Self
|
|
28
|
+
from pydantic_core import to_jsonable_python
|
|
27
29
|
|
|
28
30
|
class SystemServiceAccount(BaseModel):
|
|
29
31
|
"""
|
|
30
32
|
SystemServiceAccount
|
|
31
33
|
""" # noqa: E501
|
|
32
|
-
id:
|
|
34
|
+
id: UUID
|
|
33
35
|
name: StrictStr
|
|
34
36
|
description: Optional[StrictStr] = None
|
|
35
37
|
expiration: datetime
|
|
@@ -39,7 +41,8 @@ class SystemServiceAccount(BaseModel):
|
|
|
39
41
|
__properties: ClassVar[List[str]] = ["id", "name", "description", "expiration", "expiration_duration", "roles", "group_roles"]
|
|
40
42
|
|
|
41
43
|
model_config = ConfigDict(
|
|
42
|
-
|
|
44
|
+
validate_by_name=True,
|
|
45
|
+
validate_by_alias=True,
|
|
43
46
|
validate_assignment=True,
|
|
44
47
|
protected_namespaces=(),
|
|
45
48
|
)
|
|
@@ -51,8 +54,7 @@ class SystemServiceAccount(BaseModel):
|
|
|
51
54
|
|
|
52
55
|
def to_json(self) -> str:
|
|
53
56
|
"""Returns the JSON representation of the model using alias"""
|
|
54
|
-
|
|
55
|
-
return json.dumps(self.to_dict())
|
|
57
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
56
58
|
|
|
57
59
|
@classmethod
|
|
58
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -81,15 +83,13 @@ class SystemServiceAccount(BaseModel):
|
|
|
81
83
|
_items = []
|
|
82
84
|
if self.roles:
|
|
83
85
|
for _item_roles in self.roles:
|
|
84
|
-
if _item_roles
|
|
85
|
-
_items.append(_item_roles.to_dict())
|
|
86
|
+
_items.append(_item_roles.to_dict() if _item_roles is not None else None)
|
|
86
87
|
_dict['roles'] = _items
|
|
87
88
|
# override the default output from pydantic by calling `to_dict()` of each item in group_roles (list)
|
|
88
89
|
_items = []
|
|
89
90
|
if self.group_roles:
|
|
90
91
|
for _item_group_roles in self.group_roles:
|
|
91
|
-
if _item_group_roles
|
|
92
|
-
_items.append(_item_group_roles.to_dict())
|
|
92
|
+
_items.append(_item_group_roles.to_dict() if _item_group_roles is not None else None)
|
|
93
93
|
_dict['group_roles'] = _items
|
|
94
94
|
# set to None if description (nullable) is None
|
|
95
95
|
# and model_fields_set contains the field
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -20,17 +20,19 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from uuid import UUID
|
|
23
24
|
from across.sdk.v1.models.id_name_schema import IDNameSchema
|
|
24
25
|
from across.sdk.v1.models.schedule_cadence import ScheduleCadence
|
|
25
26
|
from across.sdk.v1.models.telescope_instrument import TelescopeInstrument
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
29
|
+
from pydantic_core import to_jsonable_python
|
|
28
30
|
|
|
29
31
|
class Telescope(BaseModel):
|
|
30
32
|
"""
|
|
31
33
|
A Pydantic model class representing a created telescope Notes ----- Inherits from TelescopeBase Methods ------- from_orm(telescope: TelescopeModel) -> Telescope Static method that instantiates this class from a telescope database record
|
|
32
34
|
""" # noqa: E501
|
|
33
|
-
id:
|
|
35
|
+
id: UUID
|
|
34
36
|
created_on: datetime
|
|
35
37
|
name: StrictStr
|
|
36
38
|
short_name: StrictStr
|
|
@@ -40,7 +42,8 @@ class Telescope(BaseModel):
|
|
|
40
42
|
__properties: ClassVar[List[str]] = ["id", "created_on", "name", "short_name", "schedule_cadences", "observatory", "instruments"]
|
|
41
43
|
|
|
42
44
|
model_config = ConfigDict(
|
|
43
|
-
|
|
45
|
+
validate_by_name=True,
|
|
46
|
+
validate_by_alias=True,
|
|
44
47
|
validate_assignment=True,
|
|
45
48
|
protected_namespaces=(),
|
|
46
49
|
)
|
|
@@ -52,8 +55,7 @@ class Telescope(BaseModel):
|
|
|
52
55
|
|
|
53
56
|
def to_json(self) -> str:
|
|
54
57
|
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
58
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
57
59
|
|
|
58
60
|
@classmethod
|
|
59
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -82,8 +84,7 @@ class Telescope(BaseModel):
|
|
|
82
84
|
_items = []
|
|
83
85
|
if self.schedule_cadences:
|
|
84
86
|
for _item_schedule_cadences in self.schedule_cadences:
|
|
85
|
-
if _item_schedule_cadences
|
|
86
|
-
_items.append(_item_schedule_cadences.to_dict())
|
|
87
|
+
_items.append(_item_schedule_cadences.to_dict() if _item_schedule_cadences is not None else None)
|
|
87
88
|
_dict['schedule_cadences'] = _items
|
|
88
89
|
# override the default output from pydantic by calling `to_dict()` of observatory
|
|
89
90
|
if self.observatory:
|
|
@@ -92,8 +93,7 @@ class Telescope(BaseModel):
|
|
|
92
93
|
_items = []
|
|
93
94
|
if self.instruments:
|
|
94
95
|
for _item_instruments in self.instruments:
|
|
95
|
-
if _item_instruments
|
|
96
|
-
_items.append(_item_instruments.to_dict())
|
|
96
|
+
_items.append(_item_instruments.to_dict() if _item_instruments is not None else None)
|
|
97
97
|
_dict['instruments'] = _items
|
|
98
98
|
# set to None if schedule_cadences (nullable) is None
|
|
99
99
|
# and model_fields_set contains the field
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -18,21 +18,24 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from uuid import UUID
|
|
23
24
|
from across.sdk.v1.models.filter import Filter
|
|
24
25
|
from across.sdk.v1.models.id_name_schema import IDNameSchema
|
|
25
26
|
from across.sdk.v1.models.observation_strategy import ObservationStrategy
|
|
26
27
|
from across.sdk.v1.models.point import Point
|
|
28
|
+
from across.sdk.v1.models.setting import Setting
|
|
27
29
|
from across.sdk.v1.models.visibility_type import VisibilityType
|
|
28
30
|
from typing import Optional, Set
|
|
29
31
|
from typing_extensions import Self
|
|
32
|
+
from pydantic_core import to_jsonable_python
|
|
30
33
|
|
|
31
34
|
class TelescopeInstrument(BaseModel):
|
|
32
35
|
"""
|
|
33
36
|
A Pydantic model class representing a created Instrument for the Telescope Endpoint Notes ----- Inherits from InstrumentBase Methods ------- from_orm(instrument: InstrumentModel, include_footprints: bool, include_filters: bool) -> Instrument Static method that instantiates this class from a Instrument database record
|
|
34
37
|
""" # noqa: E501
|
|
35
|
-
id:
|
|
38
|
+
id: UUID
|
|
36
39
|
created_on: datetime
|
|
37
40
|
name: StrictStr
|
|
38
41
|
short_name: StrictStr
|
|
@@ -42,10 +45,13 @@ class TelescopeInstrument(BaseModel):
|
|
|
42
45
|
constraints: Optional[List[Dict[str, Any]]] = None
|
|
43
46
|
visibility_type: Optional[VisibilityType] = None
|
|
44
47
|
observation_strategy: Optional[ObservationStrategy] = None
|
|
45
|
-
|
|
48
|
+
is_observation_request_enabled: StrictBool
|
|
49
|
+
settings: Optional[List[Setting]] = None
|
|
50
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "name", "short_name", "telescope", "footprints", "filters", "constraints", "visibility_type", "observation_strategy", "is_observation_request_enabled", "settings"]
|
|
46
51
|
|
|
47
52
|
model_config = ConfigDict(
|
|
48
|
-
|
|
53
|
+
validate_by_name=True,
|
|
54
|
+
validate_by_alias=True,
|
|
49
55
|
validate_assignment=True,
|
|
50
56
|
protected_namespaces=(),
|
|
51
57
|
)
|
|
@@ -57,8 +63,7 @@ class TelescopeInstrument(BaseModel):
|
|
|
57
63
|
|
|
58
64
|
def to_json(self) -> str:
|
|
59
65
|
"""Returns the JSON representation of the model using alias"""
|
|
60
|
-
|
|
61
|
-
return json.dumps(self.to_dict())
|
|
66
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
62
67
|
|
|
63
68
|
@classmethod
|
|
64
69
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -90,18 +95,22 @@ class TelescopeInstrument(BaseModel):
|
|
|
90
95
|
_items = []
|
|
91
96
|
if self.footprints:
|
|
92
97
|
for _item_footprints in self.footprints:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
98
|
+
_items.append(
|
|
99
|
+
[_inner_item.to_dict() if _inner_item is not None else None for _inner_item in _item_footprints] if _item_footprints is not None else None
|
|
100
|
+
)
|
|
97
101
|
_dict['footprints'] = _items
|
|
98
102
|
# override the default output from pydantic by calling `to_dict()` of each item in filters (list)
|
|
99
103
|
_items = []
|
|
100
104
|
if self.filters:
|
|
101
105
|
for _item_filters in self.filters:
|
|
102
|
-
if _item_filters
|
|
103
|
-
_items.append(_item_filters.to_dict())
|
|
106
|
+
_items.append(_item_filters.to_dict() if _item_filters is not None else None)
|
|
104
107
|
_dict['filters'] = _items
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of each item in settings (list)
|
|
109
|
+
_items = []
|
|
110
|
+
if self.settings:
|
|
111
|
+
for _item_settings in self.settings:
|
|
112
|
+
_items.append(_item_settings.to_dict() if _item_settings is not None else None)
|
|
113
|
+
_dict['settings'] = _items
|
|
105
114
|
# set to None if telescope (nullable) is None
|
|
106
115
|
# and model_fields_set contains the field
|
|
107
116
|
if self.telescope is None and "telescope" in self.model_fields_set:
|
|
@@ -132,6 +141,11 @@ class TelescopeInstrument(BaseModel):
|
|
|
132
141
|
if self.observation_strategy is None and "observation_strategy" in self.model_fields_set:
|
|
133
142
|
_dict['observation_strategy'] = None
|
|
134
143
|
|
|
144
|
+
# set to None if settings (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.settings is None and "settings" in self.model_fields_set:
|
|
147
|
+
_dict['settings'] = None
|
|
148
|
+
|
|
135
149
|
return _dict
|
|
136
150
|
|
|
137
151
|
@classmethod
|
|
@@ -150,13 +164,15 @@ class TelescopeInstrument(BaseModel):
|
|
|
150
164
|
"short_name": obj.get("short_name"),
|
|
151
165
|
"telescope": IDNameSchema.from_dict(obj["telescope"]) if obj.get("telescope") is not None else None,
|
|
152
166
|
"footprints": [
|
|
153
|
-
[Point.from_dict(_inner_item) for _inner_item in _item]
|
|
167
|
+
[Point.from_dict(_inner_item) for _inner_item in _item] if _item is not None else None
|
|
154
168
|
for _item in obj["footprints"]
|
|
155
169
|
] if obj.get("footprints") is not None else None,
|
|
156
170
|
"filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None,
|
|
157
171
|
"constraints": obj.get("constraints"),
|
|
158
172
|
"visibility_type": obj.get("visibility_type"),
|
|
159
|
-
"observation_strategy": obj.get("observation_strategy")
|
|
173
|
+
"observation_strategy": obj.get("observation_strategy"),
|
|
174
|
+
"is_observation_request_enabled": obj.get("is_observation_request_enabled"),
|
|
175
|
+
"settings": [Setting.from_dict(_item) for _item in obj["settings"]] if obj.get("settings") is not None else None
|
|
160
176
|
})
|
|
161
177
|
return _obj
|
|
162
178
|
|
across/sdk/v1/models/tle.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class TLE(BaseModel):
|
|
28
29
|
"""
|
|
@@ -36,7 +37,8 @@ class TLE(BaseModel):
|
|
|
36
37
|
__properties: ClassVar[List[str]] = ["norad_id", "satellite_name", "tle1", "tle2", "epoch"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
40
42
|
validate_assignment=True,
|
|
41
43
|
protected_namespaces=(),
|
|
42
44
|
)
|
|
@@ -48,8 +50,7 @@ class TLE(BaseModel):
|
|
|
48
50
|
|
|
49
51
|
def to_json(self) -> str:
|
|
50
52
|
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
53
54
|
|
|
54
55
|
@classmethod
|
|
55
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class TLECreate(BaseModel):
|
|
27
28
|
"""
|
|
@@ -34,7 +35,8 @@ class TLECreate(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["norad_id", "satellite_name", "tle1", "tle2"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class TLECreate(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class TLEParameters(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,7 +32,8 @@ class TLEParameters(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["norad_id", "norad_satellite_name"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class TLEParameters(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class UnitValue(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,7 +32,8 @@ class UnitValue(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["value", "unit"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class UnitValue(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
across/sdk/v1/models/user.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: 1.
|
|
8
|
+
The version of the OpenAPI document: 1.6.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -19,6 +19,10 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from across.sdk.v1.models.across_server_routes_v1_user_schemas_group_invite import AcrossServerRoutesV1UserSchemasGroupInvite
|
|
23
|
+
from across.sdk.v1.models.across_server_routes_v1_user_schemas_group_role import AcrossServerRoutesV1UserSchemasGroupRole
|
|
24
|
+
from across.sdk.v1.models.group import Group
|
|
25
|
+
from across.sdk.v1.models.role_base import RoleBase
|
|
22
26
|
from typing import Optional, Set
|
|
23
27
|
from typing_extensions import Self
|
|
24
28
|
|
|
@@ -26,12 +30,16 @@ class User(BaseModel):
|
|
|
26
30
|
"""
|
|
27
31
|
User
|
|
28
32
|
""" # noqa: E501
|
|
29
|
-
|
|
33
|
+
username: StrictStr
|
|
30
34
|
first_name: StrictStr
|
|
31
35
|
last_name: StrictStr
|
|
32
|
-
username: StrictStr
|
|
33
36
|
email: StrictStr
|
|
34
|
-
|
|
37
|
+
id: StrictStr
|
|
38
|
+
groups: List[Group]
|
|
39
|
+
roles: List[RoleBase]
|
|
40
|
+
group_roles: List[AcrossServerRoutesV1UserSchemasGroupRole]
|
|
41
|
+
received_invites: List[AcrossServerRoutesV1UserSchemasGroupInvite]
|
|
42
|
+
__properties: ClassVar[List[str]] = ["username", "first_name", "last_name", "email", "id", "groups", "roles", "group_roles", "received_invites"]
|
|
35
43
|
|
|
36
44
|
model_config = ConfigDict(
|
|
37
45
|
populate_by_name=True,
|
|
@@ -72,6 +80,34 @@ class User(BaseModel):
|
|
|
72
80
|
exclude=excluded_fields,
|
|
73
81
|
exclude_none=True,
|
|
74
82
|
)
|
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
|
|
84
|
+
_items = []
|
|
85
|
+
if self.groups:
|
|
86
|
+
for _item_groups in self.groups:
|
|
87
|
+
if _item_groups:
|
|
88
|
+
_items.append(_item_groups.to_dict())
|
|
89
|
+
_dict['groups'] = _items
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
|
|
91
|
+
_items = []
|
|
92
|
+
if self.roles:
|
|
93
|
+
for _item_roles in self.roles:
|
|
94
|
+
if _item_roles:
|
|
95
|
+
_items.append(_item_roles.to_dict())
|
|
96
|
+
_dict['roles'] = _items
|
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of each item in group_roles (list)
|
|
98
|
+
_items = []
|
|
99
|
+
if self.group_roles:
|
|
100
|
+
for _item_group_roles in self.group_roles:
|
|
101
|
+
if _item_group_roles:
|
|
102
|
+
_items.append(_item_group_roles.to_dict())
|
|
103
|
+
_dict['group_roles'] = _items
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of each item in received_invites (list)
|
|
105
|
+
_items = []
|
|
106
|
+
if self.received_invites:
|
|
107
|
+
for _item_received_invites in self.received_invites:
|
|
108
|
+
if _item_received_invites:
|
|
109
|
+
_items.append(_item_received_invites.to_dict())
|
|
110
|
+
_dict['received_invites'] = _items
|
|
75
111
|
return _dict
|
|
76
112
|
|
|
77
113
|
@classmethod
|
|
@@ -84,11 +120,15 @@ class User(BaseModel):
|
|
|
84
120
|
return cls.model_validate(obj)
|
|
85
121
|
|
|
86
122
|
_obj = cls.model_validate({
|
|
87
|
-
"
|
|
123
|
+
"username": obj.get("username"),
|
|
88
124
|
"first_name": obj.get("first_name"),
|
|
89
125
|
"last_name": obj.get("last_name"),
|
|
90
|
-
"
|
|
91
|
-
"
|
|
126
|
+
"email": obj.get("email"),
|
|
127
|
+
"id": obj.get("id"),
|
|
128
|
+
"groups": [Group.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None,
|
|
129
|
+
"roles": [RoleBase.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
|
|
130
|
+
"group_roles": [AcrossServerRoutesV1UserSchemasGroupRole.from_dict(_item) for _item in obj["group_roles"]] if obj.get("group_roles") is not None else None,
|
|
131
|
+
"received_invites": [AcrossServerRoutesV1UserSchemasGroupInvite.from_dict(_item) for _item in obj["received_invites"]] if obj.get("received_invites") is not None else None
|
|
92
132
|
})
|
|
93
133
|
return _obj
|
|
94
134
|
|