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.
Files changed (156) hide show
  1. across/sdk/v1/__init__.py +76 -17
  2. across/sdk/v1/api/__init__.py +3 -1
  3. across/sdk/v1/api/auth_api.py +17 -286
  4. across/sdk/v1/api/broker_alert_api.py +1017 -0
  5. across/sdk/v1/api/broker_event_api.py +697 -0
  6. across/sdk/v1/api/filter_api.py +20 -20
  7. across/sdk/v1/api/group_api.py +31 -281
  8. across/sdk/v1/api/group_invite_api.py +65 -66
  9. across/sdk/v1/api/group_role_api.py +105 -106
  10. across/sdk/v1/api/instrument_api.py +20 -20
  11. across/sdk/v1/api/internal_api.py +20 -21
  12. across/sdk/v1/api/observation_api.py +762 -135
  13. across/sdk/v1/api/observation_request_api.py +2108 -0
  14. across/sdk/v1/api/observatory_api.py +24 -25
  15. across/sdk/v1/api/permission_api.py +5 -6
  16. across/sdk/v1/api/role_api.py +1 -1
  17. across/sdk/v1/api/schedule_api.py +84 -86
  18. across/sdk/v1/api/service_account_api.py +125 -126
  19. across/sdk/v1/api/telescope_api.py +26 -26
  20. across/sdk/v1/api/tle_api.py +7 -8
  21. across/sdk/v1/api/tools_api.py +55 -55
  22. across/sdk/v1/api/user_api.py +84 -333
  23. across/sdk/v1/api_client.py +111 -47
  24. across/sdk/v1/configuration.py +106 -33
  25. across/sdk/v1/exceptions.py +8 -6
  26. across/sdk/v1/models/__init__.py +36 -9
  27. across/sdk/v1/models/access_token_response.py +5 -4
  28. across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +106 -0
  29. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group.py +93 -0
  30. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +20 -15
  31. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +107 -0
  32. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +7 -5
  33. across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +12 -12
  34. across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +8 -7
  35. across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +95 -0
  36. across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +11 -10
  37. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +8 -6
  38. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +106 -0
  39. across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +14 -16
  40. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +8 -7
  41. across/sdk/v1/models/bandpass.py +1 -1
  42. across/sdk/v1/models/bandpass_type.py +1 -1
  43. across/sdk/v1/models/broker_alert.py +106 -0
  44. across/sdk/v1/models/broker_alert_create.py +115 -0
  45. across/sdk/v1/models/broker_alert_data_source.py +39 -0
  46. across/sdk/v1/models/broker_alert_status.py +41 -0
  47. across/sdk/v1/models/broker_event.py +115 -0
  48. across/sdk/v1/models/broker_event_type.py +41 -0
  49. across/sdk/v1/models/constrained_date.py +8 -6
  50. across/sdk/v1/models/constraint_reason.py +5 -4
  51. across/sdk/v1/models/constraint_type.py +1 -1
  52. across/sdk/v1/models/coordinate.py +5 -4
  53. across/sdk/v1/models/date_range.py +5 -4
  54. across/sdk/v1/models/date_range_create.py +96 -0
  55. across/sdk/v1/models/depth_unit.py +1 -1
  56. across/sdk/v1/models/energy_bandpass.py +5 -4
  57. across/sdk/v1/models/energy_unit.py +1 -1
  58. across/sdk/v1/models/ephemeris_type.py +1 -1
  59. across/sdk/v1/models/filter.py +8 -6
  60. across/sdk/v1/models/frequency_bandpass.py +5 -4
  61. across/sdk/v1/models/frequency_unit.py +1 -1
  62. across/sdk/v1/models/grant_type.py +1 -1
  63. across/sdk/v1/models/ground_parameters.py +5 -4
  64. across/sdk/v1/models/group.py +5 -15
  65. across/sdk/v1/models/group_base.py +93 -0
  66. across/sdk/v1/models/group_invite.py +1 -1
  67. across/sdk/v1/models/group_invite_create.py +5 -4
  68. across/sdk/v1/models/group_invite_group_details.py +7 -5
  69. across/sdk/v1/models/group_read.py +7 -5
  70. across/sdk/v1/models/group_role.py +37 -6
  71. across/sdk/v1/models/group_role_create.py +7 -5
  72. across/sdk/v1/models/group_role_read.py +16 -9
  73. across/sdk/v1/models/http_validation_error.py +6 -6
  74. across/sdk/v1/models/id_name_schema.py +7 -5
  75. across/sdk/v1/models/instrument.py +31 -15
  76. across/sdk/v1/models/ivoa_obs_category.py +1 -1
  77. across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
  78. across/sdk/v1/models/joint_visibility_result.py +23 -23
  79. across/sdk/v1/models/jpl_parameters.py +5 -4
  80. across/sdk/v1/models/localization.py +128 -0
  81. across/sdk/v1/models/localization_contour_base.py +95 -0
  82. across/sdk/v1/models/localization_create.py +121 -0
  83. across/sdk/v1/models/location_inner.py +1 -1
  84. across/sdk/v1/models/name_resolver.py +5 -4
  85. across/sdk/v1/models/nullable_date_range.py +5 -4
  86. across/sdk/v1/models/nullable_end_date_range.py +96 -0
  87. across/sdk/v1/models/observation.py +11 -10
  88. across/sdk/v1/models/observation_create.py +9 -8
  89. across/sdk/v1/models/observation_footprint.py +10 -9
  90. across/sdk/v1/models/observation_footprint_create.py +6 -6
  91. across/sdk/v1/models/observation_request.py +202 -0
  92. across/sdk/v1/models/observation_request_create.py +148 -0
  93. across/sdk/v1/models/observation_request_create_many.py +95 -0
  94. across/sdk/v1/models/observation_request_status.py +40 -0
  95. across/sdk/v1/models/observation_request_update.py +213 -0
  96. across/sdk/v1/models/observation_request_version.py +99 -0
  97. across/sdk/v1/models/observation_status.py +1 -1
  98. across/sdk/v1/models/observation_strategy.py +1 -1
  99. across/sdk/v1/models/observation_type.py +1 -1
  100. across/sdk/v1/models/observation_window.py +134 -0
  101. across/sdk/v1/models/observation_window1.py +140 -0
  102. across/sdk/v1/models/observatory.py +9 -9
  103. across/sdk/v1/models/observatory_ephemeris_type.py +5 -4
  104. across/sdk/v1/models/observatory_type.py +1 -1
  105. across/sdk/v1/models/observing_proposal.py +93 -0
  106. across/sdk/v1/models/observing_proposal_create.py +98 -0
  107. across/sdk/v1/models/page_broker_alert.py +116 -0
  108. across/sdk/v1/models/page_broker_event.py +116 -0
  109. across/sdk/v1/models/page_observation.py +6 -6
  110. across/sdk/v1/models/page_observation_request.py +116 -0
  111. across/sdk/v1/models/page_schedule.py +6 -6
  112. across/sdk/v1/models/parameters.py +1 -1
  113. across/sdk/v1/models/permission.py +7 -5
  114. across/sdk/v1/models/point.py +5 -4
  115. across/sdk/v1/models/proper_motion.py +93 -0
  116. across/sdk/v1/models/role.py +4 -4
  117. across/sdk/v1/models/role_base.py +7 -5
  118. across/sdk/v1/models/schedule.py +10 -9
  119. across/sdk/v1/models/schedule_cadence.py +8 -6
  120. across/sdk/v1/models/schedule_create.py +8 -7
  121. across/sdk/v1/models/schedule_create_many.py +9 -8
  122. across/sdk/v1/models/schedule_fidelity.py +1 -1
  123. across/sdk/v1/models/schedule_status.py +1 -1
  124. across/sdk/v1/models/service_account.py +1 -1
  125. across/sdk/v1/models/service_account_create.py +5 -4
  126. across/sdk/v1/models/service_account_secret.py +7 -5
  127. across/sdk/v1/models/service_account_update.py +5 -4
  128. across/sdk/v1/models/setting.py +100 -0
  129. across/sdk/v1/models/setting_type.py +39 -0
  130. across/sdk/v1/models/spice_parameters.py +5 -4
  131. across/sdk/v1/models/system_service_account.py +9 -9
  132. across/sdk/v1/models/telescope.py +9 -9
  133. across/sdk/v1/models/telescope_instrument.py +31 -15
  134. across/sdk/v1/models/tle.py +5 -4
  135. across/sdk/v1/models/tle_create.py +5 -4
  136. across/sdk/v1/models/tle_parameters.py +5 -4
  137. across/sdk/v1/models/unit_value.py +5 -4
  138. across/sdk/v1/models/user.py +47 -7
  139. across/sdk/v1/models/user_create.py +5 -4
  140. across/sdk/v1/models/user_info.py +7 -5
  141. across/sdk/v1/models/user_update.py +5 -4
  142. across/sdk/v1/models/validation_error.py +21 -12
  143. across/sdk/v1/models/validation_error_loc_inner.py +1 -1
  144. across/sdk/v1/models/visibility_result.py +14 -11
  145. across/sdk/v1/models/visibility_type.py +1 -1
  146. across/sdk/v1/models/visibility_window.py +5 -4
  147. across/sdk/v1/models/wavelength_bandpass.py +5 -4
  148. across/sdk/v1/models/wavelength_unit.py +1 -1
  149. across/sdk/v1/models/window.py +5 -4
  150. across/sdk/v1/rest.py +88 -12
  151. {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/METADATA +122 -45
  152. across_server_openapi_python-2.0.0.dist-info/RECORD +162 -0
  153. {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/WHEEL +1 -1
  154. across_server_openapi_python-1.3.0.dist-info/RECORD +0 -126
  155. {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
  156. {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,106 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from uuid import UUID
24
+ from across.sdk.v1.models.broker_alert_data_source import BrokerAlertDataSource
25
+ from across.sdk.v1.models.broker_alert_status import BrokerAlertStatus
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+ from pydantic_core import to_jsonable_python
29
+
30
+ class BrokerAlert(BaseModel):
31
+ """
32
+ A Pydantic model class representing a BrokerAlert in the ACROSS system. Parameters ---------- id : UUID Broker alert id status : BrokerAlertStatus Status of the alert broker_name : str Name of the broker issuing the alert data_source : BrokerAlertDataSource Source of the alert external_event_id: str External name of the BrokerEvent associated with this alert broker_event_id: uuid ID of the associated BrokerEvent in the ACROSS system broker_received_on: datetime Datetime the broker received this alert payload: dict The alert payload, containing unstructured data about the event
33
+ """ # noqa: E501
34
+ id: UUID
35
+ status: BrokerAlertStatus
36
+ broker_name: StrictStr
37
+ data_source: BrokerAlertDataSource
38
+ external_event_id: StrictStr
39
+ broker_event_id: UUID
40
+ broker_received_on: datetime
41
+ payload: Dict[str, Any]
42
+ __properties: ClassVar[List[str]] = ["id", "status", "broker_name", "data_source", "external_event_id", "broker_event_id", "broker_received_on", "payload"]
43
+
44
+ model_config = ConfigDict(
45
+ validate_by_name=True,
46
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(self.to_dict()))
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of BrokerAlert from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ """
75
+ excluded_fields: Set[str] = set([
76
+ ])
77
+
78
+ _dict = self.model_dump(
79
+ by_alias=True,
80
+ exclude=excluded_fields,
81
+ exclude_none=True,
82
+ )
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of BrokerAlert from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "id": obj.get("id"),
96
+ "status": obj.get("status"),
97
+ "broker_name": obj.get("broker_name"),
98
+ "data_source": obj.get("data_source"),
99
+ "external_event_id": obj.get("external_event_id"),
100
+ "broker_event_id": obj.get("broker_event_id"),
101
+ "broker_received_on": obj.get("broker_received_on"),
102
+ "payload": obj.get("payload")
103
+ })
104
+ return _obj
105
+
106
+
@@ -0,0 +1,115 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from across.sdk.v1.models.broker_alert_data_source import BrokerAlertDataSource
24
+ from across.sdk.v1.models.broker_alert_status import BrokerAlertStatus
25
+ from across.sdk.v1.models.broker_event_type import BrokerEventType
26
+ from across.sdk.v1.models.localization_create import LocalizationCreate
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+ from pydantic_core import to_jsonable_python
30
+
31
+ class BrokerAlertCreate(BaseModel):
32
+ """
33
+ A Pydantic model class representing a BrokerEvent to be created in the ACROSS system. Parameters ---------- broker_event_datetime : datetime Datetime the associated broker event was discovered or detected broker_event_type : BrokerEventType Astrophysical type or classification of the broker event broker_event_name : str Name of the broker event localization: Localization Localization of the event from this alert Methods to_orm(self) -> BrokerAlertModel Method that creates the ORM record for a broker alert to be serialized into the database. This method does not instantiate the associated broker event or localization; these records are created within the broker alert service.
34
+ """ # noqa: E501
35
+ status: BrokerAlertStatus
36
+ broker_name: StrictStr
37
+ data_source: BrokerAlertDataSource
38
+ broker_received_on: datetime
39
+ payload: Dict[str, Any]
40
+ broker_event_datetime: datetime
41
+ broker_event_type: BrokerEventType
42
+ broker_event_name: StrictStr
43
+ localizations: List[LocalizationCreate]
44
+ __properties: ClassVar[List[str]] = ["status", "broker_name", "data_source", "broker_received_on", "payload", "broker_event_datetime", "broker_event_type", "broker_event_name", "localizations"]
45
+
46
+ model_config = ConfigDict(
47
+ validate_by_name=True,
48
+ validate_by_alias=True,
49
+ validate_assignment=True,
50
+ protected_namespaces=(),
51
+ )
52
+
53
+
54
+ def to_str(self) -> str:
55
+ """Returns the string representation of the model using alias"""
56
+ return pprint.pformat(self.model_dump(by_alias=True))
57
+
58
+ def to_json(self) -> str:
59
+ """Returns the JSON representation of the model using alias"""
60
+ return json.dumps(to_jsonable_python(self.to_dict()))
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of BrokerAlertCreate from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ """
77
+ excluded_fields: Set[str] = set([
78
+ ])
79
+
80
+ _dict = self.model_dump(
81
+ by_alias=True,
82
+ exclude=excluded_fields,
83
+ exclude_none=True,
84
+ )
85
+ # override the default output from pydantic by calling `to_dict()` of each item in localizations (list)
86
+ _items = []
87
+ if self.localizations:
88
+ for _item_localizations in self.localizations:
89
+ _items.append(_item_localizations.to_dict() if _item_localizations is not None else None)
90
+ _dict['localizations'] = _items
91
+ return _dict
92
+
93
+ @classmethod
94
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
95
+ """Create an instance of BrokerAlertCreate from a dict"""
96
+ if obj is None:
97
+ return None
98
+
99
+ if not isinstance(obj, dict):
100
+ return cls.model_validate(obj)
101
+
102
+ _obj = cls.model_validate({
103
+ "status": obj.get("status"),
104
+ "broker_name": obj.get("broker_name"),
105
+ "data_source": obj.get("data_source"),
106
+ "broker_received_on": obj.get("broker_received_on"),
107
+ "payload": obj.get("payload"),
108
+ "broker_event_datetime": obj.get("broker_event_datetime"),
109
+ "broker_event_type": obj.get("broker_event_type"),
110
+ "broker_event_name": obj.get("broker_event_name"),
111
+ "localizations": [LocalizationCreate.from_dict(_item) for _item in obj["localizations"]] if obj.get("localizations") is not None else None
112
+ })
113
+ return _obj
114
+
115
+
@@ -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 BrokerAlertDataSource(str, Enum):
22
+ """
23
+ BrokerAlertDataSource
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ TNS = 'tns'
30
+ BROKER = 'broker'
31
+ IGWN = 'igwn'
32
+ GCN = 'gcn'
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of BrokerAlertDataSource from a JSON string"""
37
+ return cls(json.loads(json_str))
38
+
39
+
@@ -0,0 +1,41 @@
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 BrokerAlertStatus(str, Enum):
22
+ """
23
+ BrokerAlertStatus
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ INITIAL = 'initial'
30
+ PRELIMINARY = 'preliminary'
31
+ CONFIRMED = 'confirmed'
32
+ RETRACTED = 'retracted'
33
+ EARLY_WARNING = 'early_warning'
34
+ CLASSIFIED = 'classified'
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of BrokerAlertStatus from a JSON string"""
39
+ return cls(json.loads(json_str))
40
+
41
+
@@ -0,0 +1,115 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from uuid import UUID
24
+ from across.sdk.v1.models.broker_alert import BrokerAlert
25
+ from across.sdk.v1.models.broker_event_type import BrokerEventType
26
+ from across.sdk.v1.models.localization import Localization
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+ from pydantic_core import to_jsonable_python
30
+
31
+ class BrokerEvent(BaseModel):
32
+ """
33
+ A Pydantic model class representing a BrokerEvent in the ACROSS system. Parameters ---------- localizations : list[Localization] Localizations associated with this event alerts : list[BrokerAlert] Alerts associated with this event Methods -------- from_orm: Converts ORM BrokerEvent model to a schemas.BrokerEvent object
34
+ """ # noqa: E501
35
+ id: UUID
36
+ event_datetime: datetime
37
+ type: BrokerEventType
38
+ name: StrictStr
39
+ localizations: List[Localization]
40
+ broker_alerts: List[BrokerAlert]
41
+ __properties: ClassVar[List[str]] = ["id", "event_datetime", "type", "name", "localizations", "broker_alerts"]
42
+
43
+ model_config = ConfigDict(
44
+ validate_by_name=True,
45
+ validate_by_alias=True,
46
+ validate_assignment=True,
47
+ protected_namespaces=(),
48
+ )
49
+
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ return json.dumps(to_jsonable_python(self.to_dict()))
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> Optional[Self]:
61
+ """Create an instance of BrokerEvent from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self) -> Dict[str, Any]:
65
+ """Return the dictionary representation of the model using alias.
66
+
67
+ This has the following differences from calling pydantic's
68
+ `self.model_dump(by_alias=True)`:
69
+
70
+ * `None` is only added to the output dict for nullable fields that
71
+ were set at model initialization. Other fields with value `None`
72
+ are ignored.
73
+ """
74
+ excluded_fields: Set[str] = set([
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ # override the default output from pydantic by calling `to_dict()` of each item in localizations (list)
83
+ _items = []
84
+ if self.localizations:
85
+ for _item_localizations in self.localizations:
86
+ _items.append(_item_localizations.to_dict() if _item_localizations is not None else None)
87
+ _dict['localizations'] = _items
88
+ # override the default output from pydantic by calling `to_dict()` of each item in broker_alerts (list)
89
+ _items = []
90
+ if self.broker_alerts:
91
+ for _item_broker_alerts in self.broker_alerts:
92
+ _items.append(_item_broker_alerts.to_dict() if _item_broker_alerts is not None else None)
93
+ _dict['broker_alerts'] = _items
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of BrokerEvent from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate({
106
+ "id": obj.get("id"),
107
+ "event_datetime": obj.get("event_datetime"),
108
+ "type": obj.get("type"),
109
+ "name": obj.get("name"),
110
+ "localizations": [Localization.from_dict(_item) for _item in obj["localizations"]] if obj.get("localizations") is not None else None,
111
+ "broker_alerts": [BrokerAlert.from_dict(_item) for _item in obj["broker_alerts"]] if obj.get("broker_alerts") is not None else None
112
+ })
113
+ return _obj
114
+
115
+
@@ -0,0 +1,41 @@
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 BrokerEventType(str, Enum):
22
+ """
23
+ BrokerEventType
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ TRANSIENT = 'transient'
30
+ GW = 'gw'
31
+ NEUTRINO = 'neutrino'
32
+ GRB = 'grb'
33
+ FRB = 'frb'
34
+ XRT = 'xrt'
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of BrokerEventType from a JSON string"""
39
+ return cls(json.loads(json_str))
40
+
41
+
@@ -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.4.0
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,11 +18,13 @@ 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
22
22
  from typing import Any, ClassVar, Dict, List
23
+ from uuid import UUID
23
24
  from across.sdk.v1.models.constraint_type import ConstraintType
24
25
  from typing import Optional, Set
25
26
  from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
26
28
 
27
29
  class ConstrainedDate(BaseModel):
28
30
  """
@@ -30,11 +32,12 @@ class ConstrainedDate(BaseModel):
30
32
  """ # noqa: E501
31
33
  datetime: datetime
32
34
  constraint: ConstraintType
33
- observatory_id: StrictStr
35
+ observatory_id: UUID
34
36
  __properties: ClassVar[List[str]] = ["datetime", "constraint", "observatory_id"]
35
37
 
36
38
  model_config = ConfigDict(
37
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
38
41
  validate_assignment=True,
39
42
  protected_namespaces=(),
40
43
  )
@@ -46,8 +49,7 @@ class ConstrainedDate(BaseModel):
46
49
 
47
50
  def to_json(self) -> str:
48
51
  """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())
52
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
53
 
52
54
  @classmethod
53
55
  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: 1.4.0
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, 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 ConstraintReason(BaseModel):
26
27
  """
@@ -31,7 +32,8 @@ class ConstraintReason(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["start_reason", "end_reason"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
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 ConstraintReason(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
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: 1.4.0
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: 1.4.0
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, Union
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 Coordinate(BaseModel):
27
28
  """
@@ -32,7 +33,8 @@ class Coordinate(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["ra", "dec"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -44,8 +46,7 @@ class Coordinate(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
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: 1.4.0
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 pydantic import BaseModel, ConfigDict
22
22
  from typing import Any, ClassVar, Dict, List
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 DateRange(BaseModel):
27
28
  """
@@ -32,7 +33,8 @@ class DateRange(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["begin", "end"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -44,8 +46,7 @@ class DateRange(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]: