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,91 @@
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 pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AcrossServerRoutesV1GroupRoleSchemasGroup(BaseModel):
26
+ """
27
+ AcrossServerRoutesV1GroupRoleSchemasGroup
28
+ """ # noqa: E501
29
+ id: StrictStr
30
+ name: StrictStr
31
+ short_name: StrictStr
32
+ __properties: ClassVar[List[str]] = ["id", "name", "short_name"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """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
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of AcrossServerRoutesV1GroupRoleSchemasGroup from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of AcrossServerRoutesV1GroupRoleSchemasGroup from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "id": obj.get("id"),
86
+ "name": obj.get("name"),
87
+ "short_name": obj.get("short_name")
88
+ })
89
+ return _obj
90
+
91
+
@@ -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.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.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,8 +19,8 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
- from across.sdk.v1.models.across_server_routes_v1_group_role_schemas_group_role import AcrossServerRoutesV1GroupRoleSchemasGroupRole
23
- from across.sdk.v1.models.user import User
22
+ from across.sdk.v1.models.across_server_routes_v1_group_schemas_user import AcrossServerRoutesV1GroupSchemasUser
23
+ from across.sdk.v1.models.group_role import GroupRole
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
@@ -31,8 +31,8 @@ class AcrossServerRoutesV1GroupSchemasGroup(BaseModel):
31
31
  id: StrictStr
32
32
  name: StrictStr
33
33
  short_name: StrictStr
34
- users: List[User]
35
- roles: List[AcrossServerRoutesV1GroupRoleSchemasGroupRole]
34
+ users: List[AcrossServerRoutesV1GroupSchemasUser]
35
+ roles: List[GroupRole]
36
36
  __properties: ClassVar[List[str]] = ["id", "name", "short_name", "users", "roles"]
37
37
 
38
38
  model_config = ConfigDict(
@@ -103,8 +103,8 @@ class AcrossServerRoutesV1GroupSchemasGroup(BaseModel):
103
103
  "id": obj.get("id"),
104
104
  "name": obj.get("name"),
105
105
  "short_name": obj.get("short_name"),
106
- "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
107
- "roles": [AcrossServerRoutesV1GroupRoleSchemasGroupRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
106
+ "users": [AcrossServerRoutesV1GroupSchemasUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
107
+ "roles": [GroupRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
108
108
  })
109
109
  return _obj
110
110
 
@@ -0,0 +1,105 @@
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 pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from across.sdk.v1.models.group_role_read import GroupRoleRead
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class AcrossServerRoutesV1GroupSchemasUser(BaseModel):
27
+ """
28
+ AcrossServerRoutesV1GroupSchemasUser
29
+ """ # noqa: E501
30
+ id: StrictStr
31
+ username: StrictStr
32
+ first_name: StrictStr
33
+ last_name: StrictStr
34
+ email: StrictStr
35
+ group_roles: List[GroupRoleRead]
36
+ __properties: ClassVar[List[str]] = ["id", "username", "first_name", "last_name", "email", "group_roles"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of AcrossServerRoutesV1GroupSchemasUser from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # override the default output from pydantic by calling `to_dict()` of each item in group_roles (list)
78
+ _items = []
79
+ if self.group_roles:
80
+ for _item_group_roles in self.group_roles:
81
+ if _item_group_roles:
82
+ _items.append(_item_group_roles.to_dict())
83
+ _dict['group_roles'] = _items
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of AcrossServerRoutesV1GroupSchemasUser from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "id": obj.get("id"),
97
+ "username": obj.get("username"),
98
+ "first_name": obj.get("first_name"),
99
+ "last_name": obj.get("last_name"),
100
+ "email": obj.get("email"),
101
+ "group_roles": [GroupRoleRead.from_dict(_item) for _item in obj["group_roles"]] if obj.get("group_roles") is not None else None
102
+ })
103
+ return _obj
104
+
105
+
@@ -0,0 +1,95 @@
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 pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AcrossServerRoutesV1RoleSchemasUser(BaseModel):
26
+ """
27
+ AcrossServerRoutesV1RoleSchemasUser
28
+ """ # noqa: E501
29
+ id: StrictStr
30
+ first_name: StrictStr
31
+ last_name: StrictStr
32
+ username: StrictStr
33
+ email: StrictStr
34
+ __properties: ClassVar[List[str]] = ["id", "first_name", "last_name", "username", "email"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """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())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of AcrossServerRoutesV1RoleSchemasUser from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of AcrossServerRoutesV1RoleSchemasUser from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "id": obj.get("id"),
88
+ "first_name": obj.get("first_name"),
89
+ "last_name": obj.get("last_name"),
90
+ "username": obj.get("username"),
91
+ "email": obj.get("email")
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,101 @@
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.group_role import GroupRole
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class AcrossServerRoutesV1UserSchemasGroup(BaseModel):
27
+ """
28
+ AcrossServerRoutesV1UserSchemasGroup
29
+ """ # noqa: E501
30
+ id: StrictStr
31
+ name: StrictStr
32
+ short_name: StrictStr
33
+ roles: List[GroupRole]
34
+ __properties: ClassVar[List[str]] = ["id", "name", "short_name", "roles"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """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())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of AcrossServerRoutesV1UserSchemasGroup from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
76
+ _items = []
77
+ if self.roles:
78
+ for _item_roles in self.roles:
79
+ if _item_roles:
80
+ _items.append(_item_roles.to_dict())
81
+ _dict['roles'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of AcrossServerRoutesV1UserSchemasGroup from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "id": obj.get("id"),
95
+ "name": obj.get("name"),
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
98
+ })
99
+ return _obj
100
+
101
+
@@ -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.
@@ -0,0 +1,105 @@
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 pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from across.sdk.v1.models.group_base import GroupBase
23
+ from across.sdk.v1.models.permission import Permission
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class AcrossServerRoutesV1UserSchemasGroupRole(BaseModel):
28
+ """
29
+ AcrossServerRoutesV1UserSchemasGroupRole
30
+ """ # noqa: E501
31
+ id: StrictStr
32
+ name: StrictStr
33
+ permissions: List[Permission]
34
+ group: GroupBase
35
+ __properties: ClassVar[List[str]] = ["id", "name", "permissions", "group"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of AcrossServerRoutesV1UserSchemasGroupRole from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
77
+ _items = []
78
+ if self.permissions:
79
+ for _item_permissions in self.permissions:
80
+ if _item_permissions:
81
+ _items.append(_item_permissions.to_dict())
82
+ _dict['permissions'] = _items
83
+ # override the default output from pydantic by calling `to_dict()` of group
84
+ if self.group:
85
+ _dict['group'] = self.group.to_dict()
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of AcrossServerRoutesV1UserSchemasGroupRole from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "id": obj.get("id"),
99
+ "name": obj.get("name"),
100
+ "permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None,
101
+ "group": GroupBase.from_dict(obj["group"]) if obj.get("group") is not None else None
102
+ })
103
+ return _obj
104
+
105
+
@@ -5,7 +5,7 @@
5
5
 
6
6
  Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
7
7
 
8
- The version of the OpenAPI document: 1.3.2
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.
@@ -19,8 +19,8 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
+ from across.sdk.v1.models.across_server_routes_v1_user_schemas_group import AcrossServerRoutesV1UserSchemasGroup
22
23
  from across.sdk.v1.models.across_server_routes_v1_user_schemas_group_invite import AcrossServerRoutesV1UserSchemasGroupInvite
23
- from across.sdk.v1.models.group import Group
24
24
  from across.sdk.v1.models.group_role import GroupRole
25
25
  from across.sdk.v1.models.role_base import RoleBase
26
26
  from typing import Optional, Set
@@ -35,7 +35,7 @@ class AcrossServerRoutesV1UserSchemasUser(BaseModel):
35
35
  last_name: StrictStr
36
36
  email: StrictStr
37
37
  id: StrictStr
38
- groups: List[Group]
38
+ groups: List[AcrossServerRoutesV1UserSchemasGroup]
39
39
  roles: List[RoleBase]
40
40
  group_roles: List[GroupRole]
41
41
  received_invites: List[AcrossServerRoutesV1UserSchemasGroupInvite]
@@ -125,7 +125,7 @@ class AcrossServerRoutesV1UserSchemasUser(BaseModel):
125
125
  "last_name": obj.get("last_name"),
126
126
  "email": obj.get("email"),
127
127
  "id": obj.get("id"),
128
- "groups": [Group.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None,
128
+ "groups": [AcrossServerRoutesV1UserSchemasGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None,
129
129
  "roles": [RoleBase.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
130
130
  "group_roles": [GroupRole.from_dict(_item) for _item in obj["group_roles"]] if obj.get("group_roles") is not None else None,
131
131
  "received_invites": [AcrossServerRoutesV1UserSchemasGroupInvite.from_dict(_item) for _item in obj["received_invites"]] if obj.get("received_invites") is not None else None
@@ -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.