across-server-openapi-python 1.2.0__py3-none-any.whl → 1.4.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 (137) hide show
  1. across/sdk/v1/__init__.py +41 -7
  2. across/sdk/v1/api/__init__.py +3 -0
  3. across/sdk/v1/api/auth_api.py +269 -1
  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 +1 -1
  7. across/sdk/v1/api/group_api.py +250 -1
  8. across/sdk/v1/api/group_invite_api.py +1 -1
  9. across/sdk/v1/api/group_role_api.py +7 -7
  10. across/sdk/v1/api/instrument_api.py +1 -1
  11. across/sdk/v1/api/internal_api.py +2 -2
  12. across/sdk/v1/api/observation_api.py +682 -52
  13. across/sdk/v1/api/observatory_api.py +1 -1
  14. across/sdk/v1/api/permission_api.py +1 -1
  15. across/sdk/v1/api/role_api.py +552 -0
  16. across/sdk/v1/api/schedule_api.py +1 -1
  17. across/sdk/v1/api/service_account_api.py +7 -7
  18. across/sdk/v1/api/telescope_api.py +35 -1
  19. across/sdk/v1/api/tle_api.py +1 -1
  20. across/sdk/v1/api/tools_api.py +1 -1
  21. across/sdk/v1/api/user_api.py +265 -17
  22. across/sdk/v1/api_client.py +1 -1
  23. across/sdk/v1/configuration.py +4 -4
  24. across/sdk/v1/exceptions.py +1 -1
  25. across/sdk/v1/models/__init__.py +18 -4
  26. across/sdk/v1/models/access_token_response.py +1 -1
  27. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group.py +91 -0
  28. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +1 -1
  29. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +1 -1
  30. across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +7 -7
  31. across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
  32. across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +95 -0
  33. across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
  34. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +1 -1
  35. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +105 -0
  36. across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +4 -4
  37. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +1 -1
  38. across/sdk/v1/models/bandpass.py +1 -1
  39. across/sdk/v1/models/bandpass_type.py +1 -1
  40. across/sdk/v1/models/broker_alert.py +104 -0
  41. across/sdk/v1/models/broker_alert_create.py +115 -0
  42. across/sdk/v1/models/broker_alert_data_source.py +39 -0
  43. across/sdk/v1/models/broker_alert_status.py +41 -0
  44. across/sdk/v1/models/broker_event.py +115 -0
  45. across/sdk/v1/models/broker_event_type.py +41 -0
  46. across/sdk/v1/models/constrained_date.py +4 -7
  47. across/sdk/v1/models/constraint_reason.py +1 -1
  48. across/sdk/v1/models/constraint_type.py +1 -1
  49. across/sdk/v1/models/coordinate.py +1 -1
  50. across/sdk/v1/models/date_range.py +1 -1
  51. across/sdk/v1/models/depth_unit.py +1 -1
  52. across/sdk/v1/models/energy_bandpass.py +1 -1
  53. across/sdk/v1/models/energy_unit.py +1 -1
  54. across/sdk/v1/models/ephemeris_type.py +1 -1
  55. across/sdk/v1/models/filter.py +1 -1
  56. across/sdk/v1/models/frequency_bandpass.py +1 -1
  57. across/sdk/v1/models/frequency_unit.py +1 -1
  58. across/sdk/v1/models/grant_type.py +1 -1
  59. across/sdk/v1/models/ground_parameters.py +1 -1
  60. across/sdk/v1/models/group.py +4 -4
  61. across/sdk/v1/models/group_base.py +91 -0
  62. across/sdk/v1/models/group_invite.py +1 -1
  63. across/sdk/v1/models/group_invite_create.py +1 -1
  64. across/sdk/v1/models/group_invite_group_details.py +1 -1
  65. across/sdk/v1/models/group_read.py +1 -1
  66. across/sdk/v1/models/group_role.py +37 -6
  67. across/sdk/v1/models/group_role_create.py +1 -1
  68. across/sdk/v1/models/group_role_read.py +9 -3
  69. across/sdk/v1/models/http_validation_error.py +1 -1
  70. across/sdk/v1/models/id_name_schema.py +1 -1
  71. across/sdk/v1/models/instrument.py +1 -1
  72. across/sdk/v1/models/ivoa_obs_category.py +1 -1
  73. across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
  74. across/sdk/v1/models/joint_visibility_result.py +1 -1
  75. across/sdk/v1/models/jpl_parameters.py +1 -1
  76. across/sdk/v1/models/localization.py +127 -0
  77. across/sdk/v1/models/localization_contour_base.py +95 -0
  78. across/sdk/v1/models/localization_create.py +121 -0
  79. across/sdk/v1/models/location_inner.py +138 -0
  80. across/sdk/v1/models/name_resolver.py +1 -1
  81. across/sdk/v1/models/nullable_date_range.py +1 -1
  82. across/sdk/v1/models/observation.py +1 -1
  83. across/sdk/v1/models/observation_create.py +1 -1
  84. across/sdk/v1/models/observation_footprint.py +1 -1
  85. across/sdk/v1/models/observation_footprint_create.py +1 -1
  86. across/sdk/v1/models/observation_status.py +1 -1
  87. across/sdk/v1/models/observation_strategy.py +1 -1
  88. across/sdk/v1/models/observation_type.py +1 -1
  89. across/sdk/v1/models/observatory.py +1 -1
  90. across/sdk/v1/models/observatory_ephemeris_type.py +1 -1
  91. across/sdk/v1/models/observatory_type.py +1 -1
  92. across/sdk/v1/models/page_broker_alert.py +116 -0
  93. across/sdk/v1/models/page_broker_event.py +116 -0
  94. across/sdk/v1/models/page_observation.py +1 -1
  95. across/sdk/v1/models/page_schedule.py +1 -1
  96. across/sdk/v1/models/parameters.py +1 -1
  97. across/sdk/v1/models/permission.py +1 -1
  98. across/sdk/v1/models/point.py +1 -1
  99. across/sdk/v1/models/role.py +99 -0
  100. across/sdk/v1/models/role_base.py +1 -1
  101. across/sdk/v1/models/schedule.py +1 -1
  102. across/sdk/v1/models/schedule_cadence.py +1 -1
  103. across/sdk/v1/models/schedule_create.py +1 -1
  104. across/sdk/v1/models/schedule_create_many.py +1 -1
  105. across/sdk/v1/models/schedule_fidelity.py +1 -1
  106. across/sdk/v1/models/schedule_status.py +1 -1
  107. across/sdk/v1/models/service_account.py +1 -1
  108. across/sdk/v1/models/service_account_create.py +1 -1
  109. across/sdk/v1/models/service_account_secret.py +1 -1
  110. across/sdk/v1/models/service_account_update.py +1 -1
  111. across/sdk/v1/models/spice_parameters.py +1 -1
  112. across/sdk/v1/models/system_service_account.py +1 -1
  113. across/sdk/v1/models/telescope.py +1 -1
  114. across/sdk/v1/models/telescope_instrument.py +1 -1
  115. across/sdk/v1/models/tle.py +1 -1
  116. across/sdk/v1/models/tle_create.py +1 -1
  117. across/sdk/v1/models/tle_parameters.py +1 -1
  118. across/sdk/v1/models/unit_value.py +1 -1
  119. across/sdk/v1/models/user.py +37 -7
  120. across/sdk/v1/models/user_create.py +1 -1
  121. across/sdk/v1/models/user_info.py +1 -1
  122. across/sdk/v1/models/user_update.py +1 -1
  123. across/sdk/v1/models/validation_error.py +1 -1
  124. across/sdk/v1/models/validation_error_loc_inner.py +1 -1
  125. across/sdk/v1/models/visibility_result.py +1 -1
  126. across/sdk/v1/models/visibility_type.py +1 -1
  127. across/sdk/v1/models/visibility_window.py +1 -1
  128. across/sdk/v1/models/wavelength_bandpass.py +1 -1
  129. across/sdk/v1/models/wavelength_unit.py +1 -1
  130. across/sdk/v1/models/window.py +1 -1
  131. across/sdk/v1/rest.py +1 -1
  132. {across_server_openapi_python-1.2.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/METADATA +45 -29
  133. across_server_openapi_python-1.4.0.dist-info/RECORD +143 -0
  134. across_server_openapi_python-1.2.0.dist-info/RECORD +0 -121
  135. {across_server_openapi_python-1.2.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/WHEEL +0 -0
  136. {across_server_openapi_python-1.2.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/licenses/LICENSE +0 -0
  137. {across_server_openapi_python-1.2.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,104 @@
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: 1.6.0
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 typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class BrokerAlert(BaseModel):
29
+ """
30
+ 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
31
+ """ # noqa: E501
32
+ id: StrictStr
33
+ status: BrokerAlertStatus
34
+ broker_name: StrictStr
35
+ data_source: BrokerAlertDataSource
36
+ external_event_id: StrictStr
37
+ broker_event_id: StrictStr
38
+ broker_received_on: datetime
39
+ payload: Dict[str, Any]
40
+ __properties: ClassVar[List[str]] = ["id", "status", "broker_name", "data_source", "external_event_id", "broker_event_id", "broker_received_on", "payload"]
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=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
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of BrokerAlert from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of BrokerAlert 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
+ "id": obj.get("id"),
94
+ "status": obj.get("status"),
95
+ "broker_name": obj.get("broker_name"),
96
+ "data_source": obj.get("data_source"),
97
+ "external_event_id": obj.get("external_event_id"),
98
+ "broker_event_id": obj.get("broker_event_id"),
99
+ "broker_received_on": obj.get("broker_received_on"),
100
+ "payload": obj.get("payload")
101
+ })
102
+ return _obj
103
+
104
+
@@ -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: 1.6.0
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
+
30
+ class BrokerAlertCreate(BaseModel):
31
+ """
32
+ 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.
33
+ """ # noqa: E501
34
+ status: BrokerAlertStatus
35
+ broker_name: StrictStr
36
+ data_source: BrokerAlertDataSource
37
+ broker_received_on: datetime
38
+ payload: Dict[str, Any]
39
+ broker_event_datetime: datetime
40
+ broker_event_type: BrokerEventType
41
+ broker_event_name: StrictStr
42
+ localizations: List[LocalizationCreate]
43
+ __properties: ClassVar[List[str]] = ["status", "broker_name", "data_source", "broker_received_on", "payload", "broker_event_datetime", "broker_event_type", "broker_event_name", "localizations"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of BrokerAlertCreate from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ # override the default output from pydantic by calling `to_dict()` of each item in localizations (list)
85
+ _items = []
86
+ if self.localizations:
87
+ for _item_localizations in self.localizations:
88
+ if _item_localizations:
89
+ _items.append(_item_localizations.to_dict())
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: 1.6.0
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: 1.6.0
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: 1.6.0
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 import BrokerAlert
24
+ from across.sdk.v1.models.broker_event_type import BrokerEventType
25
+ from across.sdk.v1.models.localization import Localization
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class BrokerEvent(BaseModel):
30
+ """
31
+ 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
32
+ """ # noqa: E501
33
+ id: StrictStr
34
+ event_datetime: datetime
35
+ type: BrokerEventType
36
+ name: StrictStr
37
+ localizations: List[Localization]
38
+ broker_alerts: List[BrokerAlert]
39
+ __properties: ClassVar[List[str]] = ["id", "event_datetime", "type", "name", "localizations", "broker_alerts"]
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of BrokerEvent 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 localizations (list)
81
+ _items = []
82
+ if self.localizations:
83
+ for _item_localizations in self.localizations:
84
+ if _item_localizations:
85
+ _items.append(_item_localizations.to_dict())
86
+ _dict['localizations'] = _items
87
+ # override the default output from pydantic by calling `to_dict()` of each item in broker_alerts (list)
88
+ _items = []
89
+ if self.broker_alerts:
90
+ for _item_broker_alerts in self.broker_alerts:
91
+ if _item_broker_alerts:
92
+ _items.append(_item_broker_alerts.to_dict())
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: 1.6.0
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.3.2
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.
@@ -17,10 +17,10 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
+ from datetime import datetime
20
21
  from pydantic import BaseModel, ConfigDict, StrictStr
21
22
  from typing import Any, ClassVar, Dict, List
22
23
  from across.sdk.v1.models.constraint_type import ConstraintType
23
- from across.sdk.v1.models.datetime import Datetime
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
@@ -28,7 +28,7 @@ class ConstrainedDate(BaseModel):
28
28
  """
29
29
  Represents a constrained date.
30
30
  """ # noqa: E501
31
- datetime: Datetime
31
+ datetime: datetime
32
32
  constraint: ConstraintType
33
33
  observatory_id: StrictStr
34
34
  __properties: ClassVar[List[str]] = ["datetime", "constraint", "observatory_id"]
@@ -72,9 +72,6 @@ class ConstrainedDate(BaseModel):
72
72
  exclude=excluded_fields,
73
73
  exclude_none=True,
74
74
  )
75
- # override the default output from pydantic by calling `to_dict()` of datetime
76
- if self.datetime:
77
- _dict['datetime'] = self.datetime.to_dict()
78
75
  return _dict
79
76
 
80
77
  @classmethod
@@ -87,7 +84,7 @@ class ConstrainedDate(BaseModel):
87
84
  return cls.model_validate(obj)
88
85
 
89
86
  _obj = cls.model_validate({
90
- "datetime": Datetime.from_dict(obj["datetime"]) if obj.get("datetime") is not None else None,
87
+ "datetime": obj.get("datetime"),
91
88
  "constraint": obj.get("constraint"),
92
89
  "observatory_id": obj.get("observatory_id")
93
90
  })
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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.
@@ -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.3.2
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,7 +19,7 @@ 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.group_role import GroupRole
22
+ from across.sdk.v1.models.across_server_routes_v1_user_schemas_group_role import AcrossServerRoutesV1UserSchemasGroupRole
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -30,7 +30,7 @@ class Group(BaseModel):
30
30
  id: StrictStr
31
31
  name: StrictStr
32
32
  short_name: StrictStr
33
- roles: List[GroupRole]
33
+ roles: List[AcrossServerRoutesV1UserSchemasGroupRole]
34
34
  __properties: ClassVar[List[str]] = ["id", "name", "short_name", "roles"]
35
35
 
36
36
  model_config = ConfigDict(
@@ -94,7 +94,7 @@ class Group(BaseModel):
94
94
  "id": obj.get("id"),
95
95
  "name": obj.get("name"),
96
96
  "short_name": obj.get("short_name"),
97
- "roles": [GroupRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
97
+ "roles": [AcrossServerRoutesV1UserSchemasGroupRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
98
98
  })
99
99
  return _obj
100
100