waldur-api-client 7.6.9__py3-none-any.whl → 7.7.1__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.

Potentially problematic release.


This version of waldur-api-client might be problematic. Click here for more details.

Files changed (49) hide show
  1. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_create.py +8 -4
  2. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_destroy.py +4 -2
  3. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_list.py +4 -4
  4. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_partial_update.py +8 -4
  5. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_retrieve.py +8 -4
  6. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_update.py +8 -4
  7. waldur_api_client/api/broadcast_messages/broadcast_messages_schedule.py +89 -0
  8. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_create.py → call_proposal_project_role_mappings/call_proposal_project_role_mappings_create.py} +27 -23
  9. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_destroy.py +89 -0
  10. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py → call_proposal_project_role_mappings/call_proposal_project_role_mappings_list.py} +34 -13
  11. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_partial_update.py → call_proposal_project_role_mappings/call_proposal_project_role_mappings_partial_update.py} +27 -23
  12. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_retrieve.py → call_proposal_project_role_mappings/call_proposal_project_role_mappings_retrieve.py} +17 -13
  13. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_update.py → call_proposal_project_role_mappings/call_proposal_project_role_mappings_update.py} +27 -23
  14. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py → marketplace_plans/marketplace_plans_destroy.py} +1 -1
  15. waldur_api_client/models/__init__.py +18 -18
  16. waldur_api_client/models/event_types_enum.py +1 -0
  17. waldur_api_client/models/group_invitation.py +16 -5
  18. waldur_api_client/models/group_invitation_request.py +16 -5
  19. waldur_api_client/models/open_stack_floating_ip.py +21 -0
  20. waldur_api_client/models/openstack_floating_ips_list_field_item.py +1 -0
  21. waldur_api_client/models/openstack_floating_ips_retrieve_field_item.py +1 -0
  22. waldur_api_client/models/patched_proposal_project_role_mapping_request.py +88 -0
  23. waldur_api_client/models/patched_protected_call_request.py +0 -17
  24. waldur_api_client/models/patched_rule_request.py +90 -1
  25. waldur_api_client/models/{patched_rule_plans_request_limits.py → patched_rule_request_plan_attributes.py} +5 -5
  26. waldur_api_client/models/patched_rule_request_plan_limits.py +44 -0
  27. waldur_api_client/models/proposal_project_role_mapping.py +122 -0
  28. waldur_api_client/models/proposal_project_role_mapping_request.py +89 -0
  29. waldur_api_client/models/proposal_protected_calls_list_field_item.py +0 -3
  30. waldur_api_client/models/proposal_protected_calls_retrieve_field_item.py +0 -3
  31. waldur_api_client/models/protected_call.py +0 -34
  32. waldur_api_client/models/protected_call_request.py +0 -17
  33. waldur_api_client/models/provider_offering_details.py +1 -1
  34. waldur_api_client/models/public_offering_details.py +1 -1
  35. waldur_api_client/models/rule.py +139 -7
  36. waldur_api_client/models/{rule_plans_attributes.py → rule_plan_attributes.py} +5 -5
  37. waldur_api_client/models/{rule_plans_limits.py → rule_plan_limits.py} +5 -5
  38. waldur_api_client/models/rule_request.py +89 -1
  39. waldur_api_client/models/{rule_plans_request_attributes.py → rule_request_plan_attributes.py} +5 -5
  40. waldur_api_client/models/{rule_plans_request_limits.py → rule_request_plan_limits.py} +5 -5
  41. {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.1.dist-info}/METADATA +1 -1
  42. {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.1.dist-info}/RECORD +45 -43
  43. waldur_api_client/models/patched_rule_plans_request.py +0 -108
  44. waldur_api_client/models/patched_rule_plans_request_attributes.py +0 -44
  45. waldur_api_client/models/rule_plans.py +0 -126
  46. waldur_api_client/models/rule_plans_request.py +0 -109
  47. /waldur_api_client/api/{autoprovisioning_rule_plans → call_proposal_project_role_mappings}/__init__.py +0 -0
  48. {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.1.dist-info}/LICENSE +0 -0
  49. {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,122 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+ from uuid import UUID
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="ProposalProjectRoleMapping")
11
+
12
+
13
+ @_attrs_define
14
+ class ProposalProjectRoleMapping:
15
+ """
16
+ Attributes:
17
+ url (str):
18
+ uuid (UUID):
19
+ call (str):
20
+ call_uuid (UUID):
21
+ call_name (str):
22
+ proposal_role (str):
23
+ project_role (Union[None, Unset, str]):
24
+ """
25
+
26
+ url: str
27
+ uuid: UUID
28
+ call: str
29
+ call_uuid: UUID
30
+ call_name: str
31
+ proposal_role: str
32
+ project_role: Union[None, Unset, str] = UNSET
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ url = self.url
37
+
38
+ uuid = str(self.uuid)
39
+
40
+ call = self.call
41
+
42
+ call_uuid = str(self.call_uuid)
43
+
44
+ call_name = self.call_name
45
+
46
+ proposal_role = self.proposal_role
47
+
48
+ project_role: Union[None, Unset, str]
49
+ if isinstance(self.project_role, Unset):
50
+ project_role = UNSET
51
+ else:
52
+ project_role = self.project_role
53
+
54
+ field_dict: dict[str, Any] = {}
55
+ field_dict.update(self.additional_properties)
56
+ field_dict.update(
57
+ {
58
+ "url": url,
59
+ "uuid": uuid,
60
+ "call": call,
61
+ "call_uuid": call_uuid,
62
+ "call_name": call_name,
63
+ "proposal_role": proposal_role,
64
+ }
65
+ )
66
+ if project_role is not UNSET:
67
+ field_dict["project_role"] = project_role
68
+
69
+ return field_dict
70
+
71
+ @classmethod
72
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
73
+ d = dict(src_dict)
74
+ url = d.pop("url")
75
+
76
+ uuid = UUID(d.pop("uuid"))
77
+
78
+ call = d.pop("call")
79
+
80
+ call_uuid = UUID(d.pop("call_uuid"))
81
+
82
+ call_name = d.pop("call_name")
83
+
84
+ proposal_role = d.pop("proposal_role")
85
+
86
+ def _parse_project_role(data: object) -> Union[None, Unset, str]:
87
+ if data is None:
88
+ return data
89
+ if isinstance(data, Unset):
90
+ return data
91
+ return cast(Union[None, Unset, str], data)
92
+
93
+ project_role = _parse_project_role(d.pop("project_role", UNSET))
94
+
95
+ proposal_project_role_mapping = cls(
96
+ url=url,
97
+ uuid=uuid,
98
+ call=call,
99
+ call_uuid=call_uuid,
100
+ call_name=call_name,
101
+ proposal_role=proposal_role,
102
+ project_role=project_role,
103
+ )
104
+
105
+ proposal_project_role_mapping.additional_properties = d
106
+ return proposal_project_role_mapping
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,89 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="ProposalProjectRoleMappingRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class ProposalProjectRoleMappingRequest:
14
+ """
15
+ Attributes:
16
+ call (str):
17
+ proposal_role (str):
18
+ project_role (Union[None, Unset, str]):
19
+ """
20
+
21
+ call: str
22
+ proposal_role: str
23
+ project_role: Union[None, Unset, str] = UNSET
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ call = self.call
28
+
29
+ proposal_role = self.proposal_role
30
+
31
+ project_role: Union[None, Unset, str]
32
+ if isinstance(self.project_role, Unset):
33
+ project_role = UNSET
34
+ else:
35
+ project_role = self.project_role
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update(
40
+ {
41
+ "call": call,
42
+ "proposal_role": proposal_role,
43
+ }
44
+ )
45
+ if project_role is not UNSET:
46
+ field_dict["project_role"] = project_role
47
+
48
+ return field_dict
49
+
50
+ @classmethod
51
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
52
+ d = dict(src_dict)
53
+ call = d.pop("call")
54
+
55
+ proposal_role = d.pop("proposal_role")
56
+
57
+ def _parse_project_role(data: object) -> Union[None, Unset, str]:
58
+ if data is None:
59
+ return data
60
+ if isinstance(data, Unset):
61
+ return data
62
+ return cast(Union[None, Unset, str], data)
63
+
64
+ project_role = _parse_project_role(d.pop("project_role", UNSET))
65
+
66
+ proposal_project_role_mapping_request = cls(
67
+ call=call,
68
+ proposal_role=proposal_role,
69
+ project_role=project_role,
70
+ )
71
+
72
+ proposal_project_role_mapping_request.additional_properties = d
73
+ return proposal_project_role_mapping_request
74
+
75
+ @property
76
+ def additional_keys(self) -> list[str]:
77
+ return list(self.additional_properties.keys())
78
+
79
+ def __getitem__(self, key: str) -> Any:
80
+ return self.additional_properties[key]
81
+
82
+ def __setitem__(self, key: str, value: Any) -> None:
83
+ self.additional_properties[key] = value
84
+
85
+ def __delitem__(self, key: str) -> None:
86
+ del self.additional_properties[key]
87
+
88
+ def __contains__(self, key: str) -> bool:
89
+ return key in self.additional_properties
@@ -7,9 +7,6 @@ class ProposalProtectedCallsListFieldItem(str, Enum):
7
7
  CREATED_BY = "created_by"
8
8
  CUSTOMER_NAME = "customer_name"
9
9
  CUSTOMER_UUID = "customer_uuid"
10
- DEFAULT_PROJECT_ROLE = "default_project_role"
11
- DEFAULT_PROJECT_ROLE_DESCRIPTION = "default_project_role_description"
12
- DEFAULT_PROJECT_ROLE_NAME = "default_project_role_name"
13
10
  DESCRIPTION = "description"
14
11
  DOCUMENTS = "documents"
15
12
  END_DATE = "end_date"
@@ -7,9 +7,6 @@ class ProposalProtectedCallsRetrieveFieldItem(str, Enum):
7
7
  CREATED_BY = "created_by"
8
8
  CUSTOMER_NAME = "customer_name"
9
9
  CUSTOMER_UUID = "customer_uuid"
10
- DEFAULT_PROJECT_ROLE = "default_project_role"
11
- DEFAULT_PROJECT_ROLE_DESCRIPTION = "default_project_role_description"
12
- DEFAULT_PROJECT_ROLE_NAME = "default_project_role_name"
13
10
  DESCRIPTION = "description"
14
11
  DOCUMENTS = "documents"
15
12
  END_DATE = "end_date"
@@ -49,9 +49,6 @@ class ProtectedCall:
49
49
  scores
50
50
  created_by (Union[None, Unset, str]):
51
51
  reference_code (Union[Unset, str]):
52
- default_project_role (Union[Unset, UUID]):
53
- default_project_role_name (Union[Unset, str]):
54
- default_project_role_description (Union[Unset, str]):
55
52
  """
56
53
 
57
54
  url: Union[Unset, str] = UNSET
@@ -77,9 +74,6 @@ class ProtectedCall:
77
74
  reviews_visible_to_submitters: Union[Unset, bool] = UNSET
78
75
  created_by: Union[None, Unset, str] = UNSET
79
76
  reference_code: Union[Unset, str] = UNSET
80
- default_project_role: Union[Unset, UUID] = UNSET
81
- default_project_role_name: Union[Unset, str] = UNSET
82
- default_project_role_description: Union[Unset, str] = UNSET
83
77
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
84
78
 
85
79
  def to_dict(self) -> dict[str, Any]:
@@ -173,14 +167,6 @@ class ProtectedCall:
173
167
 
174
168
  reference_code = self.reference_code
175
169
 
176
- default_project_role: Union[Unset, str] = UNSET
177
- if not isinstance(self.default_project_role, Unset):
178
- default_project_role = str(self.default_project_role)
179
-
180
- default_project_role_name = self.default_project_role_name
181
-
182
- default_project_role_description = self.default_project_role_description
183
-
184
170
  field_dict: dict[str, Any] = {}
185
171
  field_dict.update(self.additional_properties)
186
172
  field_dict.update({})
@@ -230,12 +216,6 @@ class ProtectedCall:
230
216
  field_dict["created_by"] = created_by
231
217
  if reference_code is not UNSET:
232
218
  field_dict["reference_code"] = reference_code
233
- if default_project_role is not UNSET:
234
- field_dict["default_project_role"] = default_project_role
235
- if default_project_role_name is not UNSET:
236
- field_dict["default_project_role_name"] = default_project_role_name
237
- if default_project_role_description is not UNSET:
238
- field_dict["default_project_role_description"] = default_project_role_description
239
219
 
240
220
  return field_dict
241
221
 
@@ -364,17 +344,6 @@ class ProtectedCall:
364
344
 
365
345
  reference_code = d.pop("reference_code", UNSET)
366
346
 
367
- _default_project_role = d.pop("default_project_role", UNSET)
368
- default_project_role: Union[Unset, UUID]
369
- if isinstance(_default_project_role, Unset):
370
- default_project_role = UNSET
371
- else:
372
- default_project_role = UUID(_default_project_role)
373
-
374
- default_project_role_name = d.pop("default_project_role_name", UNSET)
375
-
376
- default_project_role_description = d.pop("default_project_role_description", UNSET)
377
-
378
347
  protected_call = cls(
379
348
  url=url,
380
349
  uuid=uuid,
@@ -399,9 +368,6 @@ class ProtectedCall:
399
368
  reviews_visible_to_submitters=reviews_visible_to_submitters,
400
369
  created_by=created_by,
401
370
  reference_code=reference_code,
402
- default_project_role=default_project_role,
403
- default_project_role_name=default_project_role_name,
404
- default_project_role_description=default_project_role_description,
405
371
  )
406
372
 
407
373
  protected_call.additional_properties = d
@@ -1,6 +1,5 @@
1
1
  from collections.abc import Mapping
2
2
  from typing import Any, TypeVar, Union, cast
3
- from uuid import UUID
4
3
 
5
4
  from attrs import define as _attrs_define
6
5
  from attrs import field as _attrs_field
@@ -26,7 +25,6 @@ class ProtectedCallRequest:
26
25
  scores
27
26
  created_by (Union[None, Unset, str]):
28
27
  reference_code (Union[Unset, str]):
29
- default_project_role (Union[Unset, UUID]):
30
28
  """
31
29
 
32
30
  name: str
@@ -39,7 +37,6 @@ class ProtectedCallRequest:
39
37
  reviews_visible_to_submitters: Union[Unset, bool] = UNSET
40
38
  created_by: Union[None, Unset, str] = UNSET
41
39
  reference_code: Union[Unset, str] = UNSET
42
- default_project_role: Union[Unset, UUID] = UNSET
43
40
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
41
 
45
42
  def to_dict(self) -> dict[str, Any]:
@@ -75,10 +72,6 @@ class ProtectedCallRequest:
75
72
 
76
73
  reference_code = self.reference_code
77
74
 
78
- default_project_role: Union[Unset, str] = UNSET
79
- if not isinstance(self.default_project_role, Unset):
80
- default_project_role = str(self.default_project_role)
81
-
82
75
  field_dict: dict[str, Any] = {}
83
76
  field_dict.update(self.additional_properties)
84
77
  field_dict.update(
@@ -103,8 +96,6 @@ class ProtectedCallRequest:
103
96
  field_dict["created_by"] = created_by
104
97
  if reference_code is not UNSET:
105
98
  field_dict["reference_code"] = reference_code
106
- if default_project_role is not UNSET:
107
- field_dict["default_project_role"] = default_project_role
108
99
 
109
100
  return field_dict
110
101
 
@@ -152,13 +143,6 @@ class ProtectedCallRequest:
152
143
 
153
144
  reference_code = d.pop("reference_code", UNSET)
154
145
 
155
- _default_project_role = d.pop("default_project_role", UNSET)
156
- default_project_role: Union[Unset, UUID]
157
- if isinstance(_default_project_role, Unset):
158
- default_project_role = UNSET
159
- else:
160
- default_project_role = UUID(_default_project_role)
161
-
162
146
  protected_call_request = cls(
163
147
  name=name,
164
148
  manager=manager,
@@ -170,7 +154,6 @@ class ProtectedCallRequest:
170
154
  reviews_visible_to_submitters=reviews_visible_to_submitters,
171
155
  created_by=created_by,
172
156
  reference_code=reference_code,
173
- default_project_role=default_project_role,
174
157
  )
175
158
 
176
159
  protected_call_request.additional_properties = d
@@ -102,7 +102,7 @@ class ProviderOfferingDetails:
102
102
  backend_metadata (Union[Unset, Any]):
103
103
  integration_status (Union[None, Unset, list['IntegrationStatus']]):
104
104
  google_calendar_is_public (Union[None, Unset, bool]):
105
- google_calendar_link (Union[None, Unset, str]):
105
+ google_calendar_link (Union[None, Unset, str]): Get the Google Calendar link for an offering.
106
106
  """
107
107
 
108
108
  url: Union[Unset, str] = UNSET
@@ -97,7 +97,7 @@ class PublicOfferingDetails:
97
97
  parent_name (Union[None, Unset, str]):
98
98
  backend_metadata (Union[Unset, Any]):
99
99
  google_calendar_is_public (Union[None, Unset, bool]):
100
- google_calendar_link (Union[None, Unset, str]):
100
+ google_calendar_link (Union[None, Unset, str]): Get the Google Calendar link for an offering.
101
101
  promotion_campaigns (Union[Unset, list['NestedCampaign']]):
102
102
  """
103
103
 
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union, cast
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
3
  from uuid import UUID
4
4
 
5
5
  from attrs import define as _attrs_define
@@ -7,6 +7,11 @@ from attrs import field as _attrs_field
7
7
 
8
8
  from ..types import UNSET, Unset
9
9
 
10
+ if TYPE_CHECKING:
11
+ from ..models.rule_plan_attributes import RulePlanAttributes
12
+ from ..models.rule_plan_limits import RulePlanLimits
13
+
14
+
10
15
  T = TypeVar("T", bound="Rule")
11
16
 
12
17
 
@@ -14,32 +19,74 @@ T = TypeVar("T", bound="Rule")
14
19
  class Rule:
15
20
  """
16
21
  Attributes:
22
+ name (str):
17
23
  uuid (UUID):
18
24
  url (str):
19
25
  customer (str):
20
- plans (list[str]):
26
+ customer_name (str):
27
+ customer_uuid (str):
28
+ project_role_display_name (str):
29
+ project_role_description (str):
30
+ plan_name (str):
31
+ offering_name (str):
32
+ offering_uuid (UUID):
33
+ category_title (str):
34
+ category_url (str):
21
35
  user_affiliations (Union[Unset, list[str]]):
22
36
  user_email_patterns (Union[Unset, list[str]]):
23
37
  project_role (Union[None, Unset, str]):
38
+ plan (Union[None, Unset, str]):
39
+ plan_attributes (Union[Unset, RulePlanAttributes]):
40
+ plan_limits (Union[Unset, RulePlanLimits]):
24
41
  """
25
42
 
43
+ name: str
26
44
  uuid: UUID
27
45
  url: str
28
46
  customer: str
29
- plans: list[str]
47
+ customer_name: str
48
+ customer_uuid: str
49
+ project_role_display_name: str
50
+ project_role_description: str
51
+ plan_name: str
52
+ offering_name: str
53
+ offering_uuid: UUID
54
+ category_title: str
55
+ category_url: str
30
56
  user_affiliations: Union[Unset, list[str]] = UNSET
31
57
  user_email_patterns: Union[Unset, list[str]] = UNSET
32
58
  project_role: Union[None, Unset, str] = UNSET
59
+ plan: Union[None, Unset, str] = UNSET
60
+ plan_attributes: Union[Unset, "RulePlanAttributes"] = UNSET
61
+ plan_limits: Union[Unset, "RulePlanLimits"] = UNSET
33
62
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
63
 
35
64
  def to_dict(self) -> dict[str, Any]:
65
+ name = self.name
66
+
36
67
  uuid = str(self.uuid)
37
68
 
38
69
  url = self.url
39
70
 
40
71
  customer = self.customer
41
72
 
42
- plans = self.plans
73
+ customer_name = self.customer_name
74
+
75
+ customer_uuid = self.customer_uuid
76
+
77
+ project_role_display_name = self.project_role_display_name
78
+
79
+ project_role_description = self.project_role_description
80
+
81
+ plan_name = self.plan_name
82
+
83
+ offering_name = self.offering_name
84
+
85
+ offering_uuid = str(self.offering_uuid)
86
+
87
+ category_title = self.category_title
88
+
89
+ category_url = self.category_url
43
90
 
44
91
  user_affiliations: Union[Unset, list[str]] = UNSET
45
92
  if not isinstance(self.user_affiliations, Unset):
@@ -55,14 +102,37 @@ class Rule:
55
102
  else:
56
103
  project_role = self.project_role
57
104
 
105
+ plan: Union[None, Unset, str]
106
+ if isinstance(self.plan, Unset):
107
+ plan = UNSET
108
+ else:
109
+ plan = self.plan
110
+
111
+ plan_attributes: Union[Unset, dict[str, Any]] = UNSET
112
+ if not isinstance(self.plan_attributes, Unset):
113
+ plan_attributes = self.plan_attributes.to_dict()
114
+
115
+ plan_limits: Union[Unset, dict[str, Any]] = UNSET
116
+ if not isinstance(self.plan_limits, Unset):
117
+ plan_limits = self.plan_limits.to_dict()
118
+
58
119
  field_dict: dict[str, Any] = {}
59
120
  field_dict.update(self.additional_properties)
60
121
  field_dict.update(
61
122
  {
123
+ "name": name,
62
124
  "uuid": uuid,
63
125
  "url": url,
64
126
  "customer": customer,
65
- "plans": plans,
127
+ "customer_name": customer_name,
128
+ "customer_uuid": customer_uuid,
129
+ "project_role_display_name": project_role_display_name,
130
+ "project_role_description": project_role_description,
131
+ "plan_name": plan_name,
132
+ "offering_name": offering_name,
133
+ "offering_uuid": offering_uuid,
134
+ "category_title": category_title,
135
+ "category_url": category_url,
66
136
  }
67
137
  )
68
138
  if user_affiliations is not UNSET:
@@ -71,19 +141,46 @@ class Rule:
71
141
  field_dict["user_email_patterns"] = user_email_patterns
72
142
  if project_role is not UNSET:
73
143
  field_dict["project_role"] = project_role
144
+ if plan is not UNSET:
145
+ field_dict["plan"] = plan
146
+ if plan_attributes is not UNSET:
147
+ field_dict["plan_attributes"] = plan_attributes
148
+ if plan_limits is not UNSET:
149
+ field_dict["plan_limits"] = plan_limits
74
150
 
75
151
  return field_dict
76
152
 
77
153
  @classmethod
78
154
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
155
+ from ..models.rule_plan_attributes import RulePlanAttributes
156
+ from ..models.rule_plan_limits import RulePlanLimits
157
+
79
158
  d = dict(src_dict)
159
+ name = d.pop("name")
160
+
80
161
  uuid = UUID(d.pop("uuid"))
81
162
 
82
163
  url = d.pop("url")
83
164
 
84
165
  customer = d.pop("customer")
85
166
 
86
- plans = cast(list[str], d.pop("plans"))
167
+ customer_name = d.pop("customer_name")
168
+
169
+ customer_uuid = d.pop("customer_uuid")
170
+
171
+ project_role_display_name = d.pop("project_role_display_name")
172
+
173
+ project_role_description = d.pop("project_role_description")
174
+
175
+ plan_name = d.pop("plan_name")
176
+
177
+ offering_name = d.pop("offering_name")
178
+
179
+ offering_uuid = UUID(d.pop("offering_uuid"))
180
+
181
+ category_title = d.pop("category_title")
182
+
183
+ category_url = d.pop("category_url")
87
184
 
88
185
  user_affiliations = cast(list[str], d.pop("user_affiliations", UNSET))
89
186
 
@@ -98,14 +195,49 @@ class Rule:
98
195
 
99
196
  project_role = _parse_project_role(d.pop("project_role", UNSET))
100
197
 
198
+ def _parse_plan(data: object) -> Union[None, Unset, str]:
199
+ if data is None:
200
+ return data
201
+ if isinstance(data, Unset):
202
+ return data
203
+ return cast(Union[None, Unset, str], data)
204
+
205
+ plan = _parse_plan(d.pop("plan", UNSET))
206
+
207
+ _plan_attributes = d.pop("plan_attributes", UNSET)
208
+ plan_attributes: Union[Unset, RulePlanAttributes]
209
+ if isinstance(_plan_attributes, Unset):
210
+ plan_attributes = UNSET
211
+ else:
212
+ plan_attributes = RulePlanAttributes.from_dict(_plan_attributes)
213
+
214
+ _plan_limits = d.pop("plan_limits", UNSET)
215
+ plan_limits: Union[Unset, RulePlanLimits]
216
+ if isinstance(_plan_limits, Unset):
217
+ plan_limits = UNSET
218
+ else:
219
+ plan_limits = RulePlanLimits.from_dict(_plan_limits)
220
+
101
221
  rule = cls(
222
+ name=name,
102
223
  uuid=uuid,
103
224
  url=url,
104
225
  customer=customer,
105
- plans=plans,
226
+ customer_name=customer_name,
227
+ customer_uuid=customer_uuid,
228
+ project_role_display_name=project_role_display_name,
229
+ project_role_description=project_role_description,
230
+ plan_name=plan_name,
231
+ offering_name=offering_name,
232
+ offering_uuid=offering_uuid,
233
+ category_title=category_title,
234
+ category_url=category_url,
106
235
  user_affiliations=user_affiliations,
107
236
  user_email_patterns=user_email_patterns,
108
237
  project_role=project_role,
238
+ plan=plan,
239
+ plan_attributes=plan_attributes,
240
+ plan_limits=plan_limits,
109
241
  )
110
242
 
111
243
  rule.additional_properties = d
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="RulePlansAttributes")
7
+ T = TypeVar("T", bound="RulePlanAttributes")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class RulePlansAttributes:
11
+ class RulePlanAttributes:
12
12
  """ """
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +22,10 @@ class RulePlansAttributes:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- rule_plans_attributes = cls()
25
+ rule_plan_attributes = cls()
26
26
 
27
- rule_plans_attributes.additional_properties = d
28
- return rule_plans_attributes
27
+ rule_plan_attributes.additional_properties = d
28
+ return rule_plan_attributes
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]:
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="RulePlansLimits")
7
+ T = TypeVar("T", bound="RulePlanLimits")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class RulePlansLimits:
11
+ class RulePlanLimits:
12
12
  """ """
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +22,10 @@ class RulePlansLimits:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- rule_plans_limits = cls()
25
+ rule_plan_limits = cls()
26
26
 
27
- rule_plans_limits.additional_properties = d
28
- return rule_plans_limits
27
+ rule_plan_limits.additional_properties = d
28
+ return rule_plan_limits
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]: