waldur-api-client 7.6.8__py3-none-any.whl → 7.6.9__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/invoices/invoices_list.py +0 -30
- waldur_api_client/api/invoices/invoices_stats_list.py +0 -30
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_partial_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_partial_update.py +168 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcements/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_create.py +150 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_partial_update.py +164 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_retrieve.py +142 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_update.py +164 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_partial_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_update.py +166 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_offering_component.py +6 -6
- waldur_api_client/api/openstack_volume_types/openstack_volume_types_names_retrieve.py +118 -0
- waldur_api_client/models/__init__.py +34 -0
- waldur_api_client/models/constance_settings.py +22 -0
- waldur_api_client/models/constance_settings_request.py +22 -0
- waldur_api_client/models/impact_level_enum.py +11 -0
- waldur_api_client/models/maintenance_announcement.py +225 -0
- waldur_api_client/models/maintenance_announcement_offering.py +112 -0
- waldur_api_client/models/maintenance_announcement_offering_request.py +95 -0
- waldur_api_client/models/maintenance_announcement_offering_template.py +112 -0
- waldur_api_client/models/maintenance_announcement_offering_template_request.py +95 -0
- waldur_api_client/models/maintenance_announcement_request.py +113 -0
- waldur_api_client/models/maintenance_announcement_state_enum.py +12 -0
- waldur_api_client/models/maintenance_announcement_template.py +134 -0
- waldur_api_client/models/maintenance_announcement_template_request.py +95 -0
- waldur_api_client/models/maintenance_type_enum.py +12 -0
- waldur_api_client/models/merged_plugin_options.py +1 -1
- waldur_api_client/models/merged_plugin_options_request.py +1 -1
- waldur_api_client/models/offering_component.py +15 -4
- waldur_api_client/models/patched_maintenance_announcement_offering_request.py +94 -0
- waldur_api_client/models/patched_maintenance_announcement_offering_template_request.py +94 -0
- waldur_api_client/models/patched_maintenance_announcement_request.py +128 -0
- waldur_api_client/models/patched_maintenance_announcement_template_request.py +94 -0
- waldur_api_client/models/update_offering_component_request.py +274 -0
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.6.9.dist-info}/METADATA +1 -1
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.6.9.dist-info}/RECORD +58 -13
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.6.9.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.6.9.dist-info}/WHEEL +0 -0
|
@@ -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.impact_level_enum import ImpactLevelEnum
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="PatchedMaintenanceAnnouncementOfferingRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class PatchedMaintenanceAnnouncementOfferingRequest:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
maintenance (Union[Unset, str]):
|
|
18
|
+
offering (Union[Unset, str]):
|
|
19
|
+
impact_level (Union[Unset, ImpactLevelEnum]):
|
|
20
|
+
impact_description (Union[Unset, str]): Specific description of how this offering will be affected
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
maintenance: Union[Unset, str] = UNSET
|
|
24
|
+
offering: Union[Unset, str] = UNSET
|
|
25
|
+
impact_level: Union[Unset, ImpactLevelEnum] = UNSET
|
|
26
|
+
impact_description: 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
|
+
maintenance = self.maintenance
|
|
31
|
+
|
|
32
|
+
offering = self.offering
|
|
33
|
+
|
|
34
|
+
impact_level: Union[Unset, int] = UNSET
|
|
35
|
+
if not isinstance(self.impact_level, Unset):
|
|
36
|
+
impact_level = self.impact_level.value
|
|
37
|
+
|
|
38
|
+
impact_description = self.impact_description
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update({})
|
|
43
|
+
if maintenance is not UNSET:
|
|
44
|
+
field_dict["maintenance"] = maintenance
|
|
45
|
+
if offering is not UNSET:
|
|
46
|
+
field_dict["offering"] = offering
|
|
47
|
+
if impact_level is not UNSET:
|
|
48
|
+
field_dict["impact_level"] = impact_level
|
|
49
|
+
if impact_description is not UNSET:
|
|
50
|
+
field_dict["impact_description"] = impact_description
|
|
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
|
+
maintenance = d.pop("maintenance", UNSET)
|
|
58
|
+
|
|
59
|
+
offering = d.pop("offering", UNSET)
|
|
60
|
+
|
|
61
|
+
_impact_level = d.pop("impact_level", UNSET)
|
|
62
|
+
impact_level: Union[Unset, ImpactLevelEnum]
|
|
63
|
+
if isinstance(_impact_level, Unset):
|
|
64
|
+
impact_level = UNSET
|
|
65
|
+
else:
|
|
66
|
+
impact_level = ImpactLevelEnum(_impact_level)
|
|
67
|
+
|
|
68
|
+
impact_description = d.pop("impact_description", UNSET)
|
|
69
|
+
|
|
70
|
+
patched_maintenance_announcement_offering_request = cls(
|
|
71
|
+
maintenance=maintenance,
|
|
72
|
+
offering=offering,
|
|
73
|
+
impact_level=impact_level,
|
|
74
|
+
impact_description=impact_description,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
patched_maintenance_announcement_offering_request.additional_properties = d
|
|
78
|
+
return patched_maintenance_announcement_offering_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,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.impact_level_enum import ImpactLevelEnum
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="PatchedMaintenanceAnnouncementOfferingTemplateRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class PatchedMaintenanceAnnouncementOfferingTemplateRequest:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
maintenance_template (Union[Unset, str]):
|
|
18
|
+
offering (Union[Unset, str]):
|
|
19
|
+
impact_level (Union[Unset, ImpactLevelEnum]):
|
|
20
|
+
impact_description (Union[Unset, str]): Specific description of how this offering will be affected
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
maintenance_template: Union[Unset, str] = UNSET
|
|
24
|
+
offering: Union[Unset, str] = UNSET
|
|
25
|
+
impact_level: Union[Unset, ImpactLevelEnum] = UNSET
|
|
26
|
+
impact_description: 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
|
+
maintenance_template = self.maintenance_template
|
|
31
|
+
|
|
32
|
+
offering = self.offering
|
|
33
|
+
|
|
34
|
+
impact_level: Union[Unset, int] = UNSET
|
|
35
|
+
if not isinstance(self.impact_level, Unset):
|
|
36
|
+
impact_level = self.impact_level.value
|
|
37
|
+
|
|
38
|
+
impact_description = self.impact_description
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update({})
|
|
43
|
+
if maintenance_template is not UNSET:
|
|
44
|
+
field_dict["maintenance_template"] = maintenance_template
|
|
45
|
+
if offering is not UNSET:
|
|
46
|
+
field_dict["offering"] = offering
|
|
47
|
+
if impact_level is not UNSET:
|
|
48
|
+
field_dict["impact_level"] = impact_level
|
|
49
|
+
if impact_description is not UNSET:
|
|
50
|
+
field_dict["impact_description"] = impact_description
|
|
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
|
+
maintenance_template = d.pop("maintenance_template", UNSET)
|
|
58
|
+
|
|
59
|
+
offering = d.pop("offering", UNSET)
|
|
60
|
+
|
|
61
|
+
_impact_level = d.pop("impact_level", UNSET)
|
|
62
|
+
impact_level: Union[Unset, ImpactLevelEnum]
|
|
63
|
+
if isinstance(_impact_level, Unset):
|
|
64
|
+
impact_level = UNSET
|
|
65
|
+
else:
|
|
66
|
+
impact_level = ImpactLevelEnum(_impact_level)
|
|
67
|
+
|
|
68
|
+
impact_description = d.pop("impact_description", UNSET)
|
|
69
|
+
|
|
70
|
+
patched_maintenance_announcement_offering_template_request = cls(
|
|
71
|
+
maintenance_template=maintenance_template,
|
|
72
|
+
offering=offering,
|
|
73
|
+
impact_level=impact_level,
|
|
74
|
+
impact_description=impact_description,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
patched_maintenance_announcement_offering_template_request.additional_properties = d
|
|
78
|
+
return patched_maintenance_announcement_offering_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,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,274 @@
|
|
|
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 ..models.billing_type_enum import BillingTypeEnum
|
|
9
|
+
from ..models.blank_enum import BlankEnum
|
|
10
|
+
from ..models.limit_period_enum import LimitPeriodEnum
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="UpdateOfferingComponentRequest")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class UpdateOfferingComponentRequest:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
uuid (UUID):
|
|
21
|
+
billing_type (BillingTypeEnum):
|
|
22
|
+
type_ (str): Unique internal name of the measured unit, for example floating_ip.
|
|
23
|
+
name (str): Display name for the measured unit, for example, Floating IP.
|
|
24
|
+
description (Union[Unset, str]):
|
|
25
|
+
measured_unit (Union[Unset, str]): Unit of measurement, for example, GB.
|
|
26
|
+
unit_factor (Union[Unset, int]): The conversion factor from backend units to measured_unit
|
|
27
|
+
limit_period (Union[BlankEnum, LimitPeriodEnum, None, Unset]):
|
|
28
|
+
limit_amount (Union[None, Unset, int]):
|
|
29
|
+
article_code (Union[Unset, str]):
|
|
30
|
+
max_value (Union[None, Unset, int]):
|
|
31
|
+
min_value (Union[None, Unset, int]):
|
|
32
|
+
max_available_limit (Union[None, Unset, int]):
|
|
33
|
+
is_boolean (Union[Unset, bool]):
|
|
34
|
+
default_limit (Union[None, Unset, int]):
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
uuid: UUID
|
|
38
|
+
billing_type: BillingTypeEnum
|
|
39
|
+
type_: str
|
|
40
|
+
name: str
|
|
41
|
+
description: Union[Unset, str] = UNSET
|
|
42
|
+
measured_unit: Union[Unset, str] = UNSET
|
|
43
|
+
unit_factor: Union[Unset, int] = UNSET
|
|
44
|
+
limit_period: Union[BlankEnum, LimitPeriodEnum, None, Unset] = UNSET
|
|
45
|
+
limit_amount: Union[None, Unset, int] = UNSET
|
|
46
|
+
article_code: Union[Unset, str] = UNSET
|
|
47
|
+
max_value: Union[None, Unset, int] = UNSET
|
|
48
|
+
min_value: Union[None, Unset, int] = UNSET
|
|
49
|
+
max_available_limit: Union[None, Unset, int] = UNSET
|
|
50
|
+
is_boolean: Union[Unset, bool] = UNSET
|
|
51
|
+
default_limit: Union[None, Unset, int] = UNSET
|
|
52
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> dict[str, Any]:
|
|
55
|
+
uuid = str(self.uuid)
|
|
56
|
+
|
|
57
|
+
billing_type = self.billing_type.value
|
|
58
|
+
|
|
59
|
+
type_ = self.type_
|
|
60
|
+
|
|
61
|
+
name = self.name
|
|
62
|
+
|
|
63
|
+
description = self.description
|
|
64
|
+
|
|
65
|
+
measured_unit = self.measured_unit
|
|
66
|
+
|
|
67
|
+
unit_factor = self.unit_factor
|
|
68
|
+
|
|
69
|
+
limit_period: Union[None, Unset, str]
|
|
70
|
+
if isinstance(self.limit_period, Unset):
|
|
71
|
+
limit_period = UNSET
|
|
72
|
+
elif isinstance(self.limit_period, LimitPeriodEnum):
|
|
73
|
+
limit_period = self.limit_period.value
|
|
74
|
+
elif isinstance(self.limit_period, BlankEnum):
|
|
75
|
+
limit_period = self.limit_period.value
|
|
76
|
+
else:
|
|
77
|
+
limit_period = self.limit_period
|
|
78
|
+
|
|
79
|
+
limit_amount: Union[None, Unset, int]
|
|
80
|
+
if isinstance(self.limit_amount, Unset):
|
|
81
|
+
limit_amount = UNSET
|
|
82
|
+
else:
|
|
83
|
+
limit_amount = self.limit_amount
|
|
84
|
+
|
|
85
|
+
article_code = self.article_code
|
|
86
|
+
|
|
87
|
+
max_value: Union[None, Unset, int]
|
|
88
|
+
if isinstance(self.max_value, Unset):
|
|
89
|
+
max_value = UNSET
|
|
90
|
+
else:
|
|
91
|
+
max_value = self.max_value
|
|
92
|
+
|
|
93
|
+
min_value: Union[None, Unset, int]
|
|
94
|
+
if isinstance(self.min_value, Unset):
|
|
95
|
+
min_value = UNSET
|
|
96
|
+
else:
|
|
97
|
+
min_value = self.min_value
|
|
98
|
+
|
|
99
|
+
max_available_limit: Union[None, Unset, int]
|
|
100
|
+
if isinstance(self.max_available_limit, Unset):
|
|
101
|
+
max_available_limit = UNSET
|
|
102
|
+
else:
|
|
103
|
+
max_available_limit = self.max_available_limit
|
|
104
|
+
|
|
105
|
+
is_boolean = self.is_boolean
|
|
106
|
+
|
|
107
|
+
default_limit: Union[None, Unset, int]
|
|
108
|
+
if isinstance(self.default_limit, Unset):
|
|
109
|
+
default_limit = UNSET
|
|
110
|
+
else:
|
|
111
|
+
default_limit = self.default_limit
|
|
112
|
+
|
|
113
|
+
field_dict: dict[str, Any] = {}
|
|
114
|
+
field_dict.update(self.additional_properties)
|
|
115
|
+
field_dict.update(
|
|
116
|
+
{
|
|
117
|
+
"uuid": uuid,
|
|
118
|
+
"billing_type": billing_type,
|
|
119
|
+
"type": type_,
|
|
120
|
+
"name": name,
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
if description is not UNSET:
|
|
124
|
+
field_dict["description"] = description
|
|
125
|
+
if measured_unit is not UNSET:
|
|
126
|
+
field_dict["measured_unit"] = measured_unit
|
|
127
|
+
if unit_factor is not UNSET:
|
|
128
|
+
field_dict["unit_factor"] = unit_factor
|
|
129
|
+
if limit_period is not UNSET:
|
|
130
|
+
field_dict["limit_period"] = limit_period
|
|
131
|
+
if limit_amount is not UNSET:
|
|
132
|
+
field_dict["limit_amount"] = limit_amount
|
|
133
|
+
if article_code is not UNSET:
|
|
134
|
+
field_dict["article_code"] = article_code
|
|
135
|
+
if max_value is not UNSET:
|
|
136
|
+
field_dict["max_value"] = max_value
|
|
137
|
+
if min_value is not UNSET:
|
|
138
|
+
field_dict["min_value"] = min_value
|
|
139
|
+
if max_available_limit is not UNSET:
|
|
140
|
+
field_dict["max_available_limit"] = max_available_limit
|
|
141
|
+
if is_boolean is not UNSET:
|
|
142
|
+
field_dict["is_boolean"] = is_boolean
|
|
143
|
+
if default_limit is not UNSET:
|
|
144
|
+
field_dict["default_limit"] = default_limit
|
|
145
|
+
|
|
146
|
+
return field_dict
|
|
147
|
+
|
|
148
|
+
@classmethod
|
|
149
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
150
|
+
d = dict(src_dict)
|
|
151
|
+
uuid = UUID(d.pop("uuid"))
|
|
152
|
+
|
|
153
|
+
billing_type = BillingTypeEnum(d.pop("billing_type"))
|
|
154
|
+
|
|
155
|
+
type_ = d.pop("type")
|
|
156
|
+
|
|
157
|
+
name = d.pop("name")
|
|
158
|
+
|
|
159
|
+
description = d.pop("description", UNSET)
|
|
160
|
+
|
|
161
|
+
measured_unit = d.pop("measured_unit", UNSET)
|
|
162
|
+
|
|
163
|
+
unit_factor = d.pop("unit_factor", UNSET)
|
|
164
|
+
|
|
165
|
+
def _parse_limit_period(data: object) -> Union[BlankEnum, LimitPeriodEnum, None, Unset]:
|
|
166
|
+
if data is None:
|
|
167
|
+
return data
|
|
168
|
+
if isinstance(data, Unset):
|
|
169
|
+
return data
|
|
170
|
+
try:
|
|
171
|
+
if not isinstance(data, str):
|
|
172
|
+
raise TypeError()
|
|
173
|
+
limit_period_type_0 = LimitPeriodEnum(data)
|
|
174
|
+
|
|
175
|
+
return limit_period_type_0
|
|
176
|
+
except: # noqa: E722
|
|
177
|
+
pass
|
|
178
|
+
try:
|
|
179
|
+
if not isinstance(data, str):
|
|
180
|
+
raise TypeError()
|
|
181
|
+
limit_period_type_1 = BlankEnum(data)
|
|
182
|
+
|
|
183
|
+
return limit_period_type_1
|
|
184
|
+
except: # noqa: E722
|
|
185
|
+
pass
|
|
186
|
+
return cast(Union[BlankEnum, LimitPeriodEnum, None, Unset], data)
|
|
187
|
+
|
|
188
|
+
limit_period = _parse_limit_period(d.pop("limit_period", UNSET))
|
|
189
|
+
|
|
190
|
+
def _parse_limit_amount(data: object) -> Union[None, Unset, int]:
|
|
191
|
+
if data is None:
|
|
192
|
+
return data
|
|
193
|
+
if isinstance(data, Unset):
|
|
194
|
+
return data
|
|
195
|
+
return cast(Union[None, Unset, int], data)
|
|
196
|
+
|
|
197
|
+
limit_amount = _parse_limit_amount(d.pop("limit_amount", UNSET))
|
|
198
|
+
|
|
199
|
+
article_code = d.pop("article_code", UNSET)
|
|
200
|
+
|
|
201
|
+
def _parse_max_value(data: object) -> Union[None, Unset, int]:
|
|
202
|
+
if data is None:
|
|
203
|
+
return data
|
|
204
|
+
if isinstance(data, Unset):
|
|
205
|
+
return data
|
|
206
|
+
return cast(Union[None, Unset, int], data)
|
|
207
|
+
|
|
208
|
+
max_value = _parse_max_value(d.pop("max_value", UNSET))
|
|
209
|
+
|
|
210
|
+
def _parse_min_value(data: object) -> Union[None, Unset, int]:
|
|
211
|
+
if data is None:
|
|
212
|
+
return data
|
|
213
|
+
if isinstance(data, Unset):
|
|
214
|
+
return data
|
|
215
|
+
return cast(Union[None, Unset, int], data)
|
|
216
|
+
|
|
217
|
+
min_value = _parse_min_value(d.pop("min_value", UNSET))
|
|
218
|
+
|
|
219
|
+
def _parse_max_available_limit(data: object) -> Union[None, Unset, int]:
|
|
220
|
+
if data is None:
|
|
221
|
+
return data
|
|
222
|
+
if isinstance(data, Unset):
|
|
223
|
+
return data
|
|
224
|
+
return cast(Union[None, Unset, int], data)
|
|
225
|
+
|
|
226
|
+
max_available_limit = _parse_max_available_limit(d.pop("max_available_limit", UNSET))
|
|
227
|
+
|
|
228
|
+
is_boolean = d.pop("is_boolean", UNSET)
|
|
229
|
+
|
|
230
|
+
def _parse_default_limit(data: object) -> Union[None, Unset, int]:
|
|
231
|
+
if data is None:
|
|
232
|
+
return data
|
|
233
|
+
if isinstance(data, Unset):
|
|
234
|
+
return data
|
|
235
|
+
return cast(Union[None, Unset, int], data)
|
|
236
|
+
|
|
237
|
+
default_limit = _parse_default_limit(d.pop("default_limit", UNSET))
|
|
238
|
+
|
|
239
|
+
update_offering_component_request = cls(
|
|
240
|
+
uuid=uuid,
|
|
241
|
+
billing_type=billing_type,
|
|
242
|
+
type_=type_,
|
|
243
|
+
name=name,
|
|
244
|
+
description=description,
|
|
245
|
+
measured_unit=measured_unit,
|
|
246
|
+
unit_factor=unit_factor,
|
|
247
|
+
limit_period=limit_period,
|
|
248
|
+
limit_amount=limit_amount,
|
|
249
|
+
article_code=article_code,
|
|
250
|
+
max_value=max_value,
|
|
251
|
+
min_value=min_value,
|
|
252
|
+
max_available_limit=max_available_limit,
|
|
253
|
+
is_boolean=is_boolean,
|
|
254
|
+
default_limit=default_limit,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
update_offering_component_request.additional_properties = d
|
|
258
|
+
return update_offering_component_request
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def additional_keys(self) -> list[str]:
|
|
262
|
+
return list(self.additional_properties.keys())
|
|
263
|
+
|
|
264
|
+
def __getitem__(self, key: str) -> Any:
|
|
265
|
+
return self.additional_properties[key]
|
|
266
|
+
|
|
267
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
268
|
+
self.additional_properties[key] = value
|
|
269
|
+
|
|
270
|
+
def __delitem__(self, key: str) -> None:
|
|
271
|
+
del self.additional_properties[key]
|
|
272
|
+
|
|
273
|
+
def __contains__(self, key: str) -> bool:
|
|
274
|
+
return key in self.additional_properties
|