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,112 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
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.impact_level_enum import ImpactLevelEnum
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="MaintenanceAnnouncementOfferingTemplate")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class MaintenanceAnnouncementOfferingTemplate:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
url (str):
|
|
19
|
+
uuid (UUID):
|
|
20
|
+
maintenance_template (str):
|
|
21
|
+
offering (str):
|
|
22
|
+
impact_level (Union[Unset, ImpactLevelEnum]):
|
|
23
|
+
impact_description (Union[Unset, str]): Specific description of how this offering will be affected
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
uuid: UUID
|
|
28
|
+
maintenance_template: str
|
|
29
|
+
offering: str
|
|
30
|
+
impact_level: Union[Unset, ImpactLevelEnum] = UNSET
|
|
31
|
+
impact_description: Union[Unset, str] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
url = self.url
|
|
36
|
+
|
|
37
|
+
uuid = str(self.uuid)
|
|
38
|
+
|
|
39
|
+
maintenance_template = self.maintenance_template
|
|
40
|
+
|
|
41
|
+
offering = self.offering
|
|
42
|
+
|
|
43
|
+
impact_level: Union[Unset, int] = UNSET
|
|
44
|
+
if not isinstance(self.impact_level, Unset):
|
|
45
|
+
impact_level = self.impact_level.value
|
|
46
|
+
|
|
47
|
+
impact_description = self.impact_description
|
|
48
|
+
|
|
49
|
+
field_dict: dict[str, Any] = {}
|
|
50
|
+
field_dict.update(self.additional_properties)
|
|
51
|
+
field_dict.update(
|
|
52
|
+
{
|
|
53
|
+
"url": url,
|
|
54
|
+
"uuid": uuid,
|
|
55
|
+
"maintenance_template": maintenance_template,
|
|
56
|
+
"offering": offering,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
if impact_level is not UNSET:
|
|
60
|
+
field_dict["impact_level"] = impact_level
|
|
61
|
+
if impact_description is not UNSET:
|
|
62
|
+
field_dict["impact_description"] = impact_description
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
d = dict(src_dict)
|
|
69
|
+
url = d.pop("url")
|
|
70
|
+
|
|
71
|
+
uuid = UUID(d.pop("uuid"))
|
|
72
|
+
|
|
73
|
+
maintenance_template = d.pop("maintenance_template")
|
|
74
|
+
|
|
75
|
+
offering = d.pop("offering")
|
|
76
|
+
|
|
77
|
+
_impact_level = d.pop("impact_level", UNSET)
|
|
78
|
+
impact_level: Union[Unset, ImpactLevelEnum]
|
|
79
|
+
if isinstance(_impact_level, Unset):
|
|
80
|
+
impact_level = UNSET
|
|
81
|
+
else:
|
|
82
|
+
impact_level = ImpactLevelEnum(_impact_level)
|
|
83
|
+
|
|
84
|
+
impact_description = d.pop("impact_description", UNSET)
|
|
85
|
+
|
|
86
|
+
maintenance_announcement_offering_template = cls(
|
|
87
|
+
url=url,
|
|
88
|
+
uuid=uuid,
|
|
89
|
+
maintenance_template=maintenance_template,
|
|
90
|
+
offering=offering,
|
|
91
|
+
impact_level=impact_level,
|
|
92
|
+
impact_description=impact_description,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
maintenance_announcement_offering_template.additional_properties = d
|
|
96
|
+
return maintenance_announcement_offering_template
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def additional_keys(self) -> list[str]:
|
|
100
|
+
return list(self.additional_properties.keys())
|
|
101
|
+
|
|
102
|
+
def __getitem__(self, key: str) -> Any:
|
|
103
|
+
return self.additional_properties[key]
|
|
104
|
+
|
|
105
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
106
|
+
self.additional_properties[key] = value
|
|
107
|
+
|
|
108
|
+
def __delitem__(self, key: str) -> None:
|
|
109
|
+
del self.additional_properties[key]
|
|
110
|
+
|
|
111
|
+
def __contains__(self, key: str) -> bool:
|
|
112
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,95 @@
|
|
|
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="MaintenanceAnnouncementOfferingTemplateRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class MaintenanceAnnouncementOfferingTemplateRequest:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
maintenance_template (str):
|
|
18
|
+
offering (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: str
|
|
24
|
+
offering: str
|
|
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
|
+
{
|
|
44
|
+
"maintenance_template": maintenance_template,
|
|
45
|
+
"offering": offering,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if impact_level is not UNSET:
|
|
49
|
+
field_dict["impact_level"] = impact_level
|
|
50
|
+
if impact_description is not UNSET:
|
|
51
|
+
field_dict["impact_description"] = impact_description
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
maintenance_template = d.pop("maintenance_template")
|
|
59
|
+
|
|
60
|
+
offering = d.pop("offering")
|
|
61
|
+
|
|
62
|
+
_impact_level = d.pop("impact_level", UNSET)
|
|
63
|
+
impact_level: Union[Unset, ImpactLevelEnum]
|
|
64
|
+
if isinstance(_impact_level, Unset):
|
|
65
|
+
impact_level = UNSET
|
|
66
|
+
else:
|
|
67
|
+
impact_level = ImpactLevelEnum(_impact_level)
|
|
68
|
+
|
|
69
|
+
impact_description = d.pop("impact_description", UNSET)
|
|
70
|
+
|
|
71
|
+
maintenance_announcement_offering_template_request = cls(
|
|
72
|
+
maintenance_template=maintenance_template,
|
|
73
|
+
offering=offering,
|
|
74
|
+
impact_level=impact_level,
|
|
75
|
+
impact_description=impact_description,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
maintenance_announcement_offering_template_request.additional_properties = d
|
|
79
|
+
return maintenance_announcement_offering_template_request
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def additional_keys(self) -> list[str]:
|
|
83
|
+
return list(self.additional_properties.keys())
|
|
84
|
+
|
|
85
|
+
def __getitem__(self, key: str) -> Any:
|
|
86
|
+
return self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
89
|
+
self.additional_properties[key] = value
|
|
90
|
+
|
|
91
|
+
def __delitem__(self, key: str) -> None:
|
|
92
|
+
del self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __contains__(self, key: str) -> bool:
|
|
95
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,113 @@
|
|
|
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="MaintenanceAnnouncementRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class MaintenanceAnnouncementRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
name (str):
|
|
20
|
+
scheduled_start (datetime.datetime): When the maintenance is scheduled to begin
|
|
21
|
+
scheduled_end (datetime.datetime): When the maintenance is scheduled to complete
|
|
22
|
+
service_provider (str): Service provider announcing the maintenance
|
|
23
|
+
message (Union[Unset, str]):
|
|
24
|
+
maintenance_type (Union[Unset, MaintenanceTypeEnum]):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
scheduled_start: datetime.datetime
|
|
29
|
+
scheduled_end: datetime.datetime
|
|
30
|
+
service_provider: str
|
|
31
|
+
message: Union[Unset, str] = UNSET
|
|
32
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum] = 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
|
+
scheduled_start = self.scheduled_start.isoformat()
|
|
39
|
+
|
|
40
|
+
scheduled_end = self.scheduled_end.isoformat()
|
|
41
|
+
|
|
42
|
+
service_provider = self.service_provider
|
|
43
|
+
|
|
44
|
+
message = self.message
|
|
45
|
+
|
|
46
|
+
maintenance_type: Union[Unset, int] = UNSET
|
|
47
|
+
if not isinstance(self.maintenance_type, Unset):
|
|
48
|
+
maintenance_type = self.maintenance_type.value
|
|
49
|
+
|
|
50
|
+
field_dict: dict[str, Any] = {}
|
|
51
|
+
field_dict.update(self.additional_properties)
|
|
52
|
+
field_dict.update(
|
|
53
|
+
{
|
|
54
|
+
"name": name,
|
|
55
|
+
"scheduled_start": scheduled_start,
|
|
56
|
+
"scheduled_end": scheduled_end,
|
|
57
|
+
"service_provider": service_provider,
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
if message is not UNSET:
|
|
61
|
+
field_dict["message"] = message
|
|
62
|
+
if maintenance_type is not UNSET:
|
|
63
|
+
field_dict["maintenance_type"] = maintenance_type
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
d = dict(src_dict)
|
|
70
|
+
name = d.pop("name")
|
|
71
|
+
|
|
72
|
+
scheduled_start = isoparse(d.pop("scheduled_start"))
|
|
73
|
+
|
|
74
|
+
scheduled_end = isoparse(d.pop("scheduled_end"))
|
|
75
|
+
|
|
76
|
+
service_provider = d.pop("service_provider")
|
|
77
|
+
|
|
78
|
+
message = d.pop("message", UNSET)
|
|
79
|
+
|
|
80
|
+
_maintenance_type = d.pop("maintenance_type", UNSET)
|
|
81
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum]
|
|
82
|
+
if isinstance(_maintenance_type, Unset):
|
|
83
|
+
maintenance_type = UNSET
|
|
84
|
+
else:
|
|
85
|
+
maintenance_type = MaintenanceTypeEnum(_maintenance_type)
|
|
86
|
+
|
|
87
|
+
maintenance_announcement_request = cls(
|
|
88
|
+
name=name,
|
|
89
|
+
scheduled_start=scheduled_start,
|
|
90
|
+
scheduled_end=scheduled_end,
|
|
91
|
+
service_provider=service_provider,
|
|
92
|
+
message=message,
|
|
93
|
+
maintenance_type=maintenance_type,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
maintenance_announcement_request.additional_properties = d
|
|
97
|
+
return maintenance_announcement_request
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def additional_keys(self) -> list[str]:
|
|
101
|
+
return list(self.additional_properties.keys())
|
|
102
|
+
|
|
103
|
+
def __getitem__(self, key: str) -> Any:
|
|
104
|
+
return self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
107
|
+
self.additional_properties[key] = value
|
|
108
|
+
|
|
109
|
+
def __delitem__(self, key: str) -> None:
|
|
110
|
+
del self.additional_properties[key]
|
|
111
|
+
|
|
112
|
+
def __contains__(self, key: str) -> bool:
|
|
113
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
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.maintenance_type_enum import MaintenanceTypeEnum
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.maintenance_announcement_offering import MaintenanceAnnouncementOffering
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="MaintenanceAnnouncementTemplate")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class MaintenanceAnnouncementTemplate:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
url (str):
|
|
23
|
+
uuid (UUID):
|
|
24
|
+
name (str):
|
|
25
|
+
service_provider (str): Service provider announcing the maintenance
|
|
26
|
+
affected_offerings (list['MaintenanceAnnouncementOffering']):
|
|
27
|
+
message (Union[Unset, str]):
|
|
28
|
+
maintenance_type (Union[Unset, MaintenanceTypeEnum]):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
url: str
|
|
32
|
+
uuid: UUID
|
|
33
|
+
name: str
|
|
34
|
+
service_provider: str
|
|
35
|
+
affected_offerings: list["MaintenanceAnnouncementOffering"]
|
|
36
|
+
message: Union[Unset, str] = UNSET
|
|
37
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum] = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
url = self.url
|
|
42
|
+
|
|
43
|
+
uuid = str(self.uuid)
|
|
44
|
+
|
|
45
|
+
name = self.name
|
|
46
|
+
|
|
47
|
+
service_provider = self.service_provider
|
|
48
|
+
|
|
49
|
+
affected_offerings = []
|
|
50
|
+
for affected_offerings_item_data in self.affected_offerings:
|
|
51
|
+
affected_offerings_item = affected_offerings_item_data.to_dict()
|
|
52
|
+
affected_offerings.append(affected_offerings_item)
|
|
53
|
+
|
|
54
|
+
message = self.message
|
|
55
|
+
|
|
56
|
+
maintenance_type: Union[Unset, int] = UNSET
|
|
57
|
+
if not isinstance(self.maintenance_type, Unset):
|
|
58
|
+
maintenance_type = self.maintenance_type.value
|
|
59
|
+
|
|
60
|
+
field_dict: dict[str, Any] = {}
|
|
61
|
+
field_dict.update(self.additional_properties)
|
|
62
|
+
field_dict.update(
|
|
63
|
+
{
|
|
64
|
+
"url": url,
|
|
65
|
+
"uuid": uuid,
|
|
66
|
+
"name": name,
|
|
67
|
+
"service_provider": service_provider,
|
|
68
|
+
"affected_offerings": affected_offerings,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
if message is not UNSET:
|
|
72
|
+
field_dict["message"] = message
|
|
73
|
+
if maintenance_type is not UNSET:
|
|
74
|
+
field_dict["maintenance_type"] = maintenance_type
|
|
75
|
+
|
|
76
|
+
return field_dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
80
|
+
from ..models.maintenance_announcement_offering import MaintenanceAnnouncementOffering
|
|
81
|
+
|
|
82
|
+
d = dict(src_dict)
|
|
83
|
+
url = d.pop("url")
|
|
84
|
+
|
|
85
|
+
uuid = UUID(d.pop("uuid"))
|
|
86
|
+
|
|
87
|
+
name = d.pop("name")
|
|
88
|
+
|
|
89
|
+
service_provider = d.pop("service_provider")
|
|
90
|
+
|
|
91
|
+
affected_offerings = []
|
|
92
|
+
_affected_offerings = d.pop("affected_offerings")
|
|
93
|
+
for affected_offerings_item_data in _affected_offerings:
|
|
94
|
+
affected_offerings_item = MaintenanceAnnouncementOffering.from_dict(affected_offerings_item_data)
|
|
95
|
+
|
|
96
|
+
affected_offerings.append(affected_offerings_item)
|
|
97
|
+
|
|
98
|
+
message = d.pop("message", UNSET)
|
|
99
|
+
|
|
100
|
+
_maintenance_type = d.pop("maintenance_type", UNSET)
|
|
101
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum]
|
|
102
|
+
if isinstance(_maintenance_type, Unset):
|
|
103
|
+
maintenance_type = UNSET
|
|
104
|
+
else:
|
|
105
|
+
maintenance_type = MaintenanceTypeEnum(_maintenance_type)
|
|
106
|
+
|
|
107
|
+
maintenance_announcement_template = cls(
|
|
108
|
+
url=url,
|
|
109
|
+
uuid=uuid,
|
|
110
|
+
name=name,
|
|
111
|
+
service_provider=service_provider,
|
|
112
|
+
affected_offerings=affected_offerings,
|
|
113
|
+
message=message,
|
|
114
|
+
maintenance_type=maintenance_type,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
maintenance_announcement_template.additional_properties = d
|
|
118
|
+
return maintenance_announcement_template
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def additional_keys(self) -> list[str]:
|
|
122
|
+
return list(self.additional_properties.keys())
|
|
123
|
+
|
|
124
|
+
def __getitem__(self, key: str) -> Any:
|
|
125
|
+
return self.additional_properties[key]
|
|
126
|
+
|
|
127
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
128
|
+
self.additional_properties[key] = value
|
|
129
|
+
|
|
130
|
+
def __delitem__(self, key: str) -> None:
|
|
131
|
+
del self.additional_properties[key]
|
|
132
|
+
|
|
133
|
+
def __contains__(self, key: str) -> bool:
|
|
134
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,95 @@
|
|
|
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="MaintenanceAnnouncementTemplateRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class MaintenanceAnnouncementTemplateRequest:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
name (str):
|
|
18
|
+
service_provider (str): Service provider announcing the maintenance
|
|
19
|
+
message (Union[Unset, str]):
|
|
20
|
+
maintenance_type (Union[Unset, MaintenanceTypeEnum]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
service_provider: str
|
|
25
|
+
message: Union[Unset, str] = UNSET
|
|
26
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum] = 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
|
+
service_provider = self.service_provider
|
|
33
|
+
|
|
34
|
+
message = self.message
|
|
35
|
+
|
|
36
|
+
maintenance_type: Union[Unset, int] = UNSET
|
|
37
|
+
if not isinstance(self.maintenance_type, Unset):
|
|
38
|
+
maintenance_type = self.maintenance_type.value
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"name": name,
|
|
45
|
+
"service_provider": service_provider,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if message is not UNSET:
|
|
49
|
+
field_dict["message"] = message
|
|
50
|
+
if maintenance_type is not UNSET:
|
|
51
|
+
field_dict["maintenance_type"] = maintenance_type
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
name = d.pop("name")
|
|
59
|
+
|
|
60
|
+
service_provider = d.pop("service_provider")
|
|
61
|
+
|
|
62
|
+
message = d.pop("message", UNSET)
|
|
63
|
+
|
|
64
|
+
_maintenance_type = d.pop("maintenance_type", UNSET)
|
|
65
|
+
maintenance_type: Union[Unset, MaintenanceTypeEnum]
|
|
66
|
+
if isinstance(_maintenance_type, Unset):
|
|
67
|
+
maintenance_type = UNSET
|
|
68
|
+
else:
|
|
69
|
+
maintenance_type = MaintenanceTypeEnum(_maintenance_type)
|
|
70
|
+
|
|
71
|
+
maintenance_announcement_template_request = cls(
|
|
72
|
+
name=name,
|
|
73
|
+
service_provider=service_provider,
|
|
74
|
+
message=message,
|
|
75
|
+
maintenance_type=maintenance_type,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
maintenance_announcement_template_request.additional_properties = d
|
|
79
|
+
return maintenance_announcement_template_request
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def additional_keys(self) -> list[str]:
|
|
83
|
+
return list(self.additional_properties.keys())
|
|
84
|
+
|
|
85
|
+
def __getitem__(self, key: str) -> Any:
|
|
86
|
+
return self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
89
|
+
self.additional_properties[key] = value
|
|
90
|
+
|
|
91
|
+
def __delitem__(self, key: str) -> None:
|
|
92
|
+
del self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __contains__(self, key: str) -> bool:
|
|
95
|
+
return key in self.additional_properties
|
|
@@ -69,7 +69,7 @@ class MergedPluginOptions:
|
|
|
69
69
|
managed_rancher_load_balancer_data_volume_size_gb (Union[Unset, int]):
|
|
70
70
|
managed_rancher_load_balancer_data_volume_type_name (Union[Unset, str]):
|
|
71
71
|
managed_rancher_tenant_max_cpu (Union[Unset, int]): Max number of vCPUs for tenants
|
|
72
|
-
managed_rancher_tenant_max_ram (Union[Unset, int]): Max number of RAM for tenants
|
|
72
|
+
managed_rancher_tenant_max_ram (Union[Unset, int]): Max number of RAM for tenants (GB)
|
|
73
73
|
managed_rancher_tenant_max_disk (Union[Unset, int]): Max size of disk space for tenants (GB)
|
|
74
74
|
account_name_generation_policy (Union[AccountNameGenerationPolicyEnum, None, Unset]): Slurm account name
|
|
75
75
|
generation policy
|
|
@@ -69,7 +69,7 @@ class MergedPluginOptionsRequest:
|
|
|
69
69
|
managed_rancher_load_balancer_data_volume_size_gb (Union[Unset, int]):
|
|
70
70
|
managed_rancher_load_balancer_data_volume_type_name (Union[Unset, str]):
|
|
71
71
|
managed_rancher_tenant_max_cpu (Union[Unset, int]): Max number of vCPUs for tenants
|
|
72
|
-
managed_rancher_tenant_max_ram (Union[Unset, int]): Max number of RAM for tenants
|
|
72
|
+
managed_rancher_tenant_max_ram (Union[Unset, int]): Max number of RAM for tenants (GB)
|
|
73
73
|
managed_rancher_tenant_max_disk (Union[Unset, int]): Max size of disk space for tenants (GB)
|
|
74
74
|
account_name_generation_policy (Union[AccountNameGenerationPolicyEnum, None, Unset]): Slurm account name
|
|
75
75
|
generation policy
|
|
@@ -32,7 +32,7 @@ class OfferingComponent:
|
|
|
32
32
|
max_available_limit (Union[None, Unset, int]):
|
|
33
33
|
is_boolean (Union[Unset, bool]):
|
|
34
34
|
default_limit (Union[None, Unset, int]):
|
|
35
|
-
factor (Union[Unset, int]):
|
|
35
|
+
factor (Union[None, Unset, int]):
|
|
36
36
|
is_builtin (Union[Unset, bool]):
|
|
37
37
|
"""
|
|
38
38
|
|
|
@@ -51,7 +51,7 @@ class OfferingComponent:
|
|
|
51
51
|
max_available_limit: Union[None, Unset, int] = UNSET
|
|
52
52
|
is_boolean: Union[Unset, bool] = UNSET
|
|
53
53
|
default_limit: Union[None, Unset, int] = UNSET
|
|
54
|
-
factor: Union[Unset, int] = UNSET
|
|
54
|
+
factor: Union[None, Unset, int] = UNSET
|
|
55
55
|
is_builtin: Union[Unset, bool] = UNSET
|
|
56
56
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
57
57
|
|
|
@@ -118,7 +118,11 @@ class OfferingComponent:
|
|
|
118
118
|
else:
|
|
119
119
|
default_limit = self.default_limit
|
|
120
120
|
|
|
121
|
-
factor
|
|
121
|
+
factor: Union[None, Unset, int]
|
|
122
|
+
if isinstance(self.factor, Unset):
|
|
123
|
+
factor = UNSET
|
|
124
|
+
else:
|
|
125
|
+
factor = self.factor
|
|
122
126
|
|
|
123
127
|
is_builtin = self.is_builtin
|
|
124
128
|
|
|
@@ -263,7 +267,14 @@ class OfferingComponent:
|
|
|
263
267
|
|
|
264
268
|
default_limit = _parse_default_limit(d.pop("default_limit", UNSET))
|
|
265
269
|
|
|
266
|
-
|
|
270
|
+
def _parse_factor(data: object) -> Union[None, Unset, int]:
|
|
271
|
+
if data is None:
|
|
272
|
+
return data
|
|
273
|
+
if isinstance(data, Unset):
|
|
274
|
+
return data
|
|
275
|
+
return cast(Union[None, Unset, int], data)
|
|
276
|
+
|
|
277
|
+
factor = _parse_factor(d.pop("factor", UNSET))
|
|
267
278
|
|
|
268
279
|
is_builtin = d.pop("is_builtin", UNSET)
|
|
269
280
|
|