across-server-openapi-python 1.1.1__py3-none-any.whl → 1.3.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 (128) hide show
  1. across/sdk/v1/__init__.py +23 -21
  2. across/sdk/v1/api/__init__.py +1 -0
  3. across/sdk/v1/api/auth_api.py +269 -1
  4. across/sdk/v1/api/filter_api.py +1 -1
  5. across/sdk/v1/api/group_api.py +256 -7
  6. across/sdk/v1/api/group_invite_api.py +17 -17
  7. across/sdk/v1/api/group_role_api.py +1 -1
  8. across/sdk/v1/api/instrument_api.py +1 -1
  9. across/sdk/v1/api/internal_api.py +1 -1
  10. across/sdk/v1/api/observation_api.py +42 -8
  11. across/sdk/v1/api/observatory_api.py +1 -1
  12. across/sdk/v1/api/permission_api.py +1 -1
  13. across/sdk/v1/api/role_api.py +60 -60
  14. across/sdk/v1/api/schedule_api.py +52 -1
  15. across/sdk/v1/api/service_account_api.py +1 -1
  16. across/sdk/v1/api/telescope_api.py +35 -1
  17. across/sdk/v1/api/tle_api.py +1 -1
  18. across/sdk/v1/api/tools_api.py +538 -1
  19. across/sdk/v1/api/user_api.py +261 -13
  20. across/sdk/v1/api_client.py +1 -1
  21. across/sdk/v1/configuration.py +2 -2
  22. across/sdk/v1/exceptions.py +1 -1
  23. across/sdk/v1/models/__init__.py +11 -11
  24. across/sdk/v1/models/access_token_response.py +1 -1
  25. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +4 -4
  26. across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +1 -1
  27. across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +4 -4
  28. across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +1 -1
  29. across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +4 -4
  30. across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +1 -1
  31. across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +4 -4
  32. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +1 -1
  33. across/sdk/v1/models/bandpass.py +1 -1
  34. across/sdk/v1/models/bandpass_type.py +1 -1
  35. across/sdk/v1/models/constrained_date.py +1 -1
  36. across/sdk/v1/models/constraint_reason.py +1 -1
  37. across/sdk/v1/models/constraint_type.py +13 -1
  38. across/sdk/v1/models/coordinate.py +1 -1
  39. across/sdk/v1/models/date_range.py +1 -1
  40. across/sdk/v1/models/datetime.py +138 -0
  41. across/sdk/v1/models/depth_unit.py +1 -1
  42. across/sdk/v1/models/energy_bandpass.py +2 -2
  43. across/sdk/v1/models/energy_unit.py +1 -1
  44. across/sdk/v1/models/ephemeris_type.py +1 -1
  45. across/sdk/v1/models/filter.py +1 -1
  46. across/sdk/v1/models/frequency_bandpass.py +2 -2
  47. across/sdk/v1/models/frequency_unit.py +1 -1
  48. across/sdk/v1/models/grant_type.py +1 -1
  49. across/sdk/v1/models/ground_parameters.py +1 -1
  50. across/sdk/v1/models/{system_service_account_secret.py → group.py} +25 -37
  51. across/sdk/v1/models/{across_server_routes_v1_group_invite_schemas_group_invite.py → group_invite.py} +5 -5
  52. across/sdk/v1/models/group_invite_create.py +1 -1
  53. across/sdk/v1/models/group_invite_group_details.py +1 -1
  54. across/sdk/v1/models/group_read.py +1 -1
  55. across/sdk/v1/models/{across_server_routes_v1_user_schemas_group_role.py → group_role.py} +5 -5
  56. across/sdk/v1/models/group_role_create.py +1 -1
  57. across/sdk/v1/models/group_role_read.py +1 -1
  58. across/sdk/v1/models/http_validation_error.py +1 -1
  59. across/sdk/v1/models/id_name_schema.py +1 -1
  60. across/sdk/v1/models/instrument.py +13 -13
  61. across/sdk/v1/models/ivoa_obs_category.py +1 -1
  62. across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
  63. across/sdk/v1/models/joint_visibility_result.py +1 -1
  64. across/sdk/v1/models/jpl_parameters.py +1 -1
  65. across/sdk/v1/models/location_inner.py +138 -0
  66. across/sdk/v1/models/{across_server_routes_v1_system_service_account_schemas_service_account_secret.py → name_resolver.py} +16 -17
  67. across/sdk/v1/models/nullable_date_range.py +1 -1
  68. across/sdk/v1/models/observation.py +13 -3
  69. across/sdk/v1/models/observation_create.py +13 -3
  70. across/sdk/v1/models/observation_footprint.py +99 -0
  71. across/sdk/v1/models/{across_server_routes_v1_system_service_account_schemas_service_account.py → observation_footprint_create.py} +19 -14
  72. across/sdk/v1/models/observation_status.py +1 -1
  73. across/sdk/v1/models/observation_strategy.py +37 -0
  74. across/sdk/v1/models/observation_type.py +1 -1
  75. across/sdk/v1/models/observatory.py +1 -1
  76. across/sdk/v1/models/observatory_ephemeris_type.py +1 -1
  77. across/sdk/v1/models/observatory_type.py +1 -1
  78. across/sdk/v1/models/page_observation.py +1 -1
  79. across/sdk/v1/models/page_schedule.py +1 -1
  80. across/sdk/v1/models/parameters.py +1 -1
  81. across/sdk/v1/models/permission.py +1 -1
  82. across/sdk/v1/models/point.py +1 -1
  83. across/sdk/v1/models/role.py +7 -8
  84. across/sdk/v1/models/role_base.py +1 -1
  85. across/sdk/v1/models/schedule.py +1 -1
  86. across/sdk/v1/models/schedule_cadence.py +1 -1
  87. across/sdk/v1/models/schedule_create.py +1 -1
  88. across/sdk/v1/models/schedule_create_many.py +1 -1
  89. across/sdk/v1/models/schedule_fidelity.py +1 -1
  90. across/sdk/v1/models/schedule_status.py +1 -1
  91. across/sdk/v1/models/{across_server_routes_v1_group_role_schemas_service_account.py → service_account.py} +5 -5
  92. across/sdk/v1/models/service_account_create.py +1 -1
  93. across/sdk/v1/models/service_account_secret.py +1 -1
  94. across/sdk/v1/models/service_account_update.py +1 -1
  95. across/sdk/v1/models/spice_parameters.py +1 -1
  96. across/sdk/v1/models/system_service_account.py +1 -1
  97. across/sdk/v1/models/telescope.py +1 -1
  98. across/sdk/v1/models/telescope_instrument.py +13 -13
  99. across/sdk/v1/models/tle.py +1 -1
  100. across/sdk/v1/models/tle_create.py +1 -1
  101. across/sdk/v1/models/tle_parameters.py +1 -1
  102. across/sdk/v1/models/unit_value.py +1 -1
  103. across/sdk/v1/models/{across_server_routes_v1_role_schemas_user.py → user.py} +8 -9
  104. across/sdk/v1/models/user_create.py +1 -1
  105. across/sdk/v1/models/user_info.py +1 -1
  106. across/sdk/v1/models/user_update.py +1 -1
  107. across/sdk/v1/models/validation_error.py +1 -1
  108. across/sdk/v1/models/validation_error_loc_inner.py +1 -1
  109. across/sdk/v1/models/visibility_result.py +1 -1
  110. across/sdk/v1/models/visibility_type.py +1 -1
  111. across/sdk/v1/models/visibility_window.py +1 -1
  112. across/sdk/v1/models/wavelength_bandpass.py +2 -2
  113. across/sdk/v1/models/wavelength_unit.py +1 -1
  114. across/sdk/v1/models/window.py +1 -1
  115. across/sdk/v1/rest.py +1 -1
  116. {across_server_openapi_python-1.1.1.dist-info → across_server_openapi_python-1.3.0.dist-info}/METADATA +25 -27
  117. across_server_openapi_python-1.3.0.dist-info/RECORD +126 -0
  118. {across_server_openapi_python-1.1.1.dist-info → across_server_openapi_python-1.3.0.dist-info}/WHEEL +1 -1
  119. across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +0 -118
  120. across/sdk/v1/models/alt_az_constraint.py +0 -135
  121. across/sdk/v1/models/earth_limb_constraint.py +0 -124
  122. across/sdk/v1/models/instrument_constraints_inner.py +0 -237
  123. across/sdk/v1/models/moon_angle_constraint.py +0 -124
  124. across/sdk/v1/models/saa_polygon_constraint.py +0 -106
  125. across/sdk/v1/models/sun_angle_constraint.py +0 -124
  126. across_server_openapi_python-1.1.1.dist-info/RECORD +0 -129
  127. {across_server_openapi_python-1.1.1.dist-info → across_server_openapi_python-1.3.0.dist-info}/licenses/LICENSE +0 -0
  128. {across_server_openapi_python-1.1.1.dist-info → across_server_openapi_python-1.3.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: 1.1.0
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -22,7 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from across.sdk.v1.models.filter import Filter
24
24
  from across.sdk.v1.models.id_name_schema import IDNameSchema
25
- from across.sdk.v1.models.instrument_constraints_inner import InstrumentConstraintsInner
25
+ from across.sdk.v1.models.observation_strategy import ObservationStrategy
26
26
  from across.sdk.v1.models.point import Point
27
27
  from across.sdk.v1.models.visibility_type import VisibilityType
28
28
  from typing import Optional, Set
@@ -39,9 +39,10 @@ class Instrument(BaseModel):
39
39
  telescope: Optional[IDNameSchema] = None
40
40
  footprints: Optional[List[List[Point]]] = None
41
41
  filters: Optional[List[Filter]] = None
42
- constraints: Optional[List[InstrumentConstraintsInner]] = None
42
+ constraints: Optional[List[Dict[str, Any]]] = None
43
43
  visibility_type: Optional[VisibilityType] = None
44
- __properties: ClassVar[List[str]] = ["id", "created_on", "name", "short_name", "telescope", "footprints", "filters", "constraints", "visibility_type"]
44
+ observation_strategy: Optional[ObservationStrategy] = None
45
+ __properties: ClassVar[List[str]] = ["id", "created_on", "name", "short_name", "telescope", "footprints", "filters", "constraints", "visibility_type", "observation_strategy"]
45
46
 
46
47
  model_config = ConfigDict(
47
48
  populate_by_name=True,
@@ -101,13 +102,6 @@ class Instrument(BaseModel):
101
102
  if _item_filters:
102
103
  _items.append(_item_filters.to_dict())
103
104
  _dict['filters'] = _items
104
- # override the default output from pydantic by calling `to_dict()` of each item in constraints (list)
105
- _items = []
106
- if self.constraints:
107
- for _item_constraints in self.constraints:
108
- if _item_constraints:
109
- _items.append(_item_constraints.to_dict())
110
- _dict['constraints'] = _items
111
105
  # set to None if telescope (nullable) is None
112
106
  # and model_fields_set contains the field
113
107
  if self.telescope is None and "telescope" in self.model_fields_set:
@@ -133,6 +127,11 @@ class Instrument(BaseModel):
133
127
  if self.visibility_type is None and "visibility_type" in self.model_fields_set:
134
128
  _dict['visibility_type'] = None
135
129
 
130
+ # set to None if observation_strategy (nullable) is None
131
+ # and model_fields_set contains the field
132
+ if self.observation_strategy is None and "observation_strategy" in self.model_fields_set:
133
+ _dict['observation_strategy'] = None
134
+
136
135
  return _dict
137
136
 
138
137
  @classmethod
@@ -155,8 +154,9 @@ class Instrument(BaseModel):
155
154
  for _item in obj["footprints"]
156
155
  ] if obj.get("footprints") is not None else None,
157
156
  "filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None,
158
- "constraints": [InstrumentConstraintsInner.from_dict(_item) for _item in obj["constraints"]] if obj.get("constraints") is not None else None,
159
- "visibility_type": obj.get("visibility_type")
157
+ "constraints": obj.get("constraints"),
158
+ "visibility_type": obj.get("visibility_type"),
159
+ "observation_strategy": obj.get("observation_strategy")
160
160
  })
161
161
  return _obj
162
162
 
@@ -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.1.0
8
+ The version of the OpenAPI document: 1.4.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.1.0
8
+ The version of the OpenAPI document: 1.4.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.1.0
8
+ The version of the OpenAPI document: 1.4.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.1.0
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -0,0 +1,138 @@
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.4.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
+ from inspect import getfullargspec
17
+ import json
18
+ import pprint
19
+ import re # noqa: F401
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator
21
+ from typing import Optional
22
+ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
23
+ from typing_extensions import Literal, Self
24
+ from pydantic import Field
25
+
26
+ LOCATIONINNER_ANY_OF_SCHEMAS = ["int", "str"]
27
+
28
+ class LocationInner(BaseModel):
29
+ """
30
+ LocationInner
31
+ """
32
+
33
+ # data type: str
34
+ anyof_schema_1_validator: Optional[StrictStr] = None
35
+ # data type: int
36
+ anyof_schema_2_validator: Optional[StrictInt] = None
37
+ if TYPE_CHECKING:
38
+ actual_instance: Optional[Union[int, str]] = None
39
+ else:
40
+ actual_instance: Any = None
41
+ any_of_schemas: Set[str] = { "int", "str" }
42
+
43
+ model_config = {
44
+ "validate_assignment": True,
45
+ "protected_namespaces": (),
46
+ }
47
+
48
+ def __init__(self, *args, **kwargs) -> None:
49
+ if args:
50
+ if len(args) > 1:
51
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
52
+ if kwargs:
53
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
54
+ super().__init__(actual_instance=args[0])
55
+ else:
56
+ super().__init__(**kwargs)
57
+
58
+ @field_validator('actual_instance')
59
+ def actual_instance_must_validate_anyof(cls, v):
60
+ instance = LocationInner.model_construct()
61
+ error_messages = []
62
+ # validate data type: str
63
+ try:
64
+ instance.anyof_schema_1_validator = v
65
+ return v
66
+ except (ValidationError, ValueError) as e:
67
+ error_messages.append(str(e))
68
+ # validate data type: int
69
+ try:
70
+ instance.anyof_schema_2_validator = v
71
+ return v
72
+ except (ValidationError, ValueError) as e:
73
+ error_messages.append(str(e))
74
+ if error_messages:
75
+ # no match
76
+ raise ValueError("No match found when setting the actual_instance in LocationInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages))
77
+ else:
78
+ return v
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
82
+ return cls.from_json(json.dumps(obj))
83
+
84
+ @classmethod
85
+ def from_json(cls, json_str: str) -> Self:
86
+ """Returns the object represented by the json string"""
87
+ instance = cls.model_construct()
88
+ error_messages = []
89
+ # deserialize data into str
90
+ try:
91
+ # validation
92
+ instance.anyof_schema_1_validator = json.loads(json_str)
93
+ # assign value to actual_instance
94
+ instance.actual_instance = instance.anyof_schema_1_validator
95
+ return instance
96
+ except (ValidationError, ValueError) as e:
97
+ error_messages.append(str(e))
98
+ # deserialize data into int
99
+ try:
100
+ # validation
101
+ instance.anyof_schema_2_validator = json.loads(json_str)
102
+ # assign value to actual_instance
103
+ instance.actual_instance = instance.anyof_schema_2_validator
104
+ return instance
105
+ except (ValidationError, ValueError) as e:
106
+ error_messages.append(str(e))
107
+
108
+ if error_messages:
109
+ # no match
110
+ raise ValueError("No match found when deserializing the JSON string into LocationInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages))
111
+ else:
112
+ return instance
113
+
114
+ def to_json(self) -> str:
115
+ """Returns the JSON representation of the actual instance"""
116
+ if self.actual_instance is None:
117
+ return "null"
118
+
119
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
120
+ return self.actual_instance.to_json()
121
+ else:
122
+ return json.dumps(self.actual_instance)
123
+
124
+ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]:
125
+ """Returns the dict representation of the actual instance"""
126
+ if self.actual_instance is None:
127
+ return None
128
+
129
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
130
+ return self.actual_instance.to_dict()
131
+ else:
132
+ return self.actual_instance
133
+
134
+ def to_str(self) -> str:
135
+ """Returns the string representation of the actual instance"""
136
+ return pprint.pformat(self.model_dump())
137
+
138
+
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ ACROSS Server
5
5
 
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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: 0.2.1
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -17,20 +17,19 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List
20
+ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Union
23
22
  from typing import Optional, Set
24
23
  from typing_extensions import Self
25
24
 
26
- class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret(BaseModel):
25
+ class NameResolver(BaseModel):
27
26
  """
28
- AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret
27
+ Pydantic model class representing a resolved object name Parameters ---------- ra: float Right ascension coordinate, in degrees. dec: float Declination coordinate, in degrees. resolver: str Resolver used for resolving the coordinates.
29
28
  """ # noqa: E501
30
- id: StrictStr
31
- secret_key: StrictStr
32
- expiration: datetime
33
- __properties: ClassVar[List[str]] = ["id", "secret_key", "expiration"]
29
+ ra: Union[StrictFloat, StrictInt]
30
+ dec: Union[StrictFloat, StrictInt]
31
+ resolver: StrictStr
32
+ __properties: ClassVar[List[str]] = ["ra", "dec", "resolver"]
34
33
 
35
34
  model_config = ConfigDict(
36
35
  populate_by_name=True,
@@ -50,7 +49,7 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret(BaseMo
50
49
 
51
50
  @classmethod
52
51
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret from a JSON string"""
52
+ """Create an instance of NameResolver from a JSON string"""
54
53
  return cls.from_dict(json.loads(json_str))
55
54
 
56
55
  def to_dict(self) -> Dict[str, Any]:
@@ -75,7 +74,7 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret(BaseMo
75
74
 
76
75
  @classmethod
77
76
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret from a dict"""
77
+ """Create an instance of NameResolver from a dict"""
79
78
  if obj is None:
80
79
  return None
81
80
 
@@ -83,9 +82,9 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccountSecret(BaseMo
83
82
  return cls.model_validate(obj)
84
83
 
85
84
  _obj = cls.model_validate({
86
- "id": obj.get("id"),
87
- "secret_key": obj.get("secret_key"),
88
- "expiration": obj.get("expiration")
85
+ "ra": obj.get("ra"),
86
+ "dec": obj.get("dec"),
87
+ "resolver": obj.get("resolver")
89
88
  })
90
89
  return _obj
91
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.1.0
8
+ The version of the OpenAPI document: 1.4.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.1.0
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -25,6 +25,7 @@ from across.sdk.v1.models.coordinate import Coordinate
25
25
  from across.sdk.v1.models.date_range import DateRange
26
26
  from across.sdk.v1.models.ivoa_obs_category import IVOAObsCategory
27
27
  from across.sdk.v1.models.ivoa_obs_tracking_type import IVOAObsTrackingType
28
+ from across.sdk.v1.models.observation_footprint import ObservationFootprint
28
29
  from across.sdk.v1.models.observation_status import ObservationStatus
29
30
  from across.sdk.v1.models.observation_type import ObservationType
30
31
  from across.sdk.v1.models.unit_value import UnitValue
@@ -62,7 +63,8 @@ class Observation(BaseModel):
62
63
  schedule_id: StrictStr
63
64
  created_on: datetime
64
65
  created_by_id: Optional[StrictStr] = None
65
- __properties: ClassVar[List[str]] = ["instrument_id", "object_name", "pointing_position", "date_range", "external_observation_id", "type", "status", "pointing_angle", "exposure_time", "reason", "description", "proposal_reference", "object_position", "depth", "bandpass", "t_resolution", "em_res_power", "o_ucd", "pol_states", "pol_xel", "category", "priority", "tracking_type", "id", "schedule_id", "created_on", "created_by_id"]
66
+ footprint: Optional[List[ObservationFootprint]] = None
67
+ __properties: ClassVar[List[str]] = ["instrument_id", "object_name", "pointing_position", "date_range", "external_observation_id", "type", "status", "pointing_angle", "exposure_time", "reason", "description", "proposal_reference", "object_position", "depth", "bandpass", "t_resolution", "em_res_power", "o_ucd", "pol_states", "pol_xel", "category", "priority", "tracking_type", "id", "schedule_id", "created_on", "created_by_id", "footprint"]
66
68
 
67
69
  model_config = ConfigDict(
68
70
  populate_by_name=True,
@@ -118,6 +120,13 @@ class Observation(BaseModel):
118
120
  # override the default output from pydantic by calling `to_dict()` of bandpass
119
121
  if self.bandpass:
120
122
  _dict['bandpass'] = self.bandpass.to_dict()
123
+ # override the default output from pydantic by calling `to_dict()` of each item in footprint (list)
124
+ _items = []
125
+ if self.footprint:
126
+ for _item_footprint in self.footprint:
127
+ if _item_footprint:
128
+ _items.append(_item_footprint.to_dict())
129
+ _dict['footprint'] = _items
121
130
  # set to None if pointing_position (nullable) is None
122
131
  # and model_fields_set contains the field
123
132
  if self.pointing_position is None and "pointing_position" in self.model_fields_set:
@@ -241,7 +250,8 @@ class Observation(BaseModel):
241
250
  "id": obj.get("id"),
242
251
  "schedule_id": obj.get("schedule_id"),
243
252
  "created_on": obj.get("created_on"),
244
- "created_by_id": obj.get("created_by_id")
253
+ "created_by_id": obj.get("created_by_id"),
254
+ "footprint": [ObservationFootprint.from_dict(_item) for _item in obj["footprint"]] if obj.get("footprint") is not None else None
245
255
  })
246
256
  return _obj
247
257
 
@@ -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.1.0
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -25,6 +25,7 @@ from across.sdk.v1.models.coordinate import Coordinate
25
25
  from across.sdk.v1.models.date_range import DateRange
26
26
  from across.sdk.v1.models.ivoa_obs_category import IVOAObsCategory
27
27
  from across.sdk.v1.models.ivoa_obs_tracking_type import IVOAObsTrackingType
28
+ from across.sdk.v1.models.observation_footprint_create import ObservationFootprintCreate
28
29
  from across.sdk.v1.models.observation_status import ObservationStatus
29
30
  from across.sdk.v1.models.observation_type import ObservationType
30
31
  from across.sdk.v1.models.unit_value import UnitValue
@@ -60,7 +61,8 @@ class ObservationCreate(BaseModel):
60
61
  tracking_type: Optional[IVOAObsTrackingType] = None
61
62
  created_on: Optional[datetime] = None
62
63
  created_by_id: Optional[StrictStr] = None
63
- __properties: ClassVar[List[str]] = ["instrument_id", "object_name", "pointing_position", "date_range", "external_observation_id", "type", "status", "pointing_angle", "exposure_time", "reason", "description", "proposal_reference", "object_position", "depth", "bandpass", "t_resolution", "em_res_power", "o_ucd", "pol_states", "pol_xel", "category", "priority", "tracking_type", "created_on", "created_by_id"]
64
+ footprint: Optional[List[ObservationFootprintCreate]] = None
65
+ __properties: ClassVar[List[str]] = ["instrument_id", "object_name", "pointing_position", "date_range", "external_observation_id", "type", "status", "pointing_angle", "exposure_time", "reason", "description", "proposal_reference", "object_position", "depth", "bandpass", "t_resolution", "em_res_power", "o_ucd", "pol_states", "pol_xel", "category", "priority", "tracking_type", "created_on", "created_by_id", "footprint"]
64
66
 
65
67
  model_config = ConfigDict(
66
68
  populate_by_name=True,
@@ -116,6 +118,13 @@ class ObservationCreate(BaseModel):
116
118
  # override the default output from pydantic by calling `to_dict()` of bandpass
117
119
  if self.bandpass:
118
120
  _dict['bandpass'] = self.bandpass.to_dict()
121
+ # override the default output from pydantic by calling `to_dict()` of each item in footprint (list)
122
+ _items = []
123
+ if self.footprint:
124
+ for _item_footprint in self.footprint:
125
+ if _item_footprint:
126
+ _items.append(_item_footprint.to_dict())
127
+ _dict['footprint'] = _items
119
128
  # set to None if pointing_position (nullable) is None
120
129
  # and model_fields_set contains the field
121
130
  if self.pointing_position is None and "pointing_position" in self.model_fields_set:
@@ -242,7 +251,8 @@ class ObservationCreate(BaseModel):
242
251
  "priority": obj.get("priority"),
243
252
  "tracking_type": obj.get("tracking_type"),
244
253
  "created_on": obj.get("created_on"),
245
- "created_by_id": obj.get("created_by_id")
254
+ "created_by_id": obj.get("created_by_id"),
255
+ "footprint": [ObservationFootprintCreate.from_dict(_item) for _item in obj["footprint"]] if obj.get("footprint") is not None else None
246
256
  })
247
257
  return _obj
248
258
 
@@ -0,0 +1,99 @@
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.4.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 pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from across.sdk.v1.models.point import Point
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ObservationFootprint(BaseModel):
27
+ """
28
+ A Pydantic model class representing a created ObservationFootprint Notes ----- Inherits from ObservationFootprintBase Methods ------- from_orm(obj: ObservationFootprintModel) -> ObservationFootprint Static method that instantiates this class from an observation footprint database record
29
+ """ # noqa: E501
30
+ polygon: List[Point]
31
+ id: StrictStr
32
+ observation_id: StrictStr
33
+ __properties: ClassVar[List[str]] = ["polygon", "id", "observation_id"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ObservationFootprint from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of each item in polygon (list)
75
+ _items = []
76
+ if self.polygon:
77
+ for _item_polygon in self.polygon:
78
+ if _item_polygon:
79
+ _items.append(_item_polygon.to_dict())
80
+ _dict['polygon'] = _items
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of ObservationFootprint 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
+ "polygon": [Point.from_dict(_item) for _item in obj["polygon"]] if obj.get("polygon") is not None else None,
94
+ "id": obj.get("id"),
95
+ "observation_id": obj.get("observation_id")
96
+ })
97
+ return _obj
98
+
99
+
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ ACROSS Server
5
5
 
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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: 0.2.1
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -17,19 +17,18 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictStr
20
+ from pydantic import BaseModel, ConfigDict
22
21
  from typing import Any, ClassVar, Dict, List
22
+ from across.sdk.v1.models.point import Point
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount(BaseModel):
26
+ class ObservationFootprintCreate(BaseModel):
27
27
  """
28
- AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount
28
+ A Pydantic model class representing the data required to create an ObservationFootprint in the ACROSS SSA system.
29
29
  """ # noqa: E501
30
- id: StrictStr
31
- expiration: datetime
32
- __properties: ClassVar[List[str]] = ["id", "expiration"]
30
+ polygon: List[Point]
31
+ __properties: ClassVar[List[str]] = ["polygon"]
33
32
 
34
33
  model_config = ConfigDict(
35
34
  populate_by_name=True,
@@ -49,7 +48,7 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount(BaseModel):
49
48
 
50
49
  @classmethod
51
50
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount from a JSON string"""
51
+ """Create an instance of ObservationFootprintCreate from a JSON string"""
53
52
  return cls.from_dict(json.loads(json_str))
54
53
 
55
54
  def to_dict(self) -> Dict[str, Any]:
@@ -70,11 +69,18 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount(BaseModel):
70
69
  exclude=excluded_fields,
71
70
  exclude_none=True,
72
71
  )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in polygon (list)
73
+ _items = []
74
+ if self.polygon:
75
+ for _item_polygon in self.polygon:
76
+ if _item_polygon:
77
+ _items.append(_item_polygon.to_dict())
78
+ _dict['polygon'] = _items
73
79
  return _dict
74
80
 
75
81
  @classmethod
76
82
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount from a dict"""
83
+ """Create an instance of ObservationFootprintCreate from a dict"""
78
84
  if obj is None:
79
85
  return None
80
86
 
@@ -82,8 +88,7 @@ class AcrossServerRoutesV1SystemServiceAccountSchemasServiceAccount(BaseModel):
82
88
  return cls.model_validate(obj)
83
89
 
84
90
  _obj = cls.model_validate({
85
- "id": obj.get("id"),
86
- "expiration": obj.get("expiration")
91
+ "polygon": [Point.from_dict(_item) for _item in obj["polygon"]] if obj.get("polygon") is not None else None
87
92
  })
88
93
  return _obj
89
94
 
@@ -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.1.0
8
+ The version of the OpenAPI document: 1.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ACROSS Server
5
+
6
+ Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
7
+
8
+ The version of the OpenAPI document: 1.4.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 ObservationStrategy(str, Enum):
22
+ """
23
+ ObservationStrategy
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ POINTED = 'pointed'
30
+ SURVEY = 'survey'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of ObservationStrategy from a JSON string"""
35
+ return cls(json.loads(json_str))
36
+
37
+