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
|
@@ -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.
|
|
@@ -19,19 +19,22 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from uuid import UUID
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
24
26
|
|
|
25
27
|
class GroupRoleCreate(BaseModel):
|
|
26
28
|
"""
|
|
27
29
|
GroupRoleCreate
|
|
28
30
|
""" # noqa: E501
|
|
29
31
|
name: StrictStr
|
|
30
|
-
permission_ids: List[
|
|
32
|
+
permission_ids: List[UUID]
|
|
31
33
|
__properties: ClassVar[List[str]] = ["name", "permission_ids"]
|
|
32
34
|
|
|
33
35
|
model_config = ConfigDict(
|
|
34
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
35
38
|
validate_assignment=True,
|
|
36
39
|
protected_namespaces=(),
|
|
37
40
|
)
|
|
@@ -43,8 +46,7 @@ class GroupRoleCreate(BaseModel):
|
|
|
43
46
|
|
|
44
47
|
def to_json(self) -> str:
|
|
45
48
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
50
|
|
|
49
51
|
@classmethod
|
|
50
52
|
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.
|
|
@@ -19,9 +19,12 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from uuid import UUID
|
|
23
|
+
from across.sdk.v1.models.across_server_routes_v1_group_role_schemas_group import AcrossServerRoutesV1GroupRoleSchemasGroup
|
|
22
24
|
from across.sdk.v1.models.permission import Permission
|
|
23
25
|
from typing import Optional, Set
|
|
24
26
|
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
25
28
|
|
|
26
29
|
class GroupRoleRead(BaseModel):
|
|
27
30
|
"""
|
|
@@ -29,11 +32,13 @@ class GroupRoleRead(BaseModel):
|
|
|
29
32
|
""" # noqa: E501
|
|
30
33
|
name: StrictStr
|
|
31
34
|
permissions: List[Permission]
|
|
32
|
-
id:
|
|
33
|
-
|
|
35
|
+
id: UUID
|
|
36
|
+
group: AcrossServerRoutesV1GroupRoleSchemasGroup
|
|
37
|
+
__properties: ClassVar[List[str]] = ["name", "permissions", "id", "group"]
|
|
34
38
|
|
|
35
39
|
model_config = ConfigDict(
|
|
36
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
37
42
|
validate_assignment=True,
|
|
38
43
|
protected_namespaces=(),
|
|
39
44
|
)
|
|
@@ -45,8 +50,7 @@ class GroupRoleRead(BaseModel):
|
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
52
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
54
|
|
|
51
55
|
@classmethod
|
|
52
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -75,9 +79,11 @@ class GroupRoleRead(BaseModel):
|
|
|
75
79
|
_items = []
|
|
76
80
|
if self.permissions:
|
|
77
81
|
for _item_permissions in self.permissions:
|
|
78
|
-
if _item_permissions
|
|
79
|
-
_items.append(_item_permissions.to_dict())
|
|
82
|
+
_items.append(_item_permissions.to_dict() if _item_permissions is not None else None)
|
|
80
83
|
_dict['permissions'] = _items
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of group
|
|
85
|
+
if self.group:
|
|
86
|
+
_dict['group'] = self.group.to_dict()
|
|
81
87
|
return _dict
|
|
82
88
|
|
|
83
89
|
@classmethod
|
|
@@ -92,7 +98,8 @@ class GroupRoleRead(BaseModel):
|
|
|
92
98
|
_obj = cls.model_validate({
|
|
93
99
|
"name": obj.get("name"),
|
|
94
100
|
"permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None,
|
|
95
|
-
"id": obj.get("id")
|
|
101
|
+
"id": obj.get("id"),
|
|
102
|
+
"group": AcrossServerRoutesV1GroupRoleSchemasGroup.from_dict(obj["group"]) if obj.get("group") is not None else None
|
|
96
103
|
})
|
|
97
104
|
return _obj
|
|
98
105
|
|
|
@@ -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, Optional
|
|
|
22
22
|
from across.sdk.v1.models.validation_error import ValidationError
|
|
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 HTTPValidationError(BaseModel):
|
|
27
28
|
"""
|
|
@@ -31,7 +32,8 @@ class HTTPValidationError(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["detail"]
|
|
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 HTTPValidationError(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]:
|
|
@@ -73,8 +74,7 @@ class HTTPValidationError(BaseModel):
|
|
|
73
74
|
_items = []
|
|
74
75
|
if self.detail:
|
|
75
76
|
for _item_detail in self.detail:
|
|
76
|
-
if _item_detail
|
|
77
|
-
_items.append(_item_detail.to_dict())
|
|
77
|
+
_items.append(_item_detail.to_dict() if _item_detail is not None else None)
|
|
78
78
|
_dict['detail'] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -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.
|
|
@@ -19,20 +19,23 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from uuid import UUID
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
24
26
|
|
|
25
27
|
class IDNameSchema(BaseModel):
|
|
26
28
|
"""
|
|
27
29
|
IDNameSchema
|
|
28
30
|
""" # noqa: E501
|
|
29
|
-
id:
|
|
31
|
+
id: UUID
|
|
30
32
|
name: StrictStr
|
|
31
33
|
short_name: Optional[StrictStr]
|
|
32
34
|
__properties: ClassVar[List[str]] = ["id", "name", "short_name"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
36
39
|
validate_assignment=True,
|
|
37
40
|
protected_namespaces=(),
|
|
38
41
|
)
|
|
@@ -44,8 +47,7 @@ class IDNameSchema(BaseModel):
|
|
|
44
47
|
|
|
45
48
|
def to_json(self) -> str:
|
|
46
49
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
51
|
|
|
50
52
|
@classmethod
|
|
51
53
|
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.
|
|
@@ -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 Instrument(BaseModel):
|
|
32
35
|
"""
|
|
33
36
|
A Pydantic model class representing a created Instrument Notes ----- Inherits from InstrumentBase Methods ------- from_orm(instrument: InstrumentModel) -> 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 Instrument(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 Instrument(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 Instrument(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 Instrument(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 Instrument(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
|
|
|
@@ -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.
|
|
@@ -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.
|
|
@@ -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.
|
|
@@ -17,23 +17,27 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from uuid import UUID
|
|
22
23
|
from across.sdk.v1.models.visibility_window import VisibilityWindow
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
25
27
|
|
|
26
28
|
class JointVisibilityResult(BaseModel):
|
|
27
29
|
"""
|
|
28
|
-
A Pydantic model class representing the joint visibility calculation parameters. This class is used for joint visibility calculations in the ACROSS SSA system. Parameters ---------- instrument_ids: list[UUID] List of instrument IDs to check visibility against visibility_windows: list[VisibilityWindow] List of joint visibility windows for all the instruments observatory_visibility_windows: dict[UUID, list[VisibilityWindow]] Dictionary mapping instrument IDs to their respective visibility windows
|
|
30
|
+
A Pydantic model class representing the joint visibility calculation parameters. This class is used for joint visibility calculations in the ACROSS SSA system. Parameters ---------- instrument_ids: list[UUID] List of instrument IDs to check visibility against visibility_windows: list[VisibilityWindow] List of joint visibility windows for all the instruments observatory_visibility_windows: dict[UUID, list[VisibilityWindow]] Dictionary mapping instrument IDs to their respective visibility windows warnings: str Optional warnings regarding the joint visibility calculation results
|
|
29
31
|
""" # noqa: E501
|
|
30
|
-
instrument_ids: List[
|
|
32
|
+
instrument_ids: List[UUID]
|
|
31
33
|
visibility_windows: List[VisibilityWindow]
|
|
32
34
|
observatory_visibility_windows: Dict[str, List[VisibilityWindow]]
|
|
33
|
-
|
|
35
|
+
warnings: Optional[StrictStr] = Field(default='These visibility windows are calculated based on publicly available ephemerides and observatory constraints. As a result, they are rough estimates and will not perfectly reflect the target visibility for each observatory. For detailed visibility windows, we recommend visiting the observatory website or requesting information from the individual science teams.', description="Optional warnings regarding the joint visibility calculation results")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["instrument_ids", "visibility_windows", "observatory_visibility_windows", "warnings"]
|
|
34
37
|
|
|
35
38
|
model_config = ConfigDict(
|
|
36
|
-
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
37
41
|
validate_assignment=True,
|
|
38
42
|
protected_namespaces=(),
|
|
39
43
|
)
|
|
@@ -45,8 +49,7 @@ class JointVisibilityResult(BaseModel):
|
|
|
45
49
|
|
|
46
50
|
def to_json(self) -> str:
|
|
47
51
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
53
|
|
|
51
54
|
@classmethod
|
|
52
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -75,17 +78,15 @@ class JointVisibilityResult(BaseModel):
|
|
|
75
78
|
_items = []
|
|
76
79
|
if self.visibility_windows:
|
|
77
80
|
for _item_visibility_windows in self.visibility_windows:
|
|
78
|
-
if _item_visibility_windows
|
|
79
|
-
_items.append(_item_visibility_windows.to_dict())
|
|
81
|
+
_items.append(_item_visibility_windows.to_dict() if _item_visibility_windows is not None else None)
|
|
80
82
|
_dict['visibility_windows'] = _items
|
|
81
83
|
# override the default output from pydantic by calling `to_dict()` of each value in observatory_visibility_windows (dict of array)
|
|
82
84
|
_field_dict_of_array = {}
|
|
83
85
|
if self.observatory_visibility_windows:
|
|
84
86
|
for _key_observatory_visibility_windows in self.observatory_visibility_windows:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
]
|
|
87
|
+
_field_dict_of_array[_key_observatory_visibility_windows] = [
|
|
88
|
+
_item.to_dict() if _item is not None else None for _item in self.observatory_visibility_windows[_key_observatory_visibility_windows]
|
|
89
|
+
] if self.observatory_visibility_windows[_key_observatory_visibility_windows] is not None else None
|
|
89
90
|
_dict['observatory_visibility_windows'] = _field_dict_of_array
|
|
90
91
|
return _dict
|
|
91
92
|
|
|
@@ -101,14 +102,13 @@ class JointVisibilityResult(BaseModel):
|
|
|
101
102
|
_obj = cls.model_validate({
|
|
102
103
|
"instrument_ids": obj.get("instrument_ids"),
|
|
103
104
|
"visibility_windows": [VisibilityWindow.from_dict(_item) for _item in obj["visibility_windows"]] if obj.get("visibility_windows") is not None else None,
|
|
104
|
-
"observatory_visibility_windows":
|
|
105
|
-
(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
)
|
|
105
|
+
"observatory_visibility_windows": {
|
|
106
|
+
_k: [VisibilityWindow.from_dict(_item) for _item in _v] if _v is not None else None
|
|
107
|
+
for _k, _v in obj["observatory_visibility_windows"].items()
|
|
108
|
+
}
|
|
109
|
+
if obj.get("observatory_visibility_windows") is not None
|
|
110
|
+
else None,
|
|
111
|
+
"warnings": obj.get("warnings") if obj.get("warnings") is not None else 'These visibility windows are calculated based on publicly available ephemerides and observatory constraints. As a result, they are rough estimates and will not perfectly reflect the target visibility for each observatory. For detailed visibility windows, we recommend visiting the observatory website or requesting information from the individual science teams.'
|
|
112
112
|
})
|
|
113
113
|
return _obj
|
|
114
114
|
|
|
@@ -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
|
|
|
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 JPLParameters(BaseModel):
|
|
26
27
|
"""
|
|
@@ -30,7 +31,8 @@ class JPLParameters(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["naif_id"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
34
36
|
validate_assignment=True,
|
|
35
37
|
protected_namespaces=(),
|
|
36
38
|
)
|
|
@@ -42,8 +44,7 @@ class JPLParameters(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -0,0 +1,128 @@
|
|
|
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, StrictFloat, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from uuid import UUID
|
|
23
|
+
from across.sdk.v1.models.localization_contour_base import LocalizationContourBase
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class Localization(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
A Pydantic model class representing a Localization in the ACROSS system. Inherits from LocalizationBase Parameters ---------- id : UUID Localization id broker_alert_id : UUID ID of the alert associated with this localization broker_event_id: UUID ID of the event associated with this localization
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
ra: Optional[Union[StrictFloat, StrictInt]] = None
|
|
33
|
+
dec: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
+
contours: Optional[List[LocalizationContourBase]] = None
|
|
35
|
+
probability_enclosed: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
|
+
id: UUID
|
|
37
|
+
broker_event_id: UUID
|
|
38
|
+
broker_alert_id: UUID
|
|
39
|
+
__properties: ClassVar[List[str]] = ["ra", "dec", "contours", "probability_enclosed", "id", "broker_event_id", "broker_alert_id"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
validate_by_name=True,
|
|
43
|
+
validate_by_alias=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of Localization from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each item in contours (list)
|
|
81
|
+
_items = []
|
|
82
|
+
if self.contours:
|
|
83
|
+
for _item_contours in self.contours:
|
|
84
|
+
_items.append(_item_contours.to_dict() if _item_contours is not None else None)
|
|
85
|
+
_dict['contours'] = _items
|
|
86
|
+
# set to None if ra (nullable) is None
|
|
87
|
+
# and model_fields_set contains the field
|
|
88
|
+
if self.ra is None and "ra" in self.model_fields_set:
|
|
89
|
+
_dict['ra'] = None
|
|
90
|
+
|
|
91
|
+
# set to None if dec (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.dec is None and "dec" in self.model_fields_set:
|
|
94
|
+
_dict['dec'] = None
|
|
95
|
+
|
|
96
|
+
# set to None if contours (nullable) is None
|
|
97
|
+
# and model_fields_set contains the field
|
|
98
|
+
if self.contours is None and "contours" in self.model_fields_set:
|
|
99
|
+
_dict['contours'] = None
|
|
100
|
+
|
|
101
|
+
# set to None if probability_enclosed (nullable) is None
|
|
102
|
+
# and model_fields_set contains the field
|
|
103
|
+
if self.probability_enclosed is None and "probability_enclosed" in self.model_fields_set:
|
|
104
|
+
_dict['probability_enclosed'] = None
|
|
105
|
+
|
|
106
|
+
return _dict
|
|
107
|
+
|
|
108
|
+
@classmethod
|
|
109
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
110
|
+
"""Create an instance of Localization from a dict"""
|
|
111
|
+
if obj is None:
|
|
112
|
+
return None
|
|
113
|
+
|
|
114
|
+
if not isinstance(obj, dict):
|
|
115
|
+
return cls.model_validate(obj)
|
|
116
|
+
|
|
117
|
+
_obj = cls.model_validate({
|
|
118
|
+
"ra": obj.get("ra"),
|
|
119
|
+
"dec": obj.get("dec"),
|
|
120
|
+
"contours": [LocalizationContourBase.from_dict(_item) for _item in obj["contours"]] if obj.get("contours") is not None else None,
|
|
121
|
+
"probability_enclosed": obj.get("probability_enclosed"),
|
|
122
|
+
"id": obj.get("id"),
|
|
123
|
+
"broker_event_id": obj.get("broker_event_id"),
|
|
124
|
+
"broker_alert_id": obj.get("broker_alert_id")
|
|
125
|
+
})
|
|
126
|
+
return _obj
|
|
127
|
+
|
|
128
|
+
|