waldur-api-client 7.6.9__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.
- waldur_api_client/api/broadcast_messages/broadcast_messages_schedule.py +89 -0
- 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
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_destroy.py +89 -0
- 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
- 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
- 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
- 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
- waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py → marketplace_plans/marketplace_plans_destroy.py} +1 -1
- waldur_api_client/models/__init__.py +18 -18
- waldur_api_client/models/event_types_enum.py +1 -0
- waldur_api_client/models/patched_proposal_project_role_mapping_request.py +88 -0
- waldur_api_client/models/patched_protected_call_request.py +0 -17
- waldur_api_client/models/patched_rule_request.py +90 -1
- waldur_api_client/models/{patched_rule_plans_request_limits.py → patched_rule_request_plan_attributes.py} +5 -5
- waldur_api_client/models/patched_rule_request_plan_limits.py +44 -0
- waldur_api_client/models/proposal_project_role_mapping.py +122 -0
- waldur_api_client/models/proposal_project_role_mapping_request.py +89 -0
- waldur_api_client/models/proposal_protected_calls_list_field_item.py +0 -3
- waldur_api_client/models/proposal_protected_calls_retrieve_field_item.py +0 -3
- waldur_api_client/models/protected_call.py +0 -34
- waldur_api_client/models/protected_call_request.py +0 -17
- waldur_api_client/models/provider_offering_details.py +1 -1
- waldur_api_client/models/public_offering_details.py +1 -1
- waldur_api_client/models/rule.py +99 -7
- waldur_api_client/models/{rule_plans_attributes.py → rule_plan_attributes.py} +5 -5
- waldur_api_client/models/{rule_plans_limits.py → rule_plan_limits.py} +5 -5
- waldur_api_client/models/rule_request.py +89 -1
- waldur_api_client/models/{rule_plans_request_attributes.py → rule_request_plan_attributes.py} +5 -5
- waldur_api_client/models/{rule_plans_request_limits.py → rule_request_plan_limits.py} +5 -5
- {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.0.dist-info}/METADATA +1 -1
- {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.0.dist-info}/RECORD +34 -32
- waldur_api_client/models/patched_rule_plans_request.py +0 -108
- waldur_api_client/models/patched_rule_plans_request_attributes.py +0 -44
- waldur_api_client/models/rule_plans.py +0 -126
- waldur_api_client/models/rule_plans_request.py +0 -109
- /waldur_api_client/api/{autoprovisioning_rule_plans → call_proposal_project_role_mappings}/__init__.py +0 -0
- {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.0.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.6.9.dist-info → waldur_api_client-7.7.0.dist-info}/WHEEL +0 -0
|
@@ -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="
|
|
7
|
+
T = TypeVar("T", bound="PatchedRuleRequestPlanAttributes")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
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
|
-
|
|
25
|
+
patched_rule_request_plan_attributes = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
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
|
|
@@ -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
|
|
waldur_api_client/models/rule.py
CHANGED
|
@@ -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,54 @@ 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
|
-
|
|
26
|
+
customer_name (str):
|
|
27
|
+
customer_uuid (str):
|
|
28
|
+
project_role_dispay_name (str):
|
|
29
|
+
project_role_description (str):
|
|
21
30
|
user_affiliations (Union[Unset, list[str]]):
|
|
22
31
|
user_email_patterns (Union[Unset, list[str]]):
|
|
23
32
|
project_role (Union[None, Unset, str]):
|
|
33
|
+
plan (Union[None, Unset, str]):
|
|
34
|
+
plan_attributes (Union[Unset, RulePlanAttributes]):
|
|
35
|
+
plan_limits (Union[Unset, RulePlanLimits]):
|
|
24
36
|
"""
|
|
25
37
|
|
|
38
|
+
name: str
|
|
26
39
|
uuid: UUID
|
|
27
40
|
url: str
|
|
28
41
|
customer: str
|
|
29
|
-
|
|
42
|
+
customer_name: str
|
|
43
|
+
customer_uuid: str
|
|
44
|
+
project_role_dispay_name: str
|
|
45
|
+
project_role_description: str
|
|
30
46
|
user_affiliations: Union[Unset, list[str]] = UNSET
|
|
31
47
|
user_email_patterns: Union[Unset, list[str]] = UNSET
|
|
32
48
|
project_role: Union[None, Unset, str] = UNSET
|
|
49
|
+
plan: Union[None, Unset, str] = UNSET
|
|
50
|
+
plan_attributes: Union[Unset, "RulePlanAttributes"] = UNSET
|
|
51
|
+
plan_limits: Union[Unset, "RulePlanLimits"] = UNSET
|
|
33
52
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
53
|
|
|
35
54
|
def to_dict(self) -> dict[str, Any]:
|
|
55
|
+
name = self.name
|
|
56
|
+
|
|
36
57
|
uuid = str(self.uuid)
|
|
37
58
|
|
|
38
59
|
url = self.url
|
|
39
60
|
|
|
40
61
|
customer = self.customer
|
|
41
62
|
|
|
42
|
-
|
|
63
|
+
customer_name = self.customer_name
|
|
64
|
+
|
|
65
|
+
customer_uuid = self.customer_uuid
|
|
66
|
+
|
|
67
|
+
project_role_dispay_name = self.project_role_dispay_name
|
|
68
|
+
|
|
69
|
+
project_role_description = self.project_role_description
|
|
43
70
|
|
|
44
71
|
user_affiliations: Union[Unset, list[str]] = UNSET
|
|
45
72
|
if not isinstance(self.user_affiliations, Unset):
|
|
@@ -55,14 +82,32 @@ class Rule:
|
|
|
55
82
|
else:
|
|
56
83
|
project_role = self.project_role
|
|
57
84
|
|
|
85
|
+
plan: Union[None, Unset, str]
|
|
86
|
+
if isinstance(self.plan, Unset):
|
|
87
|
+
plan = UNSET
|
|
88
|
+
else:
|
|
89
|
+
plan = self.plan
|
|
90
|
+
|
|
91
|
+
plan_attributes: Union[Unset, dict[str, Any]] = UNSET
|
|
92
|
+
if not isinstance(self.plan_attributes, Unset):
|
|
93
|
+
plan_attributes = self.plan_attributes.to_dict()
|
|
94
|
+
|
|
95
|
+
plan_limits: Union[Unset, dict[str, Any]] = UNSET
|
|
96
|
+
if not isinstance(self.plan_limits, Unset):
|
|
97
|
+
plan_limits = self.plan_limits.to_dict()
|
|
98
|
+
|
|
58
99
|
field_dict: dict[str, Any] = {}
|
|
59
100
|
field_dict.update(self.additional_properties)
|
|
60
101
|
field_dict.update(
|
|
61
102
|
{
|
|
103
|
+
"name": name,
|
|
62
104
|
"uuid": uuid,
|
|
63
105
|
"url": url,
|
|
64
106
|
"customer": customer,
|
|
65
|
-
"
|
|
107
|
+
"customer_name": customer_name,
|
|
108
|
+
"customer_uuid": customer_uuid,
|
|
109
|
+
"project_role_dispay_name": project_role_dispay_name,
|
|
110
|
+
"project_role_description": project_role_description,
|
|
66
111
|
}
|
|
67
112
|
)
|
|
68
113
|
if user_affiliations is not UNSET:
|
|
@@ -71,19 +116,36 @@ class Rule:
|
|
|
71
116
|
field_dict["user_email_patterns"] = user_email_patterns
|
|
72
117
|
if project_role is not UNSET:
|
|
73
118
|
field_dict["project_role"] = project_role
|
|
119
|
+
if plan is not UNSET:
|
|
120
|
+
field_dict["plan"] = plan
|
|
121
|
+
if plan_attributes is not UNSET:
|
|
122
|
+
field_dict["plan_attributes"] = plan_attributes
|
|
123
|
+
if plan_limits is not UNSET:
|
|
124
|
+
field_dict["plan_limits"] = plan_limits
|
|
74
125
|
|
|
75
126
|
return field_dict
|
|
76
127
|
|
|
77
128
|
@classmethod
|
|
78
129
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
130
|
+
from ..models.rule_plan_attributes import RulePlanAttributes
|
|
131
|
+
from ..models.rule_plan_limits import RulePlanLimits
|
|
132
|
+
|
|
79
133
|
d = dict(src_dict)
|
|
134
|
+
name = d.pop("name")
|
|
135
|
+
|
|
80
136
|
uuid = UUID(d.pop("uuid"))
|
|
81
137
|
|
|
82
138
|
url = d.pop("url")
|
|
83
139
|
|
|
84
140
|
customer = d.pop("customer")
|
|
85
141
|
|
|
86
|
-
|
|
142
|
+
customer_name = d.pop("customer_name")
|
|
143
|
+
|
|
144
|
+
customer_uuid = d.pop("customer_uuid")
|
|
145
|
+
|
|
146
|
+
project_role_dispay_name = d.pop("project_role_dispay_name")
|
|
147
|
+
|
|
148
|
+
project_role_description = d.pop("project_role_description")
|
|
87
149
|
|
|
88
150
|
user_affiliations = cast(list[str], d.pop("user_affiliations", UNSET))
|
|
89
151
|
|
|
@@ -98,14 +160,44 @@ class Rule:
|
|
|
98
160
|
|
|
99
161
|
project_role = _parse_project_role(d.pop("project_role", UNSET))
|
|
100
162
|
|
|
163
|
+
def _parse_plan(data: object) -> Union[None, Unset, str]:
|
|
164
|
+
if data is None:
|
|
165
|
+
return data
|
|
166
|
+
if isinstance(data, Unset):
|
|
167
|
+
return data
|
|
168
|
+
return cast(Union[None, Unset, str], data)
|
|
169
|
+
|
|
170
|
+
plan = _parse_plan(d.pop("plan", UNSET))
|
|
171
|
+
|
|
172
|
+
_plan_attributes = d.pop("plan_attributes", UNSET)
|
|
173
|
+
plan_attributes: Union[Unset, RulePlanAttributes]
|
|
174
|
+
if isinstance(_plan_attributes, Unset):
|
|
175
|
+
plan_attributes = UNSET
|
|
176
|
+
else:
|
|
177
|
+
plan_attributes = RulePlanAttributes.from_dict(_plan_attributes)
|
|
178
|
+
|
|
179
|
+
_plan_limits = d.pop("plan_limits", UNSET)
|
|
180
|
+
plan_limits: Union[Unset, RulePlanLimits]
|
|
181
|
+
if isinstance(_plan_limits, Unset):
|
|
182
|
+
plan_limits = UNSET
|
|
183
|
+
else:
|
|
184
|
+
plan_limits = RulePlanLimits.from_dict(_plan_limits)
|
|
185
|
+
|
|
101
186
|
rule = cls(
|
|
187
|
+
name=name,
|
|
102
188
|
uuid=uuid,
|
|
103
189
|
url=url,
|
|
104
190
|
customer=customer,
|
|
105
|
-
|
|
191
|
+
customer_name=customer_name,
|
|
192
|
+
customer_uuid=customer_uuid,
|
|
193
|
+
project_role_dispay_name=project_role_dispay_name,
|
|
194
|
+
project_role_description=project_role_description,
|
|
106
195
|
user_affiliations=user_affiliations,
|
|
107
196
|
user_email_patterns=user_email_patterns,
|
|
108
197
|
project_role=project_role,
|
|
198
|
+
plan=plan,
|
|
199
|
+
plan_attributes=plan_attributes,
|
|
200
|
+
plan_limits=plan_limits,
|
|
109
201
|
)
|
|
110
202
|
|
|
111
203
|
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="
|
|
7
|
+
T = TypeVar("T", bound="RulePlanAttributes")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
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
|
-
|
|
25
|
+
rule_plan_attributes = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
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]:
|