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
@@ -33,8 +33,8 @@ class GroupInvitation:
33
33
  is_active (bool):
34
34
  auto_create_project (Union[Unset, bool]): Create project and grant project permissions instead of customer
35
35
  permissions
36
- project_name_template (Union[Unset, str]): Template for project name. Supports {username}, {email}, {full_name}
37
- variables
36
+ project_name_template (Union[None, Unset, str]): Template for project name. Supports {username}, {email},
37
+ {full_name} variables
38
38
  project_role (Union[None, UUID, Unset]):
39
39
  """
40
40
 
@@ -54,7 +54,7 @@ class GroupInvitation:
54
54
  expires: datetime.datetime
55
55
  is_active: bool
56
56
  auto_create_project: Union[Unset, bool] = UNSET
57
- project_name_template: Union[Unset, str] = UNSET
57
+ project_name_template: Union[None, Unset, str] = UNSET
58
58
  project_role: Union[None, UUID, Unset] = UNSET
59
59
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
60
60
 
@@ -91,7 +91,11 @@ class GroupInvitation:
91
91
 
92
92
  auto_create_project = self.auto_create_project
93
93
 
94
- project_name_template = self.project_name_template
94
+ project_name_template: Union[None, Unset, str]
95
+ if isinstance(self.project_name_template, Unset):
96
+ project_name_template = UNSET
97
+ else:
98
+ project_name_template = self.project_name_template
95
99
 
96
100
  project_role: Union[None, Unset, str]
97
101
  if isinstance(self.project_role, Unset):
@@ -166,7 +170,14 @@ class GroupInvitation:
166
170
 
167
171
  auto_create_project = d.pop("auto_create_project", UNSET)
168
172
 
169
- project_name_template = d.pop("project_name_template", UNSET)
173
+ def _parse_project_name_template(data: object) -> Union[None, Unset, str]:
174
+ if data is None:
175
+ return data
176
+ if isinstance(data, Unset):
177
+ return data
178
+ return cast(Union[None, Unset, str], data)
179
+
180
+ project_name_template = _parse_project_name_template(d.pop("project_name_template", UNSET))
170
181
 
171
182
  def _parse_project_role(data: object) -> Union[None, UUID, Unset]:
172
183
  if data is None:
@@ -18,15 +18,15 @@ class GroupInvitationRequest:
18
18
  scope (str):
19
19
  auto_create_project (Union[Unset, bool]): Create project and grant project permissions instead of customer
20
20
  permissions
21
- project_name_template (Union[Unset, str]): Template for project name. Supports {username}, {email}, {full_name}
22
- variables
21
+ project_name_template (Union[None, Unset, str]): Template for project name. Supports {username}, {email},
22
+ {full_name} variables
23
23
  project_role (Union[None, UUID, Unset]):
24
24
  """
25
25
 
26
26
  role: UUID
27
27
  scope: str
28
28
  auto_create_project: Union[Unset, bool] = UNSET
29
- project_name_template: Union[Unset, str] = UNSET
29
+ project_name_template: Union[None, Unset, str] = UNSET
30
30
  project_role: Union[None, UUID, Unset] = UNSET
31
31
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
32
 
@@ -37,7 +37,11 @@ class GroupInvitationRequest:
37
37
 
38
38
  auto_create_project = self.auto_create_project
39
39
 
40
- project_name_template = self.project_name_template
40
+ project_name_template: Union[None, Unset, str]
41
+ if isinstance(self.project_name_template, Unset):
42
+ project_name_template = UNSET
43
+ else:
44
+ project_name_template = self.project_name_template
41
45
 
42
46
  project_role: Union[None, Unset, str]
43
47
  if isinstance(self.project_role, Unset):
@@ -73,7 +77,14 @@ class GroupInvitationRequest:
73
77
 
74
78
  auto_create_project = d.pop("auto_create_project", UNSET)
75
79
 
76
- project_name_template = d.pop("project_name_template", UNSET)
80
+ def _parse_project_name_template(data: object) -> Union[None, Unset, str]:
81
+ if data is None:
82
+ return data
83
+ if isinstance(data, Unset):
84
+ return data
85
+ return cast(Union[None, Unset, str], data)
86
+
87
+ project_name_template = _parse_project_name_template(d.pop("project_name_template", UNSET))
77
88
 
78
89
  def _parse_project_role(data: object) -> Union[None, UUID, Unset]:
79
90
  if data is None:
@@ -11,6 +11,7 @@ from ..models.core_states import CoreStates
11
11
  from ..types import UNSET, Unset
12
12
 
13
13
  if TYPE_CHECKING:
14
+ from ..models.open_stack_fixed_ip import OpenStackFixedIp
14
15
  from ..models.open_stack_floating_ip_marketplace_offering_plugin_options_type_0 import (
15
16
  OpenStackFloatingIPMarketplaceOfferingPluginOptionsType0,
16
17
  )
@@ -55,6 +56,7 @@ class OpenStackFloatingIP:
55
56
  tenant_uuid (Union[Unset, UUID]):
56
57
  port (Union[Unset, str]):
57
58
  external_address (Union[None, Unset, str]): An optional address that maps to floating IP's address
59
+ port_fixed_ips (Union[Unset, list['OpenStackFixedIp']]):
58
60
  instance_uuid (Union[None, Unset, str]):
59
61
  instance_name (Union[None, Unset, str]):
60
62
  instance_url (Union[None, Unset, str]):
@@ -103,6 +105,7 @@ class OpenStackFloatingIP:
103
105
  tenant_uuid: Union[Unset, UUID] = UNSET
104
106
  port: Union[Unset, str] = UNSET
105
107
  external_address: Union[None, Unset, str] = UNSET
108
+ port_fixed_ips: Union[Unset, list["OpenStackFixedIp"]] = UNSET
106
109
  instance_uuid: Union[None, Unset, str] = UNSET
107
110
  instance_name: Union[None, Unset, str] = UNSET
108
111
  instance_url: Union[None, Unset, str] = UNSET
@@ -215,6 +218,13 @@ class OpenStackFloatingIP:
215
218
  else:
216
219
  external_address = self.external_address
217
220
 
221
+ port_fixed_ips: Union[Unset, list[dict[str, Any]]] = UNSET
222
+ if not isinstance(self.port_fixed_ips, Unset):
223
+ port_fixed_ips = []
224
+ for port_fixed_ips_item_data in self.port_fixed_ips:
225
+ port_fixed_ips_item = port_fixed_ips_item_data.to_dict()
226
+ port_fixed_ips.append(port_fixed_ips_item)
227
+
218
228
  instance_uuid: Union[None, Unset, str]
219
229
  if isinstance(self.instance_uuid, Unset):
220
230
  instance_uuid = UNSET
@@ -364,6 +374,8 @@ class OpenStackFloatingIP:
364
374
  field_dict["port"] = port
365
375
  if external_address is not UNSET:
366
376
  field_dict["external_address"] = external_address
377
+ if port_fixed_ips is not UNSET:
378
+ field_dict["port_fixed_ips"] = port_fixed_ips
367
379
  if instance_uuid is not UNSET:
368
380
  field_dict["instance_uuid"] = instance_uuid
369
381
  if instance_name is not UNSET:
@@ -395,6 +407,7 @@ class OpenStackFloatingIP:
395
407
 
396
408
  @classmethod
397
409
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
410
+ from ..models.open_stack_fixed_ip import OpenStackFixedIp
398
411
  from ..models.open_stack_floating_ip_marketplace_offering_plugin_options_type_0 import (
399
412
  OpenStackFloatingIPMarketplaceOfferingPluginOptionsType0,
400
413
  )
@@ -520,6 +533,13 @@ class OpenStackFloatingIP:
520
533
 
521
534
  external_address = _parse_external_address(d.pop("external_address", UNSET))
522
535
 
536
+ port_fixed_ips = []
537
+ _port_fixed_ips = d.pop("port_fixed_ips", UNSET)
538
+ for port_fixed_ips_item_data in _port_fixed_ips or []:
539
+ port_fixed_ips_item = OpenStackFixedIp.from_dict(port_fixed_ips_item_data)
540
+
541
+ port_fixed_ips.append(port_fixed_ips_item)
542
+
523
543
  def _parse_instance_uuid(data: object) -> Union[None, Unset, str]:
524
544
  if data is None:
525
545
  return data
@@ -684,6 +704,7 @@ class OpenStackFloatingIP:
684
704
  tenant_uuid=tenant_uuid,
685
705
  port=port,
686
706
  external_address=external_address,
707
+ port_fixed_ips=port_fixed_ips,
687
708
  instance_uuid=instance_uuid,
688
709
  instance_name=instance_name,
689
710
  instance_url=instance_url,
@@ -31,6 +31,7 @@ class OpenstackFloatingIpsListFieldItem(str, Enum):
31
31
  MODIFIED = "modified"
32
32
  NAME = "name"
33
33
  PORT = "port"
34
+ PORT_FIXED_IPS = "port_fixed_ips"
34
35
  PROJECT = "project"
35
36
  PROJECT_NAME = "project_name"
36
37
  PROJECT_UUID = "project_uuid"
@@ -31,6 +31,7 @@ class OpenstackFloatingIpsRetrieveFieldItem(str, Enum):
31
31
  MODIFIED = "modified"
32
32
  NAME = "name"
33
33
  PORT = "port"
34
+ PORT_FIXED_IPS = "port_fixed_ips"
34
35
  PROJECT = "project"
35
36
  PROJECT_NAME = "project_name"
36
37
  PROJECT_UUID = "project_uuid"
@@ -0,0 +1,88 @@
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="PatchedProposalProjectRoleMappingRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class PatchedProposalProjectRoleMappingRequest:
14
+ """
15
+ Attributes:
16
+ call (Union[Unset, str]):
17
+ proposal_role (Union[Unset, str]):
18
+ project_role (Union[None, Unset, str]):
19
+ """
20
+
21
+ call: Union[Unset, str] = UNSET
22
+ proposal_role: Union[Unset, str] = UNSET
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
+ if call is not UNSET:
41
+ field_dict["call"] = call
42
+ if proposal_role is not UNSET:
43
+ field_dict["proposal_role"] = proposal_role
44
+ if project_role is not UNSET:
45
+ field_dict["project_role"] = project_role
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ call = d.pop("call", UNSET)
53
+
54
+ proposal_role = d.pop("proposal_role", UNSET)
55
+
56
+ def _parse_project_role(data: object) -> Union[None, Unset, str]:
57
+ if data is None:
58
+ return data
59
+ if isinstance(data, Unset):
60
+ return data
61
+ return cast(Union[None, Unset, str], data)
62
+
63
+ project_role = _parse_project_role(d.pop("project_role", UNSET))
64
+
65
+ patched_proposal_project_role_mapping_request = cls(
66
+ call=call,
67
+ proposal_role=proposal_role,
68
+ project_role=project_role,
69
+ )
70
+
71
+ patched_proposal_project_role_mapping_request.additional_properties = d
72
+ return patched_proposal_project_role_mapping_request
73
+
74
+ @property
75
+ def additional_keys(self) -> list[str]:
76
+ return list(self.additional_properties.keys())
77
+
78
+ def __getitem__(self, key: str) -> Any:
79
+ return self.additional_properties[key]
80
+
81
+ def __setitem__(self, key: str, value: Any) -> None:
82
+ self.additional_properties[key] = value
83
+
84
+ def __delitem__(self, key: str) -> None:
85
+ del self.additional_properties[key]
86
+
87
+ def __contains__(self, key: str) -> bool:
88
+ return key in self.additional_properties
@@ -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
@@ -25,7 +24,6 @@ class PatchedProtectedCallRequest:
25
24
  scores
26
25
  created_by (Union[None, Unset, str]):
27
26
  reference_code (Union[Unset, str]):
28
- default_project_role (Union[Unset, UUID]):
29
27
  """
30
28
 
31
29
  name: Union[Unset, str] = UNSET
@@ -37,7 +35,6 @@ class PatchedProtectedCallRequest:
37
35
  reviews_visible_to_submitters: Union[Unset, bool] = UNSET
38
36
  created_by: Union[None, Unset, str] = UNSET
39
37
  reference_code: Union[Unset, str] = UNSET
40
- default_project_role: Union[Unset, UUID] = UNSET
41
38
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
39
 
43
40
  def to_dict(self) -> dict[str, Any]:
@@ -71,10 +68,6 @@ class PatchedProtectedCallRequest:
71
68
 
72
69
  reference_code = self.reference_code
73
70
 
74
- default_project_role: Union[Unset, str] = UNSET
75
- if not isinstance(self.default_project_role, Unset):
76
- default_project_role = str(self.default_project_role)
77
-
78
71
  field_dict: dict[str, Any] = {}
79
72
  field_dict.update(self.additional_properties)
80
73
  field_dict.update({})
@@ -96,8 +89,6 @@ class PatchedProtectedCallRequest:
96
89
  field_dict["created_by"] = created_by
97
90
  if reference_code is not UNSET:
98
91
  field_dict["reference_code"] = reference_code
99
- if default_project_role is not UNSET:
100
- field_dict["default_project_role"] = default_project_role
101
92
 
102
93
  return field_dict
103
94
 
@@ -143,13 +134,6 @@ class PatchedProtectedCallRequest:
143
134
 
144
135
  reference_code = d.pop("reference_code", UNSET)
145
136
 
146
- _default_project_role = d.pop("default_project_role", UNSET)
147
- default_project_role: Union[Unset, UUID]
148
- if isinstance(_default_project_role, Unset):
149
- default_project_role = UNSET
150
- else:
151
- default_project_role = UUID(_default_project_role)
152
-
153
137
  patched_protected_call_request = cls(
154
138
  name=name,
155
139
  description=description,
@@ -160,7 +144,6 @@ class PatchedProtectedCallRequest:
160
144
  reviews_visible_to_submitters=reviews_visible_to_submitters,
161
145
  created_by=created_by,
162
146
  reference_code=reference_code,
163
- default_project_role=default_project_role,
164
147
  )
165
148
 
166
149
  patched_protected_call_request.additional_properties = d
@@ -1,11 +1,16 @@
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
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
7
  from ..types import UNSET, Unset
8
8
 
9
+ if TYPE_CHECKING:
10
+ from ..models.patched_rule_request_plan_attributes import PatchedRuleRequestPlanAttributes
11
+ from ..models.patched_rule_request_plan_limits import PatchedRuleRequestPlanLimits
12
+
13
+
9
14
  T = TypeVar("T", bound="PatchedRuleRequest")
10
15
 
11
16
 
@@ -13,19 +18,31 @@ T = TypeVar("T", bound="PatchedRuleRequest")
13
18
  class PatchedRuleRequest:
14
19
  """
15
20
  Attributes:
21
+ name (Union[Unset, str]):
16
22
  user_affiliations (Union[Unset, list[str]]):
17
23
  user_email_patterns (Union[Unset, list[str]]):
18
24
  customer (Union[Unset, str]):
19
25
  project_role (Union[None, Unset, str]):
26
+ project_role_name (Union[None, Unset, str]):
27
+ plan (Union[None, Unset, str]):
28
+ plan_attributes (Union[Unset, PatchedRuleRequestPlanAttributes]):
29
+ plan_limits (Union[Unset, PatchedRuleRequestPlanLimits]):
20
30
  """
21
31
 
32
+ name: Union[Unset, str] = UNSET
22
33
  user_affiliations: Union[Unset, list[str]] = UNSET
23
34
  user_email_patterns: Union[Unset, list[str]] = UNSET
24
35
  customer: Union[Unset, str] = UNSET
25
36
  project_role: Union[None, Unset, str] = UNSET
37
+ project_role_name: Union[None, Unset, str] = UNSET
38
+ plan: Union[None, Unset, str] = UNSET
39
+ plan_attributes: Union[Unset, "PatchedRuleRequestPlanAttributes"] = UNSET
40
+ plan_limits: Union[Unset, "PatchedRuleRequestPlanLimits"] = UNSET
26
41
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
42
 
28
43
  def to_dict(self) -> dict[str, Any]:
44
+ name = self.name
45
+
29
46
  user_affiliations: Union[Unset, list[str]] = UNSET
30
47
  if not isinstance(self.user_affiliations, Unset):
31
48
  user_affiliations = self.user_affiliations
@@ -42,9 +59,31 @@ class PatchedRuleRequest:
42
59
  else:
43
60
  project_role = self.project_role
44
61
 
62
+ project_role_name: Union[None, Unset, str]
63
+ if isinstance(self.project_role_name, Unset):
64
+ project_role_name = UNSET
65
+ else:
66
+ project_role_name = self.project_role_name
67
+
68
+ plan: Union[None, Unset, str]
69
+ if isinstance(self.plan, Unset):
70
+ plan = UNSET
71
+ else:
72
+ plan = self.plan
73
+
74
+ plan_attributes: Union[Unset, dict[str, Any]] = UNSET
75
+ if not isinstance(self.plan_attributes, Unset):
76
+ plan_attributes = self.plan_attributes.to_dict()
77
+
78
+ plan_limits: Union[Unset, dict[str, Any]] = UNSET
79
+ if not isinstance(self.plan_limits, Unset):
80
+ plan_limits = self.plan_limits.to_dict()
81
+
45
82
  field_dict: dict[str, Any] = {}
46
83
  field_dict.update(self.additional_properties)
47
84
  field_dict.update({})
85
+ if name is not UNSET:
86
+ field_dict["name"] = name
48
87
  if user_affiliations is not UNSET:
49
88
  field_dict["user_affiliations"] = user_affiliations
50
89
  if user_email_patterns is not UNSET:
@@ -53,12 +92,25 @@ class PatchedRuleRequest:
53
92
  field_dict["customer"] = customer
54
93
  if project_role is not UNSET:
55
94
  field_dict["project_role"] = project_role
95
+ if project_role_name is not UNSET:
96
+ field_dict["project_role_name"] = project_role_name
97
+ if plan is not UNSET:
98
+ field_dict["plan"] = plan
99
+ if plan_attributes is not UNSET:
100
+ field_dict["plan_attributes"] = plan_attributes
101
+ if plan_limits is not UNSET:
102
+ field_dict["plan_limits"] = plan_limits
56
103
 
57
104
  return field_dict
58
105
 
59
106
  @classmethod
60
107
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
108
+ from ..models.patched_rule_request_plan_attributes import PatchedRuleRequestPlanAttributes
109
+ from ..models.patched_rule_request_plan_limits import PatchedRuleRequestPlanLimits
110
+
61
111
  d = dict(src_dict)
112
+ name = d.pop("name", UNSET)
113
+
62
114
  user_affiliations = cast(list[str], d.pop("user_affiliations", UNSET))
63
115
 
64
116
  user_email_patterns = cast(list[str], d.pop("user_email_patterns", UNSET))
@@ -74,11 +126,48 @@ class PatchedRuleRequest:
74
126
 
75
127
  project_role = _parse_project_role(d.pop("project_role", UNSET))
76
128
 
129
+ def _parse_project_role_name(data: object) -> Union[None, Unset, str]:
130
+ if data is None:
131
+ return data
132
+ if isinstance(data, Unset):
133
+ return data
134
+ return cast(Union[None, Unset, str], data)
135
+
136
+ project_role_name = _parse_project_role_name(d.pop("project_role_name", UNSET))
137
+
138
+ def _parse_plan(data: object) -> Union[None, Unset, str]:
139
+ if data is None:
140
+ return data
141
+ if isinstance(data, Unset):
142
+ return data
143
+ return cast(Union[None, Unset, str], data)
144
+
145
+ plan = _parse_plan(d.pop("plan", UNSET))
146
+
147
+ _plan_attributes = d.pop("plan_attributes", UNSET)
148
+ plan_attributes: Union[Unset, PatchedRuleRequestPlanAttributes]
149
+ if isinstance(_plan_attributes, Unset):
150
+ plan_attributes = UNSET
151
+ else:
152
+ plan_attributes = PatchedRuleRequestPlanAttributes.from_dict(_plan_attributes)
153
+
154
+ _plan_limits = d.pop("plan_limits", UNSET)
155
+ plan_limits: Union[Unset, PatchedRuleRequestPlanLimits]
156
+ if isinstance(_plan_limits, Unset):
157
+ plan_limits = UNSET
158
+ else:
159
+ plan_limits = PatchedRuleRequestPlanLimits.from_dict(_plan_limits)
160
+
77
161
  patched_rule_request = cls(
162
+ name=name,
78
163
  user_affiliations=user_affiliations,
79
164
  user_email_patterns=user_email_patterns,
80
165
  customer=customer,
81
166
  project_role=project_role,
167
+ project_role_name=project_role_name,
168
+ plan=plan,
169
+ plan_attributes=plan_attributes,
170
+ plan_limits=plan_limits,
82
171
  )
83
172
 
84
173
  patched_rule_request.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="PatchedRulePlansRequestLimits")
7
+ T = TypeVar("T", bound="PatchedRuleRequestPlanAttributes")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class PatchedRulePlansRequestLimits:
11
+ class PatchedRuleRequestPlanAttributes:
12
12
  """ """
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +22,10 @@ class PatchedRulePlansRequestLimits:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- patched_rule_plans_request_limits = cls()
25
+ patched_rule_request_plan_attributes = cls()
26
26
 
27
- patched_rule_plans_request_limits.additional_properties = d
28
- return patched_rule_plans_request_limits
27
+ patched_rule_request_plan_attributes.additional_properties = d
28
+ return patched_rule_request_plan_attributes
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]:
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="PatchedRuleRequestPlanLimits")
8
+
9
+
10
+ @_attrs_define
11
+ class PatchedRuleRequestPlanLimits:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ patched_rule_request_plan_limits = cls()
26
+
27
+ patched_rule_request_plan_limits.additional_properties = d
28
+ return patched_rule_request_plan_limits
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties