waldur-api-client 7.6.8__py3-none-any.whl → 7.7.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.

Potentially problematic release.


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

Files changed (91) hide show
  1. waldur_api_client/api/broadcast_messages/broadcast_messages_schedule.py +89 -0
  2. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_create.py +152 -0
  3. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_destroy.py +89 -0
  4. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_list.py +194 -0
  5. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_partial_update.py +166 -0
  6. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_retrieve.py +144 -0
  7. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_update.py +166 -0
  8. waldur_api_client/api/invoices/invoices_list.py +0 -30
  9. waldur_api_client/api/invoices/invoices_stats_list.py +0 -30
  10. waldur_api_client/api/marketplace_maintenance_announcement_offerings/__init__.py +1 -0
  11. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_create.py +152 -0
  12. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_destroy.py +89 -0
  13. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_list.py +175 -0
  14. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_partial_update.py +166 -0
  15. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_retrieve.py +144 -0
  16. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_update.py +166 -0
  17. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/__init__.py +1 -0
  18. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_create.py +152 -0
  19. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_destroy.py +89 -0
  20. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_list.py +175 -0
  21. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_partial_update.py +168 -0
  22. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_retrieve.py +144 -0
  23. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_update.py +166 -0
  24. waldur_api_client/api/marketplace_maintenance_announcements/__init__.py +1 -0
  25. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_create.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_create.py} +25 -23
  26. waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_destroy.py +89 -0
  27. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_list.py} +15 -13
  28. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_partial_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_partial_update.py} +25 -23
  29. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_retrieve.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_retrieve.py} +15 -13
  30. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_update.py} +25 -23
  31. waldur_api_client/api/marketplace_maintenance_announcements_template/__init__.py +1 -0
  32. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_create.py +152 -0
  33. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_destroy.py +89 -0
  34. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_list.py +175 -0
  35. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_partial_update.py +166 -0
  36. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_retrieve.py +144 -0
  37. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_update.py +166 -0
  38. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py → marketplace_plans/marketplace_plans_destroy.py} +1 -1
  39. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_offering_component.py +6 -6
  40. waldur_api_client/api/openstack_volume_types/openstack_volume_types_names_retrieve.py +118 -0
  41. waldur_api_client/models/__init__.py +52 -18
  42. waldur_api_client/models/constance_settings.py +22 -0
  43. waldur_api_client/models/constance_settings_request.py +22 -0
  44. waldur_api_client/models/event_types_enum.py +1 -0
  45. waldur_api_client/models/impact_level_enum.py +11 -0
  46. waldur_api_client/models/maintenance_announcement.py +225 -0
  47. waldur_api_client/models/maintenance_announcement_offering.py +112 -0
  48. waldur_api_client/models/maintenance_announcement_offering_request.py +95 -0
  49. waldur_api_client/models/maintenance_announcement_offering_template.py +112 -0
  50. waldur_api_client/models/maintenance_announcement_offering_template_request.py +95 -0
  51. waldur_api_client/models/maintenance_announcement_request.py +113 -0
  52. waldur_api_client/models/maintenance_announcement_state_enum.py +12 -0
  53. waldur_api_client/models/maintenance_announcement_template.py +134 -0
  54. waldur_api_client/models/maintenance_announcement_template_request.py +95 -0
  55. waldur_api_client/models/maintenance_type_enum.py +12 -0
  56. waldur_api_client/models/merged_plugin_options.py +1 -1
  57. waldur_api_client/models/merged_plugin_options_request.py +1 -1
  58. waldur_api_client/models/offering_component.py +15 -4
  59. waldur_api_client/models/patched_maintenance_announcement_offering_request.py +94 -0
  60. waldur_api_client/models/patched_maintenance_announcement_offering_template_request.py +94 -0
  61. waldur_api_client/models/patched_maintenance_announcement_request.py +128 -0
  62. waldur_api_client/models/patched_maintenance_announcement_template_request.py +94 -0
  63. waldur_api_client/models/patched_proposal_project_role_mapping_request.py +88 -0
  64. waldur_api_client/models/patched_protected_call_request.py +0 -17
  65. waldur_api_client/models/patched_rule_request.py +90 -1
  66. waldur_api_client/models/{patched_rule_plans_request_limits.py → patched_rule_request_plan_attributes.py} +5 -5
  67. waldur_api_client/models/patched_rule_request_plan_limits.py +44 -0
  68. waldur_api_client/models/proposal_project_role_mapping.py +122 -0
  69. waldur_api_client/models/proposal_project_role_mapping_request.py +89 -0
  70. waldur_api_client/models/proposal_protected_calls_list_field_item.py +0 -3
  71. waldur_api_client/models/proposal_protected_calls_retrieve_field_item.py +0 -3
  72. waldur_api_client/models/protected_call.py +0 -34
  73. waldur_api_client/models/protected_call_request.py +0 -17
  74. waldur_api_client/models/provider_offering_details.py +1 -1
  75. waldur_api_client/models/public_offering_details.py +1 -1
  76. waldur_api_client/models/rule.py +99 -7
  77. waldur_api_client/models/{rule_plans_attributes.py → rule_plan_attributes.py} +5 -5
  78. waldur_api_client/models/{rule_plans_limits.py → rule_plan_limits.py} +5 -5
  79. waldur_api_client/models/rule_request.py +89 -1
  80. waldur_api_client/models/{rule_plans_request_attributes.py → rule_request_plan_attributes.py} +5 -5
  81. waldur_api_client/models/{rule_plans_request_limits.py → rule_request_plan_limits.py} +5 -5
  82. waldur_api_client/models/update_offering_component_request.py +274 -0
  83. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/METADATA +1 -1
  84. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/RECORD +87 -40
  85. waldur_api_client/models/patched_rule_plans_request.py +0 -108
  86. waldur_api_client/models/patched_rule_plans_request_attributes.py +0 -44
  87. waldur_api_client/models/rule_plans.py +0 -126
  88. waldur_api_client/models/rule_plans_request.py +0 -109
  89. /waldur_api_client/api/{autoprovisioning_rule_plans → call_proposal_project_role_mappings}/__init__.py +0 -0
  90. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/LICENSE +0 -0
  91. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,128 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar, Union
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ from ..models.maintenance_type_enum import MaintenanceTypeEnum
10
+ from ..types import UNSET, Unset
11
+
12
+ T = TypeVar("T", bound="PatchedMaintenanceAnnouncementRequest")
13
+
14
+
15
+ @_attrs_define
16
+ class PatchedMaintenanceAnnouncementRequest:
17
+ """
18
+ Attributes:
19
+ name (Union[Unset, str]):
20
+ message (Union[Unset, str]):
21
+ maintenance_type (Union[Unset, MaintenanceTypeEnum]):
22
+ scheduled_start (Union[Unset, datetime.datetime]): When the maintenance is scheduled to begin
23
+ scheduled_end (Union[Unset, datetime.datetime]): When the maintenance is scheduled to complete
24
+ service_provider (Union[Unset, str]): Service provider announcing the maintenance
25
+ """
26
+
27
+ name: Union[Unset, str] = UNSET
28
+ message: Union[Unset, str] = UNSET
29
+ maintenance_type: Union[Unset, MaintenanceTypeEnum] = UNSET
30
+ scheduled_start: Union[Unset, datetime.datetime] = UNSET
31
+ scheduled_end: Union[Unset, datetime.datetime] = UNSET
32
+ service_provider: Union[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
+ name = self.name
37
+
38
+ message = self.message
39
+
40
+ maintenance_type: Union[Unset, int] = UNSET
41
+ if not isinstance(self.maintenance_type, Unset):
42
+ maintenance_type = self.maintenance_type.value
43
+
44
+ scheduled_start: Union[Unset, str] = UNSET
45
+ if not isinstance(self.scheduled_start, Unset):
46
+ scheduled_start = self.scheduled_start.isoformat()
47
+
48
+ scheduled_end: Union[Unset, str] = UNSET
49
+ if not isinstance(self.scheduled_end, Unset):
50
+ scheduled_end = self.scheduled_end.isoformat()
51
+
52
+ service_provider = self.service_provider
53
+
54
+ field_dict: dict[str, Any] = {}
55
+ field_dict.update(self.additional_properties)
56
+ field_dict.update({})
57
+ if name is not UNSET:
58
+ field_dict["name"] = name
59
+ if message is not UNSET:
60
+ field_dict["message"] = message
61
+ if maintenance_type is not UNSET:
62
+ field_dict["maintenance_type"] = maintenance_type
63
+ if scheduled_start is not UNSET:
64
+ field_dict["scheduled_start"] = scheduled_start
65
+ if scheduled_end is not UNSET:
66
+ field_dict["scheduled_end"] = scheduled_end
67
+ if service_provider is not UNSET:
68
+ field_dict["service_provider"] = service_provider
69
+
70
+ return field_dict
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ d = dict(src_dict)
75
+ name = d.pop("name", UNSET)
76
+
77
+ message = d.pop("message", UNSET)
78
+
79
+ _maintenance_type = d.pop("maintenance_type", UNSET)
80
+ maintenance_type: Union[Unset, MaintenanceTypeEnum]
81
+ if isinstance(_maintenance_type, Unset):
82
+ maintenance_type = UNSET
83
+ else:
84
+ maintenance_type = MaintenanceTypeEnum(_maintenance_type)
85
+
86
+ _scheduled_start = d.pop("scheduled_start", UNSET)
87
+ scheduled_start: Union[Unset, datetime.datetime]
88
+ if isinstance(_scheduled_start, Unset):
89
+ scheduled_start = UNSET
90
+ else:
91
+ scheduled_start = isoparse(_scheduled_start)
92
+
93
+ _scheduled_end = d.pop("scheduled_end", UNSET)
94
+ scheduled_end: Union[Unset, datetime.datetime]
95
+ if isinstance(_scheduled_end, Unset):
96
+ scheduled_end = UNSET
97
+ else:
98
+ scheduled_end = isoparse(_scheduled_end)
99
+
100
+ service_provider = d.pop("service_provider", UNSET)
101
+
102
+ patched_maintenance_announcement_request = cls(
103
+ name=name,
104
+ message=message,
105
+ maintenance_type=maintenance_type,
106
+ scheduled_start=scheduled_start,
107
+ scheduled_end=scheduled_end,
108
+ service_provider=service_provider,
109
+ )
110
+
111
+ patched_maintenance_announcement_request.additional_properties = d
112
+ return patched_maintenance_announcement_request
113
+
114
+ @property
115
+ def additional_keys(self) -> list[str]:
116
+ return list(self.additional_properties.keys())
117
+
118
+ def __getitem__(self, key: str) -> Any:
119
+ return self.additional_properties[key]
120
+
121
+ def __setitem__(self, key: str, value: Any) -> None:
122
+ self.additional_properties[key] = value
123
+
124
+ def __delitem__(self, key: str) -> None:
125
+ del self.additional_properties[key]
126
+
127
+ def __contains__(self, key: str) -> bool:
128
+ return key in self.additional_properties
@@ -0,0 +1,94 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..models.maintenance_type_enum import MaintenanceTypeEnum
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="PatchedMaintenanceAnnouncementTemplateRequest")
11
+
12
+
13
+ @_attrs_define
14
+ class PatchedMaintenanceAnnouncementTemplateRequest:
15
+ """
16
+ Attributes:
17
+ name (Union[Unset, str]):
18
+ message (Union[Unset, str]):
19
+ maintenance_type (Union[Unset, MaintenanceTypeEnum]):
20
+ service_provider (Union[Unset, str]): Service provider announcing the maintenance
21
+ """
22
+
23
+ name: Union[Unset, str] = UNSET
24
+ message: Union[Unset, str] = UNSET
25
+ maintenance_type: Union[Unset, MaintenanceTypeEnum] = UNSET
26
+ service_provider: Union[Unset, str] = UNSET
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ name = self.name
31
+
32
+ message = self.message
33
+
34
+ maintenance_type: Union[Unset, int] = UNSET
35
+ if not isinstance(self.maintenance_type, Unset):
36
+ maintenance_type = self.maintenance_type.value
37
+
38
+ service_provider = self.service_provider
39
+
40
+ field_dict: dict[str, Any] = {}
41
+ field_dict.update(self.additional_properties)
42
+ field_dict.update({})
43
+ if name is not UNSET:
44
+ field_dict["name"] = name
45
+ if message is not UNSET:
46
+ field_dict["message"] = message
47
+ if maintenance_type is not UNSET:
48
+ field_dict["maintenance_type"] = maintenance_type
49
+ if service_provider is not UNSET:
50
+ field_dict["service_provider"] = service_provider
51
+
52
+ return field_dict
53
+
54
+ @classmethod
55
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
56
+ d = dict(src_dict)
57
+ name = d.pop("name", UNSET)
58
+
59
+ message = d.pop("message", UNSET)
60
+
61
+ _maintenance_type = d.pop("maintenance_type", UNSET)
62
+ maintenance_type: Union[Unset, MaintenanceTypeEnum]
63
+ if isinstance(_maintenance_type, Unset):
64
+ maintenance_type = UNSET
65
+ else:
66
+ maintenance_type = MaintenanceTypeEnum(_maintenance_type)
67
+
68
+ service_provider = d.pop("service_provider", UNSET)
69
+
70
+ patched_maintenance_announcement_template_request = cls(
71
+ name=name,
72
+ message=message,
73
+ maintenance_type=maintenance_type,
74
+ service_provider=service_provider,
75
+ )
76
+
77
+ patched_maintenance_announcement_template_request.additional_properties = d
78
+ return patched_maintenance_announcement_template_request
79
+
80
+ @property
81
+ def additional_keys(self) -> list[str]:
82
+ return list(self.additional_properties.keys())
83
+
84
+ def __getitem__(self, key: str) -> Any:
85
+ return self.additional_properties[key]
86
+
87
+ def __setitem__(self, key: str, value: Any) -> None:
88
+ self.additional_properties[key] = value
89
+
90
+ def __delitem__(self, key: str) -> None:
91
+ del self.additional_properties[key]
92
+
93
+ def __contains__(self, key: str) -> bool:
94
+ return key in self.additional_properties
@@ -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